We're Hiring!

discrepancy between original BMP and converted ome-tif

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Re: discrepancy between original BMP and converted ome-tif

Postby bhcho » Fri Nov 19, 2010 8:19 pm

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
Attachments
snapshot_ch_00_001.bmp.png
snapshot_ch_00_001.bmp.png (11.79 KiB) Viewed 2792 times
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: discrepancy between original BMP and converted ome-tif

Postby mlinkert » Fri Nov 19, 2010 10:48 pm

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
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: discrepancy between original BMP and converted ome-tif

Postby bhcho » Mon Nov 22, 2010 6:42 pm

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
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: discrepancy between original BMP and converted ome-tif

Postby mlinkert » Mon Nov 22, 2010 7:32 pm

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
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: discrepancy between original BMP and converted ome-tif

Postby bhcho » Mon Nov 22, 2010 7:38 pm

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
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: discrepancy between original BMP and converted ome-tif

Postby mlinkert » Mon Nov 22, 2010 8:05 pm

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
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: discrepancy between original BMP and converted ome-tif

Postby bhcho » Mon Nov 22, 2010 9:00 pm

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
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Previous

Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest