Medical Imaging Interaction Toolkit
2024.06.00
Medical Imaging Interaction Toolkit
|
#include <mitkBaseRenderer.h>
Public Types | |
enum | StandardMapperSlot { Standard2D, Standard3D } |
Defines which kind of mapper (e.g. 2D or 3D) should be used. More... | |
typedef std::map< vtkRenderWindow *, BaseRenderer * > | BaseRendererMapType |
typedef BaseRenderer | 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 |
virtual const char * | GetClassName () const |
BaseRenderer (const char *name=nullptr, vtkRenderWindow *renderWindow=nullptr) | |
void | RemoveAllLocalStorages () |
void | RegisterLocalStorageHandler (BaseLocalStorageHandler *lsh) |
void | UnregisterLocalStorageHandler (BaseLocalStorageHandler *lsh) |
virtual void | SetDataStorage (DataStorage *storage) |
virtual DataStorage::Pointer | GetDataStorage () const |
vtkRenderWindow * | GetRenderWindow () const |
vtkRenderer * | GetVtkRenderer () const |
Dispatcher::Pointer | GetDispatcher () const |
Get the dispatcher, which handles events for this base renderer. More... | |
virtual void | Resize (int w, int h) |
Set a new size for the render window. More... | |
virtual void | InitRenderer (vtkRenderWindow *renderwindow) |
Initialize the base renderer with a vtk render window. Set the new renderer for the camera controller. More... | |
virtual void | InitSize (int w, int h) |
Set the initial size for the render window. More... | |
virtual void | DrawOverlayMouse (Point2D &) |
virtual void | SetWorldTimeGeometry (const TimeGeometry *geometry) |
Set the world time geometry using the given TimeGeometry. More... | |
virtual const TimeGeometry * | GetWorldTimeGeometry () |
virtual void | SetInteractionReferenceGeometry (const TimeGeometry *geometry) |
Set the interaction reference world time geometry using the given TimeGeometry. More... | |
virtual const TimeGeometry * | GetInteractionReferenceGeometry () |
Get the current interaction reference geometry. More... | |
virtual bool | GetReferenceGeometryAligned () |
Return if the reference geometry aligns with the base renderer's world geometry. If true, the interaction reference geometry aligns with the base renderer's current world geometry. False otherwise. More... | |
virtual const BaseGeometry * | GetCurrentWorldGeometry () |
Get the current time-extracted 3D-geometry. More... | |
virtual const PlaneGeometry * | GetCurrentWorldPlaneGeometry () |
Get the current slice-extracted 2D-geometry. More... | |
virtual bool | SetWorldGeometryToDataStorageBounds () |
virtual void | SetSlice (unsigned int slice) |
Set the slice that should be used for geometry extraction. More... | |
virtual unsigned int | GetSlice () const |
virtual void | SetTimeStep (unsigned int timeStep) |
Set the timestep that should be used for geometry extraction. More... | |
virtual unsigned int | GetTimeStep () const |
TimeStepType | GetTimeStep (const BaseData *data) const |
Get the timestep of a BaseData object which exists at the time of the currently displayed content. More... | |
ScalarType | GetTime () const |
Get the time in ms of the currently display content (geometry). More... | |
virtual void | SetGeometry (const itk::EventObject &geometrySliceEvent) |
Set the world time geometry using the geometry of the given event. More... | |
virtual void | UpdateGeometry (const itk::EventObject &geometrySliceEvent) |
Set the current world plane geometry using the existing current world geometry. More... | |
virtual void | SetGeometrySlice (const itk::EventObject &geometrySliceEvent) |
Set the current slice using "SetSlice" and update the current world geometry and the current world plane geometry. More... | |
virtual void | SetGeometryTime (const itk::EventObject &geometryTimeEvent) |
Set the current time using "SetTimeStep" and update the current world geometry and the current world plane geometry. More... | |
virtual DataNode * | GetCurrentWorldPlaneGeometryNode () |
void | SendUpdateSlice () |
Modify the update time of the current world plane geometry and force reslicing. More... | |
virtual unsigned long | GetCurrentWorldPlaneGeometryUpdateTime () |
Get timestamp of the update time of the current world plane geometry. More... | |
virtual unsigned long | GetTimeStepUpdateTime () |
Get timestamp of the update time of the current timestep. More... | |
virtual void | PickWorldPoint (const Point2D &diplayPosition, Point3D &worldPosition) const =0 |
Pick a world coordinate (x,y,z) given a display coordinate (x,y). More... | |
virtual DataNode * | PickObject (const Point2D &, Point3D &) const |
Determines the object (mitk::DataNode) closest to the current position by means of picking. More... | |
virtual MapperSlotId | GetMapperID () |
Get the currently used mapperID. More... | |
virtual MapperSlotId | GetMapperID () const |
virtual void | SetMapperID (MapperSlotId id) |
Set the used mapperID. More... | |
virtual int * | GetSize () const |
virtual int * | GetViewportSize () const |
void | SetSliceNavigationController (SliceNavigationController *SlicenavigationController) |
virtual CameraController * | GetCameraController () |
virtual SliceNavigationController * | GetSliceNavigationController () |
virtual CameraRotationController * | GetCameraRotationController () |
virtual bool | GetEmptyWorldGeometry () |
virtual bool | GetKeepDisplayedRegion () |
Getter/Setter for defining if the displayed region should be shifted or rescaled if the render window is resized. More... | |
virtual void | SetKeepDisplayedRegion (bool _arg) |
const char * | GetName () const |
Return the name of the base renderer. More... | |
int | GetSizeX () const |
Return the size in x-direction of the base renderer. More... | |
int | GetSizeY () const |
Return the size in y-direction of the base renderer. More... | |
const double * | GetBounds () const |
Return the bounds of the bounding box of the current world geometry (time-extracted 3D-geometry). More... | |
void | RequestUpdate () |
void | ForceImmediateUpdate () |
unsigned int | GetNumberOfVisibleLODEnabledMappers () const |
Return the number of mappers which are visible and have level-of-detail rendering enabled. More... | |
void | DisplayToWorld (const Point2D &displayPoint, Point3D &worldIndex) const |
Convert a display point to the 3D world index using the geometry of the renderWindow. More... | |
void | DisplayToPlane (const Point2D &displayPoint, Point2D &planePointInMM) const |
Convert a display point to the 2D world index, mapped onto the display plane using the geometry of the renderWindow. More... | |
void | WorldToDisplay (const Point3D &worldIndex, Point2D &displayPoint) const |
Convert a 3D world index to the display point using the geometry of the renderWindow. More... | |
void | WorldToView (const Point3D &worldIndex, Point2D &viewPoint) const |
Convert a 3D world index to the point on the viewport using the geometry of the renderWindow. More... | |
void | PlaneToDisplay (const Point2D &planePointInMM, Point2D &displayPoint) const |
Convert a 2D plane coordinate to the display point using the geometry of the renderWindow. More... | |
void | PlaneToView (const Point2D &planePointInMM, Point2D &viewPoint) const |
Convert a 2D plane coordinate to the point on the viewport using the geometry of the renderWindow. More... | |
double | GetScaleFactorMMPerDisplayUnit () const |
Point2D | GetDisplaySizeInMM () const |
Point2D | GetViewportSizeInMM () const |
Point2D | GetOriginInMM () const |
virtual bool | GetConstrainZoomingAndPanning () const |
virtual void | SetConstrainZoomingAndPanning (bool constrain) |
Static Public Member Functions | |
static BaseRenderer * | GetInstance (vtkRenderWindow *renderWindow) |
static void | AddInstance (vtkRenderWindow *renderWindow, BaseRenderer *baseRenderer) |
static void | RemoveInstance (vtkRenderWindow *renderWindow) |
static BaseRenderer * | GetByName (const std::string &name) |
static vtkRenderWindow * | GetRenderWindowByName (const std::string &name) |
static BaseRendererMapType | GetSpecificRenderWindows (MapperSlotId mapper) |
Get a map of specific RenderWindows. More... | |
static BaseRendererMapType | GetAll2DRenderWindows () |
Convenience function: Get a map of all 2D RenderWindows. More... | |
static BaseRendererMapType | GetAll3DRenderWindows () |
Convenience function: Get a map of all 3D RenderWindows. More... | |
static const char * | GetStaticNameOfClass () |
Static Public Attributes | |
static BaseRendererMapType | baseRendererMap |
Protected Types | |
typedef std::set< Mapper * > | LODEnabledMappersType |
Protected Member Functions | |
~BaseRenderer () override | |
virtual void | Update ()=0 |
void | UpdateCurrentGeometries () |
virtual void | SetCurrentWorldPlaneGeometry (const PlaneGeometry *geometry2d) |
virtual void | SetCurrentWorldGeometry (const BaseGeometry *geometry) |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
Protected Attributes | |
vtkRenderWindow * | m_RenderWindow |
vtkRenderer * | m_VtkRenderer |
MapperSlotId | m_MapperID |
DataStorage::Pointer | m_DataStorage |
unsigned long | m_LastUpdateTime |
CameraController::Pointer | m_CameraController |
CameraRotationController::Pointer | m_CameraRotationController |
SliceNavigationController::Pointer | m_SliceNavigationController |
PlaneGeometryData::Pointer | m_CurrentWorldPlaneGeometryData |
DataNode::Pointer | m_CurrentWorldPlaneGeometryNode |
unsigned long | m_CurrentWorldPlaneGeometryTransformTime |
std::string | m_Name |
double | m_Bounds [6] |
bool | m_EmptyWorldGeometry |
unsigned int | m_NumberOfVisibleLODEnabledMappers |
std::list< BaseLocalStorageHandler * > | m_RegisteredLocalStorageHandlers |
bool | m_ConstrainZoomingAndPanning |
Definition at line 56 of file mitkBaseRenderer.h.
typedef std::map<vtkRenderWindow*, BaseRenderer*> mitk::BaseRenderer::BaseRendererMapType |
Definition at line 60 of file mitkBaseRenderer.h.
typedef itk::SmartPointer<const Self> mitk::BaseRenderer::ConstPointer |
Definition at line 94 of file mitkBaseRenderer.h.
|
protected |
Definition at line 496 of file mitkBaseRenderer.h.
Definition at line 94 of file mitkBaseRenderer.h.
typedef BaseRenderer mitk::BaseRenderer::Self |
Definition at line 94 of file mitkBaseRenderer.h.
typedef itk::Object mitk::BaseRenderer::Superclass |
Definition at line 94 of file mitkBaseRenderer.h.
Defines which kind of mapper (e.g. 2D or 3D) should be used.
Enumerator | |
---|---|
Standard2D | |
Standard3D |
Definition at line 66 of file mitkBaseRenderer.h.
mitk::BaseRenderer::BaseRenderer | ( | const char * | name = nullptr , |
vtkRenderWindow * | renderWindow = nullptr |
||
) |
|
overrideprotected |
|
static |
void mitk::BaseRenderer::DisplayToPlane | ( | const Point2D & | displayPoint, |
Point2D & | planePointInMM | ||
) | const |
Convert a display point to the 2D world index, mapped onto the display plane using the geometry of the renderWindow.
void mitk::BaseRenderer::DisplayToWorld | ( | const Point2D & | displayPoint, |
Point3D & | worldIndex | ||
) | const |
Convert a display point to the 3D world index using the geometry of the renderWindow.
|
inlinevirtual |
Definition at line 140 of file mitkBaseRenderer.h.
References MITK_INFO.
void mitk::BaseRenderer::ForceImmediateUpdate | ( | ) |
|
static |
Convenience function: Get a map of all 2D RenderWindows.
|
static |
Convenience function: Get a map of all 3D RenderWindows.
const double* mitk::BaseRenderer::GetBounds | ( | ) | const |
Return the bounds of the bounding box of the current world geometry (time-extracted 3D-geometry).
If the geometry is empty, the bounds are set to zero.
|
static |
|
virtual |
|
virtual |
|
inlinevirtual |
Reimplemented in mitk::VtkPropRenderer.
Definition at line 94 of file mitkBaseRenderer.h.
|
virtual |
Reimplemented in mitk::VtkPropRenderer.
|
virtual |
|
virtual |
Get the current time-extracted 3D-geometry.
|
virtual |
Get the current slice-extracted 2D-geometry.
|
virtual |
|
virtual |
Get timestamp of the update time of the current world plane geometry.
|
inlinevirtual |
Definition at line 104 of file mitkBaseRenderer.h.
Dispatcher::Pointer mitk::BaseRenderer::GetDispatcher | ( | ) | const |
Get the dispatcher, which handles events for this base renderer.
Point2D mitk::BaseRenderer::GetDisplaySizeInMM | ( | ) | const |
|
virtual |
|
static |
|
virtual |
Get the current interaction reference geometry.
|
virtual |
Getter/Setter for defining if the displayed region should be shifted or rescaled if the render window is resized.
|
virtual |
Get the currently used mapperID.
|
virtual |
|
inline |
Return the name of the base renderer.
Definition at line 326 of file mitkBaseRenderer.h.
unsigned int mitk::BaseRenderer::GetNumberOfVisibleLODEnabledMappers | ( | ) | const |
Return the number of mappers which are visible and have level-of-detail rendering enabled.
Point2D mitk::BaseRenderer::GetOriginInMM | ( | ) | const |
|
virtual |
Return if the reference geometry aligns with the base renderer's world geometry. If true, the interaction reference geometry aligns with the base renderer's current world geometry. False otherwise.
|
inline |
Definition at line 109 of file mitkBaseRenderer.h.
|
static |
double mitk::BaseRenderer::GetScaleFactorMMPerDisplayUnit | ( | ) | const |
|
virtual |
|
inline |
Return the size in x-direction of the base renderer.
Definition at line 334 of file mitkBaseRenderer.h.
|
inline |
Return the size in y-direction of the base renderer.
Definition at line 342 of file mitkBaseRenderer.h.
|
virtual |
|
virtual |
|
static |
Get a map of specific RenderWindows.
|
inlinestatic |
Definition at line 94 of file mitkBaseRenderer.h.
ScalarType mitk::BaseRenderer::GetTime | ( | ) | const |
Get the time in ms of the currently display content (geometry).
|
virtual |
TimeStepType mitk::BaseRenderer::GetTimeStep | ( | const BaseData * | data | ) | const |
Get the timestep of a BaseData object which exists at the time of the currently displayed content.
Returns -1 if there is no data at the current time.
|
virtual |
Get timestamp of the update time of the current timestep.
|
virtual |
Point2D mitk::BaseRenderer::GetViewportSizeInMM | ( | ) | const |
|
inline |
Definition at line 114 of file mitkBaseRenderer.h.
|
virtual |
|
virtual |
Initialize the base renderer with a vtk render window. Set the new renderer for the camera controller.
Reimplemented in mitk::VtkPropRenderer.
|
virtual |
Set the initial size for the render window.
Reimplemented in mitk::VtkPropRenderer.
|
inlinevirtual |
Determines the object (mitk::DataNode) closest to the current position by means of picking.
Reimplemented in mitk::VtkPropRenderer.
Definition at line 291 of file mitkBaseRenderer.h.
|
pure virtual |
Pick a world coordinate (x,y,z) given a display coordinate (x,y).
Implemented in mitk::VtkPropRenderer.
void mitk::BaseRenderer::PlaneToDisplay | ( | const Point2D & | planePointInMM, |
Point2D & | displayPoint | ||
) | const |
Convert a 2D plane coordinate to the display point using the geometry of the renderWindow.
Convert a 2D plane coordinate to the point on the viewport using the geometry of the renderWindow.
|
overrideprotected |
void mitk::BaseRenderer::RegisterLocalStorageHandler | ( | BaseLocalStorageHandler * | lsh | ) |
void mitk::BaseRenderer::RemoveAllLocalStorages | ( | ) |
|
static |
void mitk::BaseRenderer::RequestUpdate | ( | ) |
|
virtual |
Set a new size for the render window.
Reimplemented in mitk::VtkPropRenderer.
void mitk::BaseRenderer::SendUpdateSlice | ( | ) |
Modify the update time of the current world plane geometry and force reslicing.
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Reimplemented in mitk::VtkPropRenderer.
|
virtual |
Set the world time geometry using the geometry of the given event.
The function is triggered by a SliceNavigationController::GeometrySendEvent.
|
virtual |
Set the current slice using "SetSlice" and update the current world geometry and the current world plane geometry.
The function is triggered by a SliceNavigationController::GeometrySliceEvent.
|
virtual |
Set the current time using "SetTimeStep" and update the current world geometry and the current world plane geometry.
The function is triggered by a TimeNavigationController::TimeEvent.
|
virtual |
Set the interaction reference world time geometry using the given TimeGeometry.
Setting a new interaction reference world time geometry also updates the alignment status of the reference geometry, which can be retrieved using 'GetReferenceGeometryAligned'. Using a nullptr as the interaction reference geomertry implies that no requirements on the geometry exist, thus in this case any check will result in 'ReferenceGeometryAligned' being true.
geometry | The reference geometry used for render window interaction. |
|
virtual |
|
virtual |
Set the used mapperID.
Reimplemented in mitk::VtkPropRenderer.
|
virtual |
Set the slice that should be used for geometry extraction.
The slice defines the current slice-extracted 2D-geometry (CurrentWorldPlaneGeometry). Setting a new slice will update the current world geometry and the current world plane geometry.
void mitk::BaseRenderer::SetSliceNavigationController | ( | SliceNavigationController * | SlicenavigationController | ) |
|
virtual |
Set the timestep that should be used for geometry extraction.
The timestep defines the current time-extracted 3D-geometry (CurrentWorldGeometry). Setting a new timestep will update the current world geometry and the current world plane geometry.
|
inlinevirtual |
Reimplemented in mitk::VtkPropRenderer.
Definition at line 190 of file mitkBaseRenderer.h.
|
virtual |
Set the world time geometry using the given TimeGeometry.
Setting a new world time geometry updates the current world geometry and the current world plane geometry, using the currently selected slice and timestep.
void mitk::BaseRenderer::UnregisterLocalStorageHandler | ( | BaseLocalStorageHandler * | lsh | ) |
|
protectedpure virtual |
Implemented in mitk::VtkPropRenderer.
|
protected |
|
virtual |
Set the current world plane geometry using the existing current world geometry.
The function is triggered by a SliceNavigationController::GeometryUpdateEvent.
void mitk::BaseRenderer::WorldToDisplay | ( | const Point3D & | worldIndex, |
Point2D & | displayPoint | ||
) | const |
Convert a 3D world index to the display point using the geometry of the renderWindow.
Convert a 3D world index to the point on the viewport using the geometry of the renderWindow.
|
static |
Definition at line 61 of file mitkBaseRenderer.h.
|
protected |
Definition at line 492 of file mitkBaseRenderer.h.
|
protected |
Definition at line 423 of file mitkBaseRenderer.h.
|
protected |
Definition at line 424 of file mitkBaseRenderer.h.
|
protected |
Definition at line 502 of file mitkBaseRenderer.h.
|
protected |
Definition at line 486 of file mitkBaseRenderer.h.
|
protected |
Definition at line 487 of file mitkBaseRenderer.h.
|
protected |
Definition at line 488 of file mitkBaseRenderer.h.
|
protected |
Definition at line 420 of file mitkBaseRenderer.h.
|
protected |
Definition at line 494 of file mitkBaseRenderer.h.
|
protected |
Definition at line 421 of file mitkBaseRenderer.h.
|
protected |
Definition at line 419 of file mitkBaseRenderer.h.
|
protected |
Definition at line 490 of file mitkBaseRenderer.h.
|
protected |
Definition at line 498 of file mitkBaseRenderer.h.
|
protected |
Definition at line 500 of file mitkBaseRenderer.h.
|
protected |
Definition at line 416 of file mitkBaseRenderer.h.
|
protected |
Definition at line 425 of file mitkBaseRenderer.h.
|
protected |
Definition at line 417 of file mitkBaseRenderer.h.