Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkQuadEdgeMeshTraits.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkQuadEdgeMeshTraits.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/07/24 20:05:24 $
00007   Version:   $Revision: 1.7 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
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   //typedef QEPrimal QEType;
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 

Generated at Sun Sep 23 13:59:45 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000