Replies: 1 comment 1 reply
-
Hi @muell135, to save the image in PNG format, you can set the output_dtype to np.uint8, np.uint16, or None (which will default to the input data's dtype). You can find more details in the code here: For saving the data in TIFF format, you'll need to specify the output_ext accordingly. Hope it helps, thanks. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm in the process of equipping my ML pipeline to accept 3d TIFFs as training data, but I'm running into problems with saving the patches. It seems TIFF doesn't support 32-bit 3d images, but the SaveImage call func does not allow me to specify a different output_dtype for the PILWriter:
writer_obj = writer_cls(**self.init_kwargs)
I tried passing
init_kwargs={'output_dtype': np.int8}
toSaveImage.set_options
, but it it doesn't seem to care since output_dtype has a default value of np.float32 and doesn't look in kwargs for this arguement.Is it even possible to use SaveImage to save 3d TIFFs then?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions