ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkDefaultDynamicMeshTraits.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 __itkDefaultDynamicMeshTraits_h
00019 #define __itkDefaultDynamicMeshTraits_h
00020 
00021 #include "itkCellInterface.h"
00022 #include "itkMapContainer.h"
00023 #include "itkPoint.h"
00024 #include "itkIntTypes.h"
00025 #include <set>
00026 
00027 namespace itk
00028 {
00057 template<
00058   typename TPixelType,
00059   unsigned int VPointDimension = 3,
00060   unsigned int VMaxTopologicalDimension = VPointDimension,
00061   typename TCoordRep = float,
00062   typename TInterpolationWeight = float,
00063   typename TCellPixelType = TPixelType
00064   >
00065 class DefaultDynamicMeshTraits
00066 {
00067 public:
00069   typedef DefaultDynamicMeshTraits Self;
00070 
00072   typedef TPixelType           PixelType;
00073   typedef TCellPixelType       CellPixelType;
00074   typedef TCoordRep            CoordRepType;
00075   typedef TInterpolationWeight InterpolationWeightType;
00076 
00078   itkStaticConstMacro(PointDimension, unsigned int, VPointDimension);
00079   itkStaticConstMacro(MaxTopologicalDimension, unsigned int,
00080                       VMaxTopologicalDimension);
00082 
00085   typedef IdentifierType PointIdentifier;
00086 
00089   typedef IdentifierType CellIdentifier;
00090 
00094   typedef IdentifierType CellFeatureIdentifier;
00095 
00097   typedef Point< CoordRepType, VPointDimension > PointType;
00098 
00101   typedef Point< CoordRepType, VPointDimension > PointHashType;
00102 
00105   typedef MapContainer< PointIdentifier, PointType > PointsContainer;
00106 
00109   typedef std::set< CellIdentifier > UsingCellsContainer;
00110 
00113   typedef itkMakeCellTraitsMacro CellTraits;
00114 
00117   typedef CellInterface< CellPixelType, CellTraits > CellType;
00118   typedef typename CellType::CellAutoPointer         CellAutoPointer;
00119 
00122   typedef MapContainer< CellIdentifier, CellType * > CellsContainer;
00123 
00126   typedef std::set< CellIdentifier > PointCellLinksContainer;
00127 
00130   typedef MapContainer<
00131     PointIdentifier, PointCellLinksContainer >        CellLinksContainer;
00132 
00135   typedef MapContainer< PointIdentifier, PixelType > PointDataContainer;
00136 
00139   typedef MapContainer<
00140     CellIdentifier, CellPixelType >                   CellDataContainer;
00141 };
00142 } // end namespace itk
00143 
00144 #endif
00145