| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkSimplexMeshGeometry.h.html,v $ |
| 5 |
|
Language: C++ |
| 6 |
|
Date: $Date: 2006/01/17 19:15:48 $ |
| 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 |
|
|
| 18 |
|
#ifndef __itkSimplexMeshGeometry_h |
| 19 |
|
#define __itkSimplexMeshGeometry_h |
| 20 |
|
|
| 21 |
|
#if defined(_MSC_VER) |
| 22 |
|
#pragma warning ( disable : 4786 ) |
| 23 |
|
#endif |
| 24 |
|
|
| 25 |
|
#include "itkFixedArray.h" |
| 26 |
|
#include "itkPoint.h" |
| 27 |
|
#include "itkVector.h" |
| 28 |
|
#include "itkCovariantVector.h" |
| 29 |
|
#include <set> |
| 30 |
|
|
| 31 |
|
namespace itk |
| 32 |
IND |
**{ |
| 33 |
|
|
| 34 |
IND |
**/** |
| 35 |
IND |
*** \class SimplexMeshGeometry |
| 36 |
IND |
*** \brief handle geometric properties for vertices of a simplx mesh |
| 37 |
IND |
*** |
| 38 |
LEN,IND |
*** It stores and recomputes geometric properties of simplex mesh vertices, i.e. the normal vector, |
| 39 |
LEN,IND |
*** the barycentric coordinates of the point related to its three neighbor vertices, simplex angle |
| 40 |
IND |
*** circumsphere and circumcirlce radius and center. |
| 41 |
IND |
*** |
| 42 |
IND |
*** |
| 43 |
LEN,IND |
*** \author Thomas Boettger. Division Medical and Biological Informatics, German Cancer Research Center, Heidelberg. |
| 44 |
IND |
*** |
| 45 |
IND |
***/ |
| 46 |
IND |
**class ITKCommon_EXPORT SimplexMeshGeometry |
| 47 |
IND |
****{ |
| 48 |
|
|
| 49 |
IND |
****public: |
| 50 |
|
|
| 51 |
IND |
******typedef itk::Point<double,3> PointType; |
| 52 |
IND |
******typedef itk::Vector<double,3> VectorType; |
| 53 |
IND |
******typedef itk::CovariantVector<double,3> CovariantVectorType; |
| 54 |
IND |
******typedef itk::FixedArray<unsigned long,3> IndexArray; |
| 55 |
IND |
******typedef itk::FixedArray<PointType,3> PointArray; |
| 56 |
IND |
******typedef std::set<unsigned long> NeighborSetType; |
| 57 |
|
|
| 58 |
|
|
| 59 |
EML |
|
| 60 |
IND |
******SimplexMeshGeometry(); |
| 61 |
IND |
******~SimplexMeshGeometry(); |
| 62 |
|
|
| 63 |
|
|
| 64 |
IND |
******/** Definition of some attributes for |
| 65 |
IND |
******* faster deformable model computation |
| 66 |
IND |
*******/ |
| 67 |
|
|
| 68 |
IND |
******/* stores the indices of the three direct neighbors */ |
| 69 |
IND |
******IndexArray neighborIndices; |
| 70 |
|
|
| 71 |
IND |
******/* stores the coordinates of the three direct neighbors */ |
| 72 |
IND |
******PointArray neighbors; |
| 73 |
|
|
| 74 |
IND |
******/* stores the mean curvature of the mesh in the point */ |
| 75 |
IND |
******double meanCurvature; |
| 76 |
|
|
| 77 |
IND |
******/* coordinates of the corresponding point */ |
| 78 |
IND |
******PointType pos; |
| 79 |
|
|
| 80 |
IND |
******/* coordinates of the corresponding point in previous iteration */ |
| 81 |
IND |
******PointType oldPos; |
| 82 |
|
|
| 83 |
IND |
******/* barycentric coordinates of corresponding point wiht respect |
| 84 |
IND |
******* to its three direct neighbors |
| 85 |
IND |
*******/ |
| 86 |
IND |
******PointType eps; |
| 87 |
|
|
| 88 |
IND |
******/* |
| 89 |
IND |
******* reference metric params |
| 90 |
IND |
*******/ |
| 91 |
IND |
******PointType referenceMetrics; |
| 92 |
|
|
| 93 |
IND |
******/* normal vector of corresponding point */ |
| 94 |
IND |
******CovariantVectorType normal; |
| 95 |
|
|
| 96 |
IND |
******/* stores external force component for |
| 97 |
IND |
******* current deformable model iteration |
| 98 |
IND |
*******/ |
| 99 |
IND |
******VectorType externalForce; |
| 100 |
|
|
| 101 |
IND |
******/* stores internal force component for |
| 102 |
IND |
******* current deformable model iteration |
| 103 |
IND |
*******/ |
| 104 |
IND |
******VectorType internalForce; |
| 105 |
|
|
| 106 |
IND |
******/* |
| 107 |
IND |
******* store the location of the closest attractor to this point |
| 108 |
IND |
*******/ |
| 109 |
IND |
******PointType closestAttractor; |
| 110 |
|
|
| 111 |
IND |
******/* |
| 112 |
IND |
******* stores the index of the closest attractor to this point |
| 113 |
IND |
*******/ |
| 114 |
IND |
******unsigned long closestAttractorIndex; |
| 115 |
|
|
| 116 |
IND |
******/* stores circum circle radius */ |
| 117 |
IND |
******double circleRadius; |
| 118 |
|
|
| 119 |
IND |
******/* stores circum circle center */ |
| 120 |
IND |
******PointType circleCenter; |
| 121 |
|
|
| 122 |
IND |
******/* stores circum sphere radius */ |
| 123 |
IND |
******double sphereRadius; |
| 124 |
|
|
| 125 |
IND |
******/* stores circum sphere center */ |
| 126 |
IND |
******// PointType sphereCenter; |
| 127 |
|
|
| 128 |
IND |
******/* stores distance to foot point */ |
| 129 |
IND |
******double distance; |
| 130 |
|
|
| 131 |
IND |
******/* stores angle */ |
| 132 |
IND |
******double phi; |
| 133 |
|
|
| 134 |
IND |
******/* stores the neighbor set */ |
| 135 |
IND |
******NeighborSetType* neighborSet; |
| 136 |
|
|
| 137 |
IND |
******/* stores multiplier for interactive deformable model filter */ |
| 138 |
IND |
******double multiplier; |
| 139 |
|
|
| 140 |
IND |
******unsigned long forceIndex; |
| 141 |
|
|
| 142 |
IND |
******/** |
| 143 |
IND |
******* Computes the center and radius of the circum circle of the |
| 144 |
IND |
******* three neighbor points and of the circum sphere |
| 145 |
IND |
*******/ |
| 146 |
IND |
******void ComputeGeometry(); |
| 147 |
|
|
| 148 |
|
|
| 149 |
IND |
****protected: |
| 150 |
|
|
| 151 |
|
|
| 152 |
IND |
****};// end of class __itkSimplexMeshGeometry |
| 153 |
|
|
| 154 |
IND |
**} //end of namespace itk |
| 155 |
|
|
| 156 |
|
|
| 157 |
|
#endif |
| 158 |
|
|