Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitk::RenderWindowLayerController Class Reference

#include <mitkRenderWindowLayerController.h>

Public Member Functions

 RenderWindowLayerController ()
 
void SetDataStorage (DataStorage::Pointer dataStorage)
 Set the data storage on which to work. More...
 
void InsertLayerNode (DataNode *dataNode, int layer=RenderWindowLayerUtilities::TOP_LAYER_INDEX, const BaseRenderer *renderer=nullptr)
 Insert the given data node at the specified layer for the given renderer. More...
 
bool MoveNodeToPosition (DataNode *dataNode, int layer, const BaseRenderer *renderer=nullptr)
 Move the data node to the given layer. This will change only the "layer" property. More...
 
bool MoveNodeToFront (DataNode *dataNode, const BaseRenderer *renderer=nullptr)
 Set the node in the given renderer as the topmost layer. This will change only the "layer" property. More...
 
bool MoveNodeToBack (DataNode *dataNode, const BaseRenderer *renderer=nullptr)
 Set the node in the given renderer as the lowermost layer. This will change only the "layer" property. More...
 
bool MoveNodeUp (DataNode *dataNode, const BaseRenderer *renderer=nullptr)
 Move the node in the given renderer one layer down. This will change only the "layer" property. More...
 
bool MoveNodeDown (DataNode *dataNode, const BaseRenderer *renderer=nullptr)
 Move the node in the given renderer one layer up. This will change only the "layer" property. More...
 

Detailed Description

The RenderWindowLayerController is used to manipulate the 'layer' and 'visible' property of a given data node. The 'layer' property is used to denote the layer level of a data node. Data from nodes on higher layer level are rendered on top of data from nodes on lower layer level. It can be changed using the 'MoveNode*'-functions.

To view the data of a data node only in a specific renderer, the "InsertLayerNode'-function should be used. It inserts the given node into the specified renderer and sets the corresponding properties. Inserting and showing a data node in a specific renderer / render window, will overwrite the properties of the common renderer view.

For more information about the data node properties for specific renderer, see mitk::DataNode- and mitk::PropertyList-classes.

Functions with 'mitk::BaseRenderer* renderer' have 'nullptr' as their default argument. Using the nullptr these functions operate on the general property list. Giving a specific base renderer will modify the property list of the given renderer.

Definition at line 42 of file mitkRenderWindowLayerController.h.

Constructor & Destructor Documentation

◆ RenderWindowLayerController()

mitk::RenderWindowLayerController::RenderWindowLayerController ( )

Member Function Documentation

◆ InsertLayerNode()

void mitk::RenderWindowLayerController::InsertLayerNode ( DataNode dataNode,
int  layer = RenderWindowLayerUtilities::TOP_LAYER_INDEX,
const BaseRenderer renderer = nullptr 
)

Insert the given data node at the specified layer for the given renderer.

Parameters
dataNodeThe data node that should be inserted.
layerThe layer value for the "layer" property of the data node (insertion level). "layer = RenderWindowLayerUtilities::TOP_LAYER_INDEX" (default) inserts the given data node at the top of the node stack (topmost layer).
rendererPointer to the renderer instance for which the data node should be inserted. If it is a nullptr (default) all controlled renderer will be affected.
Postcondition
After a successful call, the "visibility" property will be true and the "layer" property will be set correctly.

◆ MoveNodeDown()

bool mitk::RenderWindowLayerController::MoveNodeDown ( DataNode dataNode,
const BaseRenderer renderer = nullptr 
)

Move the node in the given renderer one layer up. This will change only the "layer" property.

Parameters
dataNodeThe data node that should be moved.
rendererPointer to the renderer instance for which the data node should be moved. If it is a nullptr (default) all controlled renderer will be affected.

◆ MoveNodeToBack()

bool mitk::RenderWindowLayerController::MoveNodeToBack ( DataNode dataNode,
const BaseRenderer renderer = nullptr 
)

Set the node in the given renderer as the lowermost layer. This will change only the "layer" property.

Parameters
dataNodeThe data node that should be moved.
rendererPointer to the renderer instance for which the data node should be moved. If it is a nullptr (default) all controlled renderer will be affected.

◆ MoveNodeToFront()

bool mitk::RenderWindowLayerController::MoveNodeToFront ( DataNode dataNode,
const BaseRenderer renderer = nullptr 
)

Set the node in the given renderer as the topmost layer. This will change only the "layer" property.

Parameters
dataNodeThe data node that should be moved.
rendererPointer to the renderer instance for which the data node should be moved. If it is a nullptr (default) all controlled renderer will be affected.

◆ MoveNodeToPosition()

bool mitk::RenderWindowLayerController::MoveNodeToPosition ( DataNode dataNode,
int  layer,
const BaseRenderer renderer = nullptr 
)

Move the data node to the given layer. This will change only the "layer" property.

Parameters
dataNodeThe data node that should be moved.
layerThe layer to which the data node should be moved.
rendererPointer to the renderer instance for which the data node should be moved. If it is a nullptr (default) all controlled renderer will be affected and the common property list will be modified.

◆ MoveNodeUp()

bool mitk::RenderWindowLayerController::MoveNodeUp ( DataNode dataNode,
const BaseRenderer renderer = nullptr 
)

Move the node in the given renderer one layer down. This will change only the "layer" property.

Parameters
dataNodeThe data node that should be moved.
rendererPointer to the renderer instance for which the data node should be moved. If it is a nullptr (default) all controlled renderer will be affected.

◆ SetDataStorage()

void mitk::RenderWindowLayerController::SetDataStorage ( DataStorage::Pointer  dataStorage)

Set the data storage on which to work.


The documentation for this class was generated from the following file: