[ITK] [ITK-users] python for AnisotropicDiffusionImageFilter

Matt McCormick matt.mccormick at kitware.com
Tue Apr 7 15:10:18 EDT 2015


Hi Eduardo,

The itk.AnisotropicDiffusionImageFilter is a base class that is not
intended to be instantiated. As you have observed, it returns an
'itkObject *' type when we attempt to use .New() in Python. Other ways
to confirm this are to look for the New() method in its Doxygen page
[1], or for the 'itkNewMacro' in its header file [2]. To get an
instance of this class, create one of its derived classes instead.
See the Doxygen inheritance diagram [1] for one of the four options.

HTH,
Matt

[1] http://www.itk.org/Doxygen/html/classitk_1_1AnisotropicDiffusionImageFilter.html

[2] http://www.itk.org/Doxygen/html/itkAnisotropicDiffusionImageFilter_8h_source.html

On Tue, Apr 7, 2015 at 3:30 AM, Eduardo Suarez-Santana
<esuarez at itccanarias.org> wrote:
> I can't use 'itk.AnisotropicDiffusionImageFilter'. It does not get rendered
> as its filter object, but as a common object. I can't see any of the filter
> methods. I tried with other filters and they seem to work fine.
>
> Tried with Itk-4.7 and git version from yesterday.
>
> $ ipython
>
> In [1]: import itk;
>
> ...
>
> In [7]: anifilter = itk.AnisotropicDiffusionImageFilter.IF3IF3.New()
>
> In [8]: anifilter
> Out[8]: <ITKCommonBasePython.itkObject; proxy of <Swig Object of type
> 'itkObject *' at 0x7f5891326030> >
>
> In [9]:
> otherfilter=itk.CurvatureAnisotropicDiffusionImageFilter.IF3IF3.New()
>
> In [10]: otherfilter
> Out[10]:
> <itkCurvatureAnisotropicDiffusionImageFilterPython.itkCurvatureAnisotropicDiffusionImageFilterIF3IF3;
> proxy of <Swig Object of type
> 'itkCurvatureAnisotropicDiffusionImageFilterIF3IF3 *' at 0x7f5893be0420> >
>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com

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

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list