X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FVisualization%2FMeshMapper.h;h=c6aee51990d84b206e674263a7dcb72a90777c8b;hb=73332fee95f5410c46e3b0cff1e2755d5e4a8b71;hp=e72ba037ab3372b37b144682b8024f8483603d87;hpb=2361f4f97631e09d88d8a5510a369817dcaa19db;p=cpPlugins.git diff --git a/lib/cpExtensions/Visualization/MeshMapper.h b/lib/cpExtensions/Visualization/MeshMapper.h index e72ba03..c6aee51 100644 --- a/lib/cpExtensions/Visualization/MeshMapper.h +++ b/lib/cpExtensions/Visualization/MeshMapper.h @@ -9,94 +9,96 @@ 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 +#ifndef ITK_MANUAL_INSTANTIATION #include +#endif // ITK_MANUAL_INSTANTIATION #endif // __CPEXTENSIONS__VISUALIZATION__MESHMAPPER__H__