X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPlugins%2FRGBImageToHSVChannelsFilter.cxx;h=166dfee3875b4b7f414a8cd4b81224b55da5f4bd;hb=2b6c309cb92d89cf9b5b0824dc8ad8cdbef96a8d;hp=339a818f8fc358cc941332f5199e4297f8515684;hpb=cb833d2fface96e020fe91584d2206860a8174ee;p=cpPlugins.git diff --git a/lib/cpPlugins/Plugins/RGBImageToHSVChannelsFilter.cxx b/lib/cpPlugins/Plugins/RGBImageToHSVChannelsFilter.cxx index 339a818..166dfee 100644 --- a/lib/cpPlugins/Plugins/RGBImageToHSVChannelsFilter.cxx +++ b/lib/cpPlugins/Plugins/RGBImageToHSVChannelsFilter.cxx @@ -1,6 +1,7 @@ #include #include -#include +#include +#include #define ITK_MANUAL_INSTANTIATION #include @@ -18,7 +19,6 @@ ) \ r = this->f< p, d >( ) - // ------------------------------------------------------------------------- std::string cpPlugins::Plugins::RGBImageToHSVChannelsFilter:: GetClassName( ) const @@ -37,7 +37,7 @@ RGBImageToHSVChannelsFilter( ) this->_MakeOutput< cpPlugins::Interface::Image >( 1 ); this->_MakeOutput< cpPlugins::Interface::Image >( 2 ); - this->m_DefaultParameters.clear( ); + this->m_DefaultParameters.Clear( ); } // ------------------------------------------------------------------------- @@ -89,8 +89,9 @@ _GD1( ) { typedef itk::Image< itk::RGBPixel< P >, D > _TImage; typedef itk::Image< P, D > _TChannel; + typedef cpPlugins::Extensions::Algorithms::RGBToHSVFunction< P > _TFunction; typedef cpPlugins::Extensions::Algorithms:: - RGBImageToHSVChannelsFilter< _TImage, _TChannel > _TFilter; + RGBImageToOtherChannelsFilter< _TImage, _TChannel, _TFunction > _TFilter; // Filter creation _TFilter* filter = @@ -105,9 +106,9 @@ _GD1( ) filter->SetInput( dynamic_cast< _TImage* >( this->_GetInput( 0 ) ) ); filter->Update( ); - this->_SetOutput( 0, filter->GetHueOutput( ) ); - this->_SetOutput( 1, filter->GetSaturationOutput( ) ); - this->_SetOutput( 2, filter->GetValueOutput( ) ); + this->_SetOutput( 0, filter->GetChannel1( ) ); + this->_SetOutput( 1, filter->GetChannel2( ) ); + this->_SetOutput( 2, filter->GetChannel3( ) ); return( "" ); }