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