1 #include <plugins/Plugins/SimpleImageNeighborhood.h>
2 #include <cpPlugins/DataObjects/Image.h>
4 #include <fpa_DataObjects.h>
6 // -------------------------------------------------------------------------
7 fpaPlugins::SimpleImageNeighborhood::
8 SimpleImageNeighborhood( )
11 typedef cpPlugins::BaseObjects::DataObject _TData;
12 typedef cpPlugins::DataObjects::Image _TImage;
14 this->_ConfigureInput< _TImage >( "Input", true, false );
15 this->_ConfigureOutput< _TData >( "Output" );
17 this->m_Parameters.ConfigureAsUint( "Order" );
18 this->m_Parameters.SetUint( "Order", 1 );
21 // -------------------------------------------------------------------------
22 fpaPlugins::SimpleImageNeighborhood::
23 ~SimpleImageNeighborhood( )
27 // -------------------------------------------------------------------------
28 void fpaPlugins::SimpleImageNeighborhood::
31 auto o = this->GetInputData( "Input" );
32 cpPlugins_Demangle_ImageProcessDims( o, _GD0 );
33 else this->_Error( "Invalid input image." );
36 // -------------------------------------------------------------------------
37 template< class _TImage >
38 void fpaPlugins::SimpleImageNeighborhood::
39 _GD0( _TImage* image )
41 typedef fpa::Image::Functors::SimpleNeighborhood< _TImage > _TFunctor;
42 auto out = this->GetOutput( "Output" );
43 auto f = out->GetITK< _TFunctor >( );
46 typename _TFunctor::Pointer ptr_f = _TFunctor::New( );
47 f = ptr_f.GetPointer( );
51 f->SetOrder( this->m_Parameters.GetUint( "Order" ) );