MITK-IGT
IGT Extension of MITK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mitk::CameraVisualization Class Reference

CameraVisualization controls the camera according to the spatial information of the navigation data. More...

#include <mitkCameraVisualization.h>

Inheritance diagram for mitk::CameraVisualization:
mitk::NavigationDataToNavigationDataFilter mitk::NavigationDataSource

Public Member Functions

 mitkClassMacro (CameraVisualization, NavigationDataToNavigationDataFilter)
 
 itkFactorylessNewMacro (Self)
 
 itkCloneMacro (Self)
 
 itkSetMacro (DirectionOfProjectionInToolCoordinates, mitk::Vector3D)
 sets the direction of projection of the camera of the renderer in tool coordinates
 
 itkSetMacro (ViewUpInToolCoordinates, mitk::Vector3D)
 sets the view up vector of the camera of the renderer in tool coordinates
 
 itkSetMacro (FocalLength, float)
 sets the focal length of the camera
 
 itkGetConstMacro (DirectionOfProjectionInToolCoordinates, mitk::Vector3D)
 returns the direction of projection of the camera of the renderer in tool coordinates
 
 itkGetConstMacro (ViewUpInToolCoordinates, mitk::Vector3D)
 returns the view up vector of the camera of the renderer in tool coordinates
 
 itkGetConstMacro (FocalLength, float)
 returns the focal length of the camera
 
virtual void SetRenderer (mitk::BaseRenderer *renderer)
 sets renderer that visualizes the navigation data
 
virtual const mitk::BaseRenderer * GetRenderer ()
 returns the renderer that visualizes the navigation data
 
void SetParameters (const mitk::PropertyList *p) override
 Set all filter parameters as the PropertyList p.
 
mitk::PropertyList::ConstPointer GetParameters () const override
 Get all filter parameters as a PropertyList.
 
- Public Member Functions inherited from mitk::NavigationDataToNavigationDataFilter
 mitkClassMacro (NavigationDataToNavigationDataFilter, NavigationDataSource)
 
virtual void SetInput (const NavigationData *nd)
 Set the input of this filter.
 
virtual void SetInput (unsigned int idx, const NavigationData *nd)
 Set input with id idx of this filter.
 
const NavigationDataGetInput (void) const
 Get the input of this filter.
 
const NavigationDataGetInput (unsigned int idx) const
 Get the input with id idx of this filter.
 
const NavigationDataGetInput (std::string navDataName) const
 Get the input with name navDataName of this filter.
 
DataObjectPointerArraySizeType GetInputIndex (std::string navDataName)
 return the index of the input with name navDataName, throw std::invalid_argument exception if that name was not found
 
virtual void ConnectTo (mitk::NavigationDataSource *UpstreamFilter)
 Connects the input of this filter to the outputs of the given NavigationDataSource.
 
- Public Member Functions inherited from mitk::NavigationDataSource
 mitkClassMacroItkParent (NavigationDataSource, itk::ProcessObject)
 
 itkGetMacro (Name, std::string)
 
 itkSetMacro (Name, std::string)
 Sets the human readable name of this source. There is also a default name, but you can use this method if you need to define it on your own.
 
NavigationDataGetOutput (void)
 return the output (output with id 0) of the filter
 
NavigationDataGetOutput (DataObjectPointerArraySizeType idx)
 return the output with id idx of the filter
 
NavigationDataGetOutput (const std::string &navDataName)
 return the output with name navDataName of the filter
 
NavigationTool::Pointer GetToolMetaData (DataObjectPointerArraySizeType idx)
 
NavigationTool::Pointer GetToolMetaData (const std::string &navDataName)
 
 itkGetMacro (ToolMetaDataCollection, mitk::NavigationToolStorage::Pointer)
 
 itkSetMacro (ToolMetaDataCollection, mitk::NavigationToolStorage::Pointer)
 
DataObjectPointerArraySizeType GetOutputIndex (std::string navDataName)
 return the index of the output with name navDataName, -1 if no output with that name was found
 
virtual void RegisterAsMicroservice ()
 Registers this object as a Microservice, making it available to every module and/or plugin. To unregister, call UnregisterMicroservice().
 
virtual void UnRegisterMicroservice ()
 Registers this object as a Microservice, making it available to every module and/or plugin.
 
std::string GetMicroserviceID ()
 Returns the id that this device is registered with. The id will only be valid, if the NavigationDataSource has been registered using RegisterAsMicroservice().
 
virtual void GraftNthOutput (unsigned int idx, itk::DataObject *graft)
 Graft the specified DataObject onto this ProcessObject's output.
 
virtual void GraftOutput (itk::DataObject *graft)
 Graft the specified DataObject onto this ProcessObject's output.
 
itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 
virtual void Freeze ()
 
virtual void UnFreeze ()
 
 itkGetMacro (IsFrozen, bool)
 

Protected Member Functions

 CameraVisualization ()
 
 ~CameraVisualization () override
 
void GenerateData () override
 filter execute method
 
- Protected Member Functions inherited from mitk::NavigationDataToNavigationDataFilter
 NavigationDataToNavigationDataFilter ()
 
 ~NavigationDataToNavigationDataFilter () override
 
void CreateOutputsForAllInputs ()
 Create an output for each input.
 
- Protected Member Functions inherited from mitk::NavigationDataSource
 NavigationDataSource ()
 
 ~NavigationDataSource () override
 

Protected Attributes

mitk::BaseRenderer::Pointer m_Renderer
 renderer that visualizes the navigation data-
 
Vector3D m_DirectionOfProjectionInToolCoordinates
 vector of the direction of projection in tool coordinates
 
Vector3D m_ViewUpInToolCoordinates
 view up vector in tool coordinates
 
Vector3D m_DirectionOfProjection
 vector of the current direction of view of the camera in world coordinates
 
Point3D m_CameraPosition
 current position of the camera
 
ScalarType m_FocalLength
 focal length of the camera: distance between camera position and focal point.
 
- Protected Attributes inherited from mitk::NavigationDataSource
std::string m_Name
 
bool m_IsFrozen
 
NavigationToolStorage::Pointer m_ToolMetaDataCollection
 

Additional Inherited Members

- Static Public Attributes inherited from mitk::NavigationDataSource
static const std::string US_INTERFACE_NAME = "org.mitk.services.NavigationDataSource"
 These Constants are used in conjunction with Microservices.
 
static const std::string US_PROPKEY_DEVICENAME = US_INTERFACE_NAME + ".devicename"
 
static const std::string US_PROPKEY_ID = US_INTERFACE_NAME + ".id"
 
static const std::string US_PROPKEY_ISACTIVE = US_INTERFACE_NAME + ".isActive"
 

Detailed Description

CameraVisualization controls the camera according to the spatial information of the navigation data.

Documentation

The camera of the renderer will be placed at the position of the navigation data and oriented according to its orientation and the camera specific information "direction of projection", "view up", "focal length", "view angle"

Definition at line 28 of file mitkCameraVisualization.h.

Constructor & Destructor Documentation

◆ CameraVisualization()

mitk::CameraVisualization::CameraVisualization ( )
protected

Definition at line 23 of file mitkCameraVisualization.cpp.

◆ ~CameraVisualization()

mitk::CameraVisualization::~CameraVisualization ( )
overrideprotected

Definition at line 36 of file mitkCameraVisualization.cpp.

Member Function Documentation

◆ GenerateData()

void mitk::CameraVisualization::GenerateData ( )
overrideprotected

filter execute method

Documentation

positions and orients camera according to the position and orientation hold in the NavigationData

Definition at line 42 of file mitkCameraVisualization.cpp.

◆ GetParameters()

mitk::PropertyList::ConstPointer mitk::CameraVisualization::GetParameters ( ) const
overridevirtual

Get all filter parameters as a PropertyList.

Documentation

This method returns a PropertyList containing the following properties (name : data type):

  • "CameraVisualization_DirectionOfProjectionInToolCoordinates" : mitk::Vector3DProperty
  • "CameraVisualization_ViewUpInToolCoordinates" : mitk::Vector3DProperty
  • "CameraVisualization_FocalLength" : mitk::FloatProperty
  • "CameraVisualization_ViewAngle" : mitk::FloatProperty The returned PropertyList must be assigned to a SmartPointer immediately, or else it will get destroyed.

Reimplemented from mitk::NavigationDataSource.

Definition at line 131 of file mitkCameraVisualization.cpp.

◆ GetRenderer()

const mitk::BaseRenderer * mitk::CameraVisualization::GetRenderer ( )
virtual

returns the renderer that visualizes the navigation data

Definition at line 106 of file mitkCameraVisualization.cpp.

◆ itkCloneMacro()

mitk::CameraVisualization::itkCloneMacro ( Self )

◆ itkFactorylessNewMacro()

mitk::CameraVisualization::itkFactorylessNewMacro ( Self )

◆ itkGetConstMacro() [1/3]

mitk::CameraVisualization::itkGetConstMacro ( DirectionOfProjectionInToolCoordinates ,
mitk::Vector3D  )

returns the direction of projection of the camera of the renderer in tool coordinates

◆ itkGetConstMacro() [2/3]

mitk::CameraVisualization::itkGetConstMacro ( FocalLength ,
float  )

returns the focal length of the camera

◆ itkGetConstMacro() [3/3]

mitk::CameraVisualization::itkGetConstMacro ( ViewUpInToolCoordinates ,
mitk::Vector3D  )

returns the view up vector of the camera of the renderer in tool coordinates

◆ itkSetMacro() [1/3]

mitk::CameraVisualization::itkSetMacro ( DirectionOfProjectionInToolCoordinates ,
mitk::Vector3D  )

sets the direction of projection of the camera of the renderer in tool coordinates

◆ itkSetMacro() [2/3]

mitk::CameraVisualization::itkSetMacro ( FocalLength ,
float  )

sets the focal length of the camera

◆ itkSetMacro() [3/3]

mitk::CameraVisualization::itkSetMacro ( ViewUpInToolCoordinates ,
mitk::Vector3D  )

sets the view up vector of the camera of the renderer in tool coordinates

◆ mitkClassMacro()

mitk::CameraVisualization::mitkClassMacro ( CameraVisualization ,
NavigationDataToNavigationDataFilter  )

◆ SetParameters()

void mitk::CameraVisualization::SetParameters ( const mitk::PropertyList * p)
overridevirtual

Set all filter parameters as the PropertyList p.

Documentation

This method reads the following properties from the PropertyList (name : data type):

  • "CameraVisualization_DirectionOfProjectionInToolCoordinates" : mitk::Vector3DProperty
  • "CameraVisualization_ViewUpInToolCoordinates" : mitk::Vector3DProperty
  • "CameraVisualization_FocalLength" : mitk::FloatProperty
  • "CameraVisualization_ViewAngle" : mitk::FloatProperty

Reimplemented from mitk::NavigationDataSource.

Definition at line 112 of file mitkCameraVisualization.cpp.

◆ SetRenderer()

void mitk::CameraVisualization::SetRenderer ( mitk::BaseRenderer * renderer)
virtual

sets renderer that visualizes the navigation data

Definition at line 100 of file mitkCameraVisualization.cpp.

Member Data Documentation

◆ m_CameraPosition

Point3D mitk::CameraVisualization::m_CameraPosition
protected

current position of the camera

Definition at line 116 of file mitkCameraVisualization.h.

◆ m_DirectionOfProjection

Vector3D mitk::CameraVisualization::m_DirectionOfProjection
protected

vector of the current direction of view of the camera in world coordinates

Definition at line 115 of file mitkCameraVisualization.h.

◆ m_DirectionOfProjectionInToolCoordinates

Vector3D mitk::CameraVisualization::m_DirectionOfProjectionInToolCoordinates
protected

vector of the direction of projection in tool coordinates

Definition at line 113 of file mitkCameraVisualization.h.

◆ m_FocalLength

ScalarType mitk::CameraVisualization::m_FocalLength
protected

focal length of the camera: distance between camera position and focal point.

Definition at line 117 of file mitkCameraVisualization.h.

◆ m_Renderer

mitk::BaseRenderer::Pointer mitk::CameraVisualization::m_Renderer
protected

renderer that visualizes the navigation data-

Definition at line 111 of file mitkCameraVisualization.h.

◆ m_ViewUpInToolCoordinates

Vector3D mitk::CameraVisualization::m_ViewUpInToolCoordinates
protected

view up vector in tool coordinates

Definition at line 114 of file mitkCameraVisualization.h.


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