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

itkLineCell.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkLineCell.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/06/20 02:35:20 $
00007   Version:   $Revision: 1.46 $
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 __itkLineCell_h
00018 #define __itkLineCell_h
00019 
00020 #include "itkCellInterface.h"
00021 #include "itkCellBoundary.h"
00022 #include "itkVertexCell.h"
00023 
00024 namespace itk
00025 {
00026 
00044 template < typename TCellInterface >
00045 class LineCell: public TCellInterface
00046 {
00047 public:
00049   itkCellCommonTypedefs(LineCell);
00050   itkCellInheritedTypedefs(TCellInterface);
00051   
00053   itkTypeMacro(LineCell, CellInterface);
00054 
00056   typedef VertexBoundary< TCellInterface >     VertexType;
00057   typedef typename VertexType::SelfAutoPointer VertexAutoPointer;
00058     
00060   enum { NumberOfPoints   = 2,
00061          NumberOfVertices = 2,
00062          CellDimension    = 1 };
00063   
00065   virtual CellGeometry GetType(void) const 
00066   {return Superclass::LINE_CELL;}
00067   virtual void MakeCopy( CellAutoPointer & ) const;
00068   virtual unsigned int GetDimension(void) const;
00069   virtual unsigned int GetNumberOfPoints(void) const;
00070   virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const;
00071   virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier,CellAutoPointer &);
00072   virtual void SetPointIds(PointIdConstIterator first);
00073   virtual void SetPointIds(PointIdConstIterator first,
00074                            PointIdConstIterator last);
00075   virtual void SetPointId(int localId, PointIdentifier);
00076   virtual PointIdIterator      PointIdsBegin(void);
00077   virtual PointIdConstIterator PointIdsBegin(void) const;
00078   virtual PointIdIterator      PointIdsEnd(void);
00079   virtual PointIdConstIterator PointIdsEnd(void) const; 
00080   
00082   virtual CellFeatureCount GetNumberOfVertices(void) const;
00083   virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
00084   
00086   itkCellVisitMacro(LINE_CELL);
00087 
00088   LineCell() {}
00089   ~LineCell() {}
00090 
00091 protected:
00093   PointIdentifier m_PointIds[NumberOfPoints];
00094 
00095  private:
00096   LineCell(const Self&); //purposely not implemented
00097   void operator=(const Self&); //purposely not implemented
00098 };
00099 
00100 
00106 template <typename TCellInterface>
00107 class LineBoundary:
00108   public CellBoundary< LineCell< TCellInterface > >
00109 {
00110 public:
00112   itkCellCommonTypedefs(LineBoundary);
00113 
00115   itkTypeMacro(LineBoundary, CellBoundary);
00116 };
00117 
00118 } // end namespace itk
00119 
00120 #ifndef ITK_MANUAL_INSTANTIATION
00121 #include "itkLineCell.txx"
00122 #endif
00123 
00124 #endif

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