Posted by
Joachim Wesner on
URL: http://imagej.273.s1.nabble.com/applying-a-binary-as-a-selection-tp3703129p3703133.html
Hi,
I think what he is looking for, expressed in the most general way, would be
the possibilty to:
1) Generate a ROI mask from a binary image (this two-level image created
from any input image, using any algorithm that might create a two level
result)
2) Have the possibilty to apply/copy this mask to another image for use
with any arbitray analysis (The initial image contents in 1) and 2) might
be the same, but need not)
So basically a binary image -> ROI mask plugin, prcatically the opposite of
the "Edit/Selection/Create Mask", which converts a ROI to a black and white
image.
Joachim
Gabriel Landini
<G.Landini@BHAM. An:
[hidden email]
AC.UK> Kopie: (Blindkopie: Joachim Wesner/DEWET/LMSCentral/Leica)
Gesendet von: Thema: Re: applying a binary as a selection
ImageJ Interest
Group
<
[hidden email]
.GOV>
09.04.2006 14:13
Bitte antworten
an ImageJ
Interest Group
On Sunday 09 April 2006 12:23, michael shaffer wrote:
> Pardon my ignorance, but I fail to see how these methods would expose
to
> the binary thresholding ONLY selected pixels. For example, other
softwares
> have demonstrated that simply converting non-selected pixels to black or
> white biases the histogram the thresholding works with(?)
I probably misunderstood what you want to do.
Can you explain a bit better what do you mean by:
> However, I first need to threshold regions that are both darker and
> brighter (step#1, e.g., other phases and surface defects) than what is to
be
> exposed to the binary thresholding (step#2).
Is it "masking"?
I do not think that IJ can do that straight away for thresholding (please
correct me if I am wrong).
You can, however, divide the procedure into:
(assume white is "yes", black is "no")
threshold regions which are darker, save it to an image
threshold regions which are brighter, save it to another image
then:
darker ADD (or OR) brighter = regions which are brighter or darker.
and subtract it from the original image (so you are left with the areas
which
are not-brighter-or-darker, i.e. the non-zero areas)
Now you want to threshold this result. Depending on the histogram method,
you
may have to force the thresholding procedure to ignore the black pixels.
(You
will have to include this in the code yourself).
BTW, this would be a handy option to have in the built-in threshold plugin
(Ignore black, and Ignore white check boxes which just set to 0 the
histo[0]
and histo[255] before submitting the histogram to the thresholding routine.
I hope it helps,
G.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit
http://www.messagelabs.com/email
______________________________________________________________________