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
Make it easy to browse example images #989
Comments
That's a splendid idea. This would be perfect as a GSoC warm-up project: @sharky93, @vighneshbirodkar |
I gave this a shot. One way I can think of to do this is parse the docstrings in edit : You can also insert an html directive with image thumbnail and link it to a new tab |
If you write a function to parse dtype and shape from the functions in I'm not familiar with the @vighneshbirodkar Thanks for doing this! |
@cdeil I'll probably put a script in And then a script in |
I meant to implement something like |
A person can already access the members of the data submodule, so I don't think there's a specific need to add a module to list them. What would be good is to add the shapes, which we can do by hand (there are only a few, and those values won't change). What I think would be a good use of time is to add a Javascript gallery that shows all the example images (something like a side-scrolling "film strip" bar). |
@stefanv Can we just add hyperlink to the docstrings (e.g. make some part of https://github.com/scikit-image/scikit-image/blob/master/skimage/data/__init__.py#L68-L73 a hyperlink to https://github.com/scikit-image/scikit-image/blob/master/skimage/data/astronaut.png), or would you prefer to pursue JavaScript solution? |
Part of this issue has been resolved by adding the shape of images to docstrings (#2236), but the gallery part didn't go through, maybe because solutions based on javascript were too complicated. Why not add a gallery example plotting all functions, like the code below? One problem which I can see is that we would require the image to take the whole width of the image, while gallery examples have small thumbnails.
|
Nice code! =) What will we do when we include a 3D image example? =) |
@jni well the code could be improved to be less of an ugly hack if needed. About 3D images, we'll see when we add mayavi as a doc dependency :-) |
@emmanuelle no I really like your uses of inspect! They have inspired me to use it more in my own work. It's so useful! |
@jni Well, do you think it would be easier to plot 3D data using JavaScript? 🙂Same applies for >3D images (e.g. taken from satellite cameras). There is one thing I don't like about the approach of plotting all the data in a dedicated gallery example - the gallery is already quite populated, and it'll be challenging for the users to locate such page. Maybe we should introduce |
@soupault very good points. It could be its own page, linked from "data types and what they mean", for example, or "getting started" directly. I think we are pretty lackadaisical about doc dependencies (vs core dependencies), so we could certainly use ipyvolume or bokeh or something else to render 3D images in a widget. |
The requested functionality has been finalised in #3388, see http://scikit-image.org/docs/dev/auto_examples/index.html -> |
It's very nice that
scikit-image
comes with example images inskimage.data
In my opinion the following two changes would make it easier to browse and use them:
The text was updated successfully, but these errors were encountered: