ALBA
mmaVolumeMaterial.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: mmaVolumeMaterial
5 Authors: Paolo Quadrani
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __mmaVolumeMaterial_H__
18#define __mmaVolumeMaterial_H__
19
20//----------------------------------------------------------------------------
21// Include:
22//----------------------------------------------------------------------------
23#include "albaAttribute.h"
24
25//----------------------------------------------------------------------------
26// forward refs :
27//----------------------------------------------------------------------------
28class vtkLookupTable;
29class vtkPiecewiseFunction;
30class vtkColorTransferFunction;
31class vtkVolumeProperty;
32class vtkVolumeProperty2;
33
34//----------------------------------------------------------------------------
35// mmaVolumeMaterial:
36//----------------------------------------------------------------------------
38class ALBA_EXPORT mmaVolumeMaterial : public albaAttribute
39{
40public:
43
45
47 virtual void Print(std::ostream& os, const int tabs=0) const;
48
50 virtual void DeepCopy(const albaAttribute *a);
51
53 virtual bool Equals(const albaAttribute *a);
54
56 void UpdateProp();
57
60
62 void ApplyGammaCorrection(int preset = -1);
63
64 vtkLookupTable *m_ColorLut;
65 vtkPiecewiseFunction *m_OpacityTransferFunction;
66 vtkPiecewiseFunction *m_GradientTransferFunction;
67 vtkColorTransferFunction *m_ColorTransferFunction;
68 vtkVolumeProperty *m_VolumeProperty;
69 vtkVolumeProperty2 *m_VolumeProperty2;
70
72
76 double m_HueRange[2];
77 double m_SaturationRange[2];
80 int m_Shade;
81
82
84 double const *GetTableRange() { return m_TableRange; }
85
87 void SetTableRange(double *tableRange) {
88 m_TableRange[0] = tableRange[0]; m_TableRange[1] = tableRange[1];
89 }
90 void SetTableRange(double a, double b) {
91 m_TableRange[0] = a; m_TableRange[1] = b;
92 }
93
94protected:
95 virtual int InternalStore(albaStorageElement *parent);
97
101
102private:
103 double m_TableRange[2];
104
105};
106#endif
An abstract class for objects representing an attribute for albaVMEs.
Definition: albaAttribute.h:34
Abstract class representing the interface for the unit of information stored in the storage.
albaString - performs common string operations on c-strings.
Definition: albaString.h:43
vtkLookupTable * m_ColorLut
virtual ~mmaVolumeMaterial()
albaString m_MaterialName
Associate a name to the volume material, this will be visible into the .msf file.
virtual void DeepCopy(const albaAttribute *a)
Copy the contents of another Meter attribute into this one.
vtkPiecewiseFunction * m_OpacityTransferFunction
void UpdateFromTables()
Used to update all member variables from LUT or Transfer Functions.
vtkVolumeProperty * m_VolumeProperty
virtual void Print(std::ostream &os, const int tabs=0) const
Print a dump of this object.
virtual int InternalStore(albaStorageElement *parent)
This is called by Store() and must be reimplemented by subclasses.
int m_Shade
Store the shade parameter for volume rendering (can be 0 pr 1)
void SetTableRange(double *tableRange)
Sets TableRange.
vtkPiecewiseFunction * m_GradientTransferFunction
albaTypeMacro(mmaVolumeMaterial, albaAttribute)
vtkColorTransferFunction * m_ColorTransferFunction
void UpdateProp()
Call to update volume properties.
virtual int InternalRestore(albaStorageElement *node)
This is called by Restore() and must be reimplemented by subclasses The element from which the object...
virtual bool Equals(const albaAttribute *a)
Compare with another Meter attribute.
void SetTableRange(double a, double b)
double const * GetTableRange()
Returns TableRange.
void ApplyGammaCorrection(int preset=-1)
Used to apply gamma correction to lut preset, need preset in order to avoid recursive applying on the...
vtkVolumeProperty2 * m_VolumeProperty2
int m_InterpolationType
Set the interpolation for the volume rendering: can be 0 (VTK_NEAREST_INTERPOLATION) or 1 (VTK_LINEAR...