KWStyle - itkLineCell.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkLineCell.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:41 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notices for more information.
15
16 =========================================================================*/
17 #ifndef __itkLineCell_h
18 #define __itkLineCell_h
19
20 #include "itkCellInterface.h"
21 #include "itkVertexCell.h"
22
23 namespace itk
24 {
25
26 /** \class LineCell
27  * LineCell represents a line segment for a Mesh.
28  *
29  * Template parameters for LineCell:
30  *
31  * TPixelType =
32  *     The type associated with a point, cell, or boundary for use in storing
33  *     its data.
34  *
35  * TCellTraits =
36  *     Type information of mesh containing cell.
37  *
38  * \ingroup MeshObjects
39  */
40
41 template < typename TCellInterface >
42 class ITK_EXPORT LineCell: public TCellInterface
43 {
44 public:
45   /** Standard class typedefs. */
46   itkCellCommonTypedefs(LineCell);
47   itkCellInheritedTypedefs(TCellInterface);
48   
49   /** Standard part of every itk Object. */
50   itkTypeMacro(LineCell, CellInterface);
51
52   /** The type of boundary for this lines's vertices. */
53   typedef VertexCell< TCellInterface >         VertexType;
54   typedef typename VertexType::SelfAutoPointer VertexAutoPointer;
55     
56   /** Line-specific topology numbers. */
57   enum { NumberOfPoints   = 2,
58 IND *********NumberOfVertices = 2,
59 IND *********CellDimension    = 1 };
60   
61   /** Implement the standard CellInterface. */
62   virtual CellGeometry GetType(void) const 
63 IND **{return Superclass::LINE_CELL;}
64   virtual void MakeCopy( CellAutoPointer & ) const;
65   virtual unsigned int GetDimension(void) const;
66   virtual unsigned int GetNumberOfPoints(void) const;
67   virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const;
68 LEN   virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier,CellAutoPointer &);
69   virtual void SetPointIds(PointIdConstIterator first);
70   virtual void SetPointIds(PointIdConstIterator first,
71                            PointIdConstIterator last);
72   virtual void SetPointId(int localId, PointIdentifier);
73   virtual PointIdIterator      PointIdsBegin(void);
74   virtual PointIdConstIterator PointIdsBegin(void) const;
75   virtual PointIdIterator      PointIdsEnd(void);
76   virtual PointIdConstIterator PointIdsEnd(void) const; 
77   
78   /** Line-specific interface. */
79   virtual CellFeatureCount GetNumberOfVertices(void) const;
80   virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &);
81   
82   /** Visitor interface */
83   itkCellVisitMacro(Superclass::LINE_CELL);
84
85   LineCell() {}
86   ~LineCell() {}
87
88 protected:
89   /** Store number of points needed for a line segment. */
90   PointIdentifier m_PointIds[NumberOfPoints];
91
92 IND *private:
93   LineCell(const Self&); //purposely not implemented
94   void operator=(const Self&); //purposely not implemented
95 };
96
97
98 // end namespace itk
99
100 #ifndef ITK_MANUAL_INSTANTIATION
101 #include "itkLineCell.txx"
102 #endif
103
104 #endif
105

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:19PM
© Kitware Inc.