Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix disabled file grouping for Micro-Manager and OME-TIFF #1687

Merged
merged 1 commit into from Mar 27, 2015

Conversation

melissalinkert
Copy link
Member

For both formats, if a TIFF file is chosen and file grouping is
disabled, then the file will be treated as a regular TIFF.
Some metadata will be unavailable (as is expected when file grouping is
disabled), but the images will be more quickly accessible.

See http://lists.openmicroscopy.org.uk/pipermail/ome-users/2015-March/005124.html.

I was testing with micromanager/scott/MM_1.4/Pos1 as it's the largest Micro-Manager dataset we have; showinf -nopix -nogroup on one of the TIFF files with this PR should be significantly faster with this PR, and result in only the chosen file being read.

For both formats, if a TIFF file is chosen and file grouping is
disabled, then the file will be treated as a regular TIFF.
Some metadata will be unavailable (as is expected when file grouping is
disabled), but the images will be more quickly accessible.
return isSingleFile(metaFile);
}
catch (Exception e) {
LOGGER.debug("", e);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing debug message?

@ghost
Copy link

ghost commented Mar 26, 2015

The source changes looks OK, I'll test them shortly.

Does the corresponding change want making to the C++ OME-TIFF reader?

@melissalinkert
Copy link
Member Author

Eventually, yes, but it doesn't necessarily need to happen before 5.1.0.

@ghost
Copy link

ghost commented Mar 26, 2015

Looks fine for both micromanager and OME-TIFF. Should they be falling back to the regular TIFF reader? I see it using the micromanager/OME-TIFF reader with grouping disabled in both cases. I thought isThisType would be returning false here and it would fall back to TiffReader.

@melissalinkert
Copy link
Member Author

Yes, it should be using the regular TIFF reader if grouping is disabled. Can you paste the exact command you're using?

@ghost
Copy link

ghost commented Mar 26, 2015

It's using TiffDelegateReader underneath so maybe it's OK. I thought the "Checking file format [...]" would have changed as well though if isThisType was false?

./tools/showinf -nogroup -nopix /ome/data_repo/from_skyking/ome-tiff/ruben/Test_Ruben_001/W0001/P002/Test_Ruben_001--W0001--P002--Z001--C01--T00003.ome.tif 
Checking file format [OME-TIFF]
Initializing reader
TiffDelegateReader initializing /ome/data_repo/from_skyking/ome-tiff/ruben/Test_Ruben_001/W0001/P002/Test_Ruben_001--W0001--P002--Z001--C01--T00003.ome.tif
Reading IFDs
Populating metadata
Checking comment style
Populating OME metadata
Initialization took 1.381s

Reading core metadata
Filename = /ome/data_repo/from_skyking/ome-tiff/ruben/Test_Ruben_001/W0001/P002/Test_Ruben_001--W0001--P002--Z001--C01--T00003.ome.tif
Series count = 1
Series #0 :
        Image count = 1
        RGB = false (1) 
        Interleaved = false
        Indexed = false (false color)
        Width = 1344
        Height = 1024
        SizeZ = 1
        SizeT = 1
        SizeC = 1
        Thumbnail size = 128 x 97
        Endianness = intel (little)
        Dimension order = XYCZT (certain)
        Pixel type = uint16
        Valid bits per pixel = 16
        Metadata complete = true
        Thumbnail series = false
        -----
        Plane #0 <=> Z 0, C 0, T 0


Reading global metadata
BitsPerSample: 16
Compression: LZW
ImageLength: 1024
ImageWidth: 1344
MetaDataPhotometricInterpretation: Monochrome
MetaMorph: no
NumberOfChannels: 1
PhotometricInterpretation: BlackIsZero
Predictor: No prediction scheme
ResolutionUnit: None
SamplesPerPixel: 1
Software: LOCI Bio-Formats
XResolution: 1
YResolution: 1
% ./tools/showinf -nogroup -nopix /ome/data_repo/from_skyking/micromanager/scott/MM_1.4/Pos1/img_000000000_491_000.tif                                
Checking file format [Micro-Manager]
Initializing reader
TiffDelegateReader initializing /ome/data_repo/from_skyking/micromanager/scott/MM_1.4/Pos1/img_000000000_491_000.tif
Reading IFDs
Populating metadata
Checking comment style
Populating OME metadata
Initialization took 1.5s

Reading core metadata
Filename = /ome/data_repo/from_skyking/micromanager/scott/MM_1.4/Pos1/img_000000000_491_000.tif
Series count = 1
Series #0 :
        Image count = 1
        RGB = false (1) 
        Interleaved = false
        Indexed = false (false color)
        Width = 512
        Height = 512
        SizeZ = 1
        SizeT = 1
        SizeC = 1
        Thumbnail size = 128 x 128
        Endianness = motorola (big)
        Dimension order = XYCZT (certain)
        Pixel type = uint16
        Valid bits per pixel = 16
        Metadata complete = true
        Thumbnail series = false
        -----
        Plane #0 <=> Z 0, C 0, T 0


Reading global metadata
BitsPerSample: 16
Compression: Uncompressed
ImageJ: 1.44n
ImageLength: 512
ImageWidth: 512
MetaDataPhotometricInterpretation: Monochrome
MetaMorph: no
NewSubfileType: 0
NumberOfChannels: 1
PhotometricInterpretation: BlackIsZero
SamplesPerPixel: 1
max: 820.0
min: 554.0

@melissalinkert
Copy link
Member Author

OK, that's expected then. The Checking file format line is printed before any of the arguments are applied; in this case, before setGroupFiles(false) is called. The important part is that only one file and plane are present in both cases.

@ghost
Copy link

ghost commented Mar 26, 2015

@melissalinkert OK, in that case it's looking fine and good to merge.

melissalinkert added a commit that referenced this pull request Mar 27, 2015
Fix disabled file grouping for Micro-Manager and OME-TIFF
@melissalinkert melissalinkert merged commit 44a67dc into ome:develop Mar 27, 2015
@melissalinkert
Copy link
Member Author

--no-rebase

@sbesson sbesson added this to the 5.1.0 milestone Apr 2, 2015
@melissalinkert melissalinkert deleted the micromanager-nogroup branch April 13, 2015 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants