Vmtk Vesselness Filtering: select seedpoint in Python


I’m using the VMTK VesselnessFilter to find my vessels in a T1ce image. I did this manually in 3DSlicer with no issues.
However, I’m seeing that I get better results when I select a seedpoint to determine the min/max vessel diameter.

Now I’d like to implement the same process in python/JupyterNotebooks.
I have a working piece of code that finds the vesselness, but can’t seem to figure out how to manually add a seedpoint.
Here is the code:

#Push input volume to node
InputVolumeNode = su.PushVolumeToSlicer(t1ce_brain)

dim_in = t1ce_brain.GetSize()
spacing_in = t1ce_brain.GetSpacing()

#Create output volume with same dim and spacing of InputVolume
OutputNode = createEmptyVolume(dim_in, spacing_in, ‘VesselnessFiltered’) # invoke function

#create vesselness filtering logic
vfl = VesselnessFiltering.VesselnessFilteringLogic()
#Select seed to determine min/max vessel diameter
#compute VesselnessFiltering
vfl.computeVesselnessVolume(InputVolumeNode, OutputNode, minimumDiameterMm=1, maximumDiameterMm=6, alpha=0.3, beta=0.3, contrastMeasure=130)

I can see that I can set the minimum/maximumDiameter inside the computeVesselnessVolume function, but I’m not sure how to find these automatically by setting a seedpoint (Fiducials.

I was looking through SlicerExtension-VMTK/VesselnessFiltering.py at master · vmtk/SlicerExtension-VMTK · GitHub for hints, but this seems to be the code to select this point within the GUI node.

#Select seed to determine min/max vessel diameter

gives the error

AttributeError: ‘VesselnessFilteringLogic’ object has no attribute ‘seedFiducialsNodeSelector’

so I’m clearly not on the right path. How can I select this seedpoint in python?

Thanks for any help!

You can probably use the same minimum and maximum diameters and contrast difference and other filtering parameters for similar images. So, you can determine the optimal parameters by using the module GUI and then use them in your Python scripts.