- /**
- */
- template< typename P, unsigned int D = 3, typename T = itk::DefaultStaticMeshTraits< P, D, D > >
- class QuadEdgeMesh
- : public itk::Mesh< P, D, T >
- {
- public:
- typedef QuadEdgeMesh Self;
- typedef itk::Mesh< P, D, T > Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- /// Types from superclass
- typedef typename
- Superclass::BoundaryAssignmentsContainer
- BoundaryAssignmentsContainer;
-
- typedef typename
- Superclass::BoundaryAssignmentsContainerPointer
- BoundaryAssignmentsContainerPointer;
-
- typedef typename Superclass::BoundingBoxType BoundingBoxType;
- typedef typename Superclass::CellAutoPointer CellAutoPointer;
- typedef typename Superclass::CellsContainer CellsContainer;
- typedef typename Superclass::CellDataContainer CellDataContainer;
- typedef typename Superclass::CellFeatureCount CellFeatureCount;
- typedef typename Superclass::CellFeatureIdentifier CellFeatureIdentifier;
- typedef typename Superclass::CellIdentifier CellIdentifier;
- typedef typename Superclass::CellLinksContainer CellLinksContainer;
- typedef typename Superclass::CellMultiVisitorType CellMultiVisitorType;
- typedef typename Superclass::CellPixelType CellPixelType;
- typedef typename Superclass::CellType CellType;
- typedef typename Superclass::PointIdentifier PointIdentifier;
- typedef typename Superclass::PointsContainer PointsContainer;
- typedef typename Superclass::PointType PointType;
-
- /// QuadEdge types (primal and dual)
- typedef QuadEdge< PointIdentifier, CellIdentifier > TPrimalEdge;
- typedef typename TPrimalEdge::TDual TDualEdge;
- typedef QuadEdgeCell< CellType, TPrimalEdge > TQuadEdgeCell;
-
- /// Memory management objects
- typedef std::set< typename TPrimalEdge::Pointer > CntPrimalEdges;
- typedef std::set< typename TDualEdge::Pointer > CntDualEdges;
- typedef std::vector< TPrimalEdge* > CntOnextRings;
-
- /// More geometry types
- typedef typename PointType::VectorType VectorType;
- typedef typename VectorType::ValueType TScalar;
- typedef std::vector< VectorType > CntNormals;
- typedef typename CntNormals::const_iterator NormalsIterator;
-
- protected:
- typedef std::vector< TPrimalEdge* > _TEdges;
-
- public:
- itkNewMacro( Self );
- itkTypeMacro( QuadEdgeMesh, itkMesh );
-
- public:
- // Edge related methods
- TPrimalEdge* FindEdge( const PointIdentifier& a ) const;
- TPrimalEdge* FindEdge(
- const PointIdentifier& a, const PointIdentifier& b
- ) const;
- TPrimalEdge* FindEntryEdge( const CellIdentifier& i ) const;
-
- /// New geometric methods
- const CntNormals& GetPointNormalsContainer( ) const;
- NormalsIterator BeginPointNormals( ) const;
- NormalsIterator EndPointNormals( ) const;
- const VectorType& GetPointNormal( const PointIdentifier& id ) const;
-
- /// itk::DataObject methods overloading
- virtual bool RequestedRegionIsOutsideOfTheBufferedRegion( );
-
- /// itk::PointSet methods overloading
- virtual void SetPoints( PointsContainer* points );
- virtual void SetPoint( PointIdentifier id , PointType point );
-
- /// itk::Mesh methods overloading
- virtual void PassStructure( Self* inputMesh )
- {
- std::cout << "PassStructure" << std::endl;
- std::exit( 1 );
- }
-
- virtual void Initialize( );
- virtual void Graft( const itk::DataObject* data );
-
- void SetCellLinks( CellLinksContainer* cellLinks )
- {
- std::cout << "SetCellLinks" << std::endl;
- std::exit( 1 );
- }
- virtual CellLinksContainer* GetCellLinks( )
- {
- std::cout << "GetCellLinks" << std::endl;
- std::exit( 1 );
- }
- virtual const CellLinksContainer* GetCellLinks( ) const
- {
- std::cout << "GetCellLinks (const)" << std::endl;
- std::exit( 1 );
- }
- virtual void SetCells( CellsContainer* cells );
- virtual void SetCellData( CellDataContainer* data );
- virtual CellDataContainer* GetCellData( )
- {
- std::cout << "GetCellData" << std::endl;
- std::exit( 1 );
- }
- virtual const CellDataContainer* GetCellData( ) const
- {
- std::cout << "GetCellData (const)" << std::endl;
- std::exit( 1 );
- }
+ public:
+ typedef QuadEdgeMesh Self;
+ typedef itk::Mesh< P, D, T > Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
+
+ /// Types from superclass
+ typedef typename
+ Superclass::BoundaryAssignmentsContainer
+ BoundaryAssignmentsContainer;
+
+ typedef typename
+ Superclass::BoundaryAssignmentsContainerPointer
+ BoundaryAssignmentsContainerPointer;
+
+ typedef typename Superclass::BoundingBoxType BoundingBoxType;
+ typedef typename Superclass::CellAutoPointer CellAutoPointer;
+ typedef typename Superclass::CellsContainer CellsContainer;
+ typedef typename Superclass::CellDataContainer CellDataContainer;
+ typedef typename Superclass::CellFeatureCount CellFeatureCount;
+ typedef typename Superclass::CellFeatureIdentifier CellFeatureIdentifier;
+ typedef typename Superclass::CellIdentifier CellIdentifier;
+ typedef typename Superclass::CellLinksContainer CellLinksContainer;
+ typedef typename Superclass::CellMultiVisitorType CellMultiVisitorType;
+ typedef typename Superclass::CellPixelType CellPixelType;
+ typedef typename Superclass::CellType CellType;
+ typedef typename Superclass::PointIdentifier PointIdentifier;
+ typedef typename Superclass::PointsContainer PointsContainer;
+ typedef typename Superclass::PointType PointType;
+
+ /// QuadEdge types (primal and dual)
+ typedef QuadEdge< PointIdentifier, CellIdentifier > TPrimalEdge;
+ typedef typename TPrimalEdge::TDual TDualEdge;
+ typedef QuadEdgeCell< CellType, TPrimalEdge > TQuadEdgeCell;
+
+ /// Memory management objects
+ typedef std::set< typename TPrimalEdge::Pointer > CntPrimalEdges;
+ typedef std::set< typename TDualEdge::Pointer > CntDualEdges;
+ typedef std::vector< TPrimalEdge* > CntOnextRings;
+
+ /// More geometry types
+ typedef typename PointType::VectorType VectorType;
+ typedef typename VectorType::ValueType TScalar;
+ typedef std::vector< VectorType > CntNormals;
+ typedef typename CntNormals::const_iterator NormalsIterator;
+
+ protected:
+ typedef std::vector< TPrimalEdge* > _TEdges;
+
+ public:
+ itkNewMacro( Self );
+ itkTypeMacro( QuadEdgeMesh, itkMesh );
+
+ public:
+ // Edge related methods
+ TPrimalEdge* FindEdge( const PointIdentifier& a ) const;
+ TPrimalEdge* FindEdge(
+ const PointIdentifier& a, const PointIdentifier& b
+ ) const;
+ TPrimalEdge* FindEntryEdge( const CellIdentifier& i ) const;
+
+ /// New geometric methods
+ const CntNormals& GetPointNormalsContainer( ) const;
+ NormalsIterator BeginPointNormals( ) const;
+ NormalsIterator EndPointNormals( ) const;
+ const VectorType& GetPointNormal( const PointIdentifier& id ) const;
+
+ /// itk::DataObject methods overloading
+ virtual bool RequestedRegionIsOutsideOfTheBufferedRegion( );
+
+ /// itk::PointSet methods overloading
+ virtual void SetPoints( PointsContainer* points );
+ virtual void SetPoint( PointIdentifier id , PointType point );
+
+ /// itk::Mesh methods overloading
+ virtual void PassStructure( Self* inputMesh )
+ {
+ std::cout << "PassStructure" << std::endl;
+ std::exit( 1 );
+ }
+
+ virtual void Initialize( );
+ virtual void Graft( const itk::DataObject* data );
+
+ void SetCellLinks( CellLinksContainer* cellLinks )
+ {
+ std::cout << "SetCellLinks" << std::endl;
+ std::exit( 1 );
+ }
+ virtual CellLinksContainer* GetCellLinks( )
+ {
+ std::cout << "GetCellLinks" << std::endl;
+ std::exit( 1 );
+ }
+ virtual const CellLinksContainer* GetCellLinks( ) const
+ {
+ std::cout << "GetCellLinks (const)" << std::endl;
+ std::exit( 1 );
+ }
+ virtual void SetCells( CellsContainer* cells );
+ virtual void SetCellData( CellDataContainer* data );
+ virtual CellDataContainer* GetCellData( )
+ {
+ std::cout << "GetCellData" << std::endl;
+ std::exit( 1 );
+ }
+ virtual const CellDataContainer* GetCellData( ) const
+ {
+ std::cout << "GetCellData (const)" << std::endl;
+ std::exit( 1 );
+ }