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: 2005/08/15 20:00:41 $
00007   Version:   $Revision: 1.6 $
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     }
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 } // end of namespace itk
00106 
00107 #ifndef ITK_MANUAL_INSTANTIATION
00108 #include "itkDTITubeSpatialObjectPoint.txx"
00109 #endif
00110 
00111 #endif // __itkDTITubeSpatialObjectPoint_h

Generated at Wed May 24 23:03:59 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000