13 #ifndef mitkMaterial_h
14 #define mitkMaterial_h
17 #include <itkObject.h>
18 #include <itkRGBPixel.h>
19 #include <itkVectorContainer.h>
22 #include <vtkSystemIncludes.h>
39 typedef itk::RGBPixel<double>
Color;
64 smartPtr->UnRegister();
79 smartPtr->UnRegister();
92 static Pointer New(
double red,
double green,
double blue,
double opacity = 1.0f)
95 smartPtr->UnRegister();
117 double colorCoefficient,
118 double specularCoefficient,
119 double specularPower,
122 Pointer smartPtr =
new Material(red, green, blue, colorCoefficient, specularCoefficient, specularPower, opacity);
123 smartPtr->UnRegister();
143 Color color,
double colorCoefficient,
double specularCoefficient,
double specularPower,
double opacity)
145 Pointer smartPtr =
new Material(color, colorCoefficient, specularCoefficient, specularPower, opacity);
146 smartPtr->UnRegister();
160 const Material &property,
double red,
double green,
double blue,
double opacity = 1.0, std::string name =
"")
162 Pointer smartPtr =
new Material(property, red, green, blue, opacity, name);
163 smartPtr->UnRegister();
167 virtual bool Assignable(
const Material &other)
const;
174 virtual void SetColor(
Color color);
183 virtual void SetColor(
double red,
double green,
double blue);
190 virtual void SetColorCoefficient(
double coefficient);
197 virtual void SetSpecularColor(
Color color);
205 virtual void SetSpecularColor(
double red,
double green,
double blue);
213 virtual void SetSpecularCoefficient(
double specularCoefficient);
221 virtual void SetSpecularPower(
double specularPower);
229 virtual void SetOpacity(
double opacity);
238 virtual void SetInterpolation(InterpolationType interpolation);
247 virtual void SetRepresentation(RepresentationType representation);
252 virtual void SetLineWidth(
float lineWidth);
257 virtual Color GetColor()
const;
262 virtual double GetColorCoefficient()
const;
268 virtual Color GetSpecularColor()
const;
273 virtual double GetSpecularCoefficient()
const;
278 virtual double GetSpecularPower()
const;
283 virtual double GetOpacity()
const;
288 virtual InterpolationType GetInterpolation()
const;
293 virtual RepresentationType GetRepresentation()
const;
299 virtual int GetVtkInterpolation()
const;
305 virtual int GetVtkRepresentation()
const;
310 virtual float GetLineWidth()
const;
318 virtual void Initialize(
const Material &property);
329 void PrintSelf(std::ostream &os, itk::Indent)
const override;
336 itkSetMacro(Name, std::string);
341 itkGetConstMacro(Name, std::string);
371 Material(
double red,
double green,
double blue,
double opacity = 1.0f);
391 double colorCoefficient,
392 double specularCoefficient,
393 double specularPower,
411 Material(
Color color,
double colorCoefficient,
double specularCoefficient,
double specularPower,
double opacity);
423 const Material &property,
double red,
double green,
double blue,
double opacity = 1.0, std::string name =
"");
425 virtual void InitializeStandardValues();
427 virtual void Update();