Page 2 of 2

Re: discrepancy between original BMP and converted ome-tif

PostPosted: Fri Nov 19, 2010 8:19 pm
by bhcho
Hi Melissa,

Thank you for your answer.
When I run that code, I also got

MD5 for plane #0 of ./images/ch_00.bmp = d048c3b6f089fc6734f1d1f0ac649b64
MD5 for plane #0 of ./images/ch_oo.ome.tif = d048c3b6f089fc6734f1d1f0ac649b64


which, I think, means the pixel value is the same.
However when I look at the original file, the location of (100,125) looks different.
like attached image, the (100,125) in my original bmp file is in the middle of a white object .
but (100,125) in the converted ome.tif file is exactly the same location where you are pointing in your attached image.
if I point there from my original bmp file, which is (96,125), the value is 127.

This seems like the image is 4 pixels right(or left)-shifted.

This is so strange. do you have any idea?
I'm using imageJ 1.44j. And I set the image>propergies like you said.

One thing is that my original bmp file has 52 bytes header, rather than the usual 54 bytes header.
is there anything related to this?

Best,
BK

Re: discrepancy between original BMP and converted ome-tif

PostPosted: Fri Nov 19, 2010 10:48 pm
by mlinkert
Hi BK,

However when I look at the original file, the location of (100,125) looks different.
like attached image, the (100,125) in my original bmp file is in the middle of a white object .
but (100,125) in the converted ome.tif file is exactly the same location where you are pointing in your attached image.
if I point there from my original bmp file, which is (96,125), the value is 127.

This seems like the image is 4 pixels right(or left)-shifted.

This is so strange. do you have any idea?
I'm using imageJ 1.44j. And I set the image>propergies like you said.


Ah, I understand now. If you open the BMP file using "File > Open" in ImageJ, then ImageJ's built-in BMP reader is what is used to read the file; once I did that, I saw a pixel value of 155 at (100, 125). The image as opened by Bio-Formats was indeed off by 4 pixels, but it should be fixed if you update to the very latest trunk build.

Regards,
-Melissa

Re: discrepancy between original BMP and converted ome-tif

PostPosted: Mon Nov 22, 2010 6:42 pm
by bhcho
Mellisa,

Thanks for telling me the converted ome.tif file is not different with the original bmp file.

The image as opened by Bio-Formats was indeed off by 4 pixels, but it should be fixed if you update to the very latest trunk build.


However, even after I updated the bio-format with the current trunk build in the ImageJ plugin, I still see the same discrepancy. It still looks 4 pixels off.

BK

Re: discrepancy between original BMP and converted ome-tif

PostPosted: Mon Nov 22, 2010 7:32 pm
by mlinkert
Hi BK,

However, even after I updated the bio-format with the current trunk build in the ImageJ plugin, I still see the same discrepancy. It still looks 4 pixels off.


Can you please double-check the version that is installed in ImageJ? If you select "Help > About Plugins > LOCI Plugins" you should see a window with text similar to "LOCI Plugins for ImageJ, revision 7231, built 22 November 2010". The revision number should be greater than or equal to 7224, and the build date should be 19 November 2010 or later.

If the revision number or build date is incorrect, then please try removing all copies of loci_tools.jar from your ImageJ plugins folder and re-installing the trunk build of loci_tools.jar.

Regards,
-Melissa

Re: discrepancy between original BMP and converted ome-tif

PostPosted: Mon Nov 22, 2010 7:38 pm
by bhcho
Melissa,

I double checked and my plugin is
"LOCI Plugins for ImageJ, revision 7231, built 22 November 2010".

the pixel value of the converted ome.tif image at (100,125) is still 127.

BK

Re: discrepancy between original BMP and converted ome-tif

PostPosted: Mon Nov 22, 2010 8:05 pm
by mlinkert
Hi BK,

I double checked and my plugin is
"LOCI Plugins for ImageJ, revision 7231, built 22 November 2010".

the pixel value of the converted ome.tif image at (100,125) is still 127.


Oh, I see. I thought you meant that the BMP files were still off by 4 pixels.

If you converted the file to OME-TIFF before the above-mentioned bug was fixed, then that behavior is expected. The bug fix mentioned above affected the BMP reader (not the OME-TIFF writer or reader), so any OME-TIFF files converted from BMP prior to that fix will still be off by a few pixels. You will need to re-convert any BMP files affected by that fix to OME-TIFF in order to fully solve the problem.

Regards,
-Melissa

Re: discrepancy between original BMP and converted ome-tif

PostPosted: Mon Nov 22, 2010 9:00 pm
by bhcho
Hi Mellisa,


After I update the bio-formats for my java code compiler, now I see the same pixel value in the converted ome.tif image.

Thanks so much,
BK