ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkQuadEdgeMeshExtendedTraits.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkQuadEdgeMeshExtendedTraits_h
00019 #define __itkQuadEdgeMeshExtendedTraits_h
00020 
00021 #include "itkCellInterface.h"
00022 #include "itkQuadEdgeCellTraitsInfo.h"
00023 #include <set>
00024 
00025 namespace itk
00026 {
00061 template<
00062   typename TPixelType = float,
00063   unsigned int VPointDimension = 3,
00064   unsigned int VMaxTopologicalDimension = VPointDimension,
00065   typename TCoordRep = float,
00066   typename TInterpolationWeightType = float,
00067   typename TCellPixelType = TPixelType,
00068   typename TPData = bool,
00069   typename TDData = bool
00070   >
00071 class QuadEdgeMeshExtendedTraits
00072 {
00073 public:
00074   typedef QuadEdgeMeshExtendedTraits Self;
00075 
00077   typedef TCoordRep      CoordRepType;
00078   typedef TPixelType     PixelType;
00079   typedef TPData         PrimalDataType;
00080   typedef TDData         DualDataType;
00081   typedef TCellPixelType CellPixelType;
00082 
00084   itkStaticConstMacro(PointDimension, unsigned int, VPointDimension);
00085   itkStaticConstMacro(MaxTopologicalDimension, unsigned int,
00086                       VPointDimension);
00088 
00089   typedef TInterpolationWeightType InterpolationWeightType;
00090 
00093   typedef IdentifierType PointIdentifier;
00094 
00097   typedef IdentifierType CellIdentifier;
00098 
00102   typedef IdentifierType CellFeatureIdentifier;
00103 
00106   typedef std::set< CellIdentifier > UsingCellsContainer;
00107 
00110   typedef std::set< CellIdentifier > PointCellLinksContainer;
00111 
00113   typedef GeometricalQuadEdge< PointIdentifier, CellIdentifier, PrimalDataType, DualDataType > QEPrimal;
00114   typedef typename QEPrimal::DualType                                                          QEDual;
00115   typedef typename QEPrimal::OriginRefType                                                     VertexRefType;
00116   typedef typename QEPrimal::DualOriginRefType                                                 FaceRefType;
00117 
00121   typedef QuadEdgeMeshPoint<
00122     CoordRepType, VPointDimension, QEPrimal >                 PointType;
00123 
00124   typedef Point< CoordRepType, VPointDimension > PointHashType;
00125 
00128   typedef MapContainer< PointIdentifier, PointType > PointsContainer;
00129 
00131   typedef QuadEdgeMeshCellTraitsInfo<
00132     VPointDimension, CoordRepType,
00133     InterpolationWeightType, PointIdentifier,
00134     CellIdentifier,          CellFeatureIdentifier,
00135     PointType,               PointsContainer,
00136     UsingCellsContainer,     QEPrimal >                       CellTraits;
00137 
00139   typedef CellInterface< CellPixelType, CellTraits > CellType;
00140   typedef typename CellType::CellAutoPointer         CellAutoPointer;
00141 
00143   typedef MapContainer< PointIdentifier, PointCellLinksContainer > CellLinksContainer;
00144   typedef MapContainer< CellIdentifier, CellType * >               CellsContainer;
00145   typedef MapContainer< PointIdentifier, PixelType >               PointDataContainer;
00146   typedef MapContainer< CellIdentifier, CellPixelType >            CellDataContainer;
00147 
00149   typedef typename PointType::VectorType VectorType;
00150 };
00151 } // enamespace
00152 
00153 #endif
00154 
00155 // eof - itkQuadEdgeMeshExtendedTraits.h
00156