ECM analysis and alignment

Figure 1-RAW - Br WT- MTC-1.tif (466.0 KB) Hi everyone,

I am trying to understand how ECM can shape cancer cell morphology and how can engage different modes of invasion. At the moment I am working with masson’s trichrome stainings in breast tissue (Figure 1). Overall, I got QuPath to perform a really nice job segmentating the fibers through superpixel (DoG), later on I add intesity and Haralick features and I finalize creating a classification where I rank the fiber in three scores (low, medium and intense) (Figure 2, and screenshot excel). see attached script as well.
I would like to know how you interpret Haralick:Entropy is it and stablish method for fiber alignment? I seen papers where people uses CT-FIRE software to calcule the angle of the fibers, but I don’t have matlab. Do you know any plugin in FIJI where I can transfer the image with the segmentation and calculate angles of allignment?

script:

setImageType('BRIGHTFIELD_H_DAB');
setColorDeconvolutionStains('{"Name" : "H-DAB default", "Stain 1" : "Hematoxylin", "Values 1" : "0.20263 0.81339 0.54528 ", "Stain 2" : "DAB", "Values 2" : "0.84535 0.49878 0.1913 ", "Background" : " 232 228 225 "}');
runPlugin('qupath.imagej.superpixels.DoGSuperpixelsPlugin', '{"downsampleFactor": 0.5,  "sigmaMicrons": 1.0,  "minThreshold": 10.0,  "maxThreshold": 140.0,  "noiseThreshold": 1.0}');
selectDetections();
runPlugin('qupath.lib.algorithms.IntensityFeaturesPlugin', '{"pixelSizeMicrons": 2.0,  "region": "ROI",  "tileSizeMicrons": 25.0,  "colorOD": false,  "colorStain1": false,  "colorStain2": true,  "colorStain3": false,  "colorRed": false,  "colorGreen": false,  "colorBlue": false,  "colorHue": false,  "colorSaturation": false,  "colorBrightness": false,  "doMean": true,  "doStdDev": true,  "doMinMax": true,  "doMedian": true,  "doHaralick": true,  "haralickDistance": 1,  "haralickBins": 32}');

Best wishes,
Oscar

Figure 2- Br WT- MTC-1.tif (485.8 KB)

1 Like

Hi. Do I understand correct in the script above that you are doing colour deconvolution of a trichrome-stained section using a DAB & Haematoxylin vector??

1 Like

Hi yes, But I preprocessed the staining vectors and the DAB is recognising the colour blue…

How did you exactly “preprocess the staining vectors”?
Normally you need to determine new ones, from singly stained images, not change the existing ones.
By the way, there is already a “Masson trichrome” set of vectors, but it is a good idea to determine your own.

Could you also include your version of QuPath so we better know which options are available to you?

Feret angles can be scripted, but you would have to calculate any “relative” angles yourself from those, I think. I’m not exactly sure how that would work.
https://gist.github.com/Svidro/68dd668af64ad91b2f76022015dd8a45
There are two scripts here:

Alignment of local cells.groovy - check neighborhood for similarly aligned cells

Angles for cells.groovy - Calculate angles relative to horizontal.

where I was looking at finding local alignment of cell objects, which could probably be modified for non-cell objects. It would take some coding though, and I don’t have time right now to look into it.

*I don’t think Haralick entropy will give you what you want since by default it will be within the current object and not between objects. If you want to try to find general alignment, and your objects are sufficiently small, you could try changing the Region from ROI to either a circular or square tile of large enough radius that it starts using information from outside of the original object.
image

And the reason I mention this is that you can fairly easily bypass the entire color vectors issue in 0.2.0M8 with the pixel classifier. Though they shouldn’t be a huge problem in this case since you are just using it for classification.


And yes, I just used ‘tumor’ and ‘stroma’ since they were handy. The classes could be anything.

1 Like

Thank you for your feedback really appreacited. I was using Qupath2.0 m8. I am going to try your suggestions and I’ll keep you all posted.

Best wishes

2 Likes