X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FAlgorithms%2FRGBImageToOtherChannelsFilter.h;h=4ce67542dccbfb74e182bd951160cc6e92c9703e;hb=8eaa2cf759c39233848cdd5b8346faccbea4c172;hp=fb04b77583a5515b9913d24cf40f1d0c6e829c84;hpb=2361f4f97631e09d88d8a5510a369817dcaa19db;p=cpPlugins.git diff --git a/lib/cpExtensions/Algorithms/RGBImageToOtherChannelsFilter.h b/lib/cpExtensions/Algorithms/RGBImageToOtherChannelsFilter.h index fb04b77..4ce6754 100644 --- a/lib/cpExtensions/Algorithms/RGBImageToOtherChannelsFilter.h +++ b/lib/cpExtensions/Algorithms/RGBImageToOtherChannelsFilter.h @@ -8,70 +8,59 @@ #include namespace cpExtensions +{ + namespace Algorithms { - namespace Algorithms + /** + */ + template< class I, class O, class C > + class RGBImageToOtherChannelsFilter + : public itk::ImageToImageFilter< I, O > { - /** - */ - template< class I, class O, class C > - class RGBImageToOtherChannelsFilter - : public itk::ImageToImageFilter< I, O > - { - public: - typedef RGBImageToOtherChannelsFilter Self; - typedef itk::ImageToImageFilter< I, O > Superclass; - typedef itk::SmartPointer< Self > Pointer; - typedef itk::SmartPointer< const Self > ConstPointer; + public: + typedef RGBImageToOtherChannelsFilter Self; + typedef itk::ImageToImageFilter< I, O > Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; - typedef I TInputImage; - typedef O TOutputImage; - typedef C TConverter; - typedef typename I::PixelType TInputPixel; - typedef typename O::PixelType TOutputPixel; + typedef I TInputImage; + typedef O TOutputImage; + typedef C TConverter; + typedef typename I::PixelType TInputPixel; + typedef typename O::PixelType TOutputPixel; - public: - itkNewMacro( Self ); - itkTypeMacro( RGBImageToOtherChannelsFilter, itkImageToImageFilter ); + public: + itkNewMacro( Self ); + itkTypeMacro( RGBImageToOtherChannelsFilter, itkImageToImageFilter ); - public: - O* GetChannel1( ); - O* GetChannel2( ); - O* GetChannel3( ); + protected: + RGBImageToOtherChannelsFilter( ); + virtual ~RGBImageToOtherChannelsFilter( ); - const O* GetChannel1( ) const; - const O* GetChannel2( ) const; - const O* GetChannel3( ) const; + virtual void BeforeThreadedGenerateData( ); + virtual void AfterThreadedGenerateData( ); - void GraftChannel1( O* c1 ); - void GraftChannel2( O* c2 ); - void GraftChannel3( O* c3 ); + virtual void ThreadedGenerateData( + const typename Superclass::OutputImageRegionType& region, + itk::ThreadIdType threadId + ); - protected: - RGBImageToOtherChannelsFilter( ); - virtual ~RGBImageToOtherChannelsFilter( ); + private: + // Purposely not implemented + RGBImageToOtherChannelsFilter( const Self& other ); + void operator=( const Self& other ); - virtual void BeforeThreadedGenerateData( ); - virtual void AfterThreadedGenerateData( ); + private: + TConverter Converter; + }; - virtual void ThreadedGenerateData( - const typename Superclass::OutputImageRegionType& region, - itk::ThreadIdType threadId - ); - - private: - // Purposely not implemented - RGBImageToOtherChannelsFilter( const Self& other ); - void operator=( const Self& other ); - - private: - TConverter Converter; - }; - - } // ecapseman + } // ecapseman } // ecapseman +#ifndef ITK_MANUAL_INSTANTIATION #include +#endif // ITK_MANUAL_INSTANTIATION #endif // __CPEXTENSIONS__ALGORITHMS__RGBIMAGETOOTHERCHANNELSFILTER__H__