Skip to content, Skip to search


Sholl Analysis

1,438 bytes removed, 15:44, 20 April 2017
Use GitHub template
Advanced options can be set through [ API calls]. Here are some examples:
3D analysis of an image stack (Python):<source lang{{GitHubEmbed|org=tferr|repo="python">#@ImagePlus imp#@LogService log from sholl import Sholl_Analysis, Options as sofrom os.ASA|path import expanduser xc, yc, zc = 100, 100, 10 # x,y,z coordinates of centerlowerT, upperT = 88, 255 # threshold values for segmentationdistances = [10, 20, 30, 40, 50] # sampling radiiexportPath = expanduser("~") # home directory sa = Sholl_Analysis() 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) sascripting-examples/3D_Analysis_ImageStack.setThreshold(lowerT, upperT)  # Retrieve intersection counts counts py|label= sa.analyze3D(xc, yc, zc, distances, imp)  # Check that 3D analysis was successfull if allof an ImageStack (c == 0 for c in counts): log.error("All intersection counts were zero")  # Do something with sampled data for idx, inters in enumerate(counts):"r="+ str(distances[idx]) +": "+ str(inters) +" intersections")  # Retrieve metrics sa.analyzeProfile(distances, counts, True)"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>Display plots without annotations (BeanShell/Groovy):<source lang="java">import sholl.Sholl_Analysis;Sholl_Analysis.setPlotLabels(truePython); // Exclude plot labels</source>}}
Reduce the number of discretization steps involved in the calculation of [[#MeanValueOfFunction|Nav]], and [[#CriticalValue|Cv]], [[#CriticalRadius|Cr]] (IJ macro (IJM) language):