-
Notifications
You must be signed in to change notification settings - Fork 14
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
Loading a 4D tif #149
Comments
Hi 👋, TIFFs don't have the ability to store 4 dimensions natively so usually TIFF writers will store that information in some non-standard way, e.g. ImageJ writes it into the ImageDescription tag. I purposefully avoided adding this to However, it's hard for us to help you without more information about the TIFF. What program was used to write the TIFF? Can you provide the output of using TiffImages
img = TiffImages.load("your img.tif")
first(ifds(img)) # prints out the tags in the first image plane |
Hi, thanks! I figured it was something like that. I generated the tiff using ImageJ, converting it from a .nd2 file (output from Nikon Elements software) -- unrelated, but if you know of a Julia package for reading in .nd2 files, I would love to know about it. I've considered writing one myself, but taking a look at similar Python libraries, it seems extremely painful. Regardless, I get the following output when I run the code you suggested: first(ifds(timeseries)) = IFD, with tags: |
Ah, ImageJ should write that info into the IMAGEDESCRIPTION tag, what's the output of println(first(ifds(timeseries))[TiffImages.IMAGEDESCRIPTION])
I do not, sorry. I would imagine it would need to look like the wonderful NRRD package by Tim Holy https://github.com/JuliaIO/NRRD.jl |
It's very nondescript: just Tag(IMAGEDESCRIPTION, "ImageJ=1.53t Presumably I need to expand the output somehow? |
Yes, sorry. It should be println(first(ifds(timeseries))[TiffImages.IMAGEDESCRIPTION].data) |
Thanks, yes I was able to get this to work with the following:
|
I am struggling to load a 4D grayscale tif (coordinates would be (y,x,z,t)). When I use the load function, the resulting array is three dimensional, with z and t combined in a single dimension. I can reshape but that requires knowledge of the number of t's or z's beforehand, which is generally impractical. Do I need to use a different library in this case? Thanks!
The text was updated successfully, but these errors were encountered: