#include #include #include // ------------------------------------------------------------------------- fpaPluginsDijkstraFunctors::GaussianModelCost:: GaussianModelCost( ) : Superclass( ) { typedef cpPlugins::Pipeline::DataObject _TData; this->_ConfigureOutput< _TData >( "Output" ); std::vector< std::string > choices; choices.push_back( "float" ); choices.push_back( "double" ); this->m_Parameters.ConfigureAsChoices( "ResultType", choices ); this->m_Parameters.SetSelectedChoice( "ResultType", "float" ); } // ------------------------------------------------------------------------- fpaPluginsDijkstraFunctors::GaussianModelCost:: ~GaussianModelCost( ) { } // ------------------------------------------------------------------------- void fpaPluginsDijkstraFunctors::GaussianModelCost:: _GenerateData( ) { auto rtype = this->m_Parameters.GetSelectedChoice( "ResultType" ); if ( rtype == "float" ) this->_GD0< float >( ); else if( rtype == "double" ) this->_GD0< double >( ); } // ------------------------------------------------------------------------- template< class _TOutput > void fpaPluginsDijkstraFunctors::GaussianModelCost:: _GD0( ) { typedef fpa::Base::Functors::GaussianModel< _TOutput, _TOutput > _TFunctor; auto out = this->GetOutput( "Output" ); auto f = out->GetITK< _TFunctor >( ); if( f == NULL ) { typename _TFunctor::Pointer ptr_f = _TFunctor::New( ); f = ptr_f.GetPointer( ); out->SetITK( f ); } // fi } // eof - $RCSfile$