Reputation: 476
I would like to open a grey-scale image or stack of images in ImageJ and convert them from 8 bit JPEG's to 32 bit floating point TIFF images. I have already done this using the following:
file->open->(selected image)->image->type->32-bit->file->Save as->TIFF
So my question is if this is the correct way to save an 8 bit JPEG as a 32 bit floating point TIFF because the digital gray values remained the same, between 0 and 255, and I expected them to change to a number between 0 and 2^32.
Thanks for any help.
Upvotes: 1
Views: 1241
Reputation: 6982
Converting between types in ImageJ does not, in general, change the intensity values. If you want to rescale them as well, you'll have to run an additional plugin such as Process > Math > Multiply...
Also, note that 32-bit floating point does not run linearly from 0 to 2^32, but rather is a sort of scientific notation with a mantissa and exponent. 32-bit float values range from approximately -3.4028235 x 10^38 to 3.4028235 x 10^38 (the Float.MAX_VALUE
constant), but with a distribution much denser near 1 and -1 than around numbers farther from 0. See the Wikipedia article on IEEE floating point for further details. These facts are relevant here because you may run into some substantial rounding errors if you try to scale up 8-bit data into a much larger numeric range.
If you want to automate the conversion, you can use the Macro Recorder tool to build up a macro that can be executed in a loop on all your images.
Upvotes: 3