ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkQuadEdgeMeshTraits.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 __itkQuadEdgeMeshTraits_h
00019 #define __itkQuadEdgeMeshTraits_h
00020 
00021 #include <set>
00022 #include "itkCellInterface.h"
00023 #include "itkQuadEdgeCellTraitsInfo.h"
00024 
00025 namespace itk
00026 {
00042 template< typename TPixel, unsigned int VPointDimension,
00043           typename TPData, typename TDData,
00044           typename TCoordRep = float, typename TInterpolationWeight = float >
00045 class QuadEdgeMeshTraits
00046 {
00047 public:
00049   typedef QuadEdgeMeshTraits   Self;
00050   typedef TPixel               PixelType;
00051   typedef TPixel               CellPixelType;
00052   typedef TCoordRep            CoordRepType;
00053   typedef TInterpolationWeight InterpolationWeightType;
00054 
00055   itkStaticConstMacro(PointDimension, unsigned int, VPointDimension);
00056   itkStaticConstMacro(MaxTopologicalDimension, unsigned int,
00057                       VPointDimension);
00058 
00059   typedef ::itk::IdentifierType   PointIdentifier;
00060   typedef ::itk::IdentifierType   CellIdentifier;
00061 
00062   typedef unsigned char CellFeatureIdentifier; // made small in purpose
00063 
00064   typedef std::set< CellIdentifier > UsingCellsContainer;
00065   typedef std::set< CellIdentifier > PointCellLinksContainer;
00066 
00068   typedef TPData PrimalDataType;
00069   typedef TDData DualDataType;
00070   typedef GeometricalQuadEdge< PointIdentifier, CellIdentifier,
00071                                PrimalDataType, DualDataType > QEPrimal;
00072   //typedef QEPrimal QEType;
00073   typedef typename QEPrimal::DualType QEDual;
00074   // FOR LEO typedef typename QEPrimal::Superclass     QEType;
00075   // FOR LEO typedef typename QEPrimal::Dual           QEDual;
00076   typedef typename QEPrimal::OriginRefType     VertexRefType;
00077   typedef typename QEPrimal::DualOriginRefType FaceRefType;
00078 
00081   typedef Point< CoordRepType, VPointDimension > PointHashType;
00082 
00084   typedef QuadEdgeMeshPoint< CoordRepType, VPointDimension, QEPrimal > PointType;
00085   typedef MapContainer< PointIdentifier, PointType >                   PointsContainer;
00086 
00088   typedef QuadEdgeMeshCellTraitsInfo<
00089     VPointDimension, CoordRepType,
00090     InterpolationWeightType, PointIdentifier,
00091     CellIdentifier,          CellFeatureIdentifier,
00092     PointType,               PointsContainer,
00093     UsingCellsContainer,     QEPrimal >                 CellTraits;
00094 
00095   typedef CellInterface< CellPixelType, CellTraits > CellType;
00096   typedef typename CellType::CellAutoPointer         CellAutoPointer;
00097 
00099   typedef MapContainer< PointIdentifier,
00100                         PointCellLinksContainer >       CellLinksContainer;
00101   typedef MapContainer< CellIdentifier, CellType * >    CellsContainer;
00102   typedef MapContainer< PointIdentifier, PixelType >    PointDataContainer;
00103   typedef MapContainer< CellIdentifier, CellPixelType > CellDataContainer;
00104 
00106   typedef typename PointType::VectorType VectorType;
00107 };
00108 }
00109 
00110 #endif
00111