[Insight-developers] Pad filters usability in python

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Fri Aug 26 11:37:50 EDT 2005


Hi,

pad filters are difficult to use in python because of usage of arrays  
instead of itk::Size objects to set bound size.

Can the following code be added to itkPadImageFilter.h to solve this  
problem ?

#include "itkSize.h"



   void SetPadLowerBound(const itk::Size<ImageDimension> & size)
     {
     this->SetPadLowerBound( size.m_Size );
     }

   void SetPadUpperBound(const itk::Size<ImageDimension> & size)
     {
     this->SetPadUpperBound( size.m_Size );
     }

   void SetPadBound(const itk::Size<ImageDimension> & size)
     {
     this->SetPadLowerBound( size );
     this->SetPadUpperBound( size );
     }

There is still the problem of reading the bound values (it can be done  
with typemaps), but this is already a big improvement :-)

Regards,

Gaetan


-- 
Gaetan Lehmann <gaetan.lehmann at jouy.inra.fr>
Tel: +33 1 34 65 29 66
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
Web: http://voxel.jouy.inra.fr


More information about the Insight-developers mailing list