X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=plugins%2FITKUnaryFunctorFilters%2FInvertIntensityImageFilter.cxx;fp=plugins%2FITKUnaryFunctorFilters%2FInvertIntensityImageFilter.cxx;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=e9e61b96f87affacb399f5fc6ae8e42f722b4836;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/plugins/ITKUnaryFunctorFilters/InvertIntensityImageFilter.cxx b/plugins/ITKUnaryFunctorFilters/InvertIntensityImageFilter.cxx deleted file mode 100644 index e9e61b9..0000000 --- a/plugins/ITKUnaryFunctorFilters/InvertIntensityImageFilter.cxx +++ /dev/null @@ -1,48 +0,0 @@ -#include -#include - -#include - -// ------------------------------------------------------------------------- -cpPluginsITKUnaryFunctorFilters::InvertIntensityImageFilter:: -InvertIntensityImageFilter( ) - : Superclass( ) -{ - typedef cpInstances::DataObjects::Image _TImage; - - this->_ConfigureInput< _TImage >( "Input", true, false ); - this->_ConfigureOutput< _TImage >( "Output" ); - this->m_Parameters.ConfigureAsUint( "Maximum", 1 ); -} - -// ------------------------------------------------------------------------- -cpPluginsITKUnaryFunctorFilters::InvertIntensityImageFilter:: -~InvertIntensityImageFilter( ) -{ -} - -// ------------------------------------------------------------------------- -void cpPluginsITKUnaryFunctorFilters::InvertIntensityImageFilter:: -_GenerateData( ) -{ - auto o = this->GetInputData( "Input" ); - cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 ) - this->_Error( "Invalid input image." ); -} - -// ------------------------------------------------------------------------- -template< class _TImage > -void cpPluginsITKUnaryFunctorFilters::InvertIntensityImageFilter:: -_GD0( _TImage* image ) -{ - typedef itk::InvertIntensityImageFilter< _TImage > _TFilter; - - // Configure filter - auto filter = this->_CreateITK< _TFilter >( ); - filter->SetInput( image ); - filter->SetMaximum( this->m_Parameters.GetUint( "Maximum" ) ); - filter->Update( ); - this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) ); -} - -// eof - $RCSfile$