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 __itkTubeSpatialObjectPoint_h 00019 #define __itkTubeSpatialObjectPoint_h 00020 00021 #include "itkSpatialObjectPoint.h" 00022 #include "itkCovariantVector.h" 00023 #include "vnl/vnl_vector_fixed.h" 00024 00025 namespace itk 00026 { 00037 template< unsigned int TPointDimension = 3 > 00038 class ITK_EXPORT TubeSpatialObjectPoint: 00039 public SpatialObjectPoint< TPointDimension > 00040 { 00041 public: 00042 00043 typedef TubeSpatialObjectPoint Self; 00044 typedef SpatialObjectPoint< TPointDimension > Superclass; 00045 typedef Point< double, TPointDimension > PointType; 00046 typedef Vector< double, TPointDimension > VectorType; 00047 typedef CovariantVector< double, TPointDimension > CovariantVectorType; 00048 00051 TubeSpatialObjectPoint(void); 00052 00054 virtual ~TubeSpatialObjectPoint(void); 00055 00057 const VectorType & GetTangent(void) const; 00058 00060 void SetTangent(const VectorType & newT); 00061 00062 void SetTangent(const double t0, const double t1); 00063 00064 void SetTangent(const double t0, const double t1, const double t2); 00065 00067 const CovariantVectorType & GetNormal1(void) const; 00068 00070 void SetNormal1(const CovariantVectorType & newV1); 00071 00072 void SetNormal1(const double v10, const double v11); 00073 00074 void SetNormal1(const double v10, const double v11, const double v12); 00075 00077 const CovariantVectorType & GetNormal2(void) const; 00078 00080 void SetNormal2(const CovariantVectorType & newV2); 00081 00082 void SetNormal2(const double v20, const double v21); 00083 00084 void SetNormal2(const double v20, const double v21, const double v22); 00085 00087 float GetRadius(void) const; 00088 00090 void SetRadius(const float newR); 00091 00093 unsigned short int GetNumDimensions(void) const; 00094 00096 Self & operator=(const TubeSpatialObjectPoint & rhs); 00097 00098 protected: 00099 00100 VectorType m_T; 00101 CovariantVectorType m_Normal1; 00102 CovariantVectorType m_Normal2; 00103 00105 float m_R; 00106 00108 unsigned short int m_NumDimensions; 00109 00111 void PrintSelf(std::ostream & os, Indent indent) const; 00112 }; 00113 } // end of namespace itk 00114 00115 #ifndef ITK_MANUAL_INSTANTIATION 00116 #include "itkTubeSpatialObjectPoint.hxx" 00117 #endif 00118 00119 #endif // __itkTubeSpatialObjectPoint_h 00120