vtkMRMLDiffusionWeightedVolumeNode.h

Go to the documentation of this file.
00001 /*=auto=========================================================================
00002 
00003   Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
00004 
00005   See Doc/copyright/copyright.txt
00006   or http://www.slicer.org/copyright/copyright.txt for details.
00007 
00008   Program:   3D Slicer
00009   Module:    $RCSfile: vtkMRMLVolumeNode.h,v $
00010   Date:      $Date: 2006/03/19 17:12:29 $
00011   Version:   $Revision: 1.13 $
00012 
00013 =========================================================================auto=*/
00023 
00024 #ifndef __vtkMRMLDiffusionWeightedVolumeNode_h
00025 #define __vtkMRMLDiffusionWeightedVolumeNode_h
00026 
00027 
00028 #include "vtkMRMLScalarVolumeNode.h"
00029 #include "vtkMRMLDiffusionWeightedVolumeDisplayNode.h"
00030 #include "vtkMRMLNRRDStorageNode.h"
00031 
00032 class vtkImageData;
00033 class vtkDoubleArray;
00034 class vtkImageExtractComponents;
00035 
00036 class VTK_MRML_EXPORT vtkMRMLDiffusionWeightedVolumeNode : public vtkMRMLScalarVolumeNode
00037 {
00038   public:
00039   static vtkMRMLDiffusionWeightedVolumeNode *New();
00040   vtkTypeMacro(vtkMRMLDiffusionWeightedVolumeNode,vtkMRMLScalarVolumeNode);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00043   virtual vtkMRMLNode* CreateNodeInstance();
00044 
00047   virtual void ReadXMLAttributes( const char** atts);
00048 
00051   virtual void WriteXML(ostream& of, int indent);
00052 
00055   virtual void Copy(vtkMRMLNode *node);
00056 
00059   virtual const char* GetNodeTagName() {return "DiffusionWeightedVolume";};
00060 
00062   void SetNumberOfGradients(int val);
00063   vtkGetMacro(NumberOfGradients,int);
00064 
00066   void SetDiffusionGradient(int val, const double g[3]);
00067   void SetDiffusionGradients(vtkDoubleArray *grad);
00068   double *GetDiffusionGradient(int val);
00069   void GetDiffusionGradient(int val, double g[3]);  
00070   vtkGetObjectMacro(DiffusionGradients,vtkDoubleArray);
00071 
00073   void SetBValue (int val, const double b);
00074   void SetBValues (vtkDoubleArray *bValue);
00076 #ifdef GetBValue
00077 #undef GetBValue
00078 #endif
00079   double GetBValue(int val);
00080   vtkGetObjectMacro(BValues,vtkDoubleArray);
00081 
00084   void SetMeasurementFrameMatrix(const double mf[3][3]);
00085   void GetMeasurementFrameMatrix(double mf[3][3]);
00086   void SetMeasurementFrameMatrix(const double xr, const double xa, const double xs,
00087                            const double yr, const double ya, const double ys,
00088                            const double zr, const double za, const double zs);
00089 
00090   void SetMeasurementFrameMatrix(vtkMatrix4x4 *mat);
00091   void GetMeasurementFrameMatrix(vtkMatrix4x4 *mat);
00092  
00095   virtual vtkMRMLDiffusionWeightedVolumeDisplayNode* GetDiffusionWeightedVolumeDisplayNode()
00096   {
00097     return vtkMRMLDiffusionWeightedVolumeDisplayNode::SafeDownCast(this->GetDisplayNode());
00098   }
00099 
00102   virtual void UpdateFromMRML();
00103   
00106   virtual void CalculateAutoLevels( vtkMRMLScalarVolumeDisplayNode *refNode = NULL, vtkImageData *refData = NULL);
00107 
00110   virtual vtkMRMLStorageNode* CreateDefaultStorageNode()
00111     {
00112     return vtkMRMLNRRDStorageNode::New();
00113     };
00114 
00115 protected:
00116   vtkMRMLDiffusionWeightedVolumeNode();
00117   ~vtkMRMLDiffusionWeightedVolumeNode();
00118   vtkMRMLDiffusionWeightedVolumeNode(const vtkMRMLDiffusionWeightedVolumeNode&);
00119   void operator=(const vtkMRMLDiffusionWeightedVolumeNode&);
00120   
00121   double MeasurementFrameMatrix[3][3];
00122   
00123   vtkDoubleArray *DiffusionGradients;
00124   vtkDoubleArray *BValues;
00125   
00126   int NumberOfGradients;
00127 
00128   vtkImageExtractComponents *ExtractComponents;
00129 
00130 };
00131 
00132 #endif
00133 
00134 
00135  
00136 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1