1 #include "InvertCostFunctor.h"
3 #include <fpa/Base/Functors/InvertCost.h>
4 #include <fpa/Base/Functors/InvertCost.hxx>
6 // -------------------------------------------------------------------------
7 fpaPlugins::InvertCostFunctor::
11 this->_ConfigureOutput< cpPlugins::BaseObjects::DataObject >( "Output" );
12 std::vector< std::string > choices;
13 choices.push_back( "float" );
14 choices.push_back( "double" );
15 this->m_Parameters.ConfigureAsChoices( "ResultType", choices );
16 this->m_Parameters.SetSelectedChoice( "ResultType", "float" );
19 // -------------------------------------------------------------------------
20 fpaPlugins::InvertCostFunctor::
25 // -------------------------------------------------------------------------
26 void fpaPlugins::InvertCostFunctor::
29 auto rtype = this->m_Parameters.GetSelectedChoice( "ResultType" );
30 if ( rtype == "float" ) this->_GD0< float >( );
31 else if( rtype == "double" ) this->_GD0< double >( );
34 // -------------------------------------------------------------------------
35 template< class _TResult >
36 void fpaPlugins::InvertCostFunctor::
39 typedef fpa::Base::Functors::InvertCost< _TResult > _TFunctor;
40 auto out = this->GetOutput( "Output" );
41 auto f = out->GetITK< _TFunctor >( );
44 typename _TFunctor::Pointer ptr_f = _TFunctor::New( );
45 f = ptr_f.GetPointer( );