Login  Register

Re: Threshold Colour - select/macro question

Posted by Gabriel Landini on Oct 16, 2012; 8:44am
URL: http://imagej.273.s1.nabble.com/Threshold-Colour-select-macro-question-tp5000412p5000413.html

On Tuesday 16 Oct 2012 00:42:25 you wrote:

> Dear Esteemed List,
>
> I'd like to create a macro that will select an ROI based on the Hue range I
> define in order to subsequently delete those regions/values from my
> histological RGB images.  Using Landini's Threshold Colour Plugin, I set my
> hue, saturation and brightness settings, press "Select" in the Threshold
> Colour dialogue, and press "Macro" in the Threshold Colour dialogue in order
> to generate the code in the recorder (see below).  I subsequently hit the
> delete key on my keyboard to delete my selection (this adds run("Clear",
> "slice"); to my macro recorder).
>
> THE PROBLEM: When I run this macro, it stalls immediately prior to the
>
> run("Clear", "slice");
>
> line and gives an error that indicates that the "Clear" command requires a
> selection.

The Macro button on that plugin only records a macro that binarises the image
according to the slider and checkbox settings. It is unaware of the status of
the other buttons.

It can't record everything that could potentially be done through the GUI.

If you want to make the thresholded areas zero, maybe you could subtract the
binarised result from the original.

Or you could create a selection on the binary image and transfer it to the
original via the Restore Selection command and the clear it.

Regards

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html