X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=plugins%2FITKSliceFilters%2FCPRImageFilter.cxx;fp=plugins%2FITKSliceFilters%2FCPRImageFilter.cxx;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=9e6b8a8c3b15c7df2744ccbcf692ce05dcfa9771;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/plugins/ITKSliceFilters/CPRImageFilter.cxx b/plugins/ITKSliceFilters/CPRImageFilter.cxx deleted file mode 100644 index 9e6b8a8..0000000 --- a/plugins/ITKSliceFilters/CPRImageFilter.cxx +++ /dev/null @@ -1,63 +0,0 @@ -#include - -#include -#include - -#include -#include -#include - -// ------------------------------------------------------------------------- -cpPluginsITKSliceFilters::CPRImageFilter:: -CPRImageFilter( ) - : Superclass( ) -{ - typedef cpInstances::DataObjects::Image _TImage; - typedef cpInstances::DataObjects::Simple3DCurve _TCurve; - this->_ConfigureInput< _TImage >( "Image", true, false ); - this->_ConfigureInput< _TCurve >( "Curve", true, false ); - this->_ConfigureOutput< _TImage >( "Output" ); - this->m_Parameters.ConfigureAsReal( "SliceRadius", 1 ); -} - -// ------------------------------------------------------------------------- -cpPluginsITKSliceFilters::CPRImageFilter:: -~CPRImageFilter( ) -{ -} - -// ------------------------------------------------------------------------- -void cpPluginsITKSliceFilters::CPRImageFilter:: -_GenerateData( ) -{ - auto o = this->GetInputData( "Image" ); - cpPlugins_Demangle_Image_ScalarPixels_1( o, _GD0, 3 ) - this->_Error( "Invalid input image." ); -} - -// ------------------------------------------------------------------------- -template< class _TImage > -void cpPluginsITKSliceFilters::CPRImageFilter:: -_GD0( _TImage* image ) -{ - auto o = this->GetInputData( "Curve" ); - cpPlugins_Demangle_Simple3DCurve_All_2( o, _GD1, image ) - this->_Error( "Invalid input curve." ); -} - -// ------------------------------------------------------------------------- -template< class _TCurve, class _TImage > -void cpPluginsITKSliceFilters::CPRImageFilter:: -_GD1( _TCurve* curve, _TImage* image ) -{ - typedef cpExtensions::Algorithms::CPRImageFilter< _TImage, _TCurve > _TFilter; - - auto filter = this->_CreateITK< _TFilter >( ); - filter->SetInput( image ); - filter->SetCurve( curve ); - filter->SetSliceRadius( this->m_Parameters.GetReal( "SliceRadius" ) ); - filter->Update( ); - this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) ); -} - -// eof - $RCSfile$