15 #ifndef __vtkMRMLDiffusionTensorDisplayPropertiesNode_h 16 #define __vtkMRMLDiffusionTensorDisplayPropertiesNode_h 22 class vtkAlgorithmOutput;
40 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
50 virtual
void ReadXMLAttributes( const
char** atts) VTK_OVERRIDE;
54 virtual
void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
62 virtual const
char* GetNodeTagName() VTK_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
98 static bool ScalarInvariantHasKnownScalarRange(
int ScalarInvariant);
99 static void ScalarInvariantKnownScalarRange(
int ScalarInvariant,
double range[2]);
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);
155 virtual const char * GetScalarInvariantAsString();
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);
210 virtual const char * GetGlyphGeometryAsString();
211 virtual const char * GetGlyphGeometryAsString(
int);
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);
292 virtual const char * GetGlyphEigenvectorAsString();
293 virtual const char * GetGlyphEigenvectorAsString(
int);
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);
407 static int GetFirstColorGlyphBy();
408 static int GetLastColorGlyphBy();
412 virtual const char * GetColorGlyphByAsString();
417 this->SetColorGlyphBy(this->Trace);
423 this->SetColorGlyphBy(this->FractionalAnisotropy);
429 this->SetColorGlyphBy(this->LinearMeasure);
441 vtkGetObjectMacro( GlyphConnection, vtkAlgorithmOutput );
444 static const char *GetScalarEnumAsString(
int val);
446 static int GetFirstScalarInvariant();
447 static int GetLastScalarInvariant();
461 void UpdateGlyphSource ( );
496 virtual void SetGlyphConnection(vtkAlgorithmOutput* glyphPort);
void SetScalarInvariantToSphericalMeasure()
Set scalar invariant to C_S (Westin's spherical measure)
void SetScalarInvariantToFractionalAnisotropy()
Set scalar invariant to FA (normalized variance of eigenvalues)
void SetGlyphEigenvectorToMajor()
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE
MRMLNode methods.
void SetGlyphEigenvectorToMiddle()
void SetScalarInvariantToRelativeAnisotropy()
Set scalar invariant to relative anisotropy.
void SetGlyphGeometryToEllipsoids()
int GetLastGlyphGeometry()
void SetTubeGlyphNumberOfSides(int numberOfSides)
int GetFirstGlyphEigenvector()
Return the lowest and highest integers, for use in looping.
void operator=(const vtkMRMLColorTableNode &)
void SetGlyphGeometryToSuperquadrics()
void SetScalarInvariantToTrace()
Set scalar invariant to trace (sum of eigenvalues).
vtkAlgorithmOutput * GlyphConnection
void SetScalarInvariantToPlanarMeasure()
Set scalar invariant to C_P (Westin's planar measure)
MRML node for display of a diffusion tensor.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
void ColorGlyphByTrace()
Set scalar invariant to trace (sum of eigenvalues).
int EllipsoidGlyphThetaResolution
Ellipsoid Glyph parameters.
void SetScalarInvariantToLinearMeasure()
Set scalar invariant to C_L (Westin's linear measure)
int ScalarInvariant
-— Parameters that should be written to MRML — //
void ColorGlyphByLinearMeasure()
Set scalar invariant to FA (normalized variance of eigenvalues)
void SetGlyphEigenvectorToMinor()
void SetTubeGlyphRadius(double radius)
Set the radius of the tube glyph.
double SuperquadricGlyphGamma
Superquadric Glyph parameters.
virtual vtkMRMLStorageNode * CreateDefaultStorageNode() VTK_OVERRIDE
Create default storage node or NULL if does not have one.
int GetFirstGlyphGeometry()
Return the lowest and highest integers, for use in looping.
int GetLastGlyphEigenvector()
void SetGlyphGeometryToTubes()
int GlyphGeometry
Glyph general parameters.
int EllipsoidGlyphPhiResolution
int SuperquadricGlyphPhiResolution
A supercalss for other storage nodes.
void SetLineGlyphResolution(int resolution)
void SetGlyphEigenvector(int eigenvector)
Set the type of glyph geometry (line, ellipsoid, etc.)
static vtkMRMLColorTableNode * New()
void ColorGlyphByFractionalAnisotropy()
Set scalar invariant to FA (normalized variance of eigenvalues)
int SuperquadricGlyphThetaResolution
int GlyphExtractEigenvalues
double TubeGlyphRadius
Tube Glyph parameters.
virtual void Modified() VTK_OVERRIDE
Customized version of Modified() allowing to compress vtkCommand::ModifiedEvent.
Abstract Superclass for all specific types of MRML nodes.
MRML node to represent discrete color information.
int TubeGlyphNumberOfSides
int LineGlyphResolution
Line Glyph parameters.
void SetGlyphGeometryToLines()
void SetGlyphGeometry(int geometry)
Set the type of glyph geometry (line, ellipsoid, etc.)