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

Define Dataset fails on tiff Z detection if no header #134

Open
Xqua opened this issue Feb 23, 2018 · 0 comments
Open

Define Dataset fails on tiff Z detection if no header #134

Xqua opened this issue Feb 23, 2018 · 0 comments

Comments

@Xqua
Copy link

Xqua commented Feb 23, 2018

The Define Multiview dataset fails to create a correct dataset if the files do not have the correct headers.

During the dataset creation process, each file is checked, and the TAG values are used instead of the correct number of pages in the tiff file.

Here I have 8 angles, 7 of which I did not touch, and 1 where I resaved it with FIJI.
The tags on each file looks like this (tiffinfo output)

TIFF Directory at offset 0x3c690c80 (1013517440)
  Image Width: 1536 Image Length: 1584
  Resolution: 1, 1 (unitless)
  Bits/Sample: 16
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 2
  Planar Configuration: single image plane
  Software: National Instruments IMAQ   

where the tags after imageJ look like:

TIFF Directory at offset 0x3c5483d8 (1012171736)
  Subfile Type: (0 = 0x0)
  Image Width: 1536 Image Length: 1584
  Resolution: 1, 1 (unitless)
  Bits/Sample: 16
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Samples/Pixel: 1
  Rows/Strip: 1584
  Planar Configuration: single image plane
  ImageDescription: ImageJ=1.51s
images=208
slices=208
unit= 
loop=false
min=9.0
max=180.0

When the Define Dataset runs, it will recheck the z size, detect it correctly THEN it will reset it to 1.

Thu Feb 22 21:54:13 EST 2018: Checking file sizes ... 
Thu Feb 22 21:54:13 EST 2018: Checking z size in file: /Microscopy/JaneliaLightSheet/Bro3/Bro3_TM00236_ANG090.tiff, series 0
Thu Feb 22 21:54:13 EST 2018: Corrected size is 1 (was 228)
Thu Feb 22 21:54:13 EST 2018: Checking z size in file: /Microscopy/JaneliaLightSheet/Bro3/Bro3_TM00236_ANG135.tiff, series 0
Thu Feb 22 21:54:14 EST 2018: Corrected size is 1 (was 208)
Thu Feb 22 21:54:14 EST 2018: Checking z size in file: /Microscopy/JaneliaLightSheet/Bro3/Bro3_TM00236_ANG000.tiff, series 0
Thu Feb 22 21:54:14 EST 2018: Corrected size is 1 (was 267)
Thu Feb 22 21:54:14 EST 2018: Checking z size in file: /Microscopy/JaneliaLightSheet/Bro3/Bro3_TM00236_ANG225.tiff, series 0
Thu Feb 22 21:54:14 EST 2018: Corrected size is 1 (was 267)

=========== HERE IS THE IMAGEJ RESAVED FILE ================

Thu Feb 22 21:54:14 EST 2018: Checking z size in file: 
Microscopy/JaneliaLightSheet/Bro3/Bro3_TM00236_ANG315.tiff, series 0
Thu Feb 22 21:54:14 EST 2018: Corrected size is 208 (was 208)

==========================================================

Thu Feb 22 21:54:14 EST 2018: Checking z size in file: /Microscopy/JaneliaLightSheet/Bro3/Bro3_TM00236_ANG270.tiff, series 0
Thu Feb 22 21:54:14 EST 2018: Corrected size is 1 (was 228)
Thu Feb 22 21:54:14 EST 2018: Checking z size in file: /Microscopy/JaneliaLightSheet/Bro3/Bro3_TM00236_ANG180.tiff, series 0
Thu Feb 22 21:54:14 EST 2018: Corrected size is 1 (was 267)
Thu Feb 22 21:54:14 EST 2018: Checking z size in file: /Microscopy/JaneliaLightSheet/Bro3/Bro3_TM00236_ANG045.tiff, series 0
Thu Feb 22 21:54:14 EST 2018: Corrected size is 1 (was 267)
Thu Feb 22 21:54:14 EST 2018: Finished.

I cannot set the tags on multipage tiff in an efficient manner (I have looked ... exiftool or libtiff only allow for the modification of the FIRST file in multipage tiff, and ... sadly imageJ does not take this into account ...)

I can't set the tiff tags on 12 To of tiffs by opening each one in python (or matlab) and setting them, as the libraries load the whole file in memory -> super long and very high memory usage for no reason

Any chance to correct this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant