Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
controls the camera used by the associated BaseRenderer More...
#include <mitkCameraController.h>
Public Types | |
enum | StandardView { ANTERIOR, POSTERIOR, SINISTER, DEXTER, CRANIAL, CAUDAL } |
typedef CameraController | Self |
typedef BaseController | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
![]() | |
typedef BaseController | Self |
typedef mitk::OperationActor | 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 |
void | SetRenderer (const BaseRenderer *renderer) |
virtual const BaseRenderer * | GetRenderer () const |
virtual void | SetViewToAnterior () |
virtual void | SetViewToPosterior () |
virtual void | SetViewToSinister () |
virtual void | SetViewToDexter () |
virtual void | SetViewToCranial () |
virtual void | SetViewToCaudal () |
virtual void | SetStandardView (StandardView view) |
void | Fit () |
Fit Adjust the camera, so that the world bounding box is fully visible. More... | |
void | SetScaleFactorInMMPerDisplayUnit (ScalarType scale) |
Set the desired zoom-level to the absolute value given. More... | |
void | MoveCameraToPoint (const Point2D &planePoint) |
MoveCameraToPoint Move camera so that the point on the plane is in the view center. More... | |
void | MoveBy (const Vector2D &moveVectorInMM) |
void | Zoom (ScalarType factor, const Point2D &zoomPointInMM) |
Point2D | GetCameraPositionOnPlane () |
void | AdjustCameraToPlane () |
AdjustCameraToPlane Moves the camera of a 2D Renderwindow without panning or zooming, eg. only rotate the camera. More... | |
![]() | |
mitk::Stepper * | GetSlice () |
Get the Stepper through the slices. More... | |
mitk::Stepper * | GetTime () |
Get the Stepper through the time. More... | |
![]() | |
itkTypeMacroNoParent (OperationActor) virtual ~OperationActor() | |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
![]() | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
Protected Member Functions | |
CameraController () | |
Default Constructor. More... | |
~CameraController () override | |
Default Destructor. More... | |
ScalarType | ComputeMaxParallelScale () |
![]() | |
BaseController () | |
Default Constructor. More... | |
~BaseController () override | |
Default Destructor. More... | |
void | ExecuteOperation (Operation *) override |
Protected Attributes | |
const BaseRenderer * | m_Renderer |
![]() | |
Stepper::Pointer | m_Time |
Stepper::Pointer | m_Slice |
unsigned long | m_LastUpdateTime |
controls the camera used by the associated BaseRenderer
Subclass of BaseController. Controls the camera used by the associated BaseRenderer.
Definition at line 29 of file mitkCameraController.h.
typedef itk::SmartPointer<const Self> mitk::CameraController::ConstPointer |
Definition at line 42 of file mitkCameraController.h.
Definition at line 42 of file mitkCameraController.h.
Definition at line 42 of file mitkCameraController.h.
Definition at line 42 of file mitkCameraController.h.
Enumerator | |
---|---|
ANTERIOR | |
POSTERIOR | |
SINISTER | |
DEXTER | |
CRANIAL | |
CAUDAL |
Definition at line 32 of file mitkCameraController.h.
|
protected |
Default Constructor.
Definition at line 24 of file mitkCameraController.cpp.
|
overrideprotected |
Default Destructor.
Definition at line 28 of file mitkCameraController.cpp.
void mitk::CameraController::AdjustCameraToPlane | ( | ) |
AdjustCameraToPlane Moves the camera of a 2D Renderwindow without panning or zooming, eg. only rotate the camera.
Definition at line 248 of file mitkCameraController.cpp.
References ComputeMaxParallelScale(), mitk::BaseGeometry::GetAxisVector(), GetCameraPositionOnPlane(), mitk::BaseRenderer::GetCurrentWorldPlaneGeometry(), mitk::PlaneGeometry::GetNormal(), mitk::BaseGeometry::GetOrigin(), GetRenderer(), mitk::BaseRenderer::GetVtkRenderer(), and mitk::BaseRenderer::Standard2D.
Referenced by MoveCameraToPoint(), mitk::VtkPropRenderer::PrepareRender(), and mitk::BaseRenderer::SetConstrainZoomingAndPanning().
|
protected |
Definition at line 32 of file mitkCameraController.cpp.
References mitk::BaseRenderer::GetCurrentWorldPlaneGeometry(), mitk::BaseGeometry::GetExtentInMM(), GetRenderer(), mitk::BaseRenderer::GetViewportSize(), and mitk::BaseRenderer::GetViewportSizeInMM().
Referenced by AdjustCameraToPlane(), Fit(), and Zoom().
void mitk::CameraController::Fit | ( | ) |
Fit Adjust the camera, so that the world bounding box is fully visible.
Definition at line 318 of file mitkCameraController.cpp.
References ComputeMaxParallelScale(), mitk::BaseRenderer::GetCurrentWorldPlaneGeometry(), mitk::BaseGeometry::GetExtentInMM(), GetRenderer(), mitk::BaseRenderer::GetVtkRenderer(), MoveCameraToPoint(), and mitk::BaseRenderer::Standard2D.
Referenced by QmitkStdMultiWidget::Fit(), mitk::RenderingManager::InitializeView(), mitk::VtkPropRenderer::InitSize(), QmitkSliceWidget::InitWidget(), mitk::VtkPropRenderer::SetWorldGeometryToDataStorageBounds(), and QmitkSliceWidget::UpdateGL().
mitk::Point2D mitk::CameraController::GetCameraPositionOnPlane | ( | ) |
Definition at line 239 of file mitkCameraController.cpp.
References mitk::BaseRenderer::DisplayToPlane(), GetRenderer(), and mitk::BaseRenderer::GetVtkRenderer().
Referenced by AdjustCameraToPlane(), MoveBy(), and Zoom().
|
inlineoverridevirtual |
Reimplemented from mitk::BaseController.
Definition at line 42 of file mitkCameraController.h.
|
virtual |
Reimplemented from mitk::BaseController.
|
virtual |
|
inlinestatic |
Definition at line 42 of file mitkCameraController.h.
void mitk::CameraController::MoveBy | ( | const Vector2D & | moveVectorInMM | ) |
Definition at line 208 of file mitkCameraController.cpp.
References GetCameraPositionOnPlane(), and MoveCameraToPoint().
Referenced by mitk::DisplayInteractor::Move(), and mitk::DisplayActionEventFunctions::MoveCameraSynchronizedAction().
void mitk::CameraController::MoveCameraToPoint | ( | const Point2D & | planePoint | ) |
MoveCameraToPoint Move camera so that the point on the plane is in the view center.
planePoint |
Definition at line 200 of file mitkCameraController.cpp.
References AdjustCameraToPlane().
Referenced by QmitkStdMultiWidget::EnsureDisplayContainsPoint(), Fit(), MoveBy(), and Zoom().
|
static |
Referenced by mitk::BaseRenderer::BaseRenderer().
|
inline |
Definition at line 46 of file mitkCameraController.h.
References Fit().
void mitk::CameraController::SetScaleFactorInMMPerDisplayUnit | ( | ScalarType | scale | ) |
Set the desired zoom-level to the absolute value given.
Definition at line 335 of file mitkCameraController.cpp.
References GetRenderer(), mitk::BaseRenderer::GetVtkRenderer(), and mitk::BaseRenderer::Standard2D.
|
virtual |
Definition at line 138 of file mitkCameraController.cpp.
References ANTERIOR, CAUDAL, mitk::DataStorage::ComputeBoundingBox(), CRANIAL, DEXTER, mitk::BaseRenderer::GetDataStorage(), mitk::RenderingManager::GetInstance(), mitk::BaseRenderer::GetMapperID(), mitk::BaseRenderer::GetVtkRenderer(), m_Renderer, POSTERIOR, mitk::RenderingManager::RequestUpdateAll(), SINISTER, and mitk::BaseRenderer::Standard3D.
Referenced by SetViewToAnterior(), SetViewToCaudal(), SetViewToCranial(), SetViewToDexter(), SetViewToPosterior(), and SetViewToSinister().
|
virtual |
Definition at line 108 of file mitkCameraController.cpp.
References ANTERIOR, and SetStandardView().
Referenced by mitk::RenderingManager::InitializeView().
|
virtual |
Definition at line 133 of file mitkCameraController.cpp.
References CAUDAL, and SetStandardView().
|
virtual |
Definition at line 128 of file mitkCameraController.cpp.
References CRANIAL, and SetStandardView().
|
virtual |
Definition at line 123 of file mitkCameraController.cpp.
References DEXTER, and SetStandardView().
|
virtual |
Definition at line 113 of file mitkCameraController.cpp.
References POSTERIOR, and SetStandardView().
Referenced by QmitkPolhemusTrackerWidget::OnStartTracking().
|
virtual |
Definition at line 118 of file mitkCameraController.cpp.
References SetStandardView(), and SINISTER.
void mitk::CameraController::Zoom | ( | ScalarType | factor, |
const Point2D & | zoomPointInMM | ||
) |
Definition at line 213 of file mitkCameraController.cpp.
References ComputeMaxParallelScale(), mitk::eps, GetCameraPositionOnPlane(), GetRenderer(), mitk::BaseRenderer::GetVtkRenderer(), MoveCameraToPoint(), and mitk::BaseRenderer::Standard2D.
Referenced by mitk::DisplayActionEventFunctions::ZoomCameraSynchronizedAction().
|
protected |
Definition at line 95 of file mitkCameraController.h.
Referenced by SetStandardView().