Create ROI by automatically wrapping low spatial moment areas

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Create ROI by automatically wrapping low spatial moment areas

Giuseppe Lucarelli
Hi guys,

Thanks in advance for your help on this topic.

I am analyzing ratiometric images of cells that have high ratios (pixel intensity) inside the cytosol. The ratio image is a 32bit image made with the Ratio Plus plugin on large fields of view.

I have ROIs for each cell and I can crop a cell of interest to design the macro which I would like to run on the whole image.


So, what am I trying to do?

I need to create a new ROI which outlines the area with high ratios and save it so that for each cell I have an ROI for the whole cell and for the "inner cytosol".

The approach I am using so far is to first find the maxima, then expand the point and measure its spatial momentum to find the region in the middle. This works OK but the area that this macro outlines is round and includes pixels with a low ratio which I don't want.

Here is the code:

run("Find Maxima...", "noise=3.50 output=[Point Selection]");
run("Enlarge...", "enlarge=2");
run("Fit Circle");
roiManager("Add");
do {
        roiManager("Select", 0);
        roiManager("Measure");
        kurt0 = getResult("Kurt");
        run("Enlarge...", "enlarge=1");
        run("Fit Circle");
        roiManager("Add");
        roiManager("Select", 1);
        roiManager("Measure");
        mean = getResult("Mean");
        kurt1 = getResult("Kurt");
        roiManager("Select", 0);
        roiManager("Delete");
} while (mean > 4 && kurt0 > kurt1);


Any suggestion on how to outline the area with a value > x

Thanks,

Giuseppe Lucarelli
PhD student dep. Biochemistry
Monash University Australia
Reply | Threaded
Open this post in threaded view
|

Re: Create ROI by automatically wrapping low spatial moment areas

dscho
Hi Giuseppe,

On Mon, 23 Jun 2014, giuseppe3 wrote:

> I need to create a new ROI which outlines the area with high ratios and
> save it so that for each cell I have an ROI for the whole cell and for
> the "inner cytosol".

What you typically do in such a case is to duplicate the original, set a
threshold and create a selection, then close the duplicate and restore the
selection.

If you need the new selection only inside another ROI, you have to do the
following steps instead of creating the selection from the threshold:
create a binary from the threshold, then duplicate the original once more,
apply the ROI, create a mask, and then perform the AND operation on both
masks via the Image Calculator.

Good luck,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Create ROI by automatically wrapping low spatial moment areas

Giuseppe Lucarelli
Thanks Johannes, I will try your suggestion.

Also I thought of using the wand tool to select the area by finding the maxima first, then set the tolerance for the wand depending on how the value of the maxima.

This may work better but I need to find out how to count the number of maxima per ROI (cell) and go through each of them and apply the wand tool.

What do you think?

Also I am not 100% sure on what steps I need to make after reading your comment:

> If you need the new selection only inside another ROI, you have to do the
> following steps instead of creating the selection from the threshold:
> create a binary from the threshold, then duplicate the original once more,
> apply the ROI, create a mask, and then perform the AND operation on both
> masks via the Image Calculator.

Thanks,

Giuseppe
Reply | Threaded
Open this post in threaded view
|

Re: Create ROI by automatically wrapping low spatial moment areas

Giuseppe Lucarelli
Thanks a lot Johannes!!

The method you suggested works fine!

I am now looking at modifying the Find Maxima plugin so that it give less weight to how close two maxima are in a ROI. Any idea on how to do this?

Thanks