Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <mitkMaterial.h>
Public Types | |
enum | InterpolationType { Flat, Gouraud, Phong } |
enum | RepresentationType { Points, Wireframe, Surface } |
typedef Material | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef itk::RGBPixel< double > | Color |
Public Member Functions | |
virtual std::vector< std::string > | GetClassHierarchy () const |
virtual const char * | GetClassName () const |
virtual bool | Assignable (const Material &other) const |
virtual Material & | operator= (const Material &other) |
virtual void | SetColor (Color color) |
virtual void | SetColor (double red, double green, double blue) |
virtual void | SetColorCoefficient (double coefficient) |
virtual void | SetSpecularColor (Color color) |
virtual void | SetSpecularColor (double red, double green, double blue) |
virtual void | SetSpecularCoefficient (double specularCoefficient) |
virtual void | SetSpecularPower (double specularPower) |
virtual void | SetOpacity (double opacity) |
virtual void | SetInterpolation (InterpolationType interpolation) |
virtual void | SetRepresentation (RepresentationType representation) |
virtual void | SetLineWidth (float lineWidth) |
virtual Color | GetColor () const |
virtual double | GetColorCoefficient () const |
virtual Color | GetSpecularColor () const |
virtual double | GetSpecularCoefficient () const |
virtual double | GetSpecularPower () const |
virtual double | GetOpacity () const |
virtual InterpolationType | GetInterpolation () const |
virtual RepresentationType | GetRepresentation () const |
virtual int | GetVtkInterpolation () const |
virtual int | GetVtkRepresentation () const |
virtual float | GetLineWidth () const |
virtual void | Initialize (const Material &property) |
virtual bool | operator== (const Material &property) const |
void | PrintSelf (std::ostream &os, itk::Indent) const override |
virtual void | SetName (std::string _arg) |
virtual std::string | GetName () const |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
static Pointer | New (Color color, double opacity=1.0f) |
static Pointer | New (double red, double green, double blue, double opacity=1.0f) |
static Pointer | New (double red, double green, double blue, double colorCoefficient, double specularCoefficient, double specularPower, double opacity) |
static Pointer | New (Color color, double colorCoefficient, double specularCoefficient, double specularPower, double opacity) |
static Pointer | New (const Material &_arg) |
static Pointer | New (const Material &property, double red, double green, double blue, double opacity=1.0, std::string name="") |
Protected Member Functions | |
Material () | |
Material (Color color, double opacity=1.0f) | |
Material (double red, double green, double blue, double opacity=1.0f) | |
Material (double red, double green, double blue, double colorCoefficient, double specularCoefficient, double specularPower, double opacity) | |
Material (Color color, double colorCoefficient, double specularCoefficient, double specularPower, double opacity) | |
Material (const Material &property) | |
Material (const Material &property, double red, double green, double blue, double opacity=1.0, std::string name="") | |
virtual void | InitializeStandardValues () |
virtual void | Update () |
Protected Attributes | |
std::string | m_Name |
Color | m_Color |
Color | m_SpecularColor |
double | m_ColorCoefficient |
double | m_SpecularCoefficient |
double | m_SpecularPower |
double | m_Opacity |
float | m_LineWidth |
InterpolationType | m_Interpolation |
RepresentationType | m_Representation |
Encapsulates 3D visualization properties which are forwarded to vtk for color mapping. This includes color, specular coefficient and power, opacity interpolation type (flat, gouraud, phong) and representation (points, wireframe or surface).
Definition at line 38 of file mitkMaterial.h.
typedef itk::RGBPixel<double> mitk::Material::Color |
Definition at line 41 of file mitkMaterial.h.
typedef itk::SmartPointer<const Self> mitk::Material::ConstPointer |
Definition at line 41 of file mitkMaterial.h.
typedef itk::SmartPointer<Self> mitk::Material::Pointer |
Definition at line 41 of file mitkMaterial.h.
typedef Material mitk::Material::Self |
Definition at line 41 of file mitkMaterial.h.
typedef itk::Object mitk::Material::Superclass |
Definition at line 41 of file mitkMaterial.h.
Enumerator | |
---|---|
Flat | |
Gouraud | |
Phong |
Definition at line 45 of file mitkMaterial.h.
Enumerator | |
---|---|
Points | |
Wireframe | |
Surface |
Definition at line 52 of file mitkMaterial.h.
|
protected |
Constructor. Materials are set to the following default values: Color (0.5, 0.5, 0.5) color coefficient 1.0, specular color (1.0, 1.0, 1.0), specular coefficient 1.0, specular power 10, opacity 1.0, interpolation Gouraud, representation Surface.
node | optinally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 94 of file mitkMaterial.cpp.
|
protected |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
color | the material color in RGB. Each RGB value should be in the range [0..1] |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optinally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 25 of file mitkMaterial.cpp.
References GetColorCoefficient(), GetInterpolation(), GetLineWidth(), GetRepresentation(), GetSpecularCoefficient(), GetSpecularColor(), GetSpecularPower(), InitializeStandardValues(), m_Name, SetColor(), SetColorCoefficient(), SetInterpolation(), SetLineWidth(), SetOpacity(), SetRepresentation(), SetSpecularCoefficient(), SetSpecularColor(), and SetSpecularPower().
|
protected |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
red | the red component of the materials color (range [0..1]) |
green | the green component of the materials color (range [0..1]) |
blue | the blue component of the materials color (range [0..1]) |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 40 of file mitkMaterial.cpp.
|
protected |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
red | the red component of the materials color (range [0..1]) |
green | the green component of the materials color (range [0..1]) |
blue | the blue component of the materials color (range [0..1]) |
colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 55 of file mitkMaterial.cpp.
|
protected |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
color | the material color in RGB. Each RGB value should be in the range [0..1] |
colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 76 of file mitkMaterial.cpp.
|
protected |
|
protected |
Copy constructor, provided for convinience. The values are copied from property and afterwards the values provided for red green blue and opacity are written into the object.
Definition at line 113 of file mitkMaterial.cpp.
|
virtual |
Definition at line 122 of file mitkMaterial.cpp.
References GetOpacity().
|
inlinevirtual |
Definition at line 41 of file mitkMaterial.h.
|
virtual |
|
virtual |
Definition at line 219 of file mitkMaterial.cpp.
Referenced by Initialize(), and operator==().
|
virtual |
Definition at line 224 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
|
virtual |
Definition at line 249 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
|
virtual |
Definition at line 287 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
|
virtual |
returns the name associated with the material property
Referenced by Initialize(), and operator==().
|
virtual |
Definition at line 244 of file mitkMaterial.cpp.
Referenced by Assignable(), Initialize(), and operator==().
|
virtual |
Definition at line 254 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
|
virtual |
Definition at line 234 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
|
virtual |
Definition at line 229 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
|
virtual |
Definition at line 239 of file mitkMaterial.cpp.
Referenced by Initialize(), Material(), and operator==().
|
inlinestatic |
Definition at line 41 of file mitkMaterial.h.
|
virtual |
Definition at line 259 of file mitkMaterial.cpp.
|
virtual |
Definition at line 273 of file mitkMaterial.cpp.
|
virtual |
Fills the current materials with the properties of the given material.
property | the materials which should be copied in the current materials |
Definition at line 292 of file mitkMaterial.cpp.
References GetColor(), GetColorCoefficient(), GetInterpolation(), GetLineWidth(), GetName(), GetOpacity(), GetRepresentation(), GetSpecularCoefficient(), GetSpecularColor(), and GetSpecularPower().
Referenced by Material().
|
protectedvirtual |
Definition at line 320 of file mitkMaterial.cpp.
Referenced by Material().
|
inlinestatic |
Constructor. Materials are set to the following default values: Color (0.5, 0.5, 0.5) color coefficient 1.0, specular color (1.0, 1.0, 1.0), specular coefficient 1.0, specular power 10, opacity 1.0, interpolation Gouraud, representation Surface.
node | optinally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 68 of file mitkMaterial.h.
Constructor. All values besides the given ones are set to defaults as described in the default constructor
color | the material color in RGB. Each RGB value should be in the range [0..1] |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optinally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 86 of file mitkMaterial.h.
|
inlinestatic |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
red | the red component of the materials color (range [0..1]) |
green | the green component of the materials color (range [0..1]) |
blue | the blue component of the materials color (range [0..1]) |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 105 of file mitkMaterial.h.
|
inlinestatic |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
red | the red component of the materials color (range [0..1]) |
green | the green component of the materials color (range [0..1]) |
blue | the blue component of the materials color (range [0..1]) |
colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 130 of file mitkMaterial.h.
|
inlinestatic |
Constructor. All values besides the given ones are set to defaults as described in the default constructor
color | the material color in RGB. Each RGB value should be in the range [0..1] |
colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
node | optionally a data tree node may be defined to which the properties are forwarded. Please note, that if this node doesn't have the needed properties associated, they will be added. |
Definition at line 161 of file mitkMaterial.h.
Copy constructor
Definition at line 172 of file mitkMaterial.h.
|
inlinestatic |
Copy constructor, provided for convinience. The values are copied from property and afterwards the values provided for red green blue and opacity are written into the object.
Definition at line 178 of file mitkMaterial.h.
|
virtual |
Definition at line 137 of file mitkMaterial.cpp.
|
virtual |
comparison operator which uses the member variables for comparison
Definition at line 306 of file mitkMaterial.cpp.
References GetColor(), GetColorCoefficient(), GetInterpolation(), GetLineWidth(), GetName(), GetOpacity(), GetRepresentation(), GetSpecularCoefficient(), GetSpecularColor(), and GetSpecularPower().
|
override |
Dumps the properties to the out stream out
Definition at line 346 of file mitkMaterial.cpp.
References GetName().
|
virtual |
Definition at line 153 of file mitkMaterial.cpp.
Referenced by Material().
|
virtual |
Sets the materials color in RGB space. The rgb components have to be in the range [0..1]
red | the red component of the materials color (range [0..1]) |
green | the green component of the materials color (range [0..1]) |
blue | the blue component of the materials color (range [0..1]) |
Definition at line 159 of file mitkMaterial.cpp.
|
virtual |
Sets a attenuation coefficient for the color. A value of 0 results in a black object. VAlid range is [0..1]
coefficient | the color attenuation coefficient |
Definition at line 165 of file mitkMaterial.cpp.
Referenced by Material().
|
virtual |
Sets the surface interpolation method of the object rendered using the given materials. Valid Interopation types are Flat, Gouraud and Phong. See any computer graphics book for their meaning
interpolation | the interpolation method used for rendering of surfaces. |
Definition at line 201 of file mitkMaterial.cpp.
Referenced by Material().
|
virtual |
Set/Get the width of a Line. The width is expressed in screen units. The default is 1.0.
Definition at line 213 of file mitkMaterial.cpp.
Referenced by Material().
|
virtual |
Sets an optional name which may be associated with the material property Please note, that this name is NOT forwarded to the data tree node as the node name
|
virtual |
Sets the opacity of the material, which controls how transparent the object appears. Valid range is [0..1], where 0 means fully transparent and 1 means a solid surface.
opacity | the new opacity of the material |
Definition at line 195 of file mitkMaterial.cpp.
Referenced by Material().
|
virtual |
Sets the surface representation method of the object rendered using the given materials. Valid Interopation types are Points, Wireframe and Surface.
representation | the representation method used for rendering of surfaces. |
Definition at line 207 of file mitkMaterial.cpp.
Referenced by Material().
|
virtual |
Sets the specular coefficient which controls the shininess of the object together with the specular power
specularCoefficient | the new specular coefficient. Valid range is [0..1] |
Definition at line 183 of file mitkMaterial.cpp.
Referenced by Material().
|
virtual |
Sets the specular color
color | the specular color in RGB. Each RGB value should be in the range [0..1] |
Definition at line 171 of file mitkMaterial.cpp.
Referenced by Material().
|
virtual |
Sets the specular color
red | the red component of the specular color (range [0..1]) |
green | the green component of the specular color (range [0..1]) |
blue | the blue component of the specular color (range [0..1]) |
Definition at line 177 of file mitkMaterial.cpp.
|
virtual |
Sets the specular power which controls the shininess of the object together with the specular coefficient
specularCoefficient | the new specular coefficient. Valid range is [0..inf] |
Definition at line 189 of file mitkMaterial.cpp.
Referenced by Material().
|
protectedvirtual |
Definition at line 334 of file mitkMaterial.cpp.
|
protected |
Definition at line 465 of file mitkMaterial.h.
|
protected |
Definition at line 469 of file mitkMaterial.h.
|
protected |
Definition at line 479 of file mitkMaterial.h.
|
protected |
Definition at line 477 of file mitkMaterial.h.
|
protected |
Definition at line 463 of file mitkMaterial.h.
Referenced by Material().
|
protected |
Definition at line 475 of file mitkMaterial.h.
|
protected |
Definition at line 481 of file mitkMaterial.h.
|
protected |
Definition at line 471 of file mitkMaterial.h.
|
protected |
Definition at line 467 of file mitkMaterial.h.
|
protected |
Definition at line 473 of file mitkMaterial.h.