]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Algorithms/RGBImageToOtherChannelsFilter.h
...
[cpPlugins.git] / lib / cpExtensions / Algorithms / RGBImageToOtherChannelsFilter.h
index fb04b77583a5515b9913d24cf40f1d0c6e829c84..b5370154bdda2920efdf21fb78711c62f550937b 100644 (file)
@@ -8,66 +8,66 @@
 #include <itkImageToImageFilter.h>
 
 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;
-
-        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:
-        O* GetChannel1( );
-        O* GetChannel2( );
-        O* GetChannel3( );
-
-        const O* GetChannel1( ) const;
-        const O* GetChannel2( ) const;
-        const O* GetChannel3( ) const;
-
-        void GraftChannel1( O* c1 );
-        void GraftChannel2( O* c2 );
-        void GraftChannel3( O* c3 );
-
-      protected:
-        RGBImageToOtherChannelsFilter( );
-        virtual ~RGBImageToOtherChannelsFilter( );
-
-        virtual void BeforeThreadedGenerateData( );
-        virtual void AfterThreadedGenerateData( );
-
-        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
+    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;
+
+    public:
+      itkNewMacro( Self );
+      itkTypeMacro( RGBImageToOtherChannelsFilter, itkImageToImageFilter );
+
+    public:
+      O* GetChannel1( );
+      O* GetChannel2( );
+      O* GetChannel3( );
+
+      const O* GetChannel1( ) const;
+      const O* GetChannel2( ) const;
+      const O* GetChannel3( ) const;
+
+      void GraftChannel1( O* c1 );
+      void GraftChannel2( O* c2 );
+      void GraftChannel3( O* c3 );
+
+    protected:
+      RGBImageToOtherChannelsFilter( );
+      virtual ~RGBImageToOtherChannelsFilter( );
+
+      virtual void BeforeThreadedGenerateData( );
+      virtual void AfterThreadedGenerateData( );
+
+      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