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 TQE QuadEdgeType;
00058 typedef typename TQE::IteratorGeom PointIdIterator;
00059 typedef typename TQE::ConstIteratorGeom PointIdConstIterator;
00060 };
00061
00076 template< typename TPixel, unsigned int VPointDimension,
00077 typename TPData, typename TDData,
00078 typename TCoordRep=float, typename TInterpolationWeight=float >
00079 class QuadEdgeMeshTraits
00080 {
00081 public:
00083 typedef QuadEdgeMeshTraits Self;
00084 typedef TPixel PixelType;
00085 typedef TPixel CellPixelType;
00086 typedef TCoordRep CoordRepType;
00087 typedef TInterpolationWeight InterpolationWeightType;
00088
00089 itkStaticConstMacro( PointDimension, unsigned int, VPointDimension );
00090 itkStaticConstMacro( MaxTopologicalDimension, unsigned int,
00091 VPointDimension );
00092
00093 typedef unsigned long PointIdentifier;
00094 typedef unsigned long CellIdentifier;
00095 typedef unsigned long CellFeatureIdentifier;
00096
00097 typedef std::set< CellIdentifier > UsingCellsContainer;
00098 typedef std::set< CellIdentifier > PointCellLinksContainer;
00099
00101 typedef TPData PrimalDataType;
00102 typedef TDData DualDataType;
00103 typedef GeometricalQuadEdge< PointIdentifier, CellIdentifier,
00104 PrimalDataType, DualDataType > QEPrimal;
00105
00106 typedef typename QEPrimal::DualType QEDual;
00109 typedef typename QEPrimal::OriginRefType VertexRefType;
00110 typedef typename QEPrimal::DualOriginRefType FaceRefType;
00111
00113 typedef QuadEdgeMeshPoint<
00114 CoordRepType, VPointDimension, QEPrimal > PointType;
00115 typedef MapContainer< PointIdentifier, PointType > PointsContainer;
00116
00118 typedef QuadEdgeMeshCellTraitsInfo<
00119 VPointDimension, CoordRepType,
00120 InterpolationWeightType, PointIdentifier,
00121 CellIdentifier, CellFeatureIdentifier,
00122 PointType, PointsContainer,
00123 UsingCellsContainer, QEPrimal > CellTraits;
00124 typedef CellInterface< CellPixelType, CellTraits > CellType;
00125 typedef typename CellType::CellAutoPointer CellAutoPointer;
00126
00128 typedef MapContainer< PointIdentifier,
00129 PointCellLinksContainer > CellLinksContainer;
00130 typedef MapContainer< CellIdentifier, CellType* > CellsContainer;
00131 typedef MapContainer< PointIdentifier, PixelType > PointDataContainer;
00132 typedef MapContainer< CellIdentifier, CellPixelType > CellDataContainer;
00133
00135 typedef typename PointType::VectorType VectorType;
00136 };
00137
00138 }
00139
00140 #endif
00141