1 // -------------------------------------------------------------------------
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // -------------------------------------------------------------------------
5 #ifndef __CPPLUGINS__EXTENSIONS__ALGORITHMS__RGBIMAGETOOTHERCHANNELSFILTER__H__
6 #define __CPPLUGINS__EXTENSIONS__ALGORITHMS__RGBIMAGETOOTHERCHANNELSFILTER__H__
8 #include <itkImageToImageFilter.h>
18 template< class I, class O, class C >
19 class RGBImageToOtherChannelsFilter
20 : public itk::ImageToImageFilter< I, O >
23 typedef RGBImageToOtherChannelsFilter Self;
24 typedef itk::ImageToImageFilter< I, O > Superclass;
25 typedef itk::SmartPointer< Self > Pointer;
26 typedef itk::SmartPointer< const Self > ConstPointer;
28 typedef I TInputImage;
29 typedef O TOutputImage;
31 typedef typename I::PixelType TInputPixel;
32 typedef typename O::PixelType TOutputPixel;
36 itkTypeMacro( RGBImageToOtherChannelsFilter, itkImageToImageFilter );
43 const O* GetChannel1( ) const;
44 const O* GetChannel2( ) const;
45 const O* GetChannel3( ) const;
47 void GraftChannel1( O* c1 );
48 void GraftChannel2( O* c2 );
49 void GraftChannel3( O* c3 );
52 RGBImageToOtherChannelsFilter( );
53 virtual ~RGBImageToOtherChannelsFilter( );
55 virtual void BeforeThreadedGenerateData( );
56 virtual void AfterThreadedGenerateData( );
58 virtual void ThreadedGenerateData(
59 const typename Superclass::OutputImageRegionType& region,
60 itk::ThreadIdType threadId
64 // Purposely not implemented
65 RGBImageToOtherChannelsFilter( const Self& other );
66 void operator=( const Self& other );
78 #include <cpPlugins/Extensions/Algorithms/RGBImageToOtherChannelsFilter.hxx>
80 #endif // __CPPLUGINS__EXTENSIONS__ALGORITHMS__RGBIMAGETOOTHERCHANNELSFILTER__H__