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: 2009-02-05 19:05:01 $
00007   Version:   $Revision: 1.52 $
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 #ifndef __itkLineCell_h
00018 #define __itkLineCell_h
00019 
00020 #include "itkCellInterface.h"
00021 #include "itkVertexCell.h"
00022 
00023 namespace itk
00024 {
00025 
00041 template < typename TCellInterface >
00042 class ITK_EXPORT LineCell: public TCellInterface
00043 {
00044 public:
00046   itkCellCommonTypedefs(LineCell);
00047   itkCellInheritedTypedefs(TCellInterface);
00049 
00051   itkTypeMacro(LineCell, CellInterface);
00052 
00054   typedef VertexCell< TCellInterface >         VertexType;
00055   typedef typename VertexType::SelfAutoPointer VertexAutoPointer;
00056 
00058   enum { NumberOfPoints   = 2,
00059          NumberOfVertices = 2,
00060          CellDimension    = 1 };
00061 
00063   virtual CellGeometry GetType(void) const 
00064     {return Superclass::LINE_CELL;}
00065   virtual void MakeCopy( CellAutoPointer & ) const;
00066   virtual unsigned int GetDimension(void) const;
00067   virtual unsigned int GetNumberOfPoints(void) const;
00068   virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const;
00069   virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier,CellAutoPointer &);
00070   virtual void SetPointIds(PointIdConstIterator first);
00071   virtual void SetPointIds(PointIdConstIterator first,
00072                            PointIdConstIterator last);
00073   virtual void SetPointId(int localId, PointIdentifier);
00074   virtual PointIdIterator      PointIdsBegin(void);
00075   virtual PointIdConstIterator PointIdsBegin(void) const;
00076   virtual PointIdIterator      PointIdsEnd(void);
00077   virtual PointIdConstIterator PointIdsEnd(void) const; 
00079 
00081   virtual CellFeatureCount GetNumberOfVertices(void) const;
00082   virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
00084 
00086   itkCellVisitMacro(Superclass::LINE_CELL);
00087 
00088   LineCell()
00089     {
00090     for (unsigned int i = 0; i < itkGetStaticConstMacro(NumberOfPoints); i++)
00091       {
00092       m_PointIds[i] = NumericTraits<unsigned long>::max();
00093       }
00094     }
00095   ~LineCell() {}
00096 
00097 protected:
00099   PointIdentifier m_PointIds[NumberOfPoints];
00100 
00101 private:
00102   LineCell(const Self&); //purposely not implemented
00103   void operator=(const Self&); //purposely not implemented
00104 };
00105 
00106 
00107 } // end namespace itk
00108 
00109 #ifndef ITK_MANUAL_INSTANTIATION
00110 #include "itkLineCell.txx"
00111 #endif
00112 
00113 #endif
00114 

Generated at Thu May 28 10:41:09 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000