Slicer  4.11
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 
41 {
42  public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
47  vtkMRMLNode* CreateNodeInstance() override;
48 
51  void ReadXMLAttributes( const char** atts) override;
52 
55  void WriteXML(ostream& of, int indent) override;
56 
59  void Copy(vtkMRMLNode *node) override;
60 
63  const char* GetNodeTagName() override {return "DiffusionTensorVolumeDisplay";}
64 
65  //virtual vtkPolyData* ExecuteGlyphPipeLineAndGetPolyData( vtkImageData* );
66 
70  void UpdateReferences() override;
71 
74  void UpdateScene(vtkMRMLScene *scene) override;
75 
78  void UpdateReferenceID(const char *oldID, const char *newID) override;
79 
82  void ProcessMRMLEvents ( vtkObject * /*caller*/,
83  unsigned long /*event*/,
84  void * /*callData*/ ) override;
85 
86  //--------------------------------------------------------------------------
88  //--------------------------------------------------------------------------
89 
90  //--------------------------------------------------------------------------
92  //--------------------------------------------------------------------------
93 
97  vtkGetMacro(ScalarInvariant, int);
98 
102  vtkSetMacro(ScalarInvariant, int);
103 
107  this->SetScalarInvariant(vtkMRMLDiffusionTensorDisplayPropertiesNode::Trace);
108  };
109 
110  //Description:
114  };
115 
120  };
121 
126  };
127 
132  };
133 
138  };
139 
142  virtual const char * GetScalarInvariantAsString()
143  {
145  };
146 
148  vtkAlgorithmOutput* GetInputImageDataConnection() override;
149 
153  vtkAlgorithmOutput* GetBackgroundImageStencilDataConnection() override;
154 
155  void UpdateImageDataPipeline() override;
156 
157  vtkGetObjectMacro(DTIMathematics, vtkDiffusionTensorMathematics);
158  vtkGetObjectMacro(DTIMathematicsAlpha, vtkDiffusionTensorMathematics);
159  vtkGetObjectMacro (ShiftScale, vtkImageShiftScale);
160 
161 
164  std::vector< vtkMRMLGlyphableVolumeSliceDisplayNode*> GetSliceGlyphDisplayNodes( vtkMRMLVolumeNode* node ) override;
165 
166 
169  void AddSliceGlyphDisplayNodes( vtkMRMLVolumeNode* node ) override;
170 
174  void GetDisplayScalarRange(double range[2]) override;
175 
176  static int GetNumberOfScalarInvariants();
177  static int GetNthScalarInvariant(int i);
178 
179 protected:
184 
186  void SetInputToImageDataPipeline(vtkAlgorithmOutput *imageDataConnection) override;
187 
188  vtkAlgorithmOutput* GetScalarImageDataConnection() override;
189 
190  static std::vector<int> GetSupportedColorModes();
191 
193 
198 
199  vtkImageShiftScale *ShiftScale;
200 
201  vtkImageMathematics *ImageMath;
202 
203  vtkImageCast *ImageCast;
204 
207 
208 
209 };
210 
211 #endif
212 
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:56
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:139
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()