Operating system: Windows 10
Slicer version: 4.11.20210226
Expected behavior: Extract de diameter of the vessel on each point (MarkupsFiducial)
Actual behavior:Tracebak Error
Hello Good Day
I am in a project where we are trying determine the ballistic trajectories of bullets inside the brain and the damage. We need to calculate the damage of vessels by measuring the change of their diameter throughout all the vessels length.
I am using SlicerVMTK module and using the the python environment, and pasting the next code:
c = getNode('CenterlineComputationModel')
points = slicer.util.arrayFromModelPoints(c)
radii = slicer.util.arrayFromModelPointData(c, 'Radius')
for i, radius in enumerate(radii):
print("Point {0}: position={1}, radius={2}".format(i, points[i], radius))
Geves me this error:
Python 3.6.7 (default, Feb 27 2021, 05:09:17)
[GCC 5.3.1 20160406 (Red Hat 5.3.1-6)] on linux2
>>> c = getNode('CenterlineComputationModel')
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/mauricio/Desktop/Slicer-4.11.20210226-linux-amd64/bin/Python/slicer/util.py", line 1312, in getNode
raise MRMLNodeNotFoundException("could not find nodes in the scene by name or id '%s'" % (pattern if (isinstance(pattern, str)) else ""))
slicer.util.MRMLNodeNotFoundException: could not find nodes in the scene by name or id 'CenterlineComputationModel'
>>> points = slicer.util.arrayFromModelPoints(c)
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'c' is not defined
>>> radii = slicer.util.arrayFromModelPointData(c, 'Radius')
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'c' is not defined
>>> for i, radius in enumerate(radii):
... print("Point {0}: position={1}, radius={2}".format(i, points[i], radius))
...
Thanks for the help.