Hi, I have some problems when I was trying to quantify the cells labeled by two channels at the same time. Here's my script below:
print("Start processing ...")
setImageType('FLUORESCENCE')
runPlugin('qupath.imagej.detect.nuclei.WatershedCellDetection', '{"detectionImageFluorescence": 1, "backgroundRadius": 15.0, "medianRadius": 0.0, "sigma": 3.0, "minArea": 10.0, "maxArea": 1000.0, "threshold": 15.0, "watershedPostProcess": true, "cellExpansion": 0.0, "includeNuclei": true, "smoothBoundaries": true, "makeMeasurements": true}')
runPlugin('qupath.imagej.detect.nuclei.WatershedCellDetection', '{"detectionImageFluorescence": 2, "backgroundRadius": 15.0, "medianRadius": 0.0, "sigma": 3.0, "minArea": 10.0, "maxArea": 1000.0, "threshold": 15.0, "watershedPostProcess": true, "cellExpansion": 0.0, "includeNuclei": true, "smoothBoundaries": true, "makeMeasurements": true}')
positive = getPathClass('Positive')
negative = getPathClass('Negative')
int positive_count = 0
int negative_count = 0
int total = 0
for (cell in getCellObjects()) {
ch1 = measurement(cell, 'Cell: Channel 1 mean')
ch2 = measurement(cell, 'Cell: Channel 2 mean')
if (ch1 > 25 && ch2 > 25) {
positive_count += 1
cell.setPathClass(positive)
} else {
negative_count += 1
cell.setPathClass(negative)
}
total += 1
}
fireHierarchyUpdate()
print("Positive cell count: " + positive_count)
print("Negative cell count: " + negative_count)
print("Total cell count: " + total)
print("Done!")
The output once fit the real situation. But then the output is all 0. Here's the output below:
INFO:
qupath.imagej.detect.nuclei.WatershedCellDetection {"detectionImageFluorescence": 2, "backgroundRadius": 15.0, "medianRadius": 0.0, "sigma": 3.0, "minArea": 10.0, "maxArea": 1000.0, "threshold": 15.0, "watershedPostProcess": true, "cellExpansion": 0.0, "includeNuclei": true, "smoothBoundaries": true, "makeMeasurements": true}
INFO: Positive cell count: 0
INFO: Negative cell count: 0
INFO: Total cell count: 0
INFO: Done!
INFO: Start processing ...
INFO: 376 nuclei detected (processing time: 0.34 seconds)
INFO: Processing complete in 0.35 seconds
INFO: Completed!
INFO:
qupath.imagej.detect.nuclei.WatershedCellDetection {"detectionImageFluorescence": 1, "backgroundRadius": 15.0, "medianRadius": 0.0, "sigma": 3.0, "minArea": 10.0, "maxArea": 1000.0, "threshold": 15.0, "watershedPostProcess": true, "cellExpansion": 0.0, "includeNuclei": true, "smoothBoundaries": true, "makeMeasurements": true}
INFO: 1207 nuclei detected (processing time: 0.43 seconds)
INFO: Processing complete in 0.44 seconds
INFO: Completed!
INFO:
qupath.imagej.detect.nuclei.WatershedCellDetection {"detectionImageFluorescence": 2, "backgroundRadius": 15.0, "medianRadius": 0.0, "sigma": 3.0, "minArea": 10.0, "maxArea": 1000.0, "threshold": 15.0, "watershedPostProcess": true, "cellExpansion": 0.0, "includeNuclei": true, "smoothBoundaries": true, "makeMeasurements": true}
INFO: Positive cell count: 0
INFO: Negative cell count: 0
INFO: Total cell count: 0
INFO: Done!
It seems that Qupath can still identify cells in different channels still, but somehow it just can't quantify the number of the cells labeled by two channels.
Can you tell me what's going on? Thanks!
Sincerely,
Fuhan