[Insight-users] WrapITK Python and IsolatedWatershedImageFilter

Erik Anderson eranders at sci.utah.edu
Thu Mar 1 12:17:50 EST 2007


Hi all,
    After getting most of my problems with WrapITK in Python fixed (I 
hope) I have constructed several processing pipelines that work without 
problem.  However, I can't get the IsolatedWatershedImageFilter to 
work.. I get the following error:

 def SetInput(*args): return 
_itkIsolatedWatershedImageFilter.itkIsolatedWatershedImageFilterIUS2IUS2_Pointer_SetInput(*args)
TypeError: No matching function for overloaded 
'itkIsolatedWatershedImageFilterIUS2IUS2_Pointer_SetInput'

The code generating this error is:

    im = self.getInputFromPort("Input Image")
    inType = itk.Image[itk.US,2]
    outType = itk.Image[itk.US,2]

    self.filter_ = itk.IsolatedWatershedImageFilter[inType,outType].New()
    self.filter_.SetInput(im)
  
    self.setSeed1(self.getInputFromPort("Seed1"))

    self.filter_.Update()
    print "filter done"
    self.setResult("Output Image", self.filter_.GetOutput())
    self.setResult("Filter", self)


Please excuse the non-WrapITK components above.  I have tried 
constructing the filter both as described above and by passing the input 
image to manipulate to the constructor.

Any help would be greatly appreciated.

Thanks
Erik


More information about the Insight-users mailing list