[Insight-users] WrapITK Python and IsolatedWatershedImageFilter
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Thu Mar 1 13:20:35 EST 2007
Hi,
It seem that your image "im" is not of the right type. It must be
itk.Image.US2.
Can you check the type of im ?
Regards,
Gaetan
Le Thu, 01 Mar 2007 18:17:50 +0100, Erik Anderson <eranders at sci.utah.edu>
a écrit:
> 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
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
More information about the Insight-users
mailing list