Medical Imaging Interaction Toolkit  2018.4.99-b585543d
Medical Imaging Interaction Toolkit
mitkSurfaceVtkMapper2D.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 "mitkSurfaceVtkMapper2D.h"
14 
15 // MITK includes
16 #include "mitkVtkPropRenderer.h"
17 #include <mitkCoreServices.h>
18 #include <mitkDataNode.h>
19 #include <mitkIPropertyAliases.h>
22 #include <mitkProperties.h>
23 #include <mitkSurface.h>
26 
27 // VTK includes
28 #include <vtkActor.h>
29 #include <vtkArrowSource.h>
30 #include <vtkAssembly.h>
31 #include <vtkCutter.h>
32 #include <vtkGlyph3D.h>
33 #include <vtkLookupTable.h>
34 #include <vtkPlane.h>
35 #include <vtkPointData.h>
36 #include <vtkPolyData.h>
37 #include <vtkReverseSense.h>
38 #include <vtkTransformPolyDataFilter.h>
39 
40 // constructor LocalStorage
42 {
43  m_Mapper = vtkSmartPointer<vtkPolyDataMapper>::New();
44  m_Mapper->ScalarVisibilityOff();
45  m_Actor = vtkSmartPointer<vtkActor>::New();
46  m_PropAssembly = vtkSmartPointer<vtkAssembly>::New();
47  m_PropAssembly->AddPart(m_Actor);
48  m_CuttingPlane = vtkSmartPointer<vtkPlane>::New();
49  m_Cutter = vtkSmartPointer<vtkCutter>::New();
50  m_Cutter->SetCutFunction(m_CuttingPlane);
51  m_Mapper->SetInputConnection(m_Cutter->GetOutputPort());
52 
53  m_NormalGlyph = vtkSmartPointer<vtkGlyph3D>::New();
54 
55  m_InverseNormalGlyph = vtkSmartPointer<vtkGlyph3D>::New();
56 
57  // Source for the glyph filter
58  m_ArrowSource = vtkSmartPointer<vtkArrowSource>::New();
59  // set small default values for fast rendering
60  m_ArrowSource->SetTipRadius(0.05);
61  m_ArrowSource->SetTipLength(0.20);
62  m_ArrowSource->SetTipResolution(5);
63  m_ArrowSource->SetShaftResolution(5);
64  m_ArrowSource->SetShaftRadius(0.01);
65 
66  m_NormalGlyph->SetSourceConnection(m_ArrowSource->GetOutputPort());
67  m_NormalGlyph->SetVectorModeToUseNormal();
68  m_NormalGlyph->OrientOn();
69 
70  m_InverseNormalGlyph->SetSourceConnection(m_ArrowSource->GetOutputPort());
71  m_InverseNormalGlyph->SetVectorModeToUseNormal();
72  m_InverseNormalGlyph->OrientOn();
73 
74  m_NormalMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
75  m_NormalMapper->SetInputConnection(m_NormalGlyph->GetOutputPort());
76  m_NormalMapper->ScalarVisibilityOff();
77 
78  m_InverseNormalMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
79  m_InverseNormalMapper->SetInputConnection(m_NormalGlyph->GetOutputPort());
80  m_InverseNormalMapper->ScalarVisibilityOff();
81 
82  m_NormalActor = vtkSmartPointer<vtkActor>::New();
83  m_NormalActor->SetMapper(m_NormalMapper);
84 
85  m_InverseNormalActor = vtkSmartPointer<vtkActor>::New();
87 
88  m_ReverseSense = vtkSmartPointer<vtkReverseSense>::New();
89 }
90 
91 // destructor LocalStorage
93 {
94 }
95 
97 {
98  return static_cast<const mitk::Surface *>(GetDataNode()->GetData());
99 }
100 
101 // constructor PointSetVtkMapper2D
103 {
104 }
105 
107 {
108 }
109 
110 // reset mapper so that nothing is displayed e.g. toggle visiblity of the propassembly
112 {
113  LocalStorage *ls = m_LSH.GetLocalStorage(renderer);
114  ls->m_PropAssembly->VisibilityOff();
115 }
116 
118 {
119  LocalStorage *ls = m_LSH.GetLocalStorage(renderer);
120  return ls->m_PropAssembly;
121 }
122 
124 {
125  const mitk::DataNode *node = GetDataNode();
126  if (node == nullptr)
127  return;
128  bool visible = true;
129  node->GetVisibility(visible, renderer, "visible");
130  if (!visible)
131  return;
132 
133  auto *surface = static_cast<mitk::Surface *>(node->GetData());
134  if (surface == nullptr)
135  return;
136 
137  // Calculate time step of the input data for the specified renderer (integer value)
138  this->CalculateTimeStep(renderer);
139 
140  // Check if time step is valid
141  const mitk::TimeGeometry *dataTimeGeometry = surface->GetTimeGeometry();
142  if ((dataTimeGeometry == nullptr) || (dataTimeGeometry->CountTimeSteps() == 0) ||
143  (!dataTimeGeometry->IsValidTimeStep(this->GetTimestep())))
144  {
145  return;
146  }
147 
148  surface->UpdateOutputInformation();
149  LocalStorage *localStorage = m_LSH.GetLocalStorage(renderer);
150 
151  // check if something important has changed and we need to rerender
152  if ((localStorage->m_LastUpdateTime < node->GetMTime()) // was the node modified?
153  ||
154  (localStorage->m_LastUpdateTime < surface->GetPipelineMTime()) // Was the data modified?
155  ||
156  (localStorage->m_LastUpdateTime <
157  renderer->GetCurrentWorldPlaneGeometryUpdateTime()) // was the geometry modified?
158  ||
159  (localStorage->m_LastUpdateTime < renderer->GetCurrentWorldPlaneGeometry()->GetMTime()) ||
160  (localStorage->m_LastUpdateTime < node->GetPropertyList()->GetMTime()) // was a property modified?
161  ||
162  (localStorage->m_LastUpdateTime < node->GetPropertyList(renderer)->GetMTime()))
163  {
164  this->GenerateDataForRenderer(renderer);
165  }
166 
167  // since we have checked that nothing important has changed, we can set
168  // m_LastUpdateTime to the current time
169  localStorage->m_LastUpdateTime.Modified();
170 }
171 
173 {
174  const DataNode *node = GetDataNode();
175  auto *surface = static_cast<Surface *>(node->GetData());
176  const TimeGeometry *dataTimeGeometry = surface->GetTimeGeometry();
177  LocalStorage *localStorage = m_LSH.GetLocalStorage(renderer);
178 
179  ScalarType time = renderer->GetTime();
180  int timestep = 0;
181 
182  if (time > itk::NumericTraits<ScalarType>::NonpositiveMin())
183  timestep = dataTimeGeometry->TimePointToTimeStep(time);
184 
185  vtkSmartPointer<vtkPolyData> inputPolyData = surface->GetVtkPolyData(timestep);
186  if ((inputPolyData == nullptr) || (inputPolyData->GetNumberOfPoints() < 1))
187  return;
188 
189  // apply color and opacity read from the PropertyList
190  this->ApplyAllProperties(renderer);
191 
192  const PlaneGeometry *planeGeometry = renderer->GetCurrentWorldPlaneGeometry();
193  if ((planeGeometry == nullptr) || (!planeGeometry->IsValid()) || (!planeGeometry->HasReferenceGeometry()))
194  {
195  return;
196  }
197 
198  if (localStorage->m_Actor->GetMapper() == nullptr)
199  localStorage->m_Actor->SetMapper(localStorage->m_Mapper);
200 
201  double origin[3];
202  origin[0] = planeGeometry->GetOrigin()[0];
203  origin[1] = planeGeometry->GetOrigin()[1];
204  origin[2] = planeGeometry->GetOrigin()[2];
205 
206  double normal[3];
207  normal[0] = planeGeometry->GetNormal()[0];
208  normal[1] = planeGeometry->GetNormal()[1];
209  normal[2] = planeGeometry->GetNormal()[2];
210 
211  localStorage->m_CuttingPlane->SetOrigin(origin);
212  localStorage->m_CuttingPlane->SetNormal(normal);
213  // Transform the data according to its geometry.
214  // See UpdateVtkTransform documentation for details.
215  vtkSmartPointer<vtkLinearTransform> vtktransform = GetDataNode()->GetVtkTransform(this->GetTimestep());
216  vtkSmartPointer<vtkTransformPolyDataFilter> filter = vtkSmartPointer<vtkTransformPolyDataFilter>::New();
217  filter->SetTransform(vtktransform);
218  filter->SetInputData(inputPolyData);
219  localStorage->m_Cutter->SetInputConnection(filter->GetOutputPort());
220  localStorage->m_Cutter->Update();
221 
222  bool generateNormals = false;
223  node->GetBoolProperty("draw normals 2D", generateNormals);
224  if (generateNormals)
225  {
226  localStorage->m_NormalGlyph->SetInputConnection(localStorage->m_Cutter->GetOutputPort());
227  localStorage->m_NormalGlyph->Update();
228 
229  localStorage->m_NormalMapper->SetInputConnection(localStorage->m_NormalGlyph->GetOutputPort());
230 
231  localStorage->m_PropAssembly->AddPart(localStorage->m_NormalActor);
232  }
233  else
234  {
235  localStorage->m_NormalGlyph->SetInputConnection(nullptr);
236  localStorage->m_PropAssembly->RemovePart(localStorage->m_NormalActor);
237  }
238 
239  bool generateInverseNormals = false;
240  node->GetBoolProperty("invert normals", generateInverseNormals);
241  if (generateInverseNormals)
242  {
243  localStorage->m_ReverseSense->SetInputConnection(localStorage->m_Cutter->GetOutputPort());
244  localStorage->m_ReverseSense->ReverseCellsOff();
245  localStorage->m_ReverseSense->ReverseNormalsOn();
246 
247  localStorage->m_InverseNormalGlyph->SetInputConnection(localStorage->m_ReverseSense->GetOutputPort());
248  localStorage->m_InverseNormalGlyph->Update();
249 
250  localStorage->m_InverseNormalMapper->SetInputConnection(localStorage->m_InverseNormalGlyph->GetOutputPort());
251 
252  localStorage->m_PropAssembly->AddPart(localStorage->m_InverseNormalActor);
253  }
254  else
255  {
256  localStorage->m_ReverseSense->SetInputConnection(nullptr);
257  localStorage->m_PropAssembly->RemovePart(localStorage->m_InverseNormalActor);
258  }
259 }
260 
262 {
263  // Before bug 18528, "line width" was an IntProperty, now it is a FloatProperty
264  float lineWidth = 1.0f;
265  if (!properties->GetFloatProperty("line width", lineWidth))
266  {
267  int legacyLineWidth = lineWidth;
268  if (properties->GetIntProperty("line width", legacyLineWidth))
269  {
270  properties->ReplaceProperty("line width", FloatProperty::New(static_cast<float>(legacyLineWidth)));
271  }
272  }
273 }
274 
276 {
277  const DataNode *node = GetDataNode();
278 
279  if (node == nullptr)
280  {
281  return;
282  }
283 
284  FixupLegacyProperties(node->GetPropertyList(renderer));
286 
287  float lineWidth = 1.0f;
288  node->GetFloatProperty("line width", lineWidth, renderer);
289 
290  LocalStorage *localStorage = m_LSH.GetLocalStorage(renderer);
291 
292  // check for color and opacity properties, use it for rendering if they exists
293  float color[3] = {1.0f, 1.0f, 1.0f};
294  node->GetColor(color, renderer, "color");
295  float opacity = 1.0f;
296  node->GetOpacity(opacity, renderer, "opacity");
297 
298  // Pass properties to VTK
299  localStorage->m_Actor->GetProperty()->SetColor(color[0], color[1], color[2]);
300  localStorage->m_Actor->GetProperty()->SetOpacity(opacity);
301  localStorage->m_NormalActor->GetProperty()->SetOpacity(opacity);
302  localStorage->m_InverseNormalActor->GetProperty()->SetOpacity(opacity);
303  localStorage->m_Actor->GetProperty()->SetLineWidth(lineWidth);
304  // By default, the cutter will also copy/compute normals of the cut
305  // to the output polydata. The normals will influence the
306  // vtkPolyDataMapper lightning. To view a clean cut the lighting has
307  // to be disabled.
308  localStorage->m_Actor->GetProperty()->SetLighting(false);
309 
310  // same block for scalar data rendering as in 3D mapper
312  this->GetDataNode()->GetProperty(transferFuncProp, "Surface.TransferFunction", renderer);
313  if (transferFuncProp.IsNotNull())
314  {
315  localStorage->m_Mapper->SetLookupTable(transferFuncProp->GetValue()->GetColorTransferFunction());
316  }
317 
318  mitk::LookupTableProperty::Pointer lookupTableProp;
319  this->GetDataNode()->GetProperty(lookupTableProp, "LookupTable", renderer);
320  if (lookupTableProp.IsNotNull())
321  {
322  localStorage->m_Mapper->SetLookupTable(lookupTableProp->GetLookupTable()->GetVtkLookupTable());
323  }
324 
325  mitk::LevelWindow levelWindow;
326  if (this->GetDataNode()->GetLevelWindow(levelWindow, renderer, "levelWindow"))
327  {
328  localStorage->m_Mapper->SetScalarRange(levelWindow.GetLowerWindowBound(), levelWindow.GetUpperWindowBound());
329  }
330  else if (this->GetDataNode()->GetLevelWindow(levelWindow, renderer))
331  {
332  localStorage->m_Mapper->SetScalarRange(levelWindow.GetLowerWindowBound(), levelWindow.GetUpperWindowBound());
333  }
334 
335  bool scalarVisibility = false;
336  this->GetDataNode()->GetBoolProperty("scalar visibility", scalarVisibility);
337  localStorage->m_Mapper->SetScalarVisibility((scalarVisibility ? 1 : 0));
338 
339  if (scalarVisibility)
340  {
341  mitk::VtkScalarModeProperty *scalarMode;
342  if (this->GetDataNode()->GetProperty(scalarMode, "scalar mode", renderer))
343  localStorage->m_Mapper->SetScalarMode(scalarMode->GetVtkScalarMode());
344  else
345  localStorage->m_Mapper->SetScalarModeToDefault();
346 
347  bool colorMode = false;
348  this->GetDataNode()->GetBoolProperty("color mode", colorMode);
349  localStorage->m_Mapper->SetColorMode((colorMode ? 1 : 0));
350 
351  double scalarsMin = 0;
352  this->GetDataNode()->GetDoubleProperty("ScalarsRangeMinimum", scalarsMin, renderer);
353 
354  double scalarsMax = 1.0;
355  this->GetDataNode()->GetDoubleProperty("ScalarsRangeMaximum", scalarsMax, renderer);
356 
357  localStorage->m_Mapper->SetScalarRange(scalarsMin, scalarsMax);
358  }
359 
360  // color for inverse normals
361  float inverseNormalsColor[3] = {1.0f, 0.0f, 0.0f};
362  node->GetColor(inverseNormalsColor, renderer, "back color");
363  localStorage->m_InverseNormalActor->GetProperty()->SetColor(
364  inverseNormalsColor[0], inverseNormalsColor[1], inverseNormalsColor[2]);
365 
366  // color for normals
367  float normalsColor[3] = {0.0f, 1.0f, 0.0f};
368  node->GetColor(normalsColor, renderer, "front color");
369  localStorage->m_NormalActor->GetProperty()->SetColor(normalsColor[0], normalsColor[1], normalsColor[2]);
370 
371  // normals scaling
372  float normalScaleFactor = 10.0f;
373  node->GetFloatProperty("front normal lenth (px)", normalScaleFactor, renderer);
374  localStorage->m_NormalGlyph->SetScaleFactor(normalScaleFactor);
375 
376  // inverse normals scaling
377  float inverseNormalScaleFactor = 10.0f;
378  node->GetFloatProperty("back normal lenth (px)", inverseNormalScaleFactor, renderer);
379  localStorage->m_InverseNormalGlyph->SetScaleFactor(inverseNormalScaleFactor);
380 }
381 
383 {
385  node->AddProperty("line width", FloatProperty::New(2.0f), renderer, overwrite);
386  aliases->AddAlias("line width", "Surface.2D.Line Width", "Surface");
387  node->AddProperty("scalar mode", VtkScalarModeProperty::New(), renderer, overwrite);
388  node->AddProperty("draw normals 2D", BoolProperty::New(false), renderer, overwrite);
389  aliases->AddAlias("draw normals 2D", "Surface.2D.Normals.Draw Normals", "Surface");
390  node->AddProperty("invert normals", BoolProperty::New(false), renderer, overwrite);
391  aliases->AddAlias("invert normals", "Surface.2D.Normals.Draw Inverse Normals", "Surface");
392  node->AddProperty("front color", ColorProperty::New(0.0, 1.0, 0.0), renderer, overwrite);
393  aliases->AddAlias("front color", "Surface.2D.Normals.Normals Color", "Surface");
394  node->AddProperty("back color", ColorProperty::New(1.0, 0.0, 0.0), renderer, overwrite);
395  aliases->AddAlias("back color", "Surface.2D.Normals.Inverse Normals Color", "Surface");
396  node->AddProperty("front normal lenth (px)", FloatProperty::New(10.0), renderer, overwrite);
397  aliases->AddAlias("front normal lenth (px)", "Surface.2D.Normals.Normals Scale Factor", "Surface");
398  node->AddProperty("back normal lenth (px)", FloatProperty::New(10.0), renderer, overwrite);
399  aliases->AddAlias("back normal lenth (px)", "Surface.2D.Normals.Inverse Normals Scale Factor", "Surface");
400  node->AddProperty("layer", IntProperty::New(100), renderer, overwrite);
401  Superclass::SetDefaultProperties(node, renderer, overwrite);
402 }
void ApplyAllProperties(BaseRenderer *renderer)
ApplyAllProperties Pass all the properties to VTK.
#define ls
Definition: MitkMCxyz.cpp:57
bool GetFloatProperty(const char *propertyKey, float &floatValue) const
Convenience method to access the value of a FloatProperty.
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...
ScalarType GetTime() const
Get the time in ms of the currently displayed content.
bool GetDoubleProperty(const char *propertyKey, double &doubleValue, const mitk::BaseRenderer *renderer=nullptr) const
Convenience access method for double properties (instances of DoubleProperty)
vtkSmartPointer< vtkPlane > m_CuttingPlane
m_CuttingPlane The plane where to cut off the 2D slice.
static void SetDefaultProperties(mitk::DataNode *node, mitk::BaseRenderer *renderer=nullptr, bool overwrite=false)
set the default properties for this mapper
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:28
L * GetLocalStorage(mitk::BaseRenderer *forRenderer)
Retrieves a LocalStorage for a specific BaseRenderer.
virtual TimeStepType CountTimeSteps() const =0
Returns the number of time steps.
LocalStorage()
Default constructor of the local storage.
unsigned long GetMTime() const override
Get the timestamp of the last change of the map or the last change of one of the properties store in ...
bool GetIntProperty(const char *propertyKey, int &intValue) const
Convenience method to access the value of an IntProperty.
Internal class holding the mapper, actor, etc. for each of the 3 2D render windows.
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
double ScalarType
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.
~SurfaceVtkMapper2D() override
~SurfaceVtkMapper2D default destructor.
vtkSmartPointer< vtkArrowSource > m_ArrowSource
m_ArrowSource Arrow representation of the normals.
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
virtual bool AddAlias(const std::string &propertyName, const std::string &alias, const std::string &className="")=0
Add an alias for a specific property.
vtkSmartPointer< vtkActor > m_InverseNormalActor
m_InverseNormalActor actor for the inverse normals.
virtual const PlaneGeometry * GetCurrentWorldPlaneGeometry()
Get the current 2D-worldgeometry (m_CurrentWorldPlaneGeometry) used for 2D-rendering.
Key-value list holding instances of BaseProperty.
unsigned long GetMTime() const override
Get the timestamp of the last change of the contents of this node or the referenced BaseData...
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)
The LevelWindow class Class to store level/window values.
static Pointer New()
bool HasReferenceGeometry() const
vtkSmartPointer< vtkGlyph3D > m_InverseNormalGlyph
m_InverseNormalGlyph Glyph for creating inverse normals.
void Update(BaseRenderer *renderer) override
Update Check if data should be generated.
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
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 ...
bool GetColor(float rgb[3], const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="color") const
Convenience access method for color properties (instances of ColorProperty)
void ReplaceProperty(const std::string &propertyKey, BaseProperty *property)
Set a property object in the list/map by reference.
ScalarType GetUpperWindowBound() const
virtual TimeStepType TimePointToTimeStep(TimePointType timePoint) const =0
Converts a time point to the corresponding time step.
vtkSmartPointer< vtkGlyph3D > m_NormalGlyph
m_NormalGlyph Glyph for creating normals.
vtkSmartPointer< vtkPolyDataMapper > m_NormalMapper
m_NormalMapper Mapper for the normals.
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:421
vtkSmartPointer< vtkPolyDataMapper > m_InverseNormalMapper
m_InverseNormalMapper Mapper for the inverse normals.
virtual void CalculateTimeStep(BaseRenderer *renderer)
Updates the time step, which is sometimes needed in subclasses.
Definition: mitkMapper.cpp:79
vtkLinearTransform * GetVtkTransform(int t=0) const
Get the transformation applied prior to displaying the data as a vtkTransform.
const Point3D GetOrigin() const
Get the origin, e.g. the upper-left corner of the plane.
static Pointer New()
virtual bool IsValid() const
Is this BaseGeometry in a state that is valid?
mitk::PropertyList * GetPropertyList(const mitk::BaseRenderer *renderer=nullptr) const
Get the PropertyList of the renderer. If renderer is nullptr, the BaseRenderer-independent PropertyLi...
static Pointer New()
Vector3D GetNormal() const
Normal of the plane.
void ResetMapper(BaseRenderer *renderer) override
ResetMapper Called in mitk::Mapper::Update to hide objects. If TimeSlicedGeometry or time step is not...
virtual const mitk::Surface * GetInput() const
vtkSmartPointer< vtkReverseSense > m_ReverseSense
m_ReverseSense Filter to invert the normals.
vtkProp * GetVtkProp(mitk::BaseRenderer *renderer) override
returns the prop assembly
vtkSmartPointer< vtkActor > m_NormalActor
m_NormalActor actor for the normals.
void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override
GenerateDataForRenderer produces all the data.
int GetTimestep() const
Returns the current time step as calculated from the renderer.
Definition: mitkMapper.h:147
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all (three) LocalStorages for the three 2D render windows.
unsigned long GetCurrentWorldPlaneGeometryUpdateTime()
Get timestamp of last call of SetCurrentWorldPlaneGeometry.
vtkSmartPointer< vtkAssembly > m_PropAssembly
m_PropAssembly Contains all vtkProps for the final rendering.
Describes a two-dimensional, rectangular plane.
vtkSmartPointer< vtkPolyDataMapper > m_Mapper
m_Mapper VTK mapper for all types of 2D polydata e.g. werewolves.
static IPropertyAliases * GetPropertyAliases(us::ModuleContext *context=us::GetModuleContext())
Get an IPropertyAliases instance.
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
~LocalStorage() override
Default deconstructor of the local storage.
vtkSmartPointer< vtkActor > m_Actor
m_Actor actor for the surface cut.
virtual bool IsValidTimeStep(TimeStepType timeStep) const =0
Test for the given time step if a geometry is availible.
virtual void FixupLegacyProperties(PropertyList *properties)
Updates legacy properties to current behavior/interpretation.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57
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
vtkSmartPointer< vtkCutter > m_Cutter
m_Cutter Filter to cut out the 2D slice.
SurfaceVtkMapper2D()
SurfaceVtkMapper2D default constructor.