Skip to content

Commit 93bc31f

Browse files
committed
Update scripts w/ references to old SkeletonConverter
1 parent 427b55c commit 93bc31f

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎src/main/resources/script_templates/Neuroanatomy/Boilerplate/PY.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
from sc.fiji.snt import Path, PathAndFillManager, SNT, SNTUI, Tree
1818
from sc.fiji.snt.analysis import GroupedTreeStatistics, MultiTreeStatistics, NodeStatistics, TreeStatistics,\
1919
ConvexHullAnalyzer, PersistenceAnalyzer, ShollAnalyzer, StrahlerAnalyzer, NodeColorMapper,\
20-
TreeColorMapper, PathProfiler, PathStraightener, RoiConverter, SkeletonConverter, SNTChart, SNTTable
20+
TreeColorMapper, PathProfiler, PathStraightener, RoiConverter, SNTChart, SNTTable
21+
from sc.fiji.snt.tracing.auto import BinaryTracer
2122
from sc.fiji.snt.analysis.graph import DirectedWeightedGraph
2223
from sc.fiji.snt.analysis.sholl.parsers import TreeParser
2324
from sc.fiji.snt.annotation import AllenCompartment, AllenUtils, VFBUtils, ZBAtlasUtils

‎src/main/resources/script_templates/Neuroanatomy/Skeletons_and_ROIs/Reconstruction_From_Segmented_Image.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import os
2222
from ij import IJ
2323
from sc.fiji.snt import Tree
24-
from sc.fiji.snt.analysis import SkeletonConverter
24+
from sc.fiji.snt.tracing.auto import BinaryTracer
2525
from sc.fiji.snt.viewer import Viewer3D
2626

2727
# Documentation Resources: https://imagej.net/plugins/snt/scripting
@@ -39,7 +39,7 @@ def main():
3939
skeletonizeImp = True
4040
# Use the image to create the reconstructions, first skeletonizing
4141
# if it is not already a skeleton.
42-
converter = SkeletonConverter(imp, skeletonizeImp)
42+
converter = BinaryTracer(imp, skeletonizeImp)
4343
converter.setPruneByLength(pruneByLength)
4444
converter.setLengthThreshold(lengthThreshold)
4545
converter.setConnectComponents(connectComponents)

‎src/main/resources/script_templates/Neuroanatomy/Tracing/Fully_Automated_Tracing_Demo_(Interactive).py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
instance of SNT to perform automated (unsupervised) tracing
1111
"""
1212

13-
from sc.fiji.snt.analysis import SkeletonConverter
13+
from sc.fiji.snt.tracing.auto import BinaryTracer
1414
from ij.gui import Roi
1515

1616
def run():
@@ -39,18 +39,18 @@ def run():
3939
# use the Estimate Radii (Local Thickness).. command directly on the image)
4040
snt.getUI().runSecondaryLayerWizard("Frangi Vesselness (Multi-scale filter)", [0.56, 0.74, 0.98])
4141

42-
# the SkeletonConverter class is the workhorse class for the conversion. We'll
42+
# the BinaryTracer class is the workhorse class for the conversion. We'll
4343
# use it to skeletonize the Frangi image, thresholding out the voxels with
4444
# low 'vesselness scores' (here, we'll only consider values above 0.005..
4545
# NB: The last boolean argument in the skeletonize() method specifies whether
4646
# isolated voxels that may exist should be eroded
4747
filtered_img = snt.getPlugin().getSecondaryDataAsImp()
4848
#filtered_img.duplicate().show() # display copy
49-
SkeletonConverter.skeletonize(filtered_img, 0.45, 1, True)
49+
BinaryTracer.skeletonize(filtered_img, 0.45, 1, True)
5050
#filtered_img.show() # display skeletonized image
5151

5252
# We can now initialize the converter and specify some tweaks:
53-
converter = SkeletonConverter(filtered_img)
53+
converter = BinaryTracer(filtered_img)
5454
converter.setPruneByLength(False) # Discard smaller disconnected branches?
5555
converter.setLengthThreshold(1) # Discard only branches smaller than 1um
5656
converter.setConnectComponents(True) # Attempt to bridge gaps in the structure?

‎src/main/resources/script_templates/Neuroanatomy/Tracing/Fully_Automated_Tracing_Timelapse_Demo.groovy‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ imp = snt.getImagePlus()
3333
println("Processing frame #" + frame)
3434

3535
// Assemble a converter for extraction of paths from this frame. API:
36-
// https://javadoc.scijava.org/SNT/index.html?sc/fiji/snt/analysis/SkeletonConverter.html
36+
// https://javadoc.scijava.org/SNT/index.html?sc/fiji/snt/tracing/auto/BinaryTracer.html
3737
converter = new BinaryTracer(imp, frame) // image and frame to be parsed
3838
converter.setPruneByLength(false) // Don't ignore small components...
3939
converter.setConnectComponents(false) // Don't merge neighboring components..

0 commit comments

Comments
 (0)