-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Trouble loading a 6gb tiff extension file with shape (36608, 186496) #5012
Comments
You could uncomment the logging line here to get a bit more info: Lines 2918 to 2922 in 76d0951
|
I tried your suggestion, but I am still getting the same error as above. |
The same error is expected, but should have extra logging output. Did you get no extra output? I guess logging would need enabling, or try this instead: except (SyntaxError, IndexError, TypeError, struct.error) as e:
# Leave disabled by default, spams the logs with image
# opening failures that are entirely expected.
# logger.debug("", exc_info=True)
print(e)
continue It's quite possible it's due to the image size. |
Hi there, img = tifffile.imread(input_com_40)
for c in range(img.shape[2]):
cslice = img[:, :, c]
tifffile.imwrite(str(output_com_40)+f'40X_c{c}.tif', slice) And I am still getting the same error without any further error message.
Please take a look. |
import tifffile # python3.8 -m pip install tifffile
input_com_40 = "01_x40_z0.tif"
output_com_40 = "out_"
img = tifffile.imread(input_com_40)
for c in range(img.shape[2]):
cslice = img[:, :, c]
tifffile.imwrite(str(output_com_40)+f'40X_c{c}.tif', slice) With this, I got this after 3.5 minutes:
It had used up (and then freed) at least 8 GB of disk space in the process. Maybe it ran out of space, I'm a bit low. Another debugging idea, temporarily delete the |
Yeah, I agree with you. To extract that image u need at least 10 GB per image. Process finished with exit code 1 |
The extracted images are in BigTIFF format, which is not supported by Pillow. |
Thanks for checking! Let's close this as a duplicate of #4513. |
Hi there,
I couldn't load 40X magnification wsi image which has a shape = (36608, 186496), size = 6827245568 (6.83GB)). I wish I could upload an image file, but I couldn´t bcoz of file size.
What did you do?
I tried:
1.
I can load file with tifffile package.
Output:
Shown in image.
What are your OS, Python and Pillow versions?
OS: Catalina 10.15..
Python: 3.7
Pillow: 8.0(latest)
I would like to load this image and then wants to compress it with jpeg2000.
Any suggestion will be highly appreciated.
The text was updated successfully, but these errors were encountered: