I have a working method to perform RAG thresholding using scikit-image:
from skimage.future import graph original_image = ... # unmodified image segmented_image = ... # result of a segmentation threshold = ... g = graph.rag_mean_color(original_image, segmented_image) thresholded = graph.cut_threshold(segmented_image, g, threshold, in_place=False)
How can I achieve the same effect in ImagePy, using
Process -> Segment -> RAG Threshold? This is what I did so far: open
original_image, make a copy of it, perform the segmentation on it to obtain
segmented_image. Looking into the RagThreshold class, I don’t see how I can use the two opened images
segmented_image to perform the thresholding from the ImagePy GUI.
This specific question has a generalization. Given some opened images in ImagePy, how can I pass them to the ImagePy plugin system?