|
10 | 10 | instance of SNT to perform automated (unsupervised) tracing |
11 | 11 | """ |
12 | 12 |
|
13 | | -from sc.fiji.snt.analysis import SkeletonConverter |
| 13 | +from sc.fiji.snt.tracing.auto import BinaryTracer |
14 | 14 | from ij.gui import Roi |
15 | 15 |
|
16 | 16 | def run(): |
@@ -39,18 +39,18 @@ def run(): |
39 | 39 | # use the Estimate Radii (Local Thickness).. command directly on the image) |
40 | 40 | snt.getUI().runSecondaryLayerWizard("Frangi Vesselness (Multi-scale filter)", [0.56, 0.74, 0.98]) |
41 | 41 |
|
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 |
43 | 43 | # use it to skeletonize the Frangi image, thresholding out the voxels with |
44 | 44 | # low 'vesselness scores' (here, we'll only consider values above 0.005.. |
45 | 45 | # NB: The last boolean argument in the skeletonize() method specifies whether |
46 | 46 | # isolated voxels that may exist should be eroded |
47 | 47 | filtered_img = snt.getPlugin().getSecondaryDataAsImp() |
48 | 48 | #filtered_img.duplicate().show() # display copy |
49 | | - SkeletonConverter.skeletonize(filtered_img, 0.45, 1, True) |
| 49 | + BinaryTracer.skeletonize(filtered_img, 0.45, 1, True) |
50 | 50 | #filtered_img.show() # display skeletonized image |
51 | 51 |
|
52 | 52 | # We can now initialize the converter and specify some tweaks: |
53 | | - converter = SkeletonConverter(filtered_img) |
| 53 | + converter = BinaryTracer(filtered_img) |
54 | 54 | converter.setPruneByLength(False) # Discard smaller disconnected branches? |
55 | 55 | converter.setLengthThreshold(1) # Discard only branches smaller than 1um |
56 | 56 | converter.setConnectComponents(True) # Attempt to bridge gaps in the structure? |
|
0 commit comments