X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=plugins%2FITKLevelSetFilters%2FLaplacianSegmentationLevelSetImageFilter.cxx;fp=plugins%2FITKLevelSetFilters%2FLaplacianSegmentationLevelSetImageFilter.cxx;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=c45c75a8ef752f6c6b799419dbb8aa18f05b54a5;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/plugins/ITKLevelSetFilters/LaplacianSegmentationLevelSetImageFilter.cxx b/plugins/ITKLevelSetFilters/LaplacianSegmentationLevelSetImageFilter.cxx deleted file mode 100644 index c45c75a..0000000 --- a/plugins/ITKLevelSetFilters/LaplacianSegmentationLevelSetImageFilter.cxx +++ /dev/null @@ -1,72 +0,0 @@ -#include -#include - -#include - -// ------------------------------------------------------------------------- -cpPluginsITKLevelSetFilters::LaplacianSegmentationLevelSetImageFilter:: -LaplacianSegmentationLevelSetImageFilter( ) - : Superclass( ) -{ - this->_ConfigureInput< cpInstances::DataObjects::Image >( "Input", true, false ); - this->_ConfigureInput< cpInstances::DataObjects::Image >( "Feature", true, false ); - this->_ConfigureOutput< cpInstances::DataObjects::Image >( "Output" ); - - this->m_Parameters.ConfigureAsReal( "PropagationScaling", 1 ); - this->m_Parameters.ConfigureAsReal( "CurvatureScaling", 1 ); - this->m_Parameters.ConfigureAsReal( "MaximumRMSError", 0.02 ); - this->m_Parameters.ConfigureAsReal( "IsoSurfaceValue", 0 ); - this->m_Parameters.ConfigureAsUint( "NumberOfIterations", 100 ); -} - -// ------------------------------------------------------------------------- -cpPluginsITKLevelSetFilters::LaplacianSegmentationLevelSetImageFilter:: -~LaplacianSegmentationLevelSetImageFilter( ) -{ -} - -// ------------------------------------------------------------------------- -void cpPluginsITKLevelSetFilters::LaplacianSegmentationLevelSetImageFilter:: -_GenerateData( ) -{ - auto o = this->GetInputData( "Input" ); - cpPlugins_Demangle_Image_RealPixels_AllDims_1( o, _GD0 ) - this->_Error( "Invalid input image." ); -} - -// ------------------------------------------------------------------------- -template< class _TImage > -void cpPluginsITKLevelSetFilters::LaplacianSegmentationLevelSetImageFilter:: -_GD0( _TImage* image ) -{ - auto f = this->GetInputData( "Feature" ); - cpPlugins_Demangle_Image_RealPixels_2( f, _GD1, _TImage::ImageDimension, image ) - this->_Error( "Invalid feature image." ); -} - -// ------------------------------------------------------------------------- -template< class _TFeature, class _TImage > -void cpPluginsITKLevelSetFilters::LaplacianSegmentationLevelSetImageFilter:: -_GD1( _TFeature* feature, _TImage* image ) -{ - typedef typename _TFeature::PixelType _TScalar; - typedef - itk::LaplacianSegmentationLevelSetImageFilter< _TImage, _TFeature, _TScalar > - _TFilter; - - // Configure filter - _TFilter* filter = this->_CreateITK< _TFilter >( ); - filter->SetInput( image ); - filter->SetFeatureImage( feature ); - filter->SetPropagationScaling( this->m_Parameters.GetReal( "PropagationScaling" ) ); - filter->SetCurvatureScaling( this->m_Parameters.GetReal( "CurvatureScaling" ) ); - filter->SetMaximumRMSError( this->m_Parameters.GetReal( "MaximumRMSError" ) ); - filter->SetIsoSurfaceValue( this->m_Parameters.GetReal( "IsoSurfaceValue" ) ); - filter->SetNumberOfIterations( this->m_Parameters.GetUint( "NumberOfIterations" ) ); - filter->Update( ); - - // Connect output - this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) ); -} - -// eof - $RCSfile$