[Insight-users] Setting Radius in python - Median Filter
Peter
peter.bloomfield at camhpet.ca
Tue Apr 5 15:17:33 EDT 2011
Hi,
I am new to itk and I apologise for this basic question.
I have compiled itk v3.20.0 for python using CableSwig from the cvs repository and all installed without error.
I have a simple program where I want to apply a median filter to a data aet and I use the following
image_filter = itk.itkMedianImageFilterF3F3_New()
image_filter.SetRadius( 5 )
but I get the following error
Traceback (most recent call last):
File "/home/peter/Src/Python/Py_Scripts/itk_chk.py", line 21, in <module>
image_filter.SetRadius( 5 )
File "/usr/local/lib/InsightToolkit/itkMedianImageFilter.py", line 1145, in SetRadius
def SetRadius(*args): return _itkMedianImageFilter.itkMedianImageFilterF3F3_Pointer_SetRadius(*args)
TypeError: Expected a pointer
How do I pass the '5' as a pointer?
Any help will be greatlyu appreciated,
Peter
More information about the Insight-users
mailing list