[vtk-developers] Segmentation of spherical structure with spherical mask

Peter Behringer peterbehringer at gmx.de
Wed Mar 12 10:33:20 EDT 2014


Hey vtk-developers,

i want to do a segmentation of a spherical structure. In order to do that, i use a seedpoint and a simple region growing algorithm provided by vtkImageThresholdConnectivity().
To kill voxels, that are captured outside of my spherical structure, i need a spherical, binary mask with center = seedpoint and radius appr. 80 voxels. I thought its easy to use SetSliceRange in every direction - but that one wont work and theres no good documentation about that function. Any ideas? 

	regiongrower=vtk.vtkImageThresholdConnectivity()
       regiongrower.SetInput(inputVolume.GetImageData())
       regiongrower.SetSeedPoints(vtkPoints)
       regiongrower.ThresholdBetween(lowerThreshold,upperThreshold)
       regiongrower.SetSliceRangeY(1,100)							<- that one wont work?!
       regiongrower.SetReplaceOut(1)   #enable SetOutValue()
       regiongrower.SetReplaceIn(1)    #enable SetInValue()
       regiongrower.SetOutValue(0)     #set OutValue = 0
       regiongrower.SetInValue(1)      #set InValue = 1
       regiongrower.GetOutput().Update()

Best regards, 
Peter










More information about the vtk-developers mailing list