ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkQuadraticTriangleCell_h 00019 #define __itkQuadraticTriangleCell_h 00020 00021 #include "itkQuadraticEdgeCell.h" 00022 #include "itkQuadraticTriangleCellTopology.h" 00023 00024 namespace itk 00025 { 00037 template< typename TCellInterface > 00038 class QuadraticTriangleCell:public TCellInterface, private QuadraticTriangleCellTopology 00039 { 00040 public: 00042 itkCellCommonTypedefs(QuadraticTriangleCell); 00043 itkCellInheritedTypedefs(TCellInterface); 00045 00047 itkTypeMacro(QuadraticTriangleCell, CellInterface); 00048 00050 typedef VertexCell< TCellInterface > VertexType; 00051 typedef typename VertexType::SelfAutoPointer VertexAutoPointer; 00052 00054 typedef QuadraticEdgeCell< TCellInterface > EdgeType; 00055 typedef typename EdgeType::SelfAutoPointer EdgeAutoPointer; 00056 00058 itkStaticConstMacro(NumberOfPoints, unsigned int, 6); 00059 itkStaticConstMacro(NumberOfVertices, unsigned int, 3); 00060 itkStaticConstMacro(NumberOfEdges, unsigned int, 3); 00061 itkStaticConstMacro(CellDimension, unsigned int, 2); 00063 00065 virtual CellGeometry GetType(void) const 00066 { return Superclass::QUADRATIC_TRIANGLE_CELL; } 00067 virtual void MakeCopy(CellAutoPointer &) const; 00069 00070 virtual unsigned int GetDimension(void) const; 00071 00072 virtual unsigned int GetNumberOfPoints(void) const; 00073 00074 virtual CellFeatureCount GetNumberOfBoundaryFeatures(int dimension) const; 00075 00076 virtual bool GetBoundaryFeature(int dimension, CellFeatureIdentifier, CellAutoPointer &); 00077 virtual void SetPointIds(PointIdConstIterator first); 00078 00079 virtual void SetPointIds(PointIdConstIterator first, 00080 PointIdConstIterator last); 00081 00082 virtual void SetPointId(int localId, PointIdentifier); 00083 virtual PointIdIterator PointIdsBegin(void); 00084 00085 virtual PointIdConstIterator PointIdsBegin(void) const; 00086 00087 virtual PointIdIterator PointIdsEnd(void); 00088 00089 virtual PointIdConstIterator PointIdsEnd(void) const; 00090 00092 virtual CellFeatureCount GetNumberOfVertices(void) const; 00093 00094 virtual CellFeatureCount GetNumberOfEdges(void) const; 00095 00096 virtual bool GetVertex(CellFeatureIdentifier, VertexAutoPointer &); 00097 virtual bool GetEdge(CellFeatureIdentifier, EdgeAutoPointer &); 00098 00100 itkCellVisitMacro(Superclass::QUADRATIC_TRIANGLE_CELL); 00101 00105 virtual void EvaluateShapeFunctions( 00106 const ParametricCoordArrayType & parametricCoordinates, 00107 ShapeFunctionsArrayType & weights) const; 00108 00109 public: 00110 QuadraticTriangleCell() 00111 { 00112 for ( PointIdentifier i = 0; i < itkGetStaticConstMacro(NumberOfPoints); i++ ) 00113 { 00114 m_PointIds[i] = NumericTraits< PointIdentifier >::max(); 00115 } 00116 } 00117 00118 ~QuadraticTriangleCell() {} 00119 protected: 00121 PointIdentifier m_PointIds[NumberOfPoints]; 00122 private: 00123 QuadraticTriangleCell(const Self &); //purposely not implemented 00124 void operator=(const Self &); //purposely not implemented 00125 }; 00126 } // end namespace itk 00128 00129 #ifndef ITK_MANUAL_INSTANTIATION 00130 #include "itkQuadraticTriangleCell.hxx" 00131 #endif 00132 00133 #endif 00134