00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __itkQuadEdgeMeshLineCell_h
00020 #define __itkQuadEdgeMeshLineCell_h
00021
00022 #include "itkAutoPointer.h"
00023 #include "itkGeometricalQuadEdge.h"
00024
00025 namespace itk
00026 {
00027
00039 template< class TCellInterface >
00040 class QuadEdgeMeshLineCell
00041 : public TCellInterface, public TCellInterface::CellTraits::QuadEdgeType
00042 {
00043 public:
00044
00046
00047 typedef QuadEdgeMeshLineCell Self;
00048 typedef AutoPointer< const Self > ConstSelfAutoPointer;
00049 typedef AutoPointer< Self > SelfAutoPointer;
00050 typedef Self * RawPointer;
00051 typedef const Self * ConstRawPointer;
00052
00053
00054 typedef TCellInterface Superclass;
00055 typedef typename Superclass::PixelType PixelType;
00056 typedef typename Superclass::CellType CellType;
00057 typedef typename Superclass::CellAutoPointer CellAutoPointer;
00058 typedef typename Superclass::CellConstAutoPointer CellConstAutoPointer;
00059 typedef typename Superclass::CellRawPointer CellRawPointer;
00060 typedef typename Superclass::CellConstRawPointer CellConstRawPointer;
00061 typedef typename Superclass::CellTraits CellTraits;
00062 typedef typename Superclass::CoordRepType CoordRepType;
00063 typedef typename Superclass::InterpolationWeightType InterpolationWeightType;
00064 typedef typename Superclass::PointIdentifier PointIdentifier;
00065 typedef typename Superclass::CellIdentifier CellIdentifier;
00066 typedef typename Superclass::CellFeatureIdentifier CellFeatureIdentifier;
00067 typedef typename Superclass::CellFeatureIdentifier CellFeatureCount;
00068 typedef typename Superclass::PointType PointType;
00069 typedef typename Superclass::PointsContainer PointsContainer;
00070 typedef typename Superclass::UsingCellsContainer UsingCellsContainer;
00071 typedef typename Superclass::CellGeometry CellGeometry;
00072 typedef typename Superclass::ParametricCoordArrayType ParametricCoordArrayType;
00073 typedef typename Superclass::ShapeFunctionsArrayType ShapeFunctionsArrayType;
00074 itkStaticConstMacro( PointDimension, unsigned int, Superclass::PointDimension );
00075 itkStaticConstMacro( CellDimension, unsigned int, 2 );
00076
00078 typedef typename CellType::MultiVisitor MultiVisitor;
00079
00081 typedef typename Superclass::CellTraits::QuadEdgeType QEType;
00082 typedef typename QEType::OriginRefType VertexRefType;
00083 typedef typename QEType::DualOriginRefType FaceRefType;
00084 typedef typename QEType::PrimalDataType PrimalDataType;
00085 typedef typename QEType::DualDataType DualDataType;
00086 typedef typename QEType::DualType QEDual;
00087
00089 typedef typename QEType::IteratorGeom PointIdIterator;
00090 typedef typename QEType::ConstIteratorGeom PointIdConstIterator;
00091
00092 public:
00094 itkTypeMacro( QuadEdgeMeshLineCell, TCellInterface );
00095
00097 virtual void MakeEdge();
00098
00099 itkQEAccessorsMacro( QEType, Self, QEDual );
00100
00101 public:
00103 QuadEdgeMeshLineCell( bool makeEdge = true );
00104 virtual ~QuadEdgeMeshLineCell();
00106
00108 void SetIdent( CellIdentifier cid );
00109 CellIdentifier GetIdent();
00111
00113 SelfAutoPointer New();
00114
00116 virtual void Accept( unsigned long cellId, MultiVisitor* mv );
00117 virtual CellGeometry GetType() const;
00119
00121 static int GetTopologyId();
00122 virtual unsigned int GetDimension() const;
00123 virtual unsigned int GetNumberOfPoints() const;
00125
00126 virtual CellFeatureCount GetNumberOfBoundaryFeatures( int dimension ) const;
00127 virtual bool GetBoundaryFeature( int dimension,
00128 CellFeatureIdentifier cellId,
00129 CellAutoPointer& cell );
00130
00132 virtual void MakeCopy( CellAutoPointer& cell ) const { (void)cell; }
00133
00135 virtual void SetPointIds( PointIdConstIterator first );
00136 virtual void SetPointIds( PointIdConstIterator first,
00137 PointIdConstIterator last );
00138 virtual void SetPointId( int localId, PointIdentifier pId );
00140
00141 virtual PointIdIterator PointIdsBegin();
00142 virtual PointIdIterator PointIdsEnd();
00143
00144 virtual PointIdConstIterator GetPointIds() const;
00145 virtual PointIdConstIterator PointIdsBegin() const;
00146 virtual PointIdConstIterator PointIdsEnd() const;
00147
00148 private:
00149 QuadEdgeMeshLineCell( const Self& );
00150 void operator=( const Self& );
00151
00156 CellIdentifier m_Identifier;
00157 };
00158
00159 }
00160
00161 #ifndef ITK_MANUAL_INSTANTIATION
00162 #include "itkQuadEdgeMeshLineCell.txx"
00163 #endif
00164
00165 #endif
00166