On Mon, Oct 28, 2013 at 6:25 PM, Josh Warner <silvertrumpet999@gmail.com> wrote:
There was some discussion about the save functionality in the original PR. I admit, I advocated to change "File -> Save As" from saving the overlay to saving the actual image the user sees... so feel free to send some blame for the present behavior my way.

There should be an option to add a Save Overlay button which should allow you to grab the overlay specifically. As to your second question: I think you can send data either to a file, or to a buffer which can be read out using `skimage.io.pop`. I've used this before, but my memory is a bit fuzzy on it now. If this isn't currently available for scripting like your hoped-for functionality example, I'm sure it could be implemented.

Thanks for the PR fixing the save dialog if it's RGB!

On Monday, October 28, 2013 2:19:03 AM UTC-5, Juan Nunez-Iglesias wrote:
Hi all, but especially @tonysyu:

I'm using the viewer for the first time to add some interactivity to my work. Please forgive the noobish-ness: I've only ever worked on command-line stuff. (Thanks btw to @tonysyu for his awesome SciPy lightning talk, which inspired me to even dip my toes in this!)

I'm running an RGB image through a bunch of thresholding and morphological operations, and I want to fiddle with the parameters before getting back the filter output. I'm running into the following problems:

1) The file > save as dialog saves a composite image of the overlay and underlying image, where I just want the overlay.
2) The file > save as dialog actually crashes when the underlying image is RGB! (PR forthcoming)
3) But most of all, I don't actually want to save the overlay, I just want to return it to the calling process. How would one go about this? Here's my code now:

v = viewer.ImageViewer(rgbs[0])
v += CentroPlugin()

which works as expected. I'd like something like:

v = viewer.ImageViewer(rgbs[0])
v += CentroPlugin()
overlay = v.show()
Is this possible?

I'm sure this is possible, but I'd have to think a bit about the right way to implement this. Currently, the viewer knows very little about the plugins, and overlays are drawn in a different layer than the image. It's definitely possible to retrieve the overlay from the viewer object, but I'm not sure how to do it cleanly.

That said, I don't know why I didn't think to return an image from the viewer. Thanks for the idea:





You received this message because you are subscribed to the Google Groups "scikit-image" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.