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 }
00070
00071 const float* GetTensorMatrix() const {return m_TensorMatrix;}
00072
00074 Self & operator=(const DTITubeSpatialObjectPoint & rhs);
00075
00077 void AddField(const char* name,float value);
00078
00080 void AddField(FieldEnumType name,float value);
00081
00083 void SetField(FieldEnumType name,float value);
00084 void SetField(const char* name,float value);
00086
00088 const FieldListType & GetFields() const {return m_Fields;}
00089
00091 float GetField(const char* name) const;
00092 float GetField(FieldEnumType name) const;
00094
00095
00096 protected:
00097
00098 float m_TensorMatrix[6];
00099 FieldListType m_Fields;
00100
00102 void PrintSelf( std::ostream & os, Indent indent) const;
00103
00105 std::string TranslateEnumToChar(FieldEnumType name) const;
00106 };
00107
00108 }
00109
00110 #ifndef ITK_MANUAL_INSTANTIATION
00111 #include "itkDTITubeSpatialObjectPoint.txx"
00112 #endif
00113
00114 #endif // __itkDTITubeSpatialObjectPoint_h
00115