Basic question - segmenting tissue from background

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Basic question - segmenting tissue from background

Mark Matsche
<http://imagej.1557.x6.nabble.com/file/t380219/16wp387_4xs.jpg> Hi,


Hi!

I'm wondering what an efficient method would be to select the "tissue" in
images such as the above so I can make measurements of relative area?  My
searches have so far only turned up examples where the tissue fills the
field of view.  For the tissue and magnification of choice I envision a 2
step process:
1) select tissue in the image from non-tissue
2) perform thresholding and analysis of selected tissues

Manually selecting the tissue is laborious.  I tried thresholding but was
not having any success.  Measuring the stained clusters in the tissue is
pretty easy but most of the images are not going to be filled with tissue
and therefore I need to segment tissue from non-tissue.  Can anyone suggest
some methods I could try?  Please be specific as I'm fairly new to ImageJ:)

Thanks!
fishguy



--
Sent from: http://imagej.1557.x6.nabble.com/

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

Re: Basic question - segmenting tissue from background

Gabriel Landini
Depending on the stain this may work:
1 convert to greyscale (or use colour deconvolution).
2 theshold with some automatic method (your image seems to be segmented well
using the Huang method)
3 "clean" the image by getting rid of snall holes and particles.

Hope it helps

Gabriel




On Wednesday, 23 January 2019 01:12:09 GMT Mark Matsche wrote:

> <http://imagej.1557.x6.nabble.com/file/t380219/16wp387_4xs.jpg> Hi,
>
>
> Hi!
>
> I'm wondering what an efficient method would be to select the "tissue" in
> images such as the above so I can make measurements of relative area?  My
> searches have so far only turned up examples where the tissue fills the
> field of view.  For the tissue and magnification of choice I envision a 2
> step process:
> 1) select tissue in the image from non-tissue
> 2) perform thresholding and analysis of selected tissues
>
> Manually selecting the tissue is laborious.  I tried thresholding but was
> not having any success.  Measuring the stained clusters in the tissue is
> pretty easy but most of the images are not going to be filled with tissue
> and therefore I need to segment tissue from non-tissue.  Can anyone suggest
> some methods I could try?  Please be specific as I'm fairly new to ImageJ:)
>
> Thanks!
> fishguy
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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

Re: Basic question - segmenting tissue from background

gnelson
In reply to this post by Mark Matsche
Hi Fishguy,

The image segments easily, especially on the red channel.  Does this do something like what you want:

selectWindow("16wp387_4xs.jpg");
getTitle();
filename=getTitle();
rename("original");
run("Duplicate...", "title=TissueMask");
run("Split Channels");
selectWindow("TissueMask (red)");
setAutoThreshold("Triangle");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Fill Holes");
run("Analyze Particles...", "size=1000-Infinity add");
selectWindow("original");
rename(filename);
roiManager("Select", 0);
setBackgroundColor(0, 0, 0);
run("Clear Outside");
run("Set Measurements...", "area mean standard perimeter integrated limit display redirect=None decimal=3");
run("Measure");

Once you have the tissue area, if you are interested in the darker spots within it (for example), then you just need to add further refinement for isolating those ROIs or areas from the image- I noticed that other autothresholding methods could do so on the split channel images.  Note that you can quickly try all with the Image->Adjust->Auto Threshold tool.  Also, you asked for basic- I have added lines for renaming the file in here, so that it will work with any image you give it by changing the first line to ask the user to open a file (or put it all in a loop to do an entire directory).

Glyn

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

Macro for ProgRes Microscope Camera

Christian Goosmann-2
Hi

I managed to write a macro that imports multi channel images from our
'Jenoptik' camera (on a fluorescence microscope) that works with
'ProgRes Capture Pro' as user interface. With this software, each
acquisition is saved as a fileset of one TIF per channel in 'parallel'
subfolders. The ImageJ macro makes it easy to collect all the TIFs into
a hyperstack using the subfolders' titles as labels. Definetely nothing
to start a Fiji update site for, but it might make someones life easier,
so I would send the macro code to those interested.

Christian

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

Re: Macro for ProgRes Microscope Camera

Mark Matsche
Glyn,
Thanks for the macro.  This works great for the measurement of total tissue
in fields of view.  I then tried using the blue and green channel images to
threshold the cell clusters of interest.  The green channel image worked
better but when I accepted the threshold it actually segmented the opposite
of what I wnat - everything but the clusters.  See attached image.  Maybe
I'm doing something wrong but I went through the thresholding in the same
way I have done before.  Maybe I need to reopen the original image?  Any
suggestions?

Also, how do I adjust the macro to let me choose a folder and then an image
within the folder?  I would typically have a folder with 40 or so images.

Thanks!

<http://imagej.1557.x6.nabble.com/file/t380219/Screenshot.jpg>



--
Sent from: http://imagej.1557.x6.nabble.com/

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

Re: Basic question - segmenting tissue from background

Mark Matsche
In reply to this post by gnelson
Thanks Glyn,

Much appreciated.  That is certainly an efficient means of getting total
tissue area in an image.  I then tried some thresholding of the images your
macro generated but without success.  I tried different settings but the end
result was the opposite of what I need - thresholding segmented all tissue
BUT the stained cell clusters.  Maybe its because I'm thresholding masks?
Do I need to reopen the original image to do that?  I attached a screenshot
showing what I ended up with.  

Next, I tried finding syntax that would allow me to choose a folder and then
an image within that folder but I couldn't get it to work.  Can you help
with that also?  Sorry, I'm a noob with this stuff:)

<http://imagej.1557.x6.nabble.com/file/t380219/Screenshot.jpg>



--
Sent from: http://imagej.1557.x6.nabble.com/

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

Re: Basic question - segmenting tissue from background

Mark Matsche
I apologize for the duplicate post.  Just figured out why.



--
Sent from: http://imagej.1557.x6.nabble.com/

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