-
Notifications
You must be signed in to change notification settings - Fork 155
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
imagej=True argument eats dimensions and complicates interpretation #66
Comments
Hello, this is a duplicate of #19. Please see the discussion there. I am trying to find a way to preserve singlet dimensions with an optional keyword (in imread) that works with ImageJ, LSM, OME-TIFF... |
Ah okay, thanks for getting back quickly. Yes a keyword argument for imread that supports singlet dimensions could work. It's kind of a deal breaker for my setup right now so I'd be very excited for a solution . Thanks for working on this! |
Hi @amsikking, would the import numpy as np
from tifffile import imread, imwrite
def imwrite_imread(data):
print('in :', data.shape)
imwrite('data.tif', data, imagej=True)
data_out = imread('data.tif', squeeze=False)
print('out:', data_out.shape)
return data_out
data_1 = np.random.randint(0, 2**8, (1, 10, 1, 248, 260), 'uint8')
data_2 = np.random.randint(0, 2**8, (10, 1, 1, 248, 260), 'uint8')
imwrite_imread(data_1)
imwrite_imread(data_2)
|
(apologies in advance if these are silly questions, my knowledge of tiff's is very shallow so I'm just approaching this from a 'user' viewpoint!) |
|
Closed in v2021.2.26. |
Hi there,
I've really enjoyed using tifffile for my microscope - thank you!
I often deal with data in a 'tzcyx' format and want to save with imagej=True. I've noticed a behavior that's tricky for me to deal with and I'm wondering if there's an easy fix to keep all dimensions?
Example script:
Output:
The text was updated successfully, but these errors were encountered: