]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/ImageSliceActors.h
...
[cpPlugins.git] / lib / cpExtensions / Visualization / ImageSliceActors.h
index 3991ab39419309ec5f7399ea3e3a7381128cf2a7..37aeac402cef79579d23b0bbab961fbb209b162c 100644 (file)
 #include <vtkTextActor.h>
 
 // -------------------------------------------------------------------------
-#define cpPlugins_ImageSliceActors( name, type )                        \
-  inline type* Get##name##Actor( ) const                                \
-  {                                                                     \
-    return(                                                             \
-      dynamic_cast< type* >(                                            \
-        const_cast< Self* >( this )->                                   \
-        GetItemAsObject( this->name##ActorIndex )                       \
-        )                                                               \
-      );                                                                \
+#define cpPlugins_ImageSliceActors( name, type )        \
+  inline type* Get##name##Actor( ) const                \
+  {                                                     \
+    return(                                             \
+      dynamic_cast< type* >(                            \
+        const_cast< Self* >( this )->                   \
+        GetItemAsObject( this->name##ActorIndex )       \
+        )                                               \
+      );                                                \
   }
 
 // -------------------------------------------------------------------------
@@ -30,66 +30,66 @@ class vtkImageData;
 
 // -------------------------------------------------------------------------
 namespace cpExtensions
+{
+  namespace Visualization
   {
-    namespace Visualization
+    /**
+     */
+    class cpExtensions_EXPORT ImageSliceActors
+      : public vtkPropCollection
     {
-      /**
-       */
-      class cpExtensions_EXPORT ImageSliceActors
-        : public vtkPropCollection
-      {
-      public:
-        typedef ImageSliceActors Self;
-
-      public:
-        vtkTypeMacro( ImageSliceActors, vtkPropCollection );
-
-        cpPlugins_ImageSliceActors( Image, vtkImageActor );
-        cpPlugins_ImageSliceActors( Text, vtkTextActor );
-        cpPlugins_ImageSliceActors( Plane, vtkActor );
-
-      public:
-        // Creation
-        static ImageSliceActors* New( );
-
-        void SetInputConnection( vtkAlgorithmOutput* aout, int axis );
-        void SetInputData( vtkImageData* data, int axis );
-
-        double* GetDisplayBounds( ) const;
-        void GetDisplayBounds( double bounds[ 6 ] ) const;
-
-        int GetAxis( ) const;
-        int GetSliceNumber( ) const;
-        int GetSliceNumberMinValue( ) const;
-        int GetSliceNumberMaxValue( ) const;
-        void SetSliceNumber( const int& slice );
-        void UpdateText( );
-
-      protected:
-        ImageSliceActors( );
-        virtual ~ImageSliceActors( );
-
-      private:
-        // Purposely not implemented
-        ImageSliceActors( const Self& );
-        Self& operator=( const Self& );
-
-      protected:
-        vtkSmartPointer< vtkImageSliceMapper > SliceMapper;
-        vtkSmartPointer< vtkPolyData >         PlaneSource;
-        vtkSmartPointer< vtkPolyDataMapper >   PlaneMapper;
-        char                                   TextBuffer[ 1024 ];
-
-        vtkSmartPointer< vtkImageActor > ImageActor;
-        vtkSmartPointer< vtkTextActor >  TextActor;
-        vtkSmartPointer< vtkActor >      PlaneActor;
-
-        unsigned int ImageActorIndex;
-        unsigned int TextActorIndex;
-        unsigned int PlaneActorIndex;
-      };
-
-    } // ecapseman
+    public:
+      typedef ImageSliceActors Self;
+
+    public:
+      vtkTypeMacro( ImageSliceActors, vtkPropCollection );
+
+      cpPlugins_ImageSliceActors( Image, vtkImageActor );
+      cpPlugins_ImageSliceActors( Text, vtkTextActor );
+      cpPlugins_ImageSliceActors( Plane, vtkActor );
+
+    public:
+      // Creation
+      static ImageSliceActors* New( );
+
+      void SetInputConnection( vtkAlgorithmOutput* aout, int axis );
+      void SetInputData( vtkImageData* data, int axis );
+
+      double* GetDisplayBounds( ) const;
+      void GetDisplayBounds( double bounds[ 6 ] ) const;
+
+      int GetAxis( ) const;
+      int GetSliceNumber( ) const;
+      int GetSliceNumberMinValue( ) const;
+      int GetSliceNumberMaxValue( ) const;
+      void SetSliceNumber( const int& slice );
+      void UpdateText( );
+
+    protected:
+      ImageSliceActors( );
+      virtual ~ImageSliceActors( );
+
+    private:
+      // Purposely not implemented
+      ImageSliceActors( const Self& );
+      Self& operator=( const Self& );
+
+    protected:
+      vtkSmartPointer< vtkImageSliceMapper > SliceMapper;
+      vtkSmartPointer< vtkPolyData >         PlaneSource;
+      vtkSmartPointer< vtkPolyDataMapper >   PlaneMapper;
+      char                                   TextBuffer[ 1024 ];
+
+      vtkSmartPointer< vtkImageActor > ImageActor;
+      vtkSmartPointer< vtkTextActor >  TextActor;
+      vtkSmartPointer< vtkActor >      PlaneActor;
+
+      unsigned int ImageActorIndex;
+      unsigned int TextActorIndex;
+      unsigned int PlaneActorIndex;
+    };
+
+  } // ecapseman
 
 } // ecapseman