int width = retrieve.getPixelsSizeX(series).getValue().intValue();
int height = retrieve.getPixelsSizeY(series).getValue().intValue();
ifd.put(new Integer(IFD.IMAGE_WIDTH), new Long(width));
ifd.put(new Integer(IFD.IMAGE_LENGTH), new Long(height));
PositiveFloat px = retrieve.getPixelsPhysicalSizeX(series);
Double physicalSizeX = px == null ? null : px.getValue();
if (physicalSizeX == null || physicalSizeX.doubleValue() == 0) {
physicalSizeX = 0d;
}
else physicalSizeX = 1d / physicalSizeX;
PositiveFloat py = retrieve.getPixelsPhysicalSizeY(series);
Double physicalSizeY = py == null ? null : py.getValue();
if (physicalSizeY == null || physicalSizeY.doubleValue() == 0) {
physicalSizeY = 0d;
}
else physicalSizeY = 1d / physicalSizeY;