Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkSurfaceVtkMapper3D.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkSurfaceVtkMapper3D.h"
14 #include <mitkClippingProperty.h>
15 #include <mitkColorProperty.h>
16 #include <mitkCoreServices.h>
17 #include <mitkDataNode.h>
18 #include <mitkExtractSliceFilter.h>
19 #include <mitkIPropertyAliases.h>
21 #include <mitkImageSliceSelector.h>
23 #include <mitkProperties.h>
29 
30 // VTK
31 #include <vtkActor.h>
32 #include <vtkPlaneCollection.h>
33 #include <vtkPointData.h>
34 #include <vtkPolyData.h>
35 #include <vtkPolyDataMapper.h>
36 #include <vtkPolyDataNormals.h>
37 #include <vtkProperty.h>
38 #include <vtkSmartPointer.h>
39 
41 {
42  return static_cast<const mitk::Surface *>(GetDataNode()->GetData());
43 }
44 
46 {
47  m_GenerateNormals = false;
48 }
49 
51 {
52 }
53 
55 {
56  LocalStorage *ls = m_LSH.GetLocalStorage(renderer);
57 
58  bool visible = true;
59  GetDataNode()->GetVisibility(visible, renderer, "visible");
60 
61  if (!visible)
62  {
63  ls->m_Actor->VisibilityOff();
64  return;
65  }
66 
67  //
68  // set the input-object at time t for the mapper
69  //
70  mitk::Surface::ConstPointer input = this->GetInput();
71  vtkSmartPointer<vtkPolyData> polydata = input->GetVtkPolyData(this->GetTimestep());
72  if (polydata == nullptr)
73  {
74  ls->m_Actor->VisibilityOff();
75  return;
76  }
78  {
79  ls->m_VtkPolyDataNormals->SetInputData(polydata);
80  ls->m_VtkPolyDataMapper->SetInputConnection(ls->m_VtkPolyDataNormals->GetOutputPort());
81  }
82  else
83  {
84  bool depthsorting = false;
85  GetDataNode()->GetBoolProperty("Depth Sorting", depthsorting);
86 
87  if (depthsorting)
88  {
89  ls->m_DepthSort->SetInputData(polydata);
90  ls->m_DepthSort->SetCamera(renderer->GetVtkRenderer()->GetActiveCamera());
91  ls->m_DepthSort->SetDirectionToBackToFront();
92  ls->m_DepthSort->Update();
93  ls->m_VtkPolyDataMapper->SetInputConnection(ls->m_DepthSort->GetOutputPort());
94  }
95  else
96  {
97  ls->m_VtkPolyDataMapper->SetInputData(polydata);
98  }
99  }
100 
101  //
102  // apply properties read from the PropertyList
103  //
104  ApplyAllProperties(renderer, ls->m_Actor);
105 
106  if (visible)
107  ls->m_Actor->VisibilityOn();
108 }
109 
111 {
112  LocalStorage *ls = m_LSH.GetLocalStorage(renderer);
113  ls->m_Actor->VisibilityOff();
114 }
115 
117  vtkProperty *property,
118  mitk::BaseRenderer *renderer)
119 {
120  // Backface culling
121  {
123  node->GetProperty(p, "Backface Culling", renderer);
124  bool useCulling = false;
125  if (p.IsNotNull())
126  useCulling = p->GetValue();
127  property->SetBackfaceCulling(useCulling);
128  }
129 
130  // Colors
131  {
132  double ambient[3] = {0.5, 0.5, 0.0};
133  double diffuse[3] = {0.5, 0.5, 0.0};
134  double specular[3] = {1.0, 1.0, 1.0};
135 
136  float coeff_ambient = 0.5f;
137  float coeff_diffuse = 0.5f;
138  float coeff_specular = 0.5f;
139  float power_specular = 10.0f;
140 
141  // Color
142  {
144  node->GetProperty(p, "color", renderer);
145  if (p.IsNotNull())
146  {
147  mitk::Color c = p->GetColor();
148  ambient[0] = c.GetRed();
149  ambient[1] = c.GetGreen();
150  ambient[2] = c.GetBlue();
151  diffuse[0] = c.GetRed();
152  diffuse[1] = c.GetGreen();
153  diffuse[2] = c.GetBlue();
154  // Setting specular color to the same, make physically no real sense, however vtk rendering slows down, if these
155  // colors are different.
156  specular[0] = c.GetRed();
157  specular[1] = c.GetGreen();
158  specular[2] = c.GetBlue();
159  }
160  }
161 
162  // Ambient
163  {
165  node->GetProperty(p, "material.ambientColor", renderer);
166  if (p.IsNotNull())
167  {
168  mitk::Color c = p->GetColor();
169  ambient[0] = c.GetRed();
170  ambient[1] = c.GetGreen();
171  ambient[2] = c.GetBlue();
172  }
173  }
174 
175  // Diffuse
176  {
178  node->GetProperty(p, "material.diffuseColor", renderer);
179  if (p.IsNotNull())
180  {
181  mitk::Color c = p->GetColor();
182  diffuse[0] = c.GetRed();
183  diffuse[1] = c.GetGreen();
184  diffuse[2] = c.GetBlue();
185  }
186  }
187 
188  // Specular
189  {
191  node->GetProperty(p, "material.specularColor", renderer);
192  if (p.IsNotNull())
193  {
194  mitk::Color c = p->GetColor();
195  specular[0] = c.GetRed();
196  specular[1] = c.GetGreen();
197  specular[2] = c.GetBlue();
198  }
199  }
200 
201  // Ambient coeff
202  {
203  node->GetFloatProperty("material.ambientCoefficient", coeff_ambient, renderer);
204  }
205 
206  // Diffuse coeff
207  {
208  node->GetFloatProperty("material.diffuseCoefficient", coeff_diffuse, renderer);
209  }
210 
211  // Specular coeff
212  {
213  node->GetFloatProperty("material.specularCoefficient", coeff_specular, renderer);
214  }
215 
216  // Specular power
217  {
218  node->GetFloatProperty("material.specularPower", power_specular, renderer);
219  }
220 
221  property->SetAmbient(coeff_ambient);
222  property->SetDiffuse(coeff_diffuse);
223  property->SetSpecular(coeff_specular);
224  property->SetSpecularPower(power_specular);
225 
226  property->SetAmbientColor(ambient);
227  property->SetDiffuseColor(diffuse);
228  property->SetSpecularColor(specular);
229  }
230 
231  // Render mode
232  {
233  // Opacity
234  {
235  float opacity = 1.0f;
236  if (node->GetOpacity(opacity, renderer))
237  property->SetOpacity(opacity);
238  }
239 
240  // Wireframe line width
241  {
242  float lineWidth = 1;
243  node->GetFloatProperty("material.wireframeLineWidth", lineWidth, renderer);
244  property->SetLineWidth(lineWidth);
245  }
246 
247  // Point size
248  {
249  float pointSize = 1.0f;
250  node->GetFloatProperty("material.pointSize", pointSize, renderer);
251  property->SetPointSize(pointSize);
252  }
253 
254  // Representation
255  {
257  node->GetProperty(p, "material.representation", renderer);
258  if (p.IsNotNull())
259  property->SetRepresentation(p->GetVtkRepresentation());
260  }
261 
262  // Interpolation
263  {
265  node->GetProperty(p, "material.interpolation", renderer);
266  if (p.IsNotNull())
267  property->SetInterpolation(p->GetVtkInterpolation());
268  }
269  }
270 }
271 
273 {
274  LocalStorage *ls = m_LSH.GetLocalStorage(renderer);
275 
277  // VTK Properties
278  ApplyMitkPropertiesToVtkProperty(this->GetDataNode(), ls->m_Actor->GetProperty(), renderer);
279 
281  this->GetDataNode()->GetProperty(transferFuncProp, "Surface.TransferFunction", renderer);
282  if (transferFuncProp.IsNotNull())
283  {
284  ls->m_VtkPolyDataMapper->SetLookupTable(transferFuncProp->GetValue()->GetColorTransferFunction());
285  }
286 
287  mitk::LookupTableProperty::Pointer lookupTableProp;
288  this->GetDataNode()->GetProperty(lookupTableProp, "LookupTable", renderer);
289  if (lookupTableProp.IsNotNull())
290  {
291  ls->m_VtkPolyDataMapper->SetLookupTable(lookupTableProp->GetLookupTable()->GetVtkLookupTable());
292  }
293 
294  mitk::LevelWindow levelWindow;
295  if (this->GetDataNode()->GetLevelWindow(levelWindow, renderer, "levelWindow"))
296  {
297  ls->m_VtkPolyDataMapper->SetScalarRange(levelWindow.GetLowerWindowBound(), levelWindow.GetUpperWindowBound());
298  }
299  else if (this->GetDataNode()->GetLevelWindow(levelWindow, renderer))
300  {
301  ls->m_VtkPolyDataMapper->SetScalarRange(levelWindow.GetLowerWindowBound(), levelWindow.GetUpperWindowBound());
302  }
303 
304  bool scalarVisibility = false;
305  this->GetDataNode()->GetBoolProperty("scalar visibility", scalarVisibility);
306  ls->m_VtkPolyDataMapper->SetScalarVisibility((scalarVisibility ? 1 : 0));
307 
308  if (scalarVisibility)
309  {
310  mitk::VtkScalarModeProperty *scalarMode;
311  if (this->GetDataNode()->GetProperty(scalarMode, "scalar mode", renderer))
312  ls->m_VtkPolyDataMapper->SetScalarMode(scalarMode->GetVtkScalarMode());
313  else
314  ls->m_VtkPolyDataMapper->SetScalarModeToDefault();
315 
316  bool colorMode = false;
317  this->GetDataNode()->GetBoolProperty("color mode", colorMode);
318  ls->m_VtkPolyDataMapper->SetColorMode((colorMode ? 1 : 0));
319 
320  double scalarsMin = 0;
321  this->GetDataNode()->GetDoubleProperty("ScalarsRangeMinimum", scalarsMin, renderer);
322 
323  double scalarsMax = 1.0;
324  this->GetDataNode()->GetDoubleProperty("ScalarsRangeMaximum", scalarsMax, renderer);
325 
326  ls->m_VtkPolyDataMapper->SetScalarRange(scalarsMin, scalarsMax);
327  }
328 
329  mitk::SmartPointerProperty::Pointer imagetextureProp =
330  dynamic_cast<mitk::SmartPointerProperty *>(GetDataNode()->GetProperty("Surface.Texture", renderer));
331 
332  if (imagetextureProp.IsNotNull())
333  {
334  mitk::Image *miktTexture = dynamic_cast<mitk::Image *>(imagetextureProp->GetSmartPointer().GetPointer());
335  vtkSmartPointer<vtkTexture> vtkTxture = vtkSmartPointer<vtkTexture>::New();
336  // Either select the first slice of a volume
337  if (miktTexture->GetDimension(2) > 1)
338  {
339  MITK_WARN << "3D Textures are not supported by VTK and MITK. The first slice of the volume will be used instead!";
341  sliceselector->SetSliceNr(0);
342  sliceselector->SetChannelNr(0);
343  sliceselector->SetTimeNr(0);
344  sliceselector->SetInput(miktTexture);
345  sliceselector->Update();
346  vtkTxture->SetInputData(sliceselector->GetOutput()->GetVtkImageData());
347  }
348  else // or just use the 2D image
349  {
350  vtkTxture->SetInputData(miktTexture->GetVtkImageData());
351  }
352  // pass the texture to the actor
353  ls->m_Actor->SetTexture(vtkTxture);
354  if (ls->m_VtkPolyDataMapper->GetInput()->GetPointData()->GetTCoords() == nullptr)
355  {
356  MITK_ERROR << "Surface.Texture property was set, but there are no texture coordinates. Please provide texture "
357  "coordinates for the vtkPolyData via vtkPolyData->GetPointData()->SetTCoords().";
358  }
359  // if no texture is set, this will also remove a previously used texture
360  // and reset the actor to it's default behaviour
361  }
362  else
363  {
364  ls->m_Actor->SetTexture(nullptr);
365  }
366 
367  // deprecated settings
368  bool deprecatedUseCellData = false;
369  this->GetDataNode()->GetBoolProperty("deprecated useCellDataForColouring", deprecatedUseCellData);
370 
371  bool deprecatedUsePointData = false;
372  this->GetDataNode()->GetBoolProperty("deprecated usePointDataForColouring", deprecatedUsePointData);
373 
374  if (deprecatedUseCellData)
375  {
376  ls->m_VtkPolyDataMapper->SetColorModeToDefault();
377  ls->m_VtkPolyDataMapper->SetScalarRange(0, 255);
378  ls->m_VtkPolyDataMapper->ScalarVisibilityOn();
379  ls->m_VtkPolyDataMapper->SetScalarModeToUseCellData();
380  ls->m_Actor->GetProperty()->SetSpecular(1);
381  ls->m_Actor->GetProperty()->SetSpecularPower(50);
382  ls->m_Actor->GetProperty()->SetInterpolationToPhong();
383  }
384  else if (deprecatedUsePointData)
385  {
386  float scalarsMin = 0;
387  if (dynamic_cast<mitk::FloatProperty *>(this->GetDataNode()->GetProperty("ScalarsRangeMinimum")) != nullptr)
388  scalarsMin =
389  dynamic_cast<mitk::FloatProperty *>(this->GetDataNode()->GetProperty("ScalarsRangeMinimum"))->GetValue();
390 
391  float scalarsMax = 0.1;
392  if (dynamic_cast<mitk::FloatProperty *>(this->GetDataNode()->GetProperty("ScalarsRangeMaximum")) != nullptr)
393  scalarsMax =
394  dynamic_cast<mitk::FloatProperty *>(this->GetDataNode()->GetProperty("ScalarsRangeMaximum"))->GetValue();
395 
396  ls->m_VtkPolyDataMapper->SetScalarRange(scalarsMin, scalarsMax);
397  ls->m_VtkPolyDataMapper->SetColorModeToMapScalars();
398  ls->m_VtkPolyDataMapper->ScalarVisibilityOn();
399  ls->m_Actor->GetProperty()->SetSpecular(1);
400  ls->m_Actor->GetProperty()->SetSpecularPower(50);
401  ls->m_Actor->GetProperty()->SetInterpolationToPhong();
402  }
403 
404  int deprecatedScalarMode = VTK_COLOR_MODE_DEFAULT;
405  if (this->GetDataNode()->GetIntProperty("deprecated scalar mode", deprecatedScalarMode, renderer))
406  {
407  ls->m_VtkPolyDataMapper->SetScalarMode(deprecatedScalarMode);
408  ls->m_VtkPolyDataMapper->ScalarVisibilityOn();
409  ls->m_Actor->GetProperty()->SetSpecular(1);
410  ls->m_Actor->GetProperty()->SetSpecularPower(50);
411  }
412 
413  // Check whether one or more ClippingProperty objects have been defined for
414  // this node. Check both renderer specific and global property lists, since
415  // properties in both should be considered.
416  const PropertyList::PropertyMap *rendererProperties = this->GetDataNode()->GetPropertyList(renderer)->GetMap();
417  const PropertyList::PropertyMap *globalProperties = this->GetDataNode()->GetPropertyList(nullptr)->GetMap();
418 
419  // Add clipping planes (if any)
420  ls->m_ClippingPlaneCollection->RemoveAllItems();
421 
422  PropertyList::PropertyMap::const_iterator it;
423  for (it = rendererProperties->begin(); it != rendererProperties->end(); ++it)
424  {
425  this->CheckForClippingProperty(renderer, (*it).second.GetPointer());
426  }
427 
428  for (it = globalProperties->begin(); it != globalProperties->end(); ++it)
429  {
430  this->CheckForClippingProperty(renderer, (*it).second.GetPointer());
431  }
432 
433  if (ls->m_ClippingPlaneCollection->GetNumberOfItems() > 0)
434  {
435  ls->m_VtkPolyDataMapper->SetClippingPlanes(ls->m_ClippingPlaneCollection);
436  }
437  else
438  {
439  ls->m_VtkPolyDataMapper->RemoveAllClippingPlanes();
440  }
441 }
442 
444 {
445  LocalStorage *ls = m_LSH.GetLocalStorage(renderer);
446  return ls->m_Actor;
447 }
448 
450 {
451  LocalStorage *ls = m_LSH.GetLocalStorage(renderer);
452 
453  auto *clippingProperty = dynamic_cast<ClippingProperty *>(property);
454 
455  if ((clippingProperty != nullptr) && (clippingProperty->GetClippingEnabled()))
456  {
457  const Point3D &origin = clippingProperty->GetOrigin();
458  const Vector3D &normal = clippingProperty->GetNormal();
459 
460  vtkSmartPointer<vtkPlane> clippingPlane = vtkSmartPointer<vtkPlane>::New();
461  clippingPlane->SetOrigin(origin[0], origin[1], origin[2]);
462  clippingPlane->SetNormal(normal[0], normal[1], normal[2]);
463 
464  ls->m_ClippingPlaneCollection->AddItem(clippingPlane);
465  }
466 }
467 
469  mitk::BaseRenderer *renderer,
470  bool overwrite)
471 {
472  // Shading
473  {
474  node->AddProperty("material.wireframeLineWidth", mitk::FloatProperty::New(1.0f), renderer, overwrite);
475  node->AddProperty("material.pointSize", mitk::FloatProperty::New(1.0f), renderer, overwrite);
476 
477  node->AddProperty("material.ambientCoefficient", mitk::FloatProperty::New(0.05f), renderer, overwrite);
478  node->AddProperty("material.diffuseCoefficient", mitk::FloatProperty::New(0.9f), renderer, overwrite);
479  node->AddProperty("material.specularCoefficient", mitk::FloatProperty::New(1.0f), renderer, overwrite);
480  node->AddProperty("material.specularPower", mitk::FloatProperty::New(16.0f), renderer, overwrite);
481 
482  node->AddProperty("material.representation", mitk::VtkRepresentationProperty::New(), renderer, overwrite);
483  node->AddProperty("material.interpolation", mitk::VtkInterpolationProperty::New(), renderer, overwrite);
484  }
485 }
486 
488 {
489  node->AddProperty("color", mitk::ColorProperty::New(1.0f, 1.0f, 1.0f), renderer, overwrite);
490  node->AddProperty("opacity", mitk::FloatProperty::New(1.0), renderer, overwrite);
491 
492  mitk::SurfaceVtkMapper3D::SetDefaultPropertiesForVtkProperty(node, renderer, overwrite); // Shading
493 
494  node->AddProperty("scalar visibility", mitk::BoolProperty::New(false), renderer, overwrite);
495  node->AddProperty("color mode", mitk::BoolProperty::New(false), renderer, overwrite);
496  node->AddProperty("scalar mode", mitk::VtkScalarModeProperty::New(), renderer, overwrite);
497  mitk::Surface::Pointer surface = dynamic_cast<Surface *>(node->GetData());
498  if (surface.IsNotNull())
499  {
500  if ((surface->GetVtkPolyData() != nullptr) && (surface->GetVtkPolyData()->GetPointData() != nullptr) &&
501  (surface->GetVtkPolyData()->GetPointData()->GetScalars() != nullptr))
502  {
503  node->AddProperty("scalar visibility", mitk::BoolProperty::New(true), renderer, overwrite);
504  node->AddProperty("color mode", mitk::BoolProperty::New(true), renderer, overwrite);
505  }
506  }
507 
508  // Backface culling
509  node->AddProperty("Backface Culling", mitk::BoolProperty::New(false), renderer, overwrite);
510 
511  node->AddProperty("Depth Sorting", mitk::BoolProperty::New(false), renderer, overwrite);
513  "Depth Sorting",
514  "Enables correct rendering for transparent objects by ordering polygons according to the distance "
515  "to the camera. It is not recommended to enable this property for large surfaces (rendering might "
516  "be slow).");
517  Superclass::SetDefaultProperties(node, renderer, overwrite);
518 }
#define ls
Definition: MitkMCxyz.cpp:57
mitk::BaseProperty * GetProperty(const char *propertyKey, const mitk::BaseRenderer *renderer=nullptr, bool fallBackOnDataProperties=true) const
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList of the rendere...
bool GetDoubleProperty(const char *propertyKey, double &doubleValue, const mitk::BaseRenderer *renderer=nullptr) const
Convenience access method for double properties (instances of DoubleProperty)
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:28
static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer=nullptr, bool overwrite=false)
L * GetLocalStorage(mitk::BaseRenderer *forRenderer)
Retrieves a LocalStorage for a specific BaseRenderer.
vtkSmartPointer< vtkDepthSortPolyData > m_DepthSort
virtual bool AddDescription(const std::string &propertyName, const std::string &description, const std::string &className="", bool overwrite=false)=0
Add a description for a specific property.
Property for clipping datasets; currently only clipping planes are possible.
void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override
Generate the data needed for rendering into renderer.
vtkRenderer * GetVtkRenderer() const
virtual DataNode * GetDataNode() const
Get the DataNode containing the data to map. Method only returns valid DataNode Pointer if the mapper...
Definition: mitkMapper.cpp:31
#define MITK_ERROR
Definition: mitkLogMacros.h:20
mitk::LocalStorageHandler< LocalStorage > m_LSH
vtkSmartPointer< vtkPlaneCollection > m_ClippingPlaneCollection
static Pointer New()
bool GetFloatProperty(const char *propertyKey, float &floatValue, const mitk::BaseRenderer *renderer=nullptr) const
Convenience access method for float properties (instances of FloatProperty)
Organizes the rendering process.
virtual vtkImageData * GetVtkImageData(int t=0, int n=0)
Get a volume at a specific time t of channel n as a vtkImageData.
Definition: mitkImage.cpp:217
static Pointer New()
void ApplyColorAndOpacityProperties(mitk::BaseRenderer *renderer, vtkActor *actor) override
Apply color and opacity properties read from the PropertyList. Called by mapper subclasses.
Property containing a smart-pointer.
bool GetBoolProperty(const char *propertyKey, bool &boolValue, const mitk::BaseRenderer *renderer=nullptr) const
Convenience access method for bool properties (instances of BoolProperty)
bool GetOpacity(float &opacity, const mitk::BaseRenderer *renderer, const char *propertyKey="opacity") const
Convenience access method for opacity properties (instances of FloatProperty)
void ResetMapper(mitk::BaseRenderer *renderer) override
Reset the mapper (i.e., make sure that nothing is displayed) if no valid data is present. In most cases the reimplemented function disables the according actors (toggling visibility off)
static IPropertyDescriptions * GetPropertyDescriptions(us::ModuleContext *context=us::GetModuleContext())
Get an IPropertyDescriptions instance.
The LevelWindow class Class to store level/window values.
static Pointer New()
vtkProp * GetVtkProp(mitk::BaseRenderer *renderer) override
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
Abstract base class for properties.
vtkSmartPointer< vtkPolyDataMapper > m_VtkPolyDataMapper
void AddProperty(const char *propertyKey, BaseProperty *property, const mitk::BaseRenderer *renderer=nullptr, bool overwrite=false)
Add the property (instance of BaseProperty) if it does not exist (or always ifoverwrite istrue) with ...
#define MITK_WARN
Definition: mitkLogMacros.h:19
std::map< std::string, BaseProperty::Pointer > PropertyMap
unsigned int GetDimension() const
Get dimension of the image.
Definition: mitkImage.cpp:106
virtual const mitk::Surface * GetInput()
static void ApplyMitkPropertiesToVtkProperty(mitk::DataNode *node, vtkProperty *property, mitk::BaseRenderer *renderer)
ScalarType GetUpperWindowBound() const
virtual void CheckForClippingProperty(mitk::BaseRenderer *renderer, mitk::BaseProperty *property)
Image class for storing images.
Definition: mitkImage.h:72
bool GetVisibility(bool &visible, const mitk::BaseRenderer *renderer, const char *propertyKey="visible") const
Convenience access method for visibility properties (instances of BoolProperty with property-key "vis...
Definition: mitkDataNode.h:422
static void SetDefaultPropertiesForVtkProperty(mitk::DataNode *node, mitk::BaseRenderer *renderer, bool overwrite)
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
static Pointer New()
mitk::PropertyList * GetPropertyList(const mitk::BaseRenderer *renderer=nullptr) const
Get the PropertyList of the renderer. If renderer is nullptr, the BaseRenderer-independent PropertyLi...
vtkSmartPointer< vtkPolyDataNormals > m_VtkPolyDataNormals
int GetTimestep() const
Returns the current time step as calculated from the renderer.
Definition: mitkMapper.h:147
bool GetLevelWindow(mitk::LevelWindow &levelWindow, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="levelwindow") const
Convenience access method for level-window properties (instances of LevelWindowProperty) ...
ScalarType GetLowerWindowBound() const
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57
const PropertyMap * GetMap() const
virtual void ApplyAllProperties(mitk::BaseRenderer *renderer, vtkActor *actor)
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false)
Set default values of properties used by this mapper to node.
Definition: mitkMapper.cpp:143