On Mon, Jul 2, 2012 at 5:01 PM, alexwatson <
[hidden email]> wrote:
> I'm trying to use imp.setOverlay() to set an overlay onto the image which
> has ROIs in it.
>
> I know it is working because I'm seeing the ROIs and there's no
> NullPointerExceptions.
>
> The problem is that IJ.run(imp, "Enlarge...", "enlarge=10 pixel") is not
> working.
>
Alex,
I'm not completely sure what you're doing without a little more code, but
perhaps you're misunderstanding the setOverlay() method. It can be called
in 3 ways according to the API documentation, and in general adds an
overlay to an image, but does NOT create a selection as I understand it.
The Enlarge... command, however, requires a selection to be active. If I
create an overlay and call Enlarge... I get an error message about a
selection required. However, if I first do an Image | Overlay | To ROI
Manager command (found in the OverlayCommands class if you're writing
code), then grab a selection from the ROI Manager, the Enlarge... command
works for me.
hth,
*Jim Passmore*
Research Associate
Sealed Air Corporation
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html