Cutting vessels - CFD

Hi

I’m working on pulmonary vessels CFD. After extracting the centerlines of my vascular tree, I’m aiming to automatically trim vessel ends below a certain caliber, perpendicular to the centerlines. I attempted to use the “vesselness filtering” tool in the VMTK module, but it doesn’t recognize the volume of my tree (STL file directly imported into Slicer). Is there a way to achieve this ?

Thank you in advance for your help

This module does just what you want.

The author has proposed to add it to SlicerVMTK extension, it’s still pending though.

1 Like

Is the ClipVessel module’s author waiting for us to do something?

1 Like

Thanks for your answer

I ve tried to set it with extension wizard but when I select extension folder “clipvessel” I get the following error :

Traceback (most recent call last):
File “/Applications/Slicer.app/Contents/bin/…/lib/Slicer-5.6/qt-scripted-modules/ExtensionWizard.py”, line 284, in selectExtension
xd = SlicerWizard.ExtensionDescription(sourcedir=path)
File “/Applications/Slicer.app/Contents/bin/Python/SlicerWizard/ExtensionDescription.py”, line 142, in init
self._setProjectAttribute(“homepage”, p, required=True)
File “/Applications/Slicer.app/Contents/bin/Python/SlicerWizard/ExtensionDescription.py”, line 189, in setProjectAttribute
v = project.getValue("EXTENSION
" + name.upper(), default, substitute)
File “/Applications/Slicer.app/Contents/bin/Python/SlicerWizard/ExtensionProject.py”, line 282, in getValue
raise KeyError(“script does not set %r” % name)
KeyError: “script does not set ‘EXTENSION_HOMEPAGE’”

Is there anything to modify in general Slicer settings ?
And in this case which path should I provide for this EXTENSION_HOMEPAGE ?

Thanks again for your help

The ‘Extension wizard’ is meant for creating extensions and modules based on templates.

You want to use the ClipVessel module. Clone it from the remote repository and drag ClipVessel.py onto Slicer. It will install it very nicely.

Thanks it works, I can run the module and set my cutting points.

However, I have 2 remaining issues:

  • After extracting centerlines, my input 3D model disappears. How can I maintain a visual on my 3D input model to position the cutting points in the right places?
  • Similarly, after creating my centerlines cut tree, how can I obtain the corresponding output surface?

Thank you in advance for the help

I’m not sure if I fully understand the problem. Visibility of any data type in 3D Slicer can be controlled from the data module. You can turn on and off your 3D model here and similarly you can turn on/off the output surface visibility after creating your centerlines cut tree.

Yes, I tried to display the 3D model by clicking on the small eye in the ‘data’ module interface, but only the centerlines appear.
I am using pre-segmented 3D models in .STL format that are imported into slicer maybe that’s why it’s not working…

There does not appear to be any other model loaded in your scene in the shared screenshot. Just “test” which appears to be the centerlines and the centerline endpoints.

Indeed, I was overwriting the input STL file during the extraction of the centerlines. I’ve corrected that, and it’s working now. The result looks good.


However, the clip points are not behaving like beads along the centerlines; they are positioning themselves outside of the surface. Is this normal ?

I’m glad to see it worked. Yes, the clip points do not move along the centerline. When you place them I believe 3D Slicer projects them onto the nearest visible surface. It should not matter if I remember correctly as the clip points are used to find the nearest point on the centerline. You can always hide the surface and place them on the centerline if you are having issues when they are on/outside the surface.

I was able to input the trimmed and extended model into my CFD software and it worked correctly. Thank you again for your help

1 Like

Hi @lassoan ,

I hereby draw your attention that @DavidM has submitted a PR to integrate Clip Vessel in SlicerVMTK. May be you could consider when you have some time.

Ragards.

This module needs a list of clip points as input. It’s quite simple with a limited number of vessels; however, it’s harder when there are many. Is there an easy way to create this list by auto-detection (like in the “extract centerline” module), for example, by placing one clip point 5mm above each centerline endpoint? Thank you for your help.