00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkSimplexMeshGeometry.h,v $ 00005 Language: C++ 00006 Date: $Date: 2004/08/03 02:37:29 $ 00007 Version: $Revision: 1.5 $ 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 00018 #ifndef __itkSimplexMeshGeometry_h 00019 #define __itkSimplexMeshGeometry_h 00020 00021 #if defined(_MSC_VER) 00022 #pragma warning ( disable : 4786 ) 00023 #endif 00024 00025 #include "itkFixedArray.h" 00026 #include "itkPoint.h" 00027 #include "itkVector.h" 00028 #include "itkCovariantVector.h" 00029 #include <set> 00030 00031 namespace itk 00032 { 00033 00046 class ITKCommon_EXPORT SimplexMeshGeometry 00047 { 00048 00049 public: 00050 00051 typedef itk::Point<double,3> PointType; 00052 typedef itk::Vector<double,3> VectorType; 00053 typedef itk::CovariantVector<double,3> CovariantVectorType; 00054 typedef itk::FixedArray<unsigned long,3> IndexArray; 00055 typedef itk::FixedArray<PointType,3> PointArray; 00056 typedef std::set<unsigned long> NeighborSetType; 00057 00058 00059 00060 SimplexMeshGeometry(); 00061 ~SimplexMeshGeometry(); 00062 00063 00068 /* stores the indices of the three direct neighbors */ 00069 IndexArray neighborIndices; 00070 00071 /* stores the coordinates of the three direct neighbors */ 00072 PointArray neighbors; 00073 00074 /* stores the mean curvature of the mesh in the point */ 00075 double meanCurvature; 00076 00077 /* coordinates of the corresponding point */ 00078 PointType pos; 00079 00080 /* coordinates of the corresponding point in previous iteration */ 00081 PointType oldPos; 00082 00083 /* barycentric coordinates of corresponding point wiht respect 00084 * to its three direct neighbors 00085 */ 00086 PointType eps; 00087 00088 /* 00089 * reference metric params 00090 */ 00091 PointType referenceMetrics; 00092 00093 /* normal vector of corresponding point */ 00094 CovariantVectorType normal; 00095 00096 /* stores external force component for 00097 * current deformable model iteration 00098 */ 00099 VectorType externalForce; 00100 00101 /* stores internal force component for 00102 * current deformable model iteration 00103 */ 00104 VectorType internalForce; 00105 00106 /* 00107 * store the location of the closest attractor to this point 00108 */ 00109 PointType closestAttractor; 00110 00111 /* 00112 * stores the index of the closest attractor to this point 00113 */ 00114 unsigned long closestAttractorIndex; 00115 00116 /* stores circum circle radius */ 00117 double circleRadius; 00118 00119 /* stores circum circle center */ 00120 PointType circleCenter; 00121 00122 /* stores circum sphere radius */ 00123 double sphereRadius; 00124 00125 /* stores circum sphere center */ 00126 // PointType sphereCenter; 00127 00128 /* stores distance to foot point */ 00129 double distance; 00130 00131 /* stores angle */ 00132 double phi; 00133 00134 /* stores the neighbor set */ 00135 NeighborSetType* neighborSet; 00136 00137 /* stores multiplier for interactive deformable model filter */ 00138 double multiplier; 00139 00140 unsigned long forceIndex; 00141 00146 void ComputeGeometry(); 00147 00148 00149 protected: 00150 00151 00152 };// end of class __itkSimplexMeshGeometry 00153 00154 } //end of namespace itk 00155 00156 00157 #endif