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 CellTraits::PointIdIterator PointIdIterator;
00082 typedef typename CellTraits::PointIdConstIterator PointIdConstIterator;
00083 typedef typename CellTraits::PointIdInternalIterator PointIdInternalIterator;
00084 typedef typename CellTraits::PointIdInternalConstIterator PointIdInternalConstIterator;
00085
00087 typedef typename CellTraits::QuadEdgeType QEType;
00088 typedef typename QEType::OriginRefType VertexRefType;
00089 typedef typename QEType::DualOriginRefType FaceRefType;
00090 typedef typename QEType::PrimalDataType PrimalDataType;
00091 typedef typename QEType::DualDataType DualDataType;
00092 typedef typename QEType::DualType QEDual;
00093
00094 public:
00096 itkTypeMacro( QuadEdgeMeshLineCell, TCellInterface );
00097
00098
00099 QEType* GetQEGeom( ) const { return( m_QuadEdgeGeom ); };
00100
00101 public:
00103 QuadEdgeMeshLineCell( );
00104 virtual ~QuadEdgeMeshLineCell();
00106
00108 void SetIdent( CellIdentifier cid );
00109
00110 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
00133 {
00134 cell.TakeOwnership( new Self );
00135 cell->SetPointId( 0, this->GetQEGeom( )->GetOrigin( ) );
00136 cell->SetPointId( 1, this->GetQEGeom( )->GetDestination( ) );
00137 }
00139
00144 virtual void SetPointIds( PointIdConstIterator first );
00145 virtual void SetPointIds( PointIdConstIterator first,
00146 PointIdConstIterator last );
00147 virtual void SetPointId( int localId, PointIdentifier pId );
00149
00150 virtual PointIdIterator PointIdsBegin(){return (PointIdIterator)0; }
00151 virtual PointIdIterator PointIdsEnd(){return (PointIdIterator)0; }
00152
00153 virtual PointIdConstIterator GetPointIds() const {return (PointIdIterator)0; }
00154 virtual PointIdConstIterator PointIdsBegin() const {return (PointIdIterator)0; }
00155 virtual PointIdConstIterator PointIdsEnd() const {return (PointIdIterator)0; }
00156
00158 virtual void InternalSetPointIds( PointIdInternalConstIterator first );
00159 virtual void InternalSetPointIds( PointIdInternalConstIterator first,
00160 PointIdInternalConstIterator last );
00162
00163 virtual PointIdInternalIterator InternalPointIdsBegin();
00164 virtual PointIdInternalIterator InternalPointIdsEnd();
00165
00166 virtual PointIdInternalConstIterator InternalGetPointIds() const;
00167 virtual PointIdInternalConstIterator InternalPointIdsBegin() const;
00168 virtual PointIdInternalConstIterator InternalPointIdsEnd() const;
00169
00170 private:
00171 QuadEdgeMeshLineCell( const Self& );
00172 void operator=( const Self& );
00173
00178 CellIdentifier m_Identifier;
00179 QEType* m_QuadEdgeGeom;
00180 };
00181
00182 }
00183
00184 #ifndef ITK_MANUAL_INSTANTIATION
00185 #include "itkQuadEdgeMeshLineCell.txx"
00186 #endif
00187
00188 #endif
00189