scifio / scifio-ome-xml

SCIFIO plug-in providing support for the OME data model, including readers, writers and translators for OME-XML and OME-TIFF formats.
http://scif.io/
BSD 2-Clause "Simplified" License
2 stars 3 forks source link

OME-TIFFs are state-dependent on legacy Fiji #15

Closed hinerm closed 10 years ago

hinerm commented 10 years ago

Some OME-TIFF datasets (e.g. the tubhiswt4D.ome.tif sample dataset) seem to be dependent on legacy fiji actions to open properly in IJ2/modern mode.

If opened in pure IJ2, or if immediately switching to modern mode and opening, the image is rendered incorrectly (just a bunch of noisy scanlines).

If, however, the dataset is opened first in Legacy mode (via File>Open or the Bio-Formats importer), it will then open correctly when switching to modern mode.

Clearly this linkage of state is undesirable, and it needs to open correctly from pure IJ2.

hinerm commented 10 years ago

This happens because if the dataset is opened in IJ2, available memory (getRuntime().freeMemory()) is < the dataset size so it opens as a cell dataset, which is apparently bugged.

If the dataset is opened in Fiji first, apparently the available memory is increased. So when getRuntime().freeMemory() is checked subsequently, the dataset fits in memory.

Regardless, the correct solution here is to fix the cell loading (it seems to open in alternating 512x16 then 1x1 strips, and the whole dataset is not opened).

hinerm commented 10 years ago

This looks to actually be an issue with PlaneSeparator not opening tiles correctly, as it overwrites the correct lastPlane offsets and lengths.

hinerm commented 10 years ago

OK, this actually is a bug regarding incorrectly assuming checking if a cached plane is contained within a requested sub-region, instead of the other way around - which created lots of problems when loading strips.

Not a SCIFIO-OME-XML issue. closing.

ctrueden commented 10 years ago

Glad you figured it out!