#include "AllPixelsImageGrowFunctionSource.h" #include #include #include #include // ------------------------------------------------------------------------- fpaPlugins::AllPixelsImageGrowFunctionSource:: AllPixelsImageGrowFunctionSource( ) : Superclass( ) { this->_AddInput( "ReferenceImage" ); this->_MakeOutput< GrowFunction >( "Output" ); } // ------------------------------------------------------------------------- fpaPlugins::AllPixelsImageGrowFunctionSource:: ~AllPixelsImageGrowFunctionSource( ) { } // ------------------------------------------------------------------------- std::string fpaPlugins::AllPixelsImageGrowFunctionSource:: _GenerateData( ) { cpPlugins::Interface::Image* image = this->GetInput< cpPlugins::Interface::Image >( "ReferenceImage" ); if( image == NULL ) return( "fpaPlugins::AllPixelsImageGrowFunctionSource: No input reference image." ); itk::DataObject* itk_image = NULL; std::string r = ""; cpPlugins_Image_Demangle_AllScalarTypes( 2, image, itk_image, r, _GD0 ); else cpPlugins_Image_Demangle_AllScalarTypes( 3, image, itk_image, r, _GD0 ); else r = "fpaPlugins::AllPixelsImageGrowFunctionSource: no valid reference image."; return( r ); } // ------------------------------------------------------------------------- template< class I > std::string fpaPlugins::AllPixelsImageGrowFunctionSource:: _GD0( itk::DataObject* data ) { typedef fpa::Image::Functors::RegionGrowAllBelongsFunction< I > _F; typename _F::Pointer functor = _F::New( ); // Connect output GrowFunction* out = this->GetOutput< GrowFunction >( "Output" ); if( out != NULL ) { out->SetITK< _F >( functor ); return( "" ); } else return( "fpaPlugins::AllPixelsImageGrowFunctionSource: output not correctly created." ); } // eof - $RCSfile$