Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLDiffusionTensorVolumeDisplayNode.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8  Program: 3D Slicer
9  Module: $RCSfile: vtkMRMLDiffusionTensorVolumeDisplayNode.h,v $
10  Date: $Date: 2006/03/19 17:12:29 $
11  Version: $Revision: 1.3 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLDiffusionTensorVolumeDisplayNode_h
16 #define __vtkMRMLDiffusionTensorVolumeDisplayNode_h
17 
21 
22 class vtkAlgorithmOutput;
25 class vtkImageCast;
26 class vtkImageData;
27 class vtkImageExtractComponents;
28 class vtkImageShiftScale;
29 class vtkImageMathematics;
30 class vtkMatrix4x4;
31 
42 {
43  public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
48  vtkMRMLNode* CreateNodeInstance() override;
49 
52  void ReadXMLAttributes( const char** atts) override;
53 
56  void WriteXML(ostream& of, int indent) override;
57 
60  void Copy(vtkMRMLNode *node) override;
61 
64  const char* GetNodeTagName() override {return "DiffusionTensorVolumeDisplay";}
65 
66  //virtual vtkPolyData* ExecuteGlyphPipeLineAndGetPolyData( vtkImageData* );
67 
71  void UpdateReferences() override;
72 
75  void UpdateScene(vtkMRMLScene *scene) override;
76 
79  void UpdateReferenceID(const char *oldID, const char *newID) override;
80 
83  void ProcessMRMLEvents ( vtkObject * /*caller*/,
84  unsigned long /*event*/,
85  void * /*callData*/ ) override;
86 
87  //--------------------------------------------------------------------------
89  //--------------------------------------------------------------------------
90 
91  //--------------------------------------------------------------------------
93  //--------------------------------------------------------------------------
94 
98  vtkGetMacro(ScalarInvariant, int);
99 
103  vtkSetMacro(ScalarInvariant, int);
104 
108  this->SetScalarInvariant(vtkMRMLDiffusionTensorDisplayPropertiesNode::Trace);
109  };
110 
111  //Description:
115  };
116 
121  };
122 
127  };
128 
133  };
134 
139  };
140 
143  virtual const char * GetScalarInvariantAsString()
144  {
146  };
147 
149  vtkAlgorithmOutput* GetInputImageDataConnection() override;
150 
154  vtkAlgorithmOutput* GetBackgroundImageStencilDataConnection() override;
155 
156  void UpdateImageDataPipeline() override;
157 
162  void SetTensorRotationMatrix(vtkMatrix4x4 *);
163 
164  vtkGetObjectMacro(DTIMathematics, vtkDiffusionTensorMathematics);
165  vtkGetObjectMacro(DTIMathematicsAlpha, vtkDiffusionTensorMathematics);
166  vtkGetObjectMacro (ShiftScale, vtkImageShiftScale);
167 
168 
171  std::vector< vtkMRMLGlyphableVolumeSliceDisplayNode*> GetSliceGlyphDisplayNodes( vtkMRMLVolumeNode* node ) override;
172 
173 
176  void AddSliceGlyphDisplayNodes( vtkMRMLVolumeNode* node ) override;
177 
181  void GetDisplayScalarRange(double range[2]) override;
182 
183  static int GetNumberOfScalarInvariants();
184  static int GetNthScalarInvariant(int i);
185 
186 protected:
191 
193  void SetInputToImageDataPipeline(vtkAlgorithmOutput *imageDataConnection) override;
194 
195  vtkAlgorithmOutput* GetScalarImageDataConnection() override;
196 
197  static std::vector<int> GetSupportedColorModes();
198 
200 
205 
206  vtkImageShiftScale *ShiftScale;
207 
208  vtkImageMathematics *ImageMath;
209 
210  vtkImageCast *ImageCast;
211 
214 
215 
216 };
217 
218 #endif
219 
void UpdateScene(vtkMRMLScene *scene) override
Finds the storage node and read the data
virtual std::vector< vtkMRMLGlyphableVolumeSliceDisplayNode * > GetSliceGlyphDisplayNodes(vtkMRMLVolumeNode *vtkNotUsed(node))
get associated slice glyph display node or nullptr if not set
void SetInputToImageDataPipeline(vtkAlgorithmOutput *imageDataConnection) override
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
alternative method to propagate events generated in Display nodes
scale and orient glyph(s) according to tensor eigenvalues and eigenvectors.
virtual const char * GetScalarInvariantAsString()
Return a text string describing the ScalarInvariant variable
void SetScalarInvariantToLinearMeasure()
Set scalar invariant to C_L (Westin&#39;s linear measure)
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
virtual vtkAlgorithmOutput * GetScalarImageDataConnection()
vtkDiffusionTensorMathematics * DTIMathematics
used for main scalar invarant (can be 1 or 3 component)
void PrintSelf(ostream &os, vtkIndent indent) override
vtkAlgorithmOutput * GetInputImageDataConnection() override
Gets the pipeline input.
vtkDiffusionTensorMathematics * DTIMathematicsAlpha
used for calculating single component magnitude for color images
void UpdateReferenceID(const char *oldID, const char *newID) override
Update the stored reference to another node in the scene
virtual void UpdateImageDataPipeline()
Update the pipeline based on this node attributes
void GetDisplayScalarRange(double range[2]) override
void WriteXML(ostream &of, int indent) override
Write this node&#39;s information to a MRML file in XML format.
void SetScalarInvariantToPlanarMeasure()
Set scalar invariant to C_P (Westin&#39;s planar measure)
void SetScalarInvariantToFractionalAnisotropy()
Set scalar invariant to FA (normalized variance of eigenvalues)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
MRML node to represent display properties for tractography.
void operator=(const vtkMRMLGlyphableVolumeDisplayNode &)
void Copy(vtkMRMLNode *node) override
Copy the node&#39;s attributes to this object
MRML node for representing a volume (image stack).
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
MRML node for representing a volume (image stack).
virtual void AddSliceGlyphDisplayNodes(vtkMRMLVolumeNode *vtkNotUsed(node))
add slice glyph display nodes if not already present and return it
void SetScalarInvariantToTrace()
Set scalar invariant to trace (sum of eigenvalues).
static const char * GetScalarEnumAsString(int val)
vtkAlgorithmOutput * GetBackgroundImageStencilDataConnection() override
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void SetScalarInvariantToSphericalMeasure()
Set scalar invariant to C_S (Westin&#39;s spherical measure)
void SetScalarInvariantToRelativeAnisotropy()
Set scalar invariant to relative anisotropy.
MRML node for representing a volume display attributes.
static vtkMRMLGlyphableVolumeDisplayNode * New()