[vtkusers] Problems using vtkConnectivityFilter on Image Data

Darya Yelshyna darya.yelshyna at yahoo.com
Fri Nov 6 14:06:12 EST 2015


Thank you so much for your reply!I am using Python wrapping to access VTK and I don't know how to add vtkImageConnectivityFilter. I am trying to use vtkImageThresholdConnectivity and I am a little confused with setting the seed. The seeds should be in real data coordinates, not in voxel index locations. How do I retrieve these coordinates from X, Y and Z indexes?
Sorry for inconveniece.
Best regards,Darya 


     On Friday, November 6, 2015 5:49 PM, David Gobbi <david.gobbi at gmail.com> wrote:
   

 Hi Darya,
The vtkConnectivityFilter is meant for use on mesh data.  It suspectthat when you used it on image data, it caused your computer to runout of memory.
I have a connectivity filter that I wrote specifically for images, but itis on github.  I haven't contributed it to VTK yet.  But you can try itif you are interested:
https://github.com/dgobbi/AIRS/tree/master/ImageSegmentation

You can also try the vtkImageThresholdConnectivity filter that comeswith VTK:http://www.vtk.org/doc/nightly/html/classvtkImageThresholdConnectivity.html

 - David


On Fri, Nov 6, 2015 at 10:36 AM, Darya Yelshyna via vtkusers <vtkusers at vtk.org> wrote:

Hi everyone!
I was trying to apply vtkConnectivityFilter to vtkImageData, but the program crashes at this step."This application has requested the Runtime to terminate it in an unusual way." This is this a part of my code:
dilateFilter = vtk.vtkImageContinuousDilate3D()dilateFilter.SetKernelSize(5, 5, 5)dilateFilter.SetInputConnection(logic2.GetOutputPort())dilateFilter.Update()
connectFilter = vtk.vtkConnectivityFilter()connectFilter.SetExtractionModeToLargestRegion()connectFilter.SetInputConnection(dilateFilter.GetOutputPort())connectFilter.Update()
I don't understand what is happening.. Can anybody help me?
Thank you in advance.
Best regards,Darya
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers





  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151106/f67543a6/attachment.html>


More information about the vtkusers mailing list