Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkDTITubeSpatialObjectPoint.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkDTITubeSpatialObjectPoint.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/01/28 19:24:21 $
00007   Version:   $Revision: 1.7 $
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 #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   // If you add a type here you need to modify the TranslateEnumToChar
00051   // to translate the enum to a string
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 } // end of namespace itk
00109 
00110 #ifndef ITK_MANUAL_INSTANTIATION
00111 #include "itkDTITubeSpatialObjectPoint.txx"
00112 #endif
00113 
00114 #endif // __itkDTITubeSpatialObjectPoint_h
00115 

Generated at Sun Sep 23 12:25:08 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000