Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Vtk-based mapper for PointSet. More...
#include <mitkPointSetVtkMapper3D.h>
Public Types | |
typedef PointSetVtkMapper3D | Self |
typedef VtkMapper | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Types inherited from mitk::VtkMapper | |
typedef VtkMapper | Self |
typedef Mapper | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Types inherited from mitk::Mapper | |
typedef Mapper | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
Pointer | Clone () const |
virtual const mitk::PointSet * | GetInput () |
virtual vtkProp * | GetVtkProp (mitk::BaseRenderer *renderer) override |
virtual void | UpdateVtkTransform (mitk::BaseRenderer *renderer) override |
Set the vtkTransform of the m_Prop3D for the current time step of renderer. More... | |
void | ReleaseGraphicsResources (vtkWindow *renWin) |
void | ReleaseGraphicsResources (mitk::BaseRenderer *renderer) override |
Release vtk-based graphics resources that are being consumed by this mapper. More... | |
Public Member Functions inherited from mitk::VtkMapper | |
virtual bool | IsVtkBased () const override |
Returns whether this is an vtk-based mapper. More... | |
void | MitkRender (mitk::BaseRenderer *renderer, mitk::VtkPropRenderer::RenderType type) override |
Determines which geometry should be rendered (opaque, translucent, volumetric, overlay) and calls the appropriate function. More... | |
virtual void | MitkRenderOverlay (BaseRenderer *renderer) |
Checks visibility and renders the overlay. More... | |
virtual void | MitkRenderOpaqueGeometry (BaseRenderer *renderer) |
Checks visibility and renders untransparent geometry. More... | |
virtual void | MitkRenderTranslucentGeometry (BaseRenderer *renderer) |
Checks visiblity and renders transparent geometry. More... | |
virtual void | MitkRenderVolumetricGeometry (BaseRenderer *renderer) |
Checks visibility and renders volumes. More... | |
virtual bool | HasVtkProp (const vtkProp *prop, BaseRenderer *renderer) |
Returns true if this mapper owns the specified vtkProp for the given BaseRenderer. More... | |
virtual void | ApplyProperties (vtkActor *actor, mitk::BaseRenderer *renderer) |
Apply color and opacity properties read from the PropertyList. More... | |
void | ApplyShaderProperties (mitk::BaseRenderer *renderer) |
SHADERTODO. More... | |
virtual void | ApplyColorAndOpacityProperties (mitk::BaseRenderer *renderer, vtkActor *actor) override |
Apply color and opacity properties read from the PropertyList. Called by mapper subclasses. More... | |
Public Member Functions inherited from mitk::Mapper | |
virtual void | SetDataNode (DataNode *_arg) |
Set the DataNode containing the data to map. More... | |
virtual DataNode * | GetDataNode () const |
Get the DataNode containing the data to map. Method only returns valid DataNode Pointer if the mapper belongs to a data node. Otherwise, the returned DataNode Pointer might be invalid. More... | |
BaseData * | GetData () const |
Get the data to map. More... | |
virtual bool | GetColor (float rgb[3], BaseRenderer *renderer, const char *name="color") const |
Convenience access method for color properties (instances of ColorProperty) More... | |
virtual bool | GetVisibility (bool &visible, BaseRenderer *renderer, const char *name="visible") const |
Convenience access method for visibility properties (instances of BoolProperty) More... | |
virtual bool | GetOpacity (float &opacity, BaseRenderer *renderer, const char *name="opacity") const |
Convenience access method for opacity properties (instances of FloatProperty) More... | |
virtual bool | GetLevelWindow (LevelWindow &levelWindow, BaseRenderer *renderer, const char *name="levelwindow") const |
Convenience access method for color properties (instances of LevelWindoProperty) More... | |
virtual bool | IsVisible (BaseRenderer *renderer, const char *name="visible") const |
Convenience access method for visibility properties (instances of BoolProperty). Return value is the visibility. Default is visible==true, i.e., true is returned even if the property (propertyKey) is not found. More... | |
virtual void | Update (BaseRenderer *renderer) |
Calls the time step of the input data for the specified renderer and checks whether the time step is valid and calls method GenerateDataForRenderer() More... | |
int | GetTimestep () const |
Returns the current time step as calculated from the renderer. More... | |
virtual bool | IsLODEnabled (BaseRenderer *) const |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
static void | SetDefaultProperties (mitk::DataNode *node, mitk::BaseRenderer *renderer=NULL, bool overwrite=false) |
Static Public Member Functions inherited from mitk::VtkMapper | |
static const char * | GetStaticNameOfClass () |
static void | SetVtkMapperImmediateModeRendering (vtkMapper *mapper) |
Re-issues all drawing commands required to describe the entire scene each time a new frame is required, regardless of actual changes. More... | |
Static Public Member Functions inherited from mitk::Mapper | |
static const char * | GetStaticNameOfClass () |
static void | SetDefaultProperties (DataNode *node, BaseRenderer *renderer=nullptr, bool overwrite=false) |
Set default values of properties used by this mapper to node. More... | |
Public Attributes | |
LocalStorageHandler< BaseLocalStorage > | m_LSH |
Public Attributes inherited from mitk::VtkMapper | |
mitk::LocalStorageHandler< VtkMapperLocalStorage > | m_VtkMapperLSH |
Protected Member Functions | |
PointSetVtkMapper3D () | |
virtual | ~PointSetVtkMapper3D () |
virtual void | GenerateDataForRenderer (mitk::BaseRenderer *renderer) override |
Generate the data needed for rendering into renderer. More... | |
virtual void | ResetMapper (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) More... | |
virtual void | ApplyAllProperties (mitk::BaseRenderer *renderer, vtkActor *actor) |
virtual void | CreateContour (vtkPoints *points, vtkCellArray *connections) |
virtual void | CreateVTKRenderObjects () |
virtual void | VertexRendering () |
Protected Member Functions inherited from mitk::VtkMapper | |
VtkMapper () | |
virtual | ~VtkMapper () |
Protected Member Functions inherited from mitk::Mapper | |
Mapper () | |
explicit constructor which disallows implicit conversions More... | |
virtual | ~Mapper () |
virtual destructor in order to derive from this class More... | |
virtual void | GenerateData () |
Generate the data needed for rendering (independent of a specific renderer) More... | |
virtual void | CalculateTimeStep (BaseRenderer *renderer) |
Updates the time step, which is sometimes needed in subclasses. More... | |
virtual OverlayManager * | GetOverlayManager () const |
Protected Attributes | |
vtkSmartPointer< vtkPoints > | m_WorldPositions |
All point positions, already in world coordinates. More... | |
vtkSmartPointer< vtkCellArray > | m_PointConnections |
All connections between two points (used for contour drawing) More... | |
vtkSmartPointer< vtkAppendPolyData > | m_vtkSelectedPointList |
vtkSmartPointer< vtkAppendPolyData > | m_vtkUnselectedPointList |
vtkSmartPointer< vtkPoints > | m_VtkPoints |
vtkSmartPointer< vtkCellArray > | m_VtkPointConnections |
vtkSmartPointer< vtkTransformPolyDataFilter > | m_VtkPointsTransformer |
vtkSmartPointer< vtkPolyDataMapper > | m_VtkSelectedPolyDataMapper |
vtkSmartPointer< vtkPolyDataMapper > | m_VtkUnselectedPolyDataMapper |
vtkSmartPointer< vtkActor > | m_SelectedActor |
vtkSmartPointer< vtkActor > | m_UnselectedActor |
vtkSmartPointer< vtkActor > | m_ContourActor |
vtkSmartPointer< vtkPropAssembly > | m_PointsAssembly |
vtkSmartPointer< vtkAppendPolyData > | m_vtkTextList |
unsigned int | m_NumberOfSelectedAdded |
unsigned int | m_NumberOfUnselectedAdded |
ScalarType | m_PointSize |
ScalarType | m_ContourRadius |
bool | m_VertexRendering |
Protected Attributes inherited from mitk::Mapper | |
mitk::DataNode * | m_DataNode |
Vtk-based mapper for PointSet.
Due to the need of different colors for selected and unselected points and the facts, that we also have a contour and labels for the points, the vtk structure is build up the following way:
We have two AppendPolyData, one selected, and one unselected and one for a contour between the points. Each one is connected to an own PolyDaraMapper and an Actor. The different color for the unselected and selected state and for the contour is read from properties.
"unselectedcolor", "selectedcolor" and "contourcolor" are the strings, that are looked for. Pointlabels are added besides the selected or the deselected points.
Then the three Actors are combined inside a vtkPropAssembly and this object is returned in GetProp() and so hooked up into the rendering pipeline.
Properties that can be set for point sets and influence the PointSetVTKMapper3D are:
- \b "color": (ColorProperty*) Color of the point set - \b "Opacity": (FloatProperty) Opacity of the point set - \b "show contour": (BoolProperty) If the contour of the points are visible - \b "contourSizeProp":(FloatProperty) Contour size of the points
The default properties are:
- \b "line width": (IntProperty::New(2), renderer, overwrite ) - \b "pointsize": (FloatProperty::New(1.0), renderer, overwrite) - \b "selectedcolor": (ColorProperty::New(1.0f, 0.0f, 0.0f), renderer, overwrite) //red - \b "color": (ColorProperty::New(1.0f, 1.0f, 0.0f), renderer, overwrite) //yellow - \b "show contour": (BoolProperty::New(false), renderer, overwrite ) - \b "contourcolor": (ColorProperty::New(1.0f, 0.0f, 0.0f), renderer, overwrite) - \b "contoursize": (FloatProperty::New(0.5), renderer, overwrite ) - \b "close contour": (BoolProperty::New(false), renderer, overwrite ) - \b "show points": (BoolProperty::New(true), renderer, overwrite ) - \b "updateDataOnRender": (BoolProperty::New(true), renderer, overwrite )
Other properties looked for are:
Definition at line 94 of file mitkPointSetVtkMapper3D.h.
typedef itk::SmartPointer<const Self> mitk::PointSetVtkMapper3D::ConstPointer |
Definition at line 97 of file mitkPointSetVtkMapper3D.h.
Definition at line 97 of file mitkPointSetVtkMapper3D.h.
Definition at line 97 of file mitkPointSetVtkMapper3D.h.
Definition at line 97 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 52 of file mitkPointSetVtkMapper3D.cpp.
References m_ContourActor, m_PointsAssembly, m_SelectedActor, m_UnselectedActor, and mitk::New().
|
protectedvirtual |
Definition at line 73 of file mitkPointSetVtkMapper3D.cpp.
|
protectedvirtual |
!define a new ColorProp to be able to pass alpha value
!define a new ColorProp to be able to pass alpha value
Reimplemented in mitk::SplineVtkMapper3D.
Definition at line 529 of file mitkPointSetVtkMapper3D.cpp.
References mitk::ColorProperty::GetColor(), and selectedColor.
Pointer mitk::PointSetVtkMapper3D::Clone | ( | ) | const |
|
protectedvirtual |
Definition at line 659 of file mitkPointSetVtkMapper3D.cpp.
References mitk::New().
|
protectedvirtual |
Definition at line 95 of file mitkPointSetVtkMapper3D.cpp.
References mitk::New(), mitk::PTCORNER, mitk::PTEDGE, mitk::PTEND, mitk::PTSTART, mitk::PTUNDEFINED, and mitk::BaseRenderer::Standard3D.
|
overrideprotectedvirtual |
Generate the data needed for rendering into renderer.
Reimplemented from mitk::Mapper.
Reimplemented in mitk::SplineVtkMapper3D.
Definition at line 429 of file mitkPointSetVtkMapper3D.cpp.
References mitk::GenericProperty< T >::GetValue(), mitk::Mapper::BaseLocalStorage::IsGenerateDataRequired(), and mitk::Mapper::BaseLocalStorage::UpdateGenerateDataTime().
|
inlineoverridevirtual |
Reimplemented from mitk::VtkMapper.
Definition at line 97 of file mitkPointSetVtkMapper3D.h.
|
virtual |
Reimplemented from mitk::VtkMapper.
|
virtual |
Definition at line 47 of file mitkPointSetVtkMapper3D.cpp.
References mitk::DataNode::GetData(), and mitk::Mapper::GetDataNode().
|
inlinestatic |
Definition at line 97 of file mitkPointSetVtkMapper3D.h.
|
overridevirtual |
Implements mitk::VtkMapper.
Reimplemented in mitk::SplineVtkMapper3D.
Definition at line 520 of file mitkPointSetVtkMapper3D.cpp.
|
static |
Referenced by mitk::CoreObjectFactory::CreateMapper().
void mitk::PointSetVtkMapper3D::ReleaseGraphicsResources | ( | vtkWindow * | renWin | ) |
Definition at line 77 of file mitkPointSetVtkMapper3D.cpp.
|
overridevirtual |
Release vtk-based graphics resources that are being consumed by this mapper.
Method called by mitk::VtkPropRenderer. The parameter renderer could be used to determine which graphic resources to release. The local storage is accessible by the parameter renderer. Should be overwritten in subclasses.
Reimplemented from mitk::VtkMapper.
Definition at line 86 of file mitkPointSetVtkMapper3D.cpp.
References mitk::BaseRenderer::GetRenderWindow().
|
overrideprotectedvirtual |
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)
To be implemented in sub-classes.
Reimplemented from mitk::Mapper.
Definition at line 515 of file mitkPointSetVtkMapper3D.cpp.
|
static |
Definition at line 691 of file mitkPointSetVtkMapper3D.cpp.
References mitk::DataNode::AddProperty(), mitk::BoolProperty::New(), mitk::IntProperty::New(), mitk::FloatProperty::New(), and mitk::ColorProperty::New().
Referenced by mitk::CoreObjectFactory::SetDefaultProperties().
|
overridevirtual |
Set the vtkTransform of the m_Prop3D for the current time step of renderer.
Called by mitk::VtkPropRenderer::Update before rendering. This method will transform all actors (e.g. of an vtkAssembly) according the geometry.
Reimplemented from mitk::VtkMapper.
Reimplemented in mitk::SplineVtkMapper3D.
Definition at line 525 of file mitkPointSetVtkMapper3D.cpp.
|
protectedvirtual |
Definition at line 376 of file mitkPointSetVtkMapper3D.cpp.
|
protected |
Definition at line 149 of file mitkPointSetVtkMapper3D.h.
Referenced by PointSetVtkMapper3D().
|
protected |
Definition at line 162 of file mitkPointSetVtkMapper3D.h.
LocalStorageHandler<BaseLocalStorage> mitk::PointSetVtkMapper3D::m_LSH |
Definition at line 117 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 157 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 158 of file mitkPointSetVtkMapper3D.h.
|
protected |
All connections between two points (used for contour drawing)
Definition at line 134 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 151 of file mitkPointSetVtkMapper3D.h.
Referenced by PointSetVtkMapper3D().
|
protected |
Definition at line 161 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 147 of file mitkPointSetVtkMapper3D.h.
Referenced by PointSetVtkMapper3D().
|
protected |
Definition at line 148 of file mitkPointSetVtkMapper3D.h.
Referenced by PointSetVtkMapper3D().
|
protected |
Definition at line 163 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 140 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 139 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 142 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 136 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 144 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 154 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 137 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 145 of file mitkPointSetVtkMapper3D.h.
|
protected |
All point positions, already in world coordinates.
Definition at line 132 of file mitkPointSetVtkMapper3D.h.