| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkVertexCell.h.html,v $ |
| 5 |
|
Language: C++ |
| 6 |
|
Date: $Date: 2006/01/17 19:15:49 $ |
| 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 __itkVertexCell_h |
| 18 |
|
#define __itkVertexCell_h |
| 19 |
|
|
| 20 |
|
#include "itkCellInterface.h" |
| 21 |
|
|
| 22 |
|
namespace itk |
| 23 |
|
{ |
| 24 |
|
|
| 25 |
|
/** \class VertexCell |
| 26 |
|
* VertexCell represents a single vertex for a Mesh. |
| 27 |
|
* |
| 28 |
|
* Template parameters for VertexCell: |
| 29 |
|
* |
| 30 |
|
* TPixelType = |
| 31 |
|
* The type associated with a point, cell, or boundary for use in storing |
| 32 |
|
* its data. |
| 33 |
|
* |
| 34 |
|
* TCellTraits = |
| 35 |
|
* Type information of mesh containing cell. |
| 36 |
|
* |
| 37 |
|
* \ingroup MeshObjects |
| 38 |
|
*/ |
| 39 |
|
|
| 40 |
|
template < typename TCellInterface > |
| 41 |
|
class ITK_EXPORT VertexCell: public TCellInterface |
| 42 |
|
{ |
| 43 |
|
public: |
| 44 |
|
/** Standard class typedefs. */ |
| 45 |
|
itkCellCommonTypedefs(VertexCell); |
| 46 |
|
itkCellInheritedTypedefs(TCellInterface); |
| 47 |
|
|
| 48 |
|
/** Standard part of every itk Object. */ |
| 49 |
|
itkTypeMacro(VertexCell, CellInterface); |
| 50 |
|
|
| 51 |
|
/** Vertex-specific topology numbers. */ |
| 52 |
|
itkStaticConstMacro(NumberOfPoints, unsigned int, 1); |
| 53 |
|
itkStaticConstMacro(CellDimension, unsigned int, 0); |
| 54 |
|
|
| 55 |
|
/** Implement the standard CellInterface. */ |
| 56 |
|
virtual CellGeometry GetType(void) const |
| 57 |
|
{return Superclass::VERTEX_CELL;} |
| 58 |
|
virtual void MakeCopy( CellAutoPointer & ) const; |
| 59 |
|
virtual unsigned int GetDimension(void) const; |
| 60 |
|
virtual unsigned int GetNumberOfPoints(void) const; |
| 61 |
|
virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const; |
| 62 |
LEN |
virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &); |
| 63 |
|
virtual void SetPointIds(PointIdConstIterator first); |
| 64 |
|
virtual void SetPointIds(PointIdConstIterator first, |
| 65 |
|
PointIdConstIterator last); |
| 66 |
|
virtual void SetPointId(int localId, PointIdentifier); |
| 67 |
|
virtual PointIdIterator PointIdsBegin(void); |
| 68 |
|
virtual PointIdConstIterator PointIdsBegin(void) const; |
| 69 |
|
virtual PointIdIterator PointIdsEnd(void); |
| 70 |
|
virtual PointIdConstIterator PointIdsEnd(void) const; |
| 71 |
|
|
| 72 |
|
/** Vertex-specific interface. */ |
| 73 |
|
virtual void SetPointId(PointIdentifier); |
| 74 |
|
virtual PointIdentifier GetPointId(void); |
| 75 |
|
|
| 76 |
|
/** Cell visitor interface */ |
| 77 |
|
itkCellVisitMacro(Superclass::VERTEX_CELL); |
| 78 |
|
|
| 79 |
|
/** Evaluate the position of a given point */ |
| 80 |
|
virtual bool EvaluatePosition(CoordRepType*, |
| 81 |
|
PointsContainer* , |
| 82 |
|
CoordRepType*, |
| 83 |
|
CoordRepType [], |
| 84 |
|
double *, |
| 85 |
|
InterpolationWeightType*); |
| 86 |
|
public: |
| 87 |
|
VertexCell() {} |
| 88 |
|
~VertexCell() {} |
| 89 |
|
|
| 90 |
|
protected: |
| 91 |
|
/** |
| 92 |
|
* Store the number of points needed for a vertex. |
| 93 |
|
*/ |
| 94 |
|
PointIdentifier m_PointIds[NumberOfPoints]; |
| 95 |
|
|
| 96 |
IND |
*private: |
| 97 |
|
VertexCell(const Self&); //purposely not implemented |
| 98 |
|
void operator=(const Self&); //purposely not implemented |
| 99 |
|
}; |
| 100 |
|
|
| 101 |
|
} // end namespace itk |
| 102 |
|
|
| 103 |
|
#ifndef ITK_MANUAL_INSTANTIATION |
| 104 |
|
#include "itkVertexCell.txx" |
| 105 |
|
#endif |
| 106 |
|
|
| 107 |
|
#endif |
| 108 |
|
|