00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkQuadEdgeMeshTraits_h
00019 #define __itkQuadEdgeMeshTraits_h
00020
00021 #include <set>
00022 #include <itkCellInterface.h>
00023 #include <itkMapContainer.h>
00024 #include "itkQuadEdgeMeshPoint.h"
00025 #include "itkGeometricalQuadEdge.h"
00026
00027 namespace itk
00028 {
00038 template< int VPointDimension, typename TCoordRep,
00039 typename TInterpolationWeight, typename TPointIdentifier,
00040 typename TCellIdentifier, typename TCellFeatureIdentifier,
00041 typename TPoint, typename TPointsContainer,
00042 typename TUsingCellsContainer, typename TQE >
00043 class QuadEdgeMeshCellTraitsInfo
00044 {
00045 public:
00046 itkStaticConstMacro( PointDimension, unsigned int, VPointDimension );
00047 typedef TCoordRep CoordRepType;
00048 typedef TInterpolationWeight InterpolationWeightType;
00049 typedef TPointIdentifier PointIdentifier;
00050 typedef TCellIdentifier CellIdentifier;
00051 typedef TCellFeatureIdentifier CellFeatureIdentifier;
00052 typedef TPoint PointType;
00053 typedef TPointsContainer PointsContainer;
00054 typedef TUsingCellsContainer UsingCellsContainer;
00055
00057 typedef PointIdentifier* PointIdIterator;
00058 typedef const PointIdentifier* PointIdConstIterator;
00059 typedef TQE QuadEdgeType;
00060 typedef typename TQE::IteratorGeom PointIdInternalIterator;
00061 typedef typename TQE::ConstIteratorGeom PointIdInternalConstIterator;
00062 };
00063
00078 template< typename TPixel, unsigned int VPointDimension,
00079 typename TPData, typename TDData,
00080 typename TCoordRep=float, typename TInterpolationWeight=float >
00081 class QuadEdgeMeshTraits
00082 {
00083 public:
00085 typedef QuadEdgeMeshTraits Self;
00086 typedef TPixel PixelType;
00087 typedef TPixel CellPixelType;
00088 typedef TCoordRep CoordRepType;
00089 typedef TInterpolationWeight InterpolationWeightType;
00090
00091 itkStaticConstMacro( PointDimension, unsigned int, VPointDimension );
00092 itkStaticConstMacro( MaxTopologicalDimension, unsigned int,
00093 VPointDimension );
00094
00095 typedef unsigned long PointIdentifier;
00096 typedef unsigned long CellIdentifier;
00097 typedef unsigned long CellFeatureIdentifier;
00098
00099 typedef std::set< CellIdentifier > UsingCellsContainer;
00100 typedef std::set< CellIdentifier > PointCellLinksContainer;
00101
00103 typedef TPData PrimalDataType;
00104 typedef TDData DualDataType;
00105 typedef GeometricalQuadEdge< PointIdentifier, CellIdentifier,
00106 PrimalDataType, DualDataType > QEPrimal;
00107
00108 typedef typename QEPrimal::DualType QEDual;
00111 typedef typename QEPrimal::OriginRefType VertexRefType;
00112 typedef typename QEPrimal::DualOriginRefType FaceRefType;
00113
00115 typedef QuadEdgeMeshPoint<
00116 CoordRepType, VPointDimension, QEPrimal > PointType;
00117 typedef MapContainer< PointIdentifier, PointType > PointsContainer;
00118
00120 typedef QuadEdgeMeshCellTraitsInfo<
00121 VPointDimension, CoordRepType,
00122 InterpolationWeightType, PointIdentifier,
00123 CellIdentifier, CellFeatureIdentifier,
00124 PointType, PointsContainer,
00125 UsingCellsContainer, QEPrimal > CellTraits;
00126 typedef CellInterface< CellPixelType, CellTraits > CellType;
00127 typedef typename CellType::CellAutoPointer CellAutoPointer;
00128
00130 typedef MapContainer< PointIdentifier,
00131 PointCellLinksContainer > CellLinksContainer;
00132 typedef MapContainer< CellIdentifier, CellType* > CellsContainer;
00133 typedef MapContainer< PointIdentifier, PixelType > PointDataContainer;
00134 typedef MapContainer< CellIdentifier, CellPixelType > CellDataContainer;
00135
00137 typedef typename PointType::VectorType VectorType;
00138 };
00139
00140 }
00141
00142 #endif
00143