15#ifndef __vtkMRMLDiffusionTensorDisplayPropertiesNode_h
16#define __vtkMRMLDiffusionTensorDisplayPropertiesNode_h
22class vtkAlgorithmOutput;
40 void PrintSelf(ostream& os, vtkIndent indent)
override;
54 void WriteXML(ostream& of,
int indent)
override;
62 const char*
GetNodeTagName()
override {
return "DiffusionTensorDisplayProperties";}
72 RelativeAnisotropy = 2,
73 FractionalAnisotropy = 3,
80 ColorOrientation = 10,
86 MaxEigenvalueProjX = 16,
87 MaxEigenvalueProjY = 17,
88 MaxEigenvalueProjZ = 18,
89 MaxEigenvec_ProjX = 19,
90 MaxEigenvec_ProjY = 20,
91 MaxEigenvec_ProjZ = 21,
92 ParallelDiffusivity = 22,
93 PerpendicularDiffusivity = 23,
94 ColorOrientationMiddleEigenvector = 24,
95 ColorOrientationMinEigenvector = 25
108 vtkGetMacro(ScalarInvariant,
int);
113 vtkSetMacro(ScalarInvariant,
int);
118 this->SetScalarInvariant(this->Trace);
124 this->SetScalarInvariant(this->RelativeAnisotropy);
130 this->SetScalarInvariant(this->FractionalAnisotropy);
136 this->SetScalarInvariant(this->LinearMeasure);
142 this->SetScalarInvariant(this->PlanarMeasure);
148 this->SetScalarInvariant(this->SphericalMeasure);
175 vtkGetMacro(GlyphGeometry,
int);
182 if ( this->GlyphGeometry != geometry )
184 this->GlyphGeometry = geometry;
185 this->UpdateGlyphSource();
191 this->SetGlyphGeometry(this->Lines);
194 this->SetGlyphGeometry(this->Tubes);
197 this->SetGlyphGeometry(this->Ellipsoids);
200 this->SetGlyphGeometry(this->Superquadrics);
219 vtkGetMacro(GlyphScaleFactor,
double);
223 vtkSetMacro(GlyphScaleFactor,
double);
227 vtkGetMacro(GlyphExtractEigenvalues,
int);
228 vtkSetMacro(GlyphExtractEigenvalues,
int);
229 vtkBooleanMacro(GlyphExtractEigenvalues,
int);
244 vtkGetMacro(GlyphEigenvector,
int);
254 if ( this->GlyphEigenvector != eigenvector )
256 this->GlyphEigenvector = eigenvector;
257 if ( this->GlyphGeometry == this->Lines || this->GlyphGeometry == this->Tubes)
260 this->UpdateGlyphSource();
270 this->SetGlyphEigenvector(this->Major);
276 this->SetGlyphEigenvector(this->Middle);
282 this->SetGlyphEigenvector(this->Minor);
301 vtkGetMacro(LineGlyphResolution,
int);
304 if ( this->LineGlyphResolution != resolution )
306 this->LineGlyphResolution = resolution;
307 if ( this->GlyphGeometry == this->Lines || this->GlyphGeometry == this->Tubes)
310 this->UpdateGlyphSource();
323 vtkGetMacro(TubeGlyphRadius,
double);
329 if ( this->TubeGlyphRadius != radius )
331 this->TubeGlyphRadius = radius;
332 if ( this->GlyphGeometry == this->Lines || this->GlyphGeometry == this->Tubes)
335 this->UpdateGlyphSource();
344 vtkGetMacro(TubeGlyphNumberOfSides,
int);
347 if ( this->TubeGlyphNumberOfSides != numberOfSides )
349 this->TubeGlyphNumberOfSides = numberOfSides;
350 if ( this->GlyphGeometry == this->Lines || this->GlyphGeometry == this->Tubes)
353 this->UpdateGlyphSource();
366 vtkGetMacro(EllipsoidGlyphThetaResolution,
int);
367 vtkSetMacro(EllipsoidGlyphThetaResolution,
int);
372 vtkGetMacro(EllipsoidGlyphPhiResolution,
int);
373 vtkSetMacro(EllipsoidGlyphPhiResolution,
int);
380 vtkGetMacro(SuperquadricGlyphGamma,
double);
381 vtkSetMacro(SuperquadricGlyphGamma,
double);
384 vtkGetMacro(SuperquadricGlyphThetaResolution,
int);
385 vtkSetMacro(SuperquadricGlyphThetaResolution,
int);
388 vtkGetMacro(SuperquadricGlyphPhiResolution,
int);
389 vtkSetMacro(SuperquadricGlyphPhiResolution,
int);
398 vtkGetMacro(ColorGlyphBy,
int);
403 vtkSetMacro(ColorGlyphBy,
int);
417 this->SetColorGlyphBy(this->Trace);
423 this->SetColorGlyphBy(this->FractionalAnisotropy);
429 this->SetColorGlyphBy(this->LinearMeasure);
441 vtkGetObjectMacro( GlyphConnection, vtkAlgorithmOutput );
MRML node to represent discrete color information.
MRML node for display of a diffusion tensor.
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.
int GlyphExtractEigenvalues
void SetTubeGlyphNumberOfSides(int numberOfSides)
void SetGlyphGeometryToSuperquadrics()
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 GetLastScalarInvariant()
static int GetFirstColorGlyphBy()
Return the lowest and highest integers, for use in looping.
static int GetLastColorGlyphBy()
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 SetLineGlyphResolution(int resolution)
void SetGlyphEigenvectorToMiddle()
int GetLastGlyphGeometry()
int GlyphGeometry
Glyph general parameters.
void SetScalarInvariantToPlanarMeasure()
Set scalar invariant to C_P (Westin's planar measure)
int EllipsoidGlyphThetaResolution
Ellipsoid Glyph parameters.
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 SetGlyphGeometryToTubes()
int SuperquadricGlyphThetaResolution
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.
int EllipsoidGlyphPhiResolution
void SetGlyphEigenvectorToMajor()
virtual const char * GetGlyphEigenvectorAsString(int)
int LineGlyphResolution
Line Glyph parameters.
void ColorGlyphByFractionalAnisotropy()
Set scalar invariant to FA (normalized variance of eigenvalues)
void PrintSelf(ostream &os, vtkIndent indent) override
void SetGlyphGeometryToEllipsoids()
int SuperquadricGlyphPhiResolution
void SetGlyphEigenvectorToMinor()
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.
vtkMRMLDiffusionTensorDisplayPropertiesNode()
void SetGlyphGeometryToLines()
vtkAlgorithmOutput * GlyphConnection
int ScalarInvariant
-— Parameters that should be written to MRML — //
static int GetFirstScalarInvariant()
Return the lowest and highest integers, for use in looping.
~vtkMRMLDiffusionTensorDisplayPropertiesNode() override
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.
double TubeGlyphRadius
Tube Glyph parameters.
int GetLastGlyphEigenvector()
int TubeGlyphNumberOfSides
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.
double SuperquadricGlyphGamma
Superquadric Glyph parameters.
Abstract Superclass for all specific types of MRML nodes.
A superclass for other storage nodes.