Hello,
Using version v0.2.3, I am trying to calculate the distance of every detected cell to the annotation boundary (of class “Tumor”). I execute the following script for cell detection and distance measurement and it runs without any errors or warnings. However, for every cell the “Distance to annotation with Tumor” measurement turns out to be zero.
setImageType('BRIGHTFIELD_OTHER');
clearDetections();
selectAnnotations()
// Stain vectors adjusted to include purple chromogen
setColorDeconvolutionStains('{"Name" : "VIP chromogen", "Stain 1" : "Hematoxylin", "Values 1" : "0.663 0.677 0.32 ", "Stain 2" : "Purple", "Values 2" : "0.547 0.735 0.402 ", "Stain 3" : "DAB", "Values 3" : "0.468 0.615 0.634 ", "Background" : " 255 255 255 "}');
//Positive cell detection
runPlugin('qupath.imagej.detect.cells.PositiveCellDetection', '{"detectionImageBrightfield": "Optical density sum", "requestedPixelSizeMicrons": 0.5, "backgroundRadiusMicrons": 8.0, "medianRadiusMicrons": 0.0, "sigmaMicrons": 1.5, "minAreaMicrons": 25.0, "maxAreaMicrons": 400.0, "threshold": 0.1, "maxBackground": 10.0, "watershedPostProcess": true, "cellExpansionMicrons": 3.0, "includeNuclei": true, "smoothBoundaries": true, "makeMeasurements": true, "thresholdCompartment": "Nucleus: Purple OD mean", "thresholdPositive1": 0.32, "thresholdPositive2": 0.4, "thresholdPositive3": 0.6000000000000001, "singleThreshold": true}');
//selectObjectsByClassification("Tumor")
detectionToAnnotationDistances(true)
Am I doing something wrong here? Do I need to call another function/method before calling detectionToAnnotationDistance(true)
?
I also tried to modify and run the newer script for calculating the cell distance to annotations for TMAs and I get the same result.
I am guessing its something very trivial… but can’t figure it out.
Any suggestions is greatly appreciated.