-
Notifications
You must be signed in to change notification settings - Fork 21
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
Image data formats: refactor into one activity per format #720
Comments
In fact, another reason to refactor this is that in python saving in different formats may be less easy and require various dependencies. In Fiji everything is conveniently bundled under |
Hello @tischi, |
Hi @tischi, I agree the activity looks a bit complicated and splitting it up would make it easier to pick out specific parts that you want to teach. Including different microscope formats and how to directly concatenate a movie from a folder would be very useful. As you said splitting the activities by file format will have the benefit that we can pick the specific reader/writer method needed for that type of data so it should be easier. We did something similar for a Napari workshop recently. Just wondering, right now the module appears to serve multiple purposes, which in combination with all different file formats can make it a bit overwhelming (and possibly very large). Would it make sense to split it further into separate consecutive modules or would it fragment the flow too much?
|
So you are proposing to separate opening and inspecting image pixel data and opening and inspecting image metadata into two different modules? I am not sure about this, could you please elaborate a bit more why you think this would be good? Regarding the saving being a different module: I think we all agree (see #719). |
I was just wondering, in part to simplify the module and in part because the concept of metadata feels like it can be a topic of its own, depending on how deep you want to go into it. We recently tested a microscope that saved the metadata separately from the tif output (I actually did not like that at all, what if you lose the metadata file or accidentally move it somewhere else?). But occasionally one might want to read only the metadata. However, I also understand it is convenient to keep it together with opening different image formats since each format has its own metadata structure. |
Good point....I thought didactically it could be good to make the point that the mapping of the binary pixel data into an XYZCT space needs some metadata, e.g. which TIFF plane corresponds to what. If that information is missing or wrong it will be hard to read the data in a meaningful way, at all. But the microscopy settings metadata is a different and indeed something that could be looked at separately. Maybe we could restrict this module to "essential metadata" such as the XYZCT mapping and pixel spatial calibration? And then refer to a future module for microscope related metadata? |
Yes I see your point. Depending on the reader the image may be displayed correctly automatically, but if not, it is helpful to know where to find this information and how to apply it (for which we can refer in part to the spatial calibration module). I think restricting the module to the essential metadata and referring to a separate module that dives into microscopy metadata could work! |
In am still not sure. At least in Fiji, reading the metadata is as easy as checking one box in the Bio-Formats Importer. Thus, teaching how to open it does not present a lot of overhead. Of course, then really digging through all the metadata could take a lot of time, but I don't think we need to do this here. We can just tell the students: "That's how you can access metadata easily, good luck finding there what you need". |
Which image formats should we teach to open? I think it would be important to cover some of the typical complex cases, e.g.
What do you think? Please note that my current plan is to teach "big image data formats" like OME-Zarr and XML/HDF5 in another module, because the need the additional concept of a resolution pyramid. Please also note that there my current plan is to have a whole module about OME-TIFF, which also can be multi-resolution, can contain several images, and as such is quite complex and too much for an overview module, imho. |
I would keep the metadata at a minimum (axis notation and pixel size, Dt). The rest could be addressed in another module if necessary. The rest is often how the image has been acquired (laser power, filters etc.). Didactically the examples you picked are fine. I would have something with tiles too, just the opening. Stitching does not fit here and is a much needed separate module. The fact that we plan now to separate the activities per data format is good (do czi and lif separated). The data format is a little facility/institute specific and depends on what instruments you have. I was not aware the ome-tiff can do pyramids :-) |
I agree those examples are good! With czi / lif / (ndi) it could be nice to explore the different options for splitting channels and/or timepoints using the bioformats importer. For concatenating a movie from a folder containing z-stacks, it might be nice to show the virtual stack option and how to set the hyperstack correctly. |
I think I would also like to add one activity for the ilastik hdf5 format, bc HDF5 in general is important to know. |
Hi, I started the refactoring by implementing an activity to open a CZI image (see above commit). May I ask for your help with the other file formats? It is relatively straightforward, just copy what I did for the CZI format. I don't think we need PRs for this, simply push to master with commit messages referring to this issue (#720), e.g.:
@felixS27 could you please modified this as mentioned in the TODO? @AnniekStok could you be motivated to add activities to open some of the other formats that we agree upon? Regarding the TIFF series: I actually want to change this and not do a movie but EM volume slices, because this is very relevant for EMBL here. |
I now also added a TIFF series activity. @felixS27 could you please look into implementing the corresponding python activity? I do not know whether this could also be done with bioio. If not, maybe tifffile offers something? You could ask on the forum if you do not find anything; I am positive that there should be something... |
Hi, |
@tischi sure, I will do this. Should I then also do this for the other files formats in parallel? |
@tischi I will look into this. |
Yes please, you could also start refactoring and the @AnniekStok could fill in the ImageJ implementations. Thanks!!! |
@tischi I split the open with bioio python activities into open a .tif, .lif, .czi. For the later two, I included to open and inspect both images. I also implemented a script to open the em tiff series. |
@felixS27 can you quickly link the python code? Then I'll have a look |
Maybe quickly how I'm doing it:
|
This is the implementation I was talking about. |
Logically it's the same. Just one question: I've never used the BioImage package, is there a specific reason that you are using it here. Are we using it anywhere else in the teaching materials? |
True. Than I think I can leave it like that :) |
Good enough for me :) I agree that you can leave it like this |
I just added the ImageJ GUI activities for TIF and LIF and also added the reference to the BioImage versions. |
Recent teaching experiences showed that handling such "monster activities" (https://neubias.github.io/training-resources/image_file_formats/index.html#open) can be challenging for trainers, students and maintainers, because
I would therefore like to inquire how you feel about splitting this up into one activity per image data format? A disadvantage could be that if we find general new tricks how to best open such image data we would need to change this in several activities.
ping @manerotoni @k-dominik @AnniekStok
The text was updated successfully, but these errors were encountered: