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

itkHexahedronCell.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkHexahedronCell.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/08/26 15:48:04 $
00007   Version:   $Revision: 1.42 $
00008 
00009   Copyright (c) 2002 Insight 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 #ifndef __itkHexahedronCell_h
00018 #define __itkHexahedronCell_h
00019 
00020 #include "itkCellInterface.h"
00021 #include "itkCellBoundary.h"
00022 #include "itkQuadrilateralCell.h"
00023 #include "itkHexahedronCellTopology.h"
00024 
00025 namespace itk
00026 {
00027 
00045 template < typename TCellInterface >
00046 class HexahedronCell: public TCellInterface, private HexahedronCellTopology
00047 {
00048 public:
00050   itkCellCommonTypedefs(HexahedronCell);
00051   itkCellInheritedTypedefs(TCellInterface);
00052 
00054   itkTypeMacro(HexahedronCell, CellInterface);
00055 
00057   typedef VertexBoundary< TCellInterface >            VertexType;
00058   typedef typename VertexType::SelfAutoPointer        VertexAutoPointer;
00059   
00061   typedef LineBoundary< TCellInterface >              EdgeType;
00062   typedef typename EdgeType::SelfAutoPointer          EdgeAutoPointer;
00063   
00065   typedef QuadrilateralBoundary< TCellInterface >     FaceType;
00066   typedef typename FaceType::SelfAutoPointer          FaceAutoPointer;
00067     
00069   enum { NumberOfPoints   =  8,
00070          NumberOfVertices =  8,
00071          NumberOfEdges    = 12,
00072          NumberOfFaces    =  6,
00073          CellDimension    =  3 };
00074 
00076   virtual CellGeometry GetType(void) const 
00077     {return Superclass::HEXAHEDRON_CELL;}
00078   virtual void MakeCopy( CellAutoPointer & ) const;
00079   virtual unsigned int GetDimension(void) const;
00080   virtual unsigned int GetNumberOfPoints(void) const;
00081   virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const;
00082   virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &);
00083   virtual void SetPointIds(PointIdConstIterator first);
00084   virtual void SetPointIds(PointIdConstIterator first, PointIdConstIterator last);
00085   virtual void SetPointId(int localId, PointIdentifier);
00086   virtual PointIdIterator      PointIdsBegin(void);
00087   virtual PointIdConstIterator PointIdsBegin(void) const;
00088   virtual PointIdIterator      PointIdsEnd(void);
00089   virtual PointIdConstIterator PointIdsEnd(void) const; 
00090   
00092   virtual CellFeatureCount GetNumberOfVertices(void) const;
00093   virtual CellFeatureCount GetNumberOfEdges(void) const;
00094   virtual CellFeatureCount GetNumberOfFaces(void) const;
00095   virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
00096   virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &);  
00097   virtual bool GetFace(CellFeatureIdentifier, FaceAutoPointer &);  
00098   
00100   itkCellVisitMacro(HEXAHEDRON_CELL);
00101 
00102 protected:
00104   PointIdentifier m_PointIds[NumberOfPoints];
00105   
00106 public:
00107   HexahedronCell() {}
00108   ~HexahedronCell() {}
00109   
00110 private:
00111   HexahedronCell(const Self&); //purposely not implemented
00112   void operator=(const Self&); //purposely not implemented  
00113 };
00114 
00115 
00122 template <typename TCellInterface>
00123 class HexahedronBoundary:
00124   public CellBoundary< HexahedronCell< TCellInterface > >
00125 {
00126 public:
00128   itkCellCommonTypedefs(HexahedronBoundary);
00129 
00131   itkTypeMacro(HexahedronBoundary, CellBoundary);
00132   
00134   HexahedronBoundary() {}
00135   ~HexahedronBoundary() {}
00136 
00137 private:
00138   HexahedronBoundary(const Self&); //purposely not implemented
00139   void operator=(const Self&); //purposely not implemented  
00140 };
00141 
00142 } // end namespace itk
00143 
00144 #ifndef ITK_MANUAL_INSTANTIATION
00145 #include "itkHexahedronCell.txx"
00146 #endif
00147 
00148 #endif

Generated at Wed Mar 12 01:12:59 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000