http://imagej.273.s1.nabble.com/applying-a-binary-as-a-selection-tp3703129p3703135.html
If I understood correctly, you can create a composite ROI Mask as follows:
changed since then.
> Joachim Wesner writes ...
>
> > I think what he is looking for, expressed in the most general
> > way, would be the possibility 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 possibility to apply/copy this mask to another
> > image for use with any arbitrary analysis (The initial image
> > contents in 1) and 2) might be the same, but need not)
> >
> > So basically a binary image -> ROI mask plugin, practically
> > the opposite of the "Edit/Selection/Create Mask", which
> > converts a ROI to a black and white image.
>
> That's pretty much it. I'm a bit surprised this capability isn't in
>ImageJ(?), and was sure I was asking a stupid question. Given the following
>task, let me ask if there isn't a different way ...
>
> Suppose I have an image that contains regions of 6 brightness levels
>(including detector noise). But I am only interested in 2 phases that are
>very close in brightness. Furthermore, a number of bi-level thresholding
>algorithms might work with separating these 2 important phases, so the
>problem is to remove everything else and allow the bi-level thresholding to
>"see" only the pixel values of concern. What is more, I need to process
>many of these images and a macro is therefore necessary.
>
> Am I correct is assuming the thresholding plug-in will work only with
>pixels within a ROI? If so, I then only need a versatile method of creating
>this ROI.
>
> Thanx for your responses ...
>
>michael shaffer :o)
>
> > 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> > ______________________________________________________________________
> >
> > __________ NOD32 1.1478 (20060409) Information __________
> >
> > This message was checked by NOD32 antivirus system.
> >
http://www.eset.com> >
> >