Skip to content, Skip to search

Changes

Sholl Analysis

193 bytes added, 13:10, 20 October 2016
Add a validation step to Python example
if sa.validateImage(imp):
# Specify some output options so.setNoTable(False) so.setNoPlots(False) sa.setDescription(imp.getTitle(), True) sa.setExportPath(exportPath, True) sa.setInteractiveMode(False)
# Specify analysis settings sa.setCenter(xc, yc, zc) sa.setThreshold(lowerT, upperT)
# Retrieve intersection counts counts = sa.analyze3D(xc, yc, zc, distances, imp)
# Do something with sampled dataCheck that analysis was successfull if all(c == 0 for idx, inters c in enumerate(counts): log.infoerror("r=" + str(distances[idx]) +": "+ str(inters) +" intersectionsAll intersection counts were zero")
# Retrieve metricsDo something with sampled data sa for idx, inters in enumerate(counts): log.analyzeProfileinfo("r="+ str(distances, counts, True[idx]) +": "+ str(inters) +" intersections")
# Retrieve metrics sa.analyzeProfile(distances, counts, True)  log.info("Analysis finished. Files saved to "+ exportPath) log.warn("Sholl Results Table has not been saved")
else:
log.error(imp.getTitle() + " is not a valid image")
</source>
Emailconfirmed
1,643
edits