|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Encapsulates 3D visualization properties which are forwarded to VTK for color mapping. More...
#include <mitkMaterial.h>


Public Types | |
| enum | InterpolationType { Flat , Gouraud , Phong } |
| enum | RepresentationType { Points , Wireframe , Surface } |
| typedef itk::RGBPixel< double > | Color |
Public Member Functions | |
| mitkClassMacroItkParent (Material, itk::Object) | |
| mitkNewMacro1Param (Material, const Material &) | |
| Copy constructor. More... | |
| virtual bool | Assignable (const Material &other) const |
| Check whether the given material can be assigned to this one. More... | |
| virtual Material & | operator= (const Material &other) |
| Assignment operator. Copies all properties from the other material. More... | |
| virtual void | SetColor (Color color) |
| Set the material color in RGB space. More... | |
| virtual void | SetColor (double red, double green, double blue) |
| Set the material color in RGB space. More... | |
| virtual void | SetColorCoefficient (double coefficient) |
| Set an attenuation coefficient for the color. More... | |
| virtual void | SetSpecularColor (Color color) |
| Set the specular color. More... | |
| virtual void | SetSpecularColor (double red, double green, double blue) |
| Set the specular color using RGB components. More... | |
| virtual void | SetSpecularCoefficient (double specularCoefficient) |
| Set the specular coefficient which controls the shininess of the object together with the specular power. More... | |
| virtual void | SetSpecularPower (double specularPower) |
| Set the specular power which controls the shininess of the object together with the specular coefficient. More... | |
| virtual void | SetOpacity (double opacity) |
| Set the opacity of the material. More... | |
| virtual void | SetInterpolation (InterpolationType interpolation) |
| Set the surface interpolation method of the object. More... | |
| virtual void | SetRepresentation (RepresentationType representation) |
| Set the surface representation method of the object. More... | |
| virtual void | SetLineWidth (float lineWidth) |
| Set the width of a Line. More... | |
| virtual Color | GetColor () const |
| Get the color of the material. More... | |
| virtual double | GetColorCoefficient () const |
| Get the color coefficient of the material. More... | |
| virtual Color | GetSpecularColor () const |
| Get the specular color of the material. More... | |
| virtual double | GetSpecularCoefficient () const |
| Get the specular coefficient used for rendering. More... | |
| virtual double | GetSpecularPower () const |
| Get the specular power. More... | |
| virtual double | GetOpacity () const |
| Get the opacity of the material. More... | |
| virtual InterpolationType | GetInterpolation () const |
| Get the interpolation method used for rendering. More... | |
| virtual RepresentationType | GetRepresentation () const |
| Get the representation type used for rendering. More... | |
| virtual int | GetVtkInterpolation () const |
| Get the interpolation method as a VTK constant. More... | |
| virtual int | GetVtkRepresentation () const |
| Get the representation type as a VTK constant. More... | |
| virtual float | GetLineWidth () const |
| Get the line width used for wireframe rendering. More... | |
| virtual void | Initialize (const Material &property) |
| Fill the current material with the properties of the given material. More... | |
| virtual bool | operator== (const Material &property) const |
| Comparison operator which uses the member variables for comparison. More... | |
| void | PrintSelf (std::ostream &os, itk::Indent) const override |
| Print the material properties to the given output stream. More... | |
| virtual void | SetName (std::string _arg) |
| Set an optional name which may be associated with the material property. More... | |
| virtual std::string | GetName () const |
| Get the name associated with the material property. More... | |
Static Public Member Functions | |
| static Pointer | New () |
| Create a new Material with default values. More... | |
| static Pointer | New (Color color, double opacity=1.0f) |
| Create a new Material with the given color and opacity. More... | |
| static Pointer | New (double red, double green, double blue, double opacity=1.0f) |
| Create a new Material with the given RGB color components and opacity. More... | |
| static Pointer | New (double red, double green, double blue, double colorCoefficient, double specularCoefficient, double specularPower, double opacity) |
| Create a new Material with full control over color and lighting properties. More... | |
| static Pointer | New (Color color, double colorCoefficient, double specularCoefficient, double specularPower, double opacity) |
| Create a new Material with the given color and lighting properties. More... | |
| static Pointer | New (const Material &property, double red, double green, double blue, double opacity=1.0, std::string name="") |
| Copy constructor with color and opacity override. More... | |
Protected Member Functions | |
| Material () | |
| Default constructor. More... | |
| Material (Color color, double opacity=1.0f) | |
| Constructor with color and opacity. More... | |
| Material (double red, double green, double blue, double opacity=1.0f) | |
| Constructor with RGB components and opacity. More... | |
| Material (double red, double green, double blue, double colorCoefficient, double specularCoefficient, double specularPower, double opacity) | |
| Constructor with full control over color and lighting properties. More... | |
| Material (Color color, double colorCoefficient, double specularCoefficient, double specularPower, double opacity) | |
| Constructor with color and lighting properties. More... | |
| Material (const Material &property) | |
| Copy constructor. More... | |
| Material (const Material &property, double red, double green, double blue, double opacity=1.0, std::string name="") | |
| Copy constructor with color and opacity override. More... | |
| virtual void | InitializeStandardValues () |
| Initialize all member variables to standard default values. More... | |
| virtual void | Update () |
| Re-apply all current property values, triggering Modified(). More... | |
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 35 of file mitkMaterial.h.
| typedef itk::RGBPixel<double> mitk::Material::Color |
Definition at line 40 of file mitkMaterial.h.
| Enumerator | |
|---|---|
| Flat | |
| Gouraud | |
| Phong | |
Definition at line 42 of file mitkMaterial.h.
| Enumerator | |
|---|---|
| Points | |
| Wireframe | |
| Surface | |
Definition at line 49 of file mitkMaterial.h.
|
protected |
Default 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.
|
protected |
Constructor with color and opacity.
All values besides the given ones are set to defaults as described in the default constructor.
| [in] | color | the material color in RGB. Each RGB value should be in the range [0..1]. |
| [in] | opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
|
protected |
Constructor with RGB components and opacity.
All values besides the given ones are set to defaults as described in the default constructor.
| [in] | red | the red component of the material color (range [0..1]). |
| [in] | green | the green component of the material color (range [0..1]). |
| [in] | blue | the blue component of the material color (range [0..1]). |
| [in] | opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
|
protected |
Constructor with full control over color and lighting properties.
All values besides the given ones are set to defaults as described in the default constructor.
| [in] | red | the red component of the material color (range [0..1]). |
| [in] | green | the green component of the material color (range [0..1]). |
| [in] | blue | the blue component of the material color (range [0..1]). |
| [in] | colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
| [in] | specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
| [in] | specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
| [in] | opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
|
protected |
Constructor with color and lighting properties.
All values besides the given ones are set to defaults as described in the default constructor.
| [in] | color | the material color in RGB. Each RGB value should be in the range [0..1]. |
| [in] | colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
| [in] | specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
| [in] | specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
| [in] | opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
|
protected |
Copy constructor.
|
protected |
Copy constructor with color and opacity override.
The values are copied from the given property and afterwards the values provided for red, green, blue, and opacity are written into the object.
|
virtual |
Check whether the given material can be assigned to this one.
| [in] | other | the Material to check for assignability. |
|
virtual |
Get the color of the material.
|
virtual |
Get the color coefficient of the material.
|
virtual |
Get the interpolation method used for rendering.
|
virtual |
Get the line width used for wireframe rendering.
|
virtual |
Get the name associated with the material property.
|
virtual |
Get the opacity of the material.
|
virtual |
Get the representation type used for rendering.
|
virtual |
Get the specular coefficient used for rendering.
|
virtual |
Get the specular color of the material.
|
virtual |
Get the specular power.
|
virtual |
Get the interpolation method as a VTK constant.
|
virtual |
Get the representation type as a VTK constant.
|
virtual |
Fill the current material with the properties of the given material.
| [in] | property | the Material whose properties should be copied into this material. |
|
protectedvirtual |
Initialize all member variables to standard default values.
| mitk::Material::mitkClassMacroItkParent | ( | Material | , |
| itk::Object | |||
| ) |
|
inlinestatic |
Create a new Material with default values.
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.
Definition at line 66 of file mitkMaterial.h.
|
inlinestatic |
Create a new Material with the given color and lighting properties.
All values besides the given ones are set to defaults as described in the default constructor.
| [in] | color | the material color in RGB. Each RGB value should be in the range [0..1]. |
| [in] | colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
| [in] | specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
| [in] | specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
| [in] | opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
Definition at line 162 of file mitkMaterial.h.
|
inlinestatic |
Create a new Material with the given color and opacity.
All values besides the given ones are set to defaults as described in the default constructor.
| [in] | color | the material color in RGB. Each RGB value should be in the range [0..1]. |
| [in] | opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
Definition at line 85 of file mitkMaterial.h.
|
inlinestatic |
Copy constructor with color and opacity override.
The values are copied from the given property and afterwards the values provided for red, green, blue, and opacity are written into the object.
| [in] | property | the source Material to copy from. |
| [in] | red | the red component of the material color (range [0..1]). |
| [in] | green | the green component of the material color (range [0..1]). |
| [in] | blue | the blue component of the material color (range [0..1]). |
| [in] | opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
| [in] | name | an optional name to associate with this material. |
Definition at line 188 of file mitkMaterial.h.
|
inlinestatic |
Create a new Material with full control over color and lighting properties.
All values besides the given ones are set to defaults as described in the default constructor.
| [in] | red | the red component of the material color (range [0..1]). |
| [in] | green | the green component of the material color (range [0..1]). |
| [in] | blue | the blue component of the material color (range [0..1]). |
| [in] | colorCoefficient | a scaling factor for the color coefficient which will be multiplied with each color component (range [0..1]). |
| [in] | specularCoefficient | controls in combination with the specular power how shiny the material will appear (range [0..1]). |
| [in] | specularPower | controls in combination with the specular coefficient how shiny the material will appear (range [0..inf]). |
| [in] | opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
Definition at line 131 of file mitkMaterial.h.
|
inlinestatic |
Create a new Material with the given RGB color components and opacity.
All values besides the given ones are set to defaults as described in the default constructor.
| [in] | red | the red component of the material color (range [0..1]). |
| [in] | green | the green component of the material color (range [0..1]). |
| [in] | blue | the blue component of the material color (range [0..1]). |
| [in] | opacity | the opacity of the material. 0.0 means fully transparent and 1.0 means solid. |
Definition at line 105 of file mitkMaterial.h.
Assignment operator. Copies all properties from the other material.
| [in] | other | the Material to copy from. |
|
virtual |
Comparison operator which uses the member variables for comparison.
| [in] | property | the Material to compare with. |
|
override |
Print the material properties to the given output stream.
| [in] | os | the output stream. |
|
virtual |
Set the material color in RGB space.
The RGB components have to be in the range [0..1].
| [in] | color | the new color of the material. |
|
virtual |
Set the material color in RGB space.
The RGB components have to be in the range [0..1].
| [in] | red | the red component of the material color (range [0..1]). |
| [in] | green | the green component of the material color (range [0..1]). |
| [in] | blue | the blue component of the material color (range [0..1]). |
|
virtual |
Set an attenuation coefficient for the color.
A value of 0 results in a black object. Valid range is [0..1].
| [in] | coefficient | the color attenuation coefficient. |
|
virtual |
Set the surface interpolation method of the object.
Valid interpolation types are Flat, Gouraud and Phong.
| [in] | interpolation | the interpolation method used for rendering of surfaces. |
|
virtual |
Set the width of a Line.
The width is expressed in screen units. The default is 1.0.
| [in] | lineWidth | the new line width in screen units. |
|
virtual |
Set 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 |
Set the opacity of the material.
Controls how transparent the object appears. Valid range is [0..1], where 0 means fully transparent and 1 means a solid surface.
| [in] | opacity | the new opacity of the material. |
|
virtual |
Set the surface representation method of the object.
Valid representation types are Points, Wireframe and Surface.
| [in] | representation | the representation method used for rendering of surfaces. |
|
virtual |
Set the specular coefficient which controls the shininess of the object together with the specular power.
| [in] | specularCoefficient | the new specular coefficient. Valid range is [0..1]. |
|
virtual |
Set the specular color.
| [in] | color | the specular color in RGB. Each RGB value should be in the range [0..1]. |
|
virtual |
Set the specular color using RGB components.
| [in] | red | the red component of the specular color (range [0..1]). |
| [in] | green | the green component of the specular color (range [0..1]). |
| [in] | blue | the blue component of the specular color (range [0..1]). |
|
virtual |
Set the specular power which controls the shininess of the object together with the specular coefficient.
| [in] | specularPower | the new specular power. Valid range is [0..inf]. |
|
protectedvirtual |
Re-apply all current property values, triggering Modified().
|
protected |
Definition at line 520 of file mitkMaterial.h.
|
protected |
Definition at line 524 of file mitkMaterial.h.
|
protected |
Definition at line 534 of file mitkMaterial.h.
|
protected |
Definition at line 532 of file mitkMaterial.h.
|
protected |
Definition at line 518 of file mitkMaterial.h.
|
protected |
Definition at line 530 of file mitkMaterial.h.
|
protected |
Definition at line 536 of file mitkMaterial.h.
|
protected |
Definition at line 526 of file mitkMaterial.h.
|
protected |
Definition at line 522 of file mitkMaterial.h.
|
protected |
Definition at line 528 of file mitkMaterial.h.