Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLDiffusionTensorDisplayPropertiesNode.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: ,v $
10 Date: $Date: 2006/03/19 17:12:29 $
11 Version: $Revision: 1.3 $
12
13 =========================================================================auto=*/
14
15#ifndef __vtkMRMLDiffusionTensorDisplayPropertiesNode_h
16#define __vtkMRMLDiffusionTensorDisplayPropertiesNode_h
17
19
20// VTK includes
21class vtkPolyData;
22class vtkAlgorithmOutput;
23
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
42 //--------------------------------------------------------------------------
44 //--------------------------------------------------------------------------
45
47
50 void ReadXMLAttributes(const char** atts) override;
51
54 void WriteXML(ostream& of, int indent) override;
55
58 void Copy(vtkMRMLNode* node) override;
59
62 const char* GetNodeTagName() override { return "DiffusionTensorDisplayProperties"; }
63
64 //--------------------------------------------------------------------------
66 //--------------------------------------------------------------------------
67
68 enum
69 {
70 Trace = 0,
81 D11 = 11,
82 D22 = 12,
83 D33 = 13,
84 Mode = 14,
96 };
97
99 static void ScalarInvariantKnownScalarRange(int ScalarInvariant, double range[2]);
100
101 //--------------------------------------------------------------------------
103 //--------------------------------------------------------------------------
104
108 vtkGetMacro(ScalarInvariant, int);
109
113 vtkSetMacro(ScalarInvariant, int);
114
118
119 // Description:
122
126
130
134
138
140
143 virtual const char* GetScalarInvariantAsString();
144
145 //--------------------------------------------------------------------------
147 //--------------------------------------------------------------------------
148
149 enum
150 {
151 Lines = 0,
152 Tubes = 1,
155 };
156
157 //--------------------------------------------------------------------------
159 //--------------------------------------------------------------------------
160
163 vtkGetMacro(GlyphGeometry, int);
164
167 // vtkSetMacro(GlyphGeometry, int);
169 void SetGlyphGeometry(int geometry)
170 {
171 if (this->GlyphGeometry != geometry)
172 {
173 this->GlyphGeometry = geometry;
174 this->UpdateGlyphSource();
175 this->Modified();
176 }
177 }
178
183
186 int GetFirstGlyphGeometry() { return this->Lines; };
187 int GetLastGlyphGeometry() { return this->Ellipsoids; };
188
191 virtual const char* GetGlyphGeometryAsString();
192 virtual const char* GetGlyphGeometryAsString(int);
193
194 //--------------------------------------------------------------------------
196 //--------------------------------------------------------------------------
197
200 vtkGetMacro(GlyphScaleFactor, double);
201
204 vtkSetMacro(GlyphScaleFactor, double);
205
208 vtkGetMacro(GlyphExtractEigenvalues, int);
209 vtkSetMacro(GlyphExtractEigenvalues, int);
210 vtkBooleanMacro(GlyphExtractEigenvalues, int);
211
212 //--------------------------------------------------------------------------
214 //--------------------------------------------------------------------------
215
216 enum
217 {
218 Major = 0,
221 };
222
225 vtkGetMacro(GlyphEigenvector, int);
226
229 // vtkSetMacro(GlyphEigenvector, int);
232 // vtkSetMacro(GlyphGeometry, int);
234 void SetGlyphEigenvector(int eigenvector)
235 {
236 if (this->GlyphEigenvector != eigenvector)
237 {
238 this->GlyphEigenvector = eigenvector;
239 if (this->GlyphGeometry == this->Lines || this->GlyphGeometry == this->Tubes)
240 {
242 this->UpdateGlyphSource();
243 }
244
245 this->Modified();
246 }
247 }
248
252
256
260
263 int GetFirstGlyphEigenvector() { return this->Major; };
264 int GetLastGlyphEigenvector() { return this->Minor; };
265
268 virtual const char* GetGlyphEigenvectorAsString();
269 virtual const char* GetGlyphEigenvectorAsString(int);
270
271 //--------------------------------------------------------------------------
273 //--------------------------------------------------------------------------
274
277 vtkGetMacro(LineGlyphResolution, int);
278 // vtkSetMacro(LineGlyphResolution, int);
279 void SetLineGlyphResolution(int resolution)
280 {
281 if (this->LineGlyphResolution != resolution)
282 {
283 this->LineGlyphResolution = resolution;
284 if (this->GlyphGeometry == this->Lines || this->GlyphGeometry == this->Tubes)
285 {
287 this->UpdateGlyphSource();
288 }
289
290 this->Modified();
291 }
292 }
293
294 //--------------------------------------------------------------------------
296 //--------------------------------------------------------------------------
297
300 vtkGetMacro(TubeGlyphRadius, double);
301
304 // vtkSetMacro(TubeGlyphRadius, double);
305 void SetTubeGlyphRadius(double radius)
306 {
307 if (this->TubeGlyphRadius != radius)
308 {
309 this->TubeGlyphRadius = radius;
310 if (this->GlyphGeometry == this->Lines || this->GlyphGeometry == this->Tubes)
311 {
313 this->UpdateGlyphSource();
314 }
315
316 this->Modified();
317 }
318 }
319
322 vtkGetMacro(TubeGlyphNumberOfSides, int);
323 // vtkSetMacro(TubeGlyphNumberOfSides, int);
324 void SetTubeGlyphNumberOfSides(int numberOfSides)
325 {
326 if (this->TubeGlyphNumberOfSides != numberOfSides)
327 {
328 this->TubeGlyphNumberOfSides = numberOfSides;
329 if (this->GlyphGeometry == this->Lines || this->GlyphGeometry == this->Tubes)
330 {
332 this->UpdateGlyphSource();
333 }
334
335 this->Modified();
336 }
337 }
338 //--------------------------------------------------------------------------
340 //--------------------------------------------------------------------------
341
347
353
354 //--------------------------------------------------------------------------
356 //--------------------------------------------------------------------------
357
359 vtkGetMacro(SuperquadricGlyphGamma, double);
360 vtkSetMacro(SuperquadricGlyphGamma, double);
361
365
369
370 //--------------------------------------------------------------------------
372 //--------------------------------------------------------------------------
373
377 vtkGetMacro(ColorGlyphBy, int);
378
382 vtkSetMacro(ColorGlyphBy, int);
383
388
391 virtual const char* GetColorGlyphByAsString();
392
395 void ColorGlyphByTrace() { this->SetColorGlyphBy(this->Trace); };
396
400
404
406
407 //--------------------------------------------------------------------------
409 //--------------------------------------------------------------------------
410
414 vtkGetObjectMacro(GlyphConnection, vtkAlgorithmOutput);
415
416 // Helper function to get the string of Scalar enums
417 static const char* GetScalarEnumAsString(int val);
421
424 vtkMRMLStorageNode* CreateDefaultStorageNode() override { return nullptr; }
425
426protected:
431
433
435
438
445
448
452
456
461
463
467 virtual void SetGlyphConnection(vtkAlgorithmOutput* glyphPort);
468 vtkAlgorithmOutput* GlyphConnection;
469
472
474};
475
476#endif
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void operator=(const vtkMRMLDiffusionTensorDisplayPropertiesNode &)
virtual const char * GetGlyphGeometryAsString()
Return a text string describing the GlyphGeometry variable.
int GetFirstGlyphGeometry()
Return the lowest and highest integers, for use in looping.
void SetGlyphEigenvector(int eigenvector)
Set the type of glyph geometry (line, ellipsoid, etc.)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
static int GetFirstColorGlyphBy()
Return the lowest and highest integers, for use in looping.
vtkMRMLDiffusionTensorDisplayPropertiesNode(const vtkMRMLDiffusionTensorDisplayPropertiesNode &)
virtual const char * GetScalarInvariantAsString()
TO DO: add the rest of the scalars.
static const char * GetScalarEnumAsString(int val)
void ColorGlyphByTrace()
Set scalar invariant to trace (sum of eigenvalues).
void SetScalarInvariantToPlanarMeasure()
Set scalar invariant to C_P (Westin's planar measure)
static bool ScalarInvariantHasKnownScalarRange(int ScalarInvariant)
void SetTubeGlyphRadius(double radius)
Set the radius of the tube glyph.
vtkMRMLStorageNode * CreateDefaultStorageNode() override
Create default storage node or nullptr if does not have one.
void SetScalarInvariantToLinearMeasure()
Set scalar invariant to C_L (Westin's linear measure)
void SetScalarInvariantToRelativeAnisotropy()
Set scalar invariant to relative anisotropy.
void ColorGlyphByLinearMeasure()
Set scalar invariant to FA (normalized variance of eigenvalues)
void SetGlyphGeometry(int geometry)
Set the type of glyph geometry (line, ellipsoid, etc.)
static void ScalarInvariantKnownScalarRange(int ScalarInvariant, double range[2])
static vtkMRMLDiffusionTensorDisplayPropertiesNode * New()
virtual const char * GetColorGlyphByAsString()
Return a text string describing the ColorGlyphBy.
int GetFirstGlyphEigenvector()
Return the lowest and highest integers, for use in looping.
virtual const char * GetGlyphEigenvectorAsString(int)
void ColorGlyphByFractionalAnisotropy()
Set scalar invariant to FA (normalized variance of eigenvalues)
void PrintSelf(ostream &os, vtkIndent indent) override
virtual const char * GetGlyphGeometryAsString(int)
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
virtual void SetGlyphConnection(vtkAlgorithmOutput *glyphPort)
-— End of parameters that should be written to MRML — //
void SetScalarInvariantToFractionalAnisotropy()
Set scalar invariant to FA (normalized variance of eigenvalues)
virtual const char * GetGlyphEigenvectorAsString()
Return a text string describing GlyphEigenvector variable.
int ScalarInvariant
-— Parameters that should be written to MRML — //
static int GetFirstScalarInvariant()
Return the lowest and highest integers, for use in looping.
void SetScalarInvariantToSphericalMeasure()
Set scalar invariant to C_S (Westin's spherical measure)
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.
void SetScalarInvariantToTrace()
Set scalar invariant to trace (sum of eigenvalues).
void ReadXMLAttributes(const char **atts) override
Read node attributes from a MRML file in XML format.
Abstract Superclass for all specific types of MRML nodes.
void Modified() override
Customized version of Modified() allowing to compress vtkCommand::ModifiedEvent.
A superclass for other storage nodes.