Operating system: Ubuntu 16
Slicer version: 4.8
Expected behavior: getting an output
Actual behavior: infinite loop
Dear all,
I have few questions related automatic measurement the length of an object in Slicer. The object is already segmented out and saves as a label. This object has a curvy shape so Ruler tool does not work.
Here are what I already tried:
I tried “Extract Skeleton” module with different parameters but it goes on infinite loop. Why I get such behavior? in case it works, how can I compute the length as the output is just number of points that already decided by the user?
I tried “BinaryThinningImageFilter”, it works and I get a curve from the object. How can I measure this curve length?
Another (less precise) option is that if you place fiducials close together
along the length of a curve, you can get the summed linear distance between
all the highlighted fiducials in the Markups module by right clicking in
the table.
Many thanks for the info. Actually, I am trying to automate things here. Here is what I tried and it works so far.
First I apply “BinaryThinningImageFilter” on the label then I apply “Extract Skeleton”.
With this, I get a nice list of points that represent my curve in a text file. What I need to do now is to accumulate the distance between all these points. If there is already a python script for this, I appreciate sharing it. If not, I will try to write it and share it with everyone.
I guess it will be something like (please correct me if I am wrong):
P1 = the first point in the text file
P1 =IJK2RAS(P1)
D = 0
for all remaining points p
P2 = p
P2 =IJK2RAS(P2)
D = D + dist(P1,P2)
P1=P2
I found out the points generated by the text files are not all the points generated by the skeleton filter, please check the images. The fiducial points represent the points from the text file. Any suggestion to correct this?
The value that Slicer computes is the curvature of a curve. You can look up the exact definition I. Wikipedia, but in short, curvature is 1/R where R is the radius of the circle that best approximates the curve at that point. For a circle that has a radius of 10 mm the curvature of every point is 0.1 and the unit is 1/mm.