I try to do tissue segmentation

I want to count positive cells on a specific zone(eg. tumour zone).So I have chosen a protein marker that can specifically expression on that zone.But I don’t know how to do tissue segmentation.I tried ‘ilastik’(pixel classification module),But it looks like that:

What I reallllly want is like that:

I realllllllllllllly hope someone can give me some suggestion. Maybe there are some other softwares or methods I can use. Thank you!!!

Good day,

please post typical unprocessed images in the original TIF- or PNG-format, otherwise we can’t help you!

Regards

Herbie

This is the original photo.

Thank you!!!

Thanks for posting the image!

I’ve successfully downloaded the TIF-version and shall have a closer look at it.
(BTW never ever use JPG-compressed images for scientfic tasks because JPG-compression causes artifacts that can’t be removed. Of course, converting a JPG-compressed image to TIFF- or PNG-format doesn’t make sense.)

Regards

Herbie

Is this OK for you?

result

Herbie

Thank you so much!
I am a beginner.I am stuck in this problem once I try it…==
Look forward for you replying!!

yes!!!this is what i want !
how to do this!?

Here is an ImageJ-macro that should do what you need (revised!):

// imagej-macro "cellClusters" (Herbie G., 23. Dec. 2018)
requires( "1.52i" );
setBackgroundColor(0, 0, 0);
setOption("BlackBackground", true);
img=getImageID();
setBatchMode(true);
run("Duplicate...", "title=temp");
run("Split Channels");
run("Gaussian Blur...", "sigma=16");
setAutoThreshold("Intermodes");
run("Convert to Mask");
run("Analyze Particles...", "size=5000-Infinity exclude add");
if (roiManager("count")>1) {
   roiManager("combine");
   roiManager("Add");
}
roiManager("select", roiManager("count")-1 );
run("Fill Holes");
run("Clear Outside");
selectImage(img);
run("Restore Selection");
run("Add Selection...");
run("Select None");
setBatchMode(false);
exit();
// imagej-macro "cellClusters" (Herbie G., 23. Dec. 2018)

Paste the above macro code to an empty macro window (Plugins >> New >> Macro) and run it with an image open in ImageJ.

  1. Considered is only the Blue-channel of the RGB-image.
  2. To make neighbouring cells fuse, this channel is lowpass-filtered by a Gauss-filter with a sigma of 16 pixels radius.
  3. The filtered channel is then binarized by Automatic Thresholding according to scheme “Intermodes”.
  4. Clusters are defined by continuous regions of the binarized image that contain more than 5000 white pixels.

A larger sigma than 16 will result in less detailed countours, a smaller one may not catch all cells of a cluster.

Please note that if there are more clusters in an image, the macro will separately draw contours to all of them like in this example:

If you use this macro for work that finds its way to a report, thesis or publication, then you are to mention that you’ve received help!

HTH

Herbie

2 Likes

:ok_hand:
Thank you so much!!

hello, Herbie!!
I have one more question about how to save photo with the ROIs’ outlines.
I try selecting all the ROIs and then save the photo.But it turned out to be the original photo without outlines.
Could you help me?
Look forward to your replying!!
Thank you so much!

My macro saves the outlines as overlays and those are only kept either by saving the image in TIF-format ot if you flatten the overlay before saving.

Please make sure you understand the overlay functionality of ImageJ (see the User Guide).

Regards

Herbie

1 Like

Thank you!!!:smile: