#include #include #include /* TODO #include #include #include #include #include #include */ // ------------------------------------------------------------------------- cpPluginsImageGradientFilters::FluxImageFilter:: FluxImageFilter( ) : Superclass( ) { typedef cpPlugins::DataObjects::Image _TImage; this->_ConfigureInput< _TImage >( "Input", true, false ); this->_ConfigureInput< _TImage >( "Mask", false, false ); this->_ConfigureOutput< _TImage >( "Output" ); this->m_Parameters.ConfigureAsReal( "MinRadius" ); this->m_Parameters.ConfigureAsReal( "MaxRadius" ); this->m_Parameters.ConfigureAsReal( "RadiusStep" ); this->m_Parameters.ConfigureAsUint( "RadialSampling" ); this->m_Parameters.SetReal( "MinRadius", 0 ); this->m_Parameters.SetReal( "MaxRadius", 1 ); this->m_Parameters.SetReal( "RadiusStep", 1 ); this->m_Parameters.SetUint( "RadialSampling", 4 ); } // ------------------------------------------------------------------------- cpPluginsImageGradientFilters::FluxImageFilter:: ~FluxImageFilter( ) { } // ------------------------------------------------------------------------- void cpPluginsImageGradientFilters::FluxImageFilter:: _GenerateData( ) { /* TODO auto o = this->GetInputData( "Input" ); cpPlugins_Demangle_ImageCovariantVectors_Dims( o, _GD0 ); else this->_Error( "Invalid input image." ); */ } // ------------------------------------------------------------------------- template< class _TImage > void cpPluginsImageGradientFilters::FluxImageFilter:: _GD0( _TImage* image ) { /* TODO typedef typename _TImage::PixelType _TGradient; typedef cpExtensions::Algorithms::FluxMedialness< _TImage > _TFunction; typedef typename _TFunction::TOutput _TScalar; typedef itk::Image< _TScalar, _TImage::ImageDimension > _TOutputImage; typedef cpExtensions::Algorithms::ImageFunctionFilter< _TImage, _TOutputImage, _TFunction > _TFilter; auto filter = this->_CreateITK< _TFilter >( ); auto function = filter->GetFunction( ); if( function == NULL ) { filter->SetFunction( _TFunction::New( ) ); function = filter->GetFunction( ); } // fi function->SetMinRadius( this->m_Parameters.GetReal( "MinRadius" ) ); function->SetMaxRadius( this->m_Parameters.GetReal( "MaxRadius" ) ); function->SetRadiusStep( this->m_Parameters.GetReal( "RadiusStep" ) ); function->SetRadialSampling( this->m_Parameters.GetUint( "RadialSampling" ) ); filter->SetInput( image ); filter->Update( ); this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) ); */ } // eof - $RCSfile$