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

Create "Advanced" tutorials #1

Open
hinerm opened this issue Feb 3, 2014 · 7 comments
Open

Create "Advanced" tutorials #1

hinerm opened this issue Feb 3, 2014 · 7 comments
Milestone

Comments

@hinerm
Copy link
Member

hinerm commented Feb 3, 2014

Would be nice to create some tutorials to highlight the features of SCIFIO that stand out, e.g. compared to Bio-Formats.

Some ideas for this series of tutorials:

  • Modifying reader behavior via filters
  • Configuration through high-level API via SCIFIOConfig
  • Opening a large dataset and manipulating the planes, using caching
@ctrueden
Copy link
Member

ctrueden commented Feb 3, 2014

All of those are good ideas. The first two bullets are fundamentally impossible with the previous Bio-Formats architecture. And the third bullet (integration with ImgLib2) is particularly awesome, especially for large datasets.

Another thing to highlight is metadata translation. You could show the difference using code side-by-side for a "minimal" format implementation. In SCIFIO the code is clearer because various parts of the format handling are separated. And more crucially, SCIFIO's destination data model is pluggable as opposed to Bio-Formats which is hardcoded to OME-XML. It would be great to show that SCIFIO can translate to multiple destination metadata formats. This could be as simple as translating from PFF A's field foo to PFF B's field bar, without needing an intermediary standard, by implementing a simple Translator for it.

@ctrueden
Copy link
Member

ctrueden commented Feb 7, 2014

Upon further reflection, I don't think the "opening a large dataset...using caching" is advanced. On the contrary, I think this is the most basic tutorial that demonstrates how to use the very high level API (ImgOpener) to operate on images in a container- and type-agnostic way. This feature needs to be front and center in the tutorials. The tutorials at the moment imply that you still have to open each plane individually, which is definitely not the case anymore.

@ctrueden
Copy link
Member

ctrueden commented Feb 7, 2014

Another tutorial I really want to see is "parsing metadata, and then reusing it when opening pixels." I think the API for this could use a little streamlining, actually. It is not dirt simple enough yet to go from a Metadata to a Reader wrapping that Metadata. (Or from a Metadata to a SCIFIOImgPlus, either.)

@jaywarrick
Copy link

Related to these comments. I would love to open an nd2 file and work with planes of data. It seems like the Plane objects from a Reader would be nice but I haven't figured out a way to use them to save the individual planes as a specific image (of a possibly new desired type) separate from the original image (i.e., not as a multidimensional image file but individual images for individual planes), or how to take a Plane object and turn it into something viewable (didn't have much success using getBytes() because my image is 16 bits and not savvy enough to do the byte manipulations to turn it into short[]). I'm working with nd2 images so I use the tutorial method slightly modified to allow opening of the image to match a format.

final Reader reader = scifio.initializer().initializeReader(sampleImage, new SCIFIOConfig().checkerSetOpen(true));

I can then use the iteration method to go through images and planes as I want or create a SCIFIOImgPlus with...

List<SCIFIOImgPlus<ShortType>> imgs = IO.openImgs(reader, new ShortType(), new SCIFIOConfig().checkerSetOpen(true));

But the resultant list is a single multidimensional SCIFIOImgPlus which at least seems quite bulky (~2GB) in my test case but I'm not particularly savvy yet with these things yet. However, at least I can view what I have with ImageJ.ui().show(SCIFIOImgPlus). Moreso, I'm interested in seeing what the plane I have looks like.

The reason I would like to stay with using/converting Planes is that the API was simple for getting to a plane and I have metadata that refers directly to those planes. I'm not sure yet how to get planes from SCIFIOImgPlus objects yet and I'm not sure how they relate to planes in SCIFIO (same?) I would definitely be open to suggestions. It seems like I should be able to do everything I want within SCIFIO but struggling a bit. If you get me going in the right direction, I can supply a MWE as a tutorial for you guys.

As always, you guys rock. Thanks for you help.

@dscho
Copy link

dscho commented Sep 3, 2014

Another tutorial I really want to see is "parsing metadata, and then reusing it when opening pixels." I think the API for this could use a little streamlining, actually. It is not dirt simple enough yet to go from a Metadata to a Reader wrapping that Metadata.

@ctrueden I think this should be prioritized. I'll need it myself for some OpenSPIM-related work.

@hinerm
Copy link
Member Author

hinerm commented Sep 4, 2014

didn't have much success using getBytes() because my image is 16 bits and not savvy enough to do the byte manipulations to turn it into short[]

There are methods to do this conversion already in (DataTools)[https://github.com/scifio/scifio/blob/master/src/main/java/io/scif/common/DataTools.java].

Maybe we should also have a "Tools" or "Utils" tutorial since highlighting these types of methods...?

@jaywarrick
Copy link

Great. Thanks!!! That really helps.

On Sep 4, 2014, at 2:52 PM, Mark Hiner [email protected] wrote:

didn't have much success using getBytes() because my image is 16 bits and not savvy enough to do the byte manipulations to turn it into short[]

There are methods to do this conversion already in (DataTools)[https://github.com/scifio/scifio/blob/master/src/main/java/io/scif/common/DataTools.java].

Maybe we should also have a "Tools" or "Utils" tutorial since highlighting these types of methods...?


Reply to this email directly or view it on GitHub.

@hinerm hinerm added this to the m1 milestone Mar 23, 2015
@hinerm hinerm self-assigned this Mar 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants