00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkDTITubeSpatialObjectPoint_h
00018 #define __itkDTITubeSpatialObjectPoint_h
00019
00020 #include "itkTubeSpatialObjectPoint.h"
00021 #include "itkCovariantVector.h"
00022 #include "vnl/vnl_vector_fixed.h"
00023
00024 namespace itk
00025 {
00026
00035 template < unsigned int TPointDimension = 3 >
00036 class DTITubeSpatialObjectPoint
00037 : public TubeSpatialObjectPoint<TPointDimension>
00038 {
00039
00040 public:
00041
00042 typedef DTITubeSpatialObjectPoint Self;
00043 typedef SpatialObjectPoint<TPointDimension> Superclass;
00044 typedef Point< double, TPointDimension > PointType;
00045 typedef Vector<double, TPointDimension > VectorType;
00046 typedef CovariantVector<double, TPointDimension > CovariantVectorType;
00047 typedef std::pair<std::string,float> FieldType;
00048 typedef std::vector<FieldType> FieldListType;
00049
00050
00051
00052 typedef enum {FA,ADC,GA} FieldEnumType;
00053
00056 DTITubeSpatialObjectPoint( void );
00057
00059 virtual ~DTITubeSpatialObjectPoint( void );
00060
00062 void SetTensorMatrix(const float* matrix)
00063 {
00064 for(unsigned int i=0;i<6;i++)
00065 {
00066 m_TensorMatrix[i] = matrix[i];
00067 }
00068 }
00069
00070 const float* GetTensorMatrix() const {return m_TensorMatrix;}
00071
00073 Self & operator=(const DTITubeSpatialObjectPoint & rhs);
00074
00076 void AddField(const char* name,float value);
00077
00079 void AddField(FieldEnumType name,float value);
00080
00082 void SetField(FieldEnumType name,float value);
00083 void SetField(const char* name,float value);
00084
00086 const FieldListType & GetFields() const {return m_Fields;}
00087
00089 float GetField(const char* name) const;
00090 float GetField(FieldEnumType name) const;
00091
00092
00093 protected:
00094
00095 float m_TensorMatrix[6];
00096 FieldListType m_Fields;
00097
00099 void PrintSelf( std::ostream & os, Indent indent) const;
00100
00102 std::string TranslateEnumToChar(FieldEnumType name) const;
00103 };
00104
00105 }
00106
00107 #ifndef ITK_MANUAL_INSTANTIATION
00108 #include "itkDTITubeSpatialObjectPoint.txx"
00109 #endif
00110
00111 #endif // __itkDTITubeSpatialObjectPoint_h