# Vmtk Vesselness Filtering without seed point?

**URL:** <https://discourse.slicer.org/t/vmtk-vesselness-filtering-without-seed-point/8468>\
**Category:** Support\
**Tags:** segmentation, vmtk, vessels\
**Created:** [September 17, 2019, 12:45pm UTC](https://discourse.slicer.org/t/vmtk-vesselness-filtering-without-seed-point/8468 "2019-09-17T12:45:50Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Tommaso\_Di\_Noto](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tommaso_di_noto/32/6802_2.png) [@Tommaso\_Di\_Noto](https://discourse.slicer.org/u/Tommaso_Di_Noto)\
**Post date:** [September 19, 2019, 8:23am UTC](https://discourse.slicer.org/t/vmtk-vesselness-filtering-without-seed-point/8468/10 "2019-09-19T08:23:14Z")

</div>

@lassoan, apologies for not reading the API doc carefully. I now modified as:

```
_, InputVolumeNode = slicer.util.loadVolume(one_patient_path, returnNode=True)
dim = InputVolumeNode.GetImageData().GetDimensions()
spacing = InputVolumeNode.GetSpacing()

```

and following [this thread](https://discourse.slicer.org/t/display-issue-with-volume-node-created-programmatically/2346/2), I created the Output Node with:

```
def createEmptyVolume(imageSize, imageSpacing, nodeName):
    voxelType=vtk.VTK_FLOAT
    # Create an empty image volume
    imageData=vtk.vtkImageData()
    imageData.SetDimensions(imageSize)
    imageData.AllocateScalars(voxelType, 1)
    thresholder=vtk.vtkImageThreshold()
    thresholder.SetInputData(imageData)
    thresholder.SetInValue(0)
    thresholder.SetOutValue(0)
    thresholder.Update()
    # Create volume node
    volumeNode=slicer.mrmlScene.AddNewNodeByClass("vtkMRMLScalarVolumeNode", nodeName)
    volumeNode.SetSpacing(imageSpacing)
    volumeNode.SetAndObserveImageData(thresholder.GetOutput())
    volumeNode.CreateDefaultDisplayNodes()
    volumeNode.CreateDefaultStorageNode()
    return volumeNode  

# creat output node with same dim and spacing of InputNode
OutputNode = createEmptyVolume(dim, spacing, 'VesselnessFiltered') # invoke function 

```

Now, if I try to apply the VesselNessFiltering from the GUI with these two volumes (and with the manual seed point), the “VesselnessFiltered” volume is created correctly.

However, when I run in Jupyter:

```
vfl = VesselnessFiltering.VesselnessFilteringLogic()
vfl.computeVesselnessVolume(InputVolumeNode, OutputVolume, minimumDiameterMm=0, maximumDiameterMm=25, alpha=0.3, beta=0.3, contrastMeasure=150) 

```

I get the following log in Slicer (from Help/Report a bug):

```
[DEBUG][Python] 19.09.2019 10:04:22 [Python] (/home/newuser/.config/NA-MIC/Extensions-27931
SlicerVMTK/lib/Slicer-4.10/qt-scripted-modules/VesselnessFiltering.py:465) - Vesselness filtering 
started: diameter min=0, max=25, alpha=0.3, beta=0.3, contrastMeasure=150
[CRITICAL][Stream] 19.09.2019 10:04:23 [] (unknown:0) - ERROR: during execute_request
[CRITICAL][Stream] 19.09.2019 10:04:23 [] (unknown:0) - /work/Stable/Slicer-4101- 
build/ITK/Modules/Filtering/Smoothing/include/itkRecursiveGaussianImageFilter.hxx:344:
[CRITICAL][Stream] 19.09.2019 10:04:23 [] (unknown:0) - itk::ERROR: 
RecursiveGaussianImageFilter(0xb7ded90): Sigma must be greater than zero.

```

The [DEBUG] tells us that the VesselnessFiltering started, but then the `itkRecursiveGaussianImageFilter` raises the CRITICAL error about the Sigma. What I don’t understand is where, inside `computeVesselnessVolume`, this itk function is invoked.

Pardon me if the question is trivial, but how could I find this out? Or, in other words, how can I debug in cases like this to understand what calls `itkRecursiveGaussianImageFilter`?

Thanks again for your time!

---

_[View the full topic](https://discourse.slicer.org/t/vmtk-vesselness-filtering-without-seed-point/8468)._
