Medical Imaging Interaction Toolkit
2023.04.00
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 () |
vtkProp * | GetVtkProp (mitk::BaseRenderer *renderer) override |
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 visibility 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 *) |
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=nullptr, bool overwrite=false) |
Static Public Member Functions inherited from mitk::VtkMapper | |
static const char * | GetStaticNameOfClass () |
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 |
Protected Member Functions | |
PointSetVtkMapper3D () | |
~PointSetVtkMapper3D () override | |
void | GenerateDataForRenderer (mitk::BaseRenderer *renderer) override |
Generate the data needed for rendering into renderer. More... | |
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 () |
Protected Member Functions inherited from mitk::VtkMapper | |
VtkMapper () | |
~VtkMapper () override | |
Protected Member Functions inherited from mitk::Mapper | |
Mapper () | |
explicit constructor which disallows implicit conversions More... | |
~Mapper () override | |
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... | |
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 |
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:
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 90 of file mitkPointSetVtkMapper3D.h.
typedef itk::SmartPointer<const Self> mitk::PointSetVtkMapper3D::ConstPointer |
Definition at line 93 of file mitkPointSetVtkMapper3D.h.
Definition at line 93 of file mitkPointSetVtkMapper3D.h.
Definition at line 93 of file mitkPointSetVtkMapper3D.h.
Definition at line 93 of file mitkPointSetVtkMapper3D.h.
|
protected |
|
overrideprotected |
|
protectedvirtual |
Reimplemented in mitk::SplineVtkMapper3D.
Pointer mitk::PointSetVtkMapper3D::Clone | ( | ) | const |
|
protectedvirtual |
|
protectedvirtual |
|
overrideprotectedvirtual |
Generate the data needed for rendering into renderer.
Reimplemented from mitk::Mapper.
Reimplemented in mitk::SplineVtkMapper3D.
|
inlineoverridevirtual |
Reimplemented from mitk::VtkMapper.
Definition at line 93 of file mitkPointSetVtkMapper3D.h.
|
virtual |
Reimplemented from mitk::VtkMapper.
|
virtual |
|
inlinestatic |
Definition at line 93 of file mitkPointSetVtkMapper3D.h.
|
overridevirtual |
Implements mitk::VtkMapper.
Reimplemented in mitk::SplineVtkMapper3D.
|
static |
|
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.
void mitk::PointSetVtkMapper3D::ReleaseGraphicsResources | ( | vtkWindow * | renWin | ) |
|
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.
|
static |
|
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.
|
protected |
Definition at line 146 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 159 of file mitkPointSetVtkMapper3D.h.
LocalStorageHandler<BaseLocalStorage> mitk::PointSetVtkMapper3D::m_LSH |
Definition at line 115 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 154 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 155 of file mitkPointSetVtkMapper3D.h.
|
protected |
All connections between two points (used for contour drawing)
Definition at line 131 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 148 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 158 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 144 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 145 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 137 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 136 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 139 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 133 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 141 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 151 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 134 of file mitkPointSetVtkMapper3D.h.
|
protected |
Definition at line 142 of file mitkPointSetVtkMapper3D.h.
|
protected |
All point positions, already in world coordinates.
Definition at line 129 of file mitkPointSetVtkMapper3D.h.