]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Visualization/MeshMapper.h
...
[cpPlugins.git] / lib / cpExtensions / Visualization / MeshMapper.h
index e72ba037ab3372b37b144682b8024f8483603d87..e833f128f03496ca133c78a5be1862e99dd2c397 100644 (file)
@@ -9,90 +9,90 @@ class vtkInformation;
 class vtkRenderer;
 
 namespace cpExtensions
+{
+  namespace Visualization
   {
-    namespace Visualization
+    /**
+     */
+    template< class M >
+    class MeshMapper
+      : public vtkMapper
     {
-      /**
-       */
-      template< class M >
-      class MeshMapper
-        : public vtkMapper
-      {
-      public:
-        typedef MeshMapper Self;
-        vtkTypeMacro( MeshMapper, vtkMapper );
-
-        typedef M                             TMesh;
-        typedef typename M::PointType         TPoint;
-        typedef typename TPoint::VectorType   TVector;
-        typedef typename TPoint::CoordRepType TScalar;
-        itkStaticConstMacro( Dimension, unsigned int, M::PointDimension );
-
-        // Begin concept checking
+    public:
+      typedef MeshMapper Self;
+      vtkTypeMacro( MeshMapper, vtkMapper );
+
+      typedef M                             TMesh;
+      typedef typename M::PointType         TPoint;
+      typedef typename TPoint::VectorType   TVector;
+      typedef typename TPoint::CoordRepType TScalar;
+      itkStaticConstMacro( Dimension, unsigned int, M::PointDimension );
+
+      // Begin concept checking
 #ifdef ITK_USE_CONCEPT_CHECKING
-        /* TODO
-           itkConceptMacro(
-           InputMeshIsTwoOrThreeimensionalCheck,
-           ( itk::Concept::SameDimensionOrMinusOne< Self::Dimension, 3 > )
-           );
-           itkConceptMacro(
-           ScalarTypeHasFloatResolution,
-           ( itk::Concept::IsFloatingPoint< TScalar > )
-           );
-        */
+      /* TODO
+         itkConceptMacro(
+         InputMeshIsTwoOrThreeimensionalCheck,
+         ( itk::Concept::SameDimensionOrMinusOne< Self::Dimension, 3 > )
+         );
+         itkConceptMacro(
+         ScalarTypeHasFloatResolution,
+         ( itk::Concept::IsFloatingPoint< TScalar > )
+         );
+      */
 #endif
-        // End concept checking
-
-      public:
-        // TODO: static Self* New( );
-        virtual void ShallowCopy( vtkAbstractMapper* m );
-
-        virtual void SetInputData( M* in );
-        virtual M* GetInput( );
-        virtual const M* GetInput( ) const;
-
-        virtual double* GetBounds( );
-        virtual void GetBounds( double bounds[ 6 ] );
-
-        virtual void RenderPiece( vtkRenderer* aren, vtkActor* act ) = 0;
-        virtual void Render( vtkRenderer* aren, vtkActor* act );
-        virtual void Update( );
-        virtual void Update( int port );
-
-        virtual void MapDataArrayToVertexAttribute(
-          const char* vertexAttributeName,
-          const char* dataArrayName,
-          int fieldAssociation,
-          int componentno = -1
-          );
-        virtual void MapDataArrayToMultiTextureAttribute(
-          int unit,
-          const char* dataArrayName,
-          int fieldAssociation,
-          int componentno = -1
-          );
-        virtual void RemoveVertexAttributeMapping(
-          const char* vertexAttributeName
-          );
-        virtual void RemoveAllVertexAttributeMappings( );
-
-      protected:
-        MeshMapper( );
-        virtual ~MeshMapper( );
-
-        virtual void ComputeBounds( );
-        virtual int FillInputPortInformation( int port, vtkInformation* info );
-
-      private:
-        // These methods aren't supposed to be implemented
-        MeshMapper( const Self& other );
-        Self& operator=( const Self& other );
-
-      protected:
-        typename M::Pointer Mesh;
-      };
-
-    } // ecapseman
+      // End concept checking
+
+    public:
+      // TODO: static Self* New( );
+      virtual void ShallowCopy( vtkAbstractMapper* m );
+
+      virtual void SetInputData( M* in );
+      virtual M* GetInput( );
+      virtual const M* GetInput( ) const;
+
+      virtual double* GetBounds( );
+      virtual void GetBounds( double bounds[ 6 ] );
+
+      virtual void RenderPiece( vtkRenderer* aren, vtkActor* act ) = 0;
+      virtual void Render( vtkRenderer* aren, vtkActor* act );
+      virtual void Update( );
+      virtual void Update( int port );
+
+      virtual void MapDataArrayToVertexAttribute(
+        const char* vertexAttributeName,
+        const char* dataArrayName,
+        int fieldAssociation,
+        int componentno = -1
+        );
+      virtual void MapDataArrayToMultiTextureAttribute(
+        int unit,
+        const char* dataArrayName,
+        int fieldAssociation,
+        int componentno = -1
+        );
+      virtual void RemoveVertexAttributeMapping(
+        const char* vertexAttributeName
+        );
+      virtual void RemoveAllVertexAttributeMappings( );
+
+    protected:
+      MeshMapper( );
+      virtual ~MeshMapper( );
+
+      virtual void ComputeBounds( );
+      virtual int FillInputPortInformation( int port, vtkInformation* info );
+
+    private:
+      // These methods aren't supposed to be implemented
+      MeshMapper( const Self& other );
+      Self& operator=( const Self& other );
+
+    protected:
+      typename M::Pointer Mesh;
+    };
+
+  } // ecapseman
 
 } // ecapseman