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

add TIFF writer #99

Open
rachel-banks opened this issue Mar 27, 2023 · 8 comments
Open

add TIFF writer #99

rachel-banks opened this issue Mar 27, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@rachel-banks
Copy link

It would be great to have a writer for tiff files that preserves as much metadata as possible, that can be read by ImageJ. We use single channel z-stack TIFF files for segmentation with Cellpose. It would be useful if users could also open the images in ImageJ and see properties like the channel name, pixel size, and z step.

I think a useful folder structure would be:
dataset > position > channel_name_t_idx.tiff

@ziw-liu
Copy link
Collaborator

ziw-liu commented Apr 5, 2023

During an offline meeting @Soorya19Pradeep pointed out that CellPose takes TIFF files as input but does not require any metadata. @rachel-banks can you elaborate on why you need ImageJ metadata for this intermediate step? Also, are you expecting a python API or CLI for this writer?

@ziw-liu ziw-liu added the enhancement New feature or request label Apr 5, 2023
@mattersoflight
Copy link
Collaborator

@ziw-liu @rachel-banks I think that we need just enough metadata so that ImageJ readers (the built-in hyperstack reader and BioFormats reader) can load the ND data in the correct order.

@rachel-banks
Copy link
Author

As long as the ImageJ readers can load the data in the correct order, it is fine. It would be nice to have the metadata for someone (maybe an RA or scientist) working with the images to be able to easily access the metadata, without having to go to the zarr store.

@ziw-liu
Copy link
Collaborator

ziw-liu commented Apr 11, 2023

It would be nice to have the metadata for someone (maybe an RA or scientist) working with the images to be able to easily access the metadata, without having to go to the zarr store.

Can you elaborate on what are these metadata and where are they extracted from?

@JoOkuma
Copy link
Member

JoOkuma commented Apr 12, 2023

My impression is that cellpose is not propagating the metadata to the output labels, is that correct @rachel-banks?

CZI is working on a metadata plugin for napari, so there should be an interface for it soon.

@rachel-banks
Copy link
Author

@ziw-liu metadata such as pixel size, z step, and channel name, they should all be in the micro-manager metadata

@JoOkuma that's correct

@ziw-liu
Copy link
Collaborator

ziw-liu commented Apr 12, 2023

@ziw-liu metadata such as pixel size, z step, and channel name, they should all be in the micro-manager metadata

The Zarr stores written by iohub always have the channel name and their display color. Z-step are also written if it's converted from a MM dataset. Currently only NDTIFF conversion writes pixel sizes, but we plan to support that for OME-TIFF as well (#103). These will show up in napari as layer names or layer metadata (if using the plugin @JoOkuma mentioned).

Given that these properties are accessible from a GUI, I think we can avoid data duplication and fragmentation (the purpose of iohub) by helping the users view them in napari instead of ImageJ, and keeping the intermediate TIFFs minimal just for CellPose.

@JoOkuma
Copy link
Member

JoOkuma commented Apr 12, 2023

So it might be the case of contributing to cellpose so the metadata is propagated or writing a custom processing script and propagating the metadata yourself there.

@ziw-liu ziw-liu mentioned this issue May 31, 2023
5 tasks
@ziw-liu ziw-liu mentioned this issue Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants