ALBA
mmaMaterial.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: mmaMaterial
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 __mmaMaterial_H__
18#define __mmaMaterial_H__
19
20//----------------------------------------------------------------------------
21// Include:
22//----------------------------------------------------------------------------
23#include "albaAttribute.h"
24
25//----------------------------------------------------------------------------
26// forward refs :
27//----------------------------------------------------------------------------
28class vtkProperty;
29class vtkLookupTable;
30class vtkImageData;
31
32//----------------------------------------------------------------------------
33// mmaMaterial:
34//----------------------------------------------------------------------------
36class ALBA_EXPORT mmaMaterial : public albaAttribute
37{
38public:
40 virtual ~mmaMaterial();
41
43
45 {
48 USE_TEXTURE
49 };
50
52 {
53 PLANE_MAPPING = 0,
55 SPHERE_MAPPING
56 };
57
59 wxBitmap *MakeIcon();
60
62 virtual void Print(std::ostream& os, const int tabs=0) const;
63
65 virtual void DeepCopy(const albaAttribute *a);
66
68 virtual bool Equals(const albaAttribute *a);
69
71 void SetMaterialTexture(vtkImageData *tex);
72
74 vtkImageData *GetMaterialTexture();
75
78
80 void SetMaterialTexture(int tex_id);
81
83 virtual void UpdateProp();
84
87
88 vtkProperty *m_Prop;
89 vtkLookupTable *m_ColorLut;
90
92 wxBitmap *m_Icon;
93 double m_Value;
94 double m_Ambient[3];
96 double m_Diffuse[3];
98 double m_Specular[3];
101 double m_Opacity;
103
104 double m_HueRange[2];
105 double m_SaturationRange[2];
106 double m_TableRange[2];
110
111protected:
112 vtkImageData *m_TextureImage;
114
115 virtual int InternalStore(albaStorageElement *parent);
117};
118#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
int m_TextureMappingMode
Definition: mmaMaterial.h:109
virtual int InternalStore(albaStorageElement *parent)
This is called by Store() and must be reimplemented by subclasses.
albaString m_MaterialName
Definition: mmaMaterial.h:91
vtkProperty * m_Prop
Definition: mmaMaterial.h:88
virtual void Print(std::ostream &os, const int tabs=0) const
print a dump of this object
int m_MaterialType
Definition: mmaMaterial.h:108
virtual int InternalRestore(albaStorageElement *node)
This is called by Restore() and must be reimplemented by subclasses The element from which the object...
@ CYLINDER_MAPPING
Definition: mmaMaterial.h:54
int GetMaterialTextureID()
Return the vme's id representing the texture.
wxBitmap * m_Icon
Definition: mmaMaterial.h:92
double m_Value
Definition: mmaMaterial.h:93
vtkLookupTable * m_ColorLut
Definition: mmaMaterial.h:89
virtual bool Equals(const albaAttribute *a)
Compare with another Meter attribute.
vtkImageData * GetMaterialTexture()
Return the texture set as vtkImageData.
vtkImageData * m_TextureImage
Definition: mmaMaterial.h:112
virtual void UpdateProp()
Apply shading parameters to the vtkProperty.
double m_Representation
Definition: mmaMaterial.h:102
double m_DiffuseIntensity
Definition: mmaMaterial.h:97
virtual ~mmaMaterial()
double m_SpecularIntensity
Definition: mmaMaterial.h:99
void SetMaterialTexture(int tex_id)
Set the albaVMEImage id to use as texture to map on the surface.
double m_SpecularPower
Definition: mmaMaterial.h:100
void SetMaterialTexture(vtkImageData *tex)
Set the texture image to map on the surface.
albaTypeMacro(mmaMaterial, albaAttribute)
double m_Opacity
Definition: mmaMaterial.h:101
double m_AmbientIntensity
Definition: mmaMaterial.h:95
void UpdateFromLut()
This method updates member variables from Lookup Table.
wxBitmap * MakeIcon()
Build the material icon.
virtual void DeepCopy(const albaAttribute *a)
Copy the contents of another Meter attribute into this one.
@ USE_VTK_PROPERTY
Definition: mmaMaterial.h:46