glencoesoftware / bioformats2raw

Bio-Formats image file format to raw format converter
GNU General Public License v2.0
77 stars 35 forks source link

Conversion problem for the 4th channel #244

Open Portglass opened 6 months ago

Portglass commented 6 months ago

Hello,

I wanted to convert an MRXS file which has 4 channels and is fluorescent to OME.TIFF, I first went through Bioformats2raw to get a ZARR file which seems to have gone well. Then I wanted to convert it to OMETIFF with raw2ometiff and the conversion didn't give any errors. However, when I opened it in the QUPATH software, the 4th channel seemed completely buggy and displayed large red squares. This is not the case when I open the file with the proprietary software for MRXS. Does the problem come from the 4th channel or is there a parameter to add when ordering?

bin\\bioformats2raw "C:\Users\portglass\Desktop\to_convert.mrxs" "C:\Users\portglass\Desktop\raw_image"
bin\\raw2ometiff  "C:\Users\portglass\Desktop\raw_image" "C:\Users\portglass\Desktop\raw_image\pyramid_image.ome.tiff"

test

melissalinkert commented 6 months ago

Thanks for reporting, @Portglass. This would be a problem with the first step of the conversion, so I have transferred this issue from https://github.com/glencoesoftware/raw2ometiff to https://github.com/glencoesoftware/bioformats2raw.

Could you please let us know which specific versions of bioformats2raw and raw2ometiff you used? Would you be able to provide the original .mrxs dataset that shows this problem, either publicly via https://zenodo.org/ or privately by FTP?

Portglass commented 6 months ago

For bioformats2raw, i test it with 0.9.1 and 0.9.2 and for raw2ometiff, i use 0.7.0. Unfortunately, I'm unable to pass on these images because they don't belong to me. I'll see if I can find similar images that I can give you.

Portglass commented 6 months ago

From time to time, when converting my 4-channel file, I get this error.

12:22:54.706 [pool-1-thread-1] ERROR com.glencoesoftware.pyramid.PyramidFromDirectoryWriter -- Failed to write tile in series 0 resolution 0
java.io.FileNotFoundException: E:\portglass\Image\pyramid_image.ome.tiff (The process cannot access the file because it is used by another process)
    at java.io.RandomAccessFile.open0(Native Method)
    at java.io.RandomAccessFile.open(Unknown Source)
    at java.io.RandomAccessFile.<init>(Unknown Source)
    at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:130)
    at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:151)
    at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:165)
    at loci.common.Location.getHandle(Location.java:522)
    at loci.common.Location.getHandle(Location.java:462)
    at loci.common.Location.getHandle(Location.java:443)
    at loci.common.RandomAccessOutputStream.<init>(RandomAccessOutputStream.java:66)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.writeToDisk(PyramidFromDirectoryWriter.java:1743)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.writeTile(PyramidFromDirectoryWriter.java:1713)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.lambda$convertPyramid$0(PyramidFromDirectoryWriter.java:1384)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)