NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Derived from niftk::Single3DViewWidget to provide a widget that given a video image, will render it at video frame rate into both the foreground and the background layer, and additionally merge VTK renderings. More...
Public Member Functions | |
SingleVideoWidget (QWidget *parent=0, Qt::WindowFlags f=0, mitk::RenderingManager *renderingManager=0) | |
virtual | ~SingleVideoWidget () |
virtual void | SetDataStorage (mitk::DataStorage *ds) override |
Stores ds in base-class and sets it on the niftk::BitmapOverlay. More... | |
virtual void | SetImageNode (mitk::DataNode *node) override |
Overrides base class to set the selected node on the niftk::BitmapOverlay. More... | |
virtual void | Update () override |
Called from base class and gives us an opportunity to update renderings etc. More... | |
void | SetUseOverlay (const bool &b) |
If true, will enable the bitmap overlay, if false, will disable it. More... | |
void | SetTransformNode (const mitk::DataNode *node) |
Sets a node, which should contain a niftk::CoordinateAxesData, which is used for moving the camera around. More... | |
float | GetOpacity () const |
Retrieves the opacity from the niftk::BitmapOverlayWidget. More... | |
void | SetOpacity (const float &value) |
Sets the opacity on the niftk::BitmapOverlayWidget. More... | |
void | SetEyeHandFileName (const std::string &fileName) |
If specified, will attempt to load the given file, and will assume that the provided transform is a tracking matrix, and calculate the camera-to-world transformation. More... | |
Public Member Functions inherited from niftk::Single3DViewWidget | |
Single3DViewWidget (QWidget *parent=0, Qt::WindowFlags f=0, mitk::RenderingManager *renderingManager=0) | |
virtual | ~Single3DViewWidget () |
QmitkRenderWindow * | GetRenderWindow () const |
Returns a pointer to the contained QmitkRenderWindow. More... | |
void | EnableGradientBackground () |
Calls mitk::GradientBackground::EnableGradientBackground(). More... | |
void | DisableGradientBackground () |
Calls mitk::GradientBackground::DisableGradientBackground(). More... | |
void | SetGradientBackgroundColors (const mitk::Color &upper, const mitk::Color &lower) |
Calls mitk::GradientBackground::SetGradientColors(). More... | |
void | EnableDepartmentLogo () |
Calls niftk::CMICLogo::EnableDepartmentLogo(), and is currently unused. More... | |
void | DisableDepartmentLogo () |
Calls niftk::CMICLogo::DisableDepartmentLogo(), and is currently unused. More... | |
void | SetDepartmentLogoPath (const QString &path) |
Calls niftk::CMICLogo::SetDepartmentLogoPath(), and is currently unused. More... | |
void | SetClippingRange (const double &near, const double &far) |
Sets the clipping range, which derived classes use in different ways. More... | |
Protected Member Functions | |
virtual void | NodeRemoved (const mitk::DataNode *node) override |
Called when a DataStorage Node Removed Event was emitted. More... | |
virtual void | NodeChanged (const mitk::DataNode *node) override |
Called when a DataStorage Node Changes Event was emitted. More... | |
virtual void | NodeAdded (const mitk::DataNode *node) override |
Called when a DataStorage Node Added Event was emitted. More... | |
virtual void | resizeEvent (QResizeEvent *event) override |
Re-implemented so we can correctly scale image while resizeing. More... | |
Additional Inherited Members | |
Protected Attributes inherited from niftk::Single3DViewWidget | |
mitk::DataStorage::Pointer | m_DataStorage |
mitk::Image::Pointer | m_Image |
mitk::DataNode::Pointer | m_ImageNode |
double | m_ClippingRange [2] |
Derived from niftk::Single3DViewWidget to provide a widget that given a video image, will render it at video frame rate into both the foreground and the background layer, and additionally merge VTK renderings.
According to VTK documentation, layers that are not the absolute background should have a transparent background. So, by placing the VTK rendering in a layer that is NOT the background, then the black background colour should be transparent black. Then we also render the video into the foreground to try and blend over it.
In addition, this class can perform rendering, as if through a calibrated camera, such as may be obtained view an OpenCV (Zhang 2000) camera model. If the camera intrinsic parameters are found as a data node on the specified image, then the camera switches to a calibrated camera, and otherwise will assume the default VTK behaviour implemented in vtkOpenGLCamera. This only does the intrinsics, not the distortion parameters. So the supplied video should already be distortion corrected. The rendered VTK world should be distortion corrected world.
niftk::SingleVideoWidget::SingleVideoWidget | ( | QWidget * | parent = 0 , |
Qt::WindowFlags | f = 0 , |
||
mitk::RenderingManager * | renderingManager = 0 |
||
) |
|
virtual |
float niftk::SingleVideoWidget::GetOpacity | ( | ) | const |
Retrieves the opacity from the niftk::BitmapOverlayWidget.
|
overrideprotectedvirtual |
Called when a DataStorage Node Added Event was emitted.
Reimplemented from niftk::Single3DViewWidget.
|
overrideprotectedvirtual |
Called when a DataStorage Node Changes Event was emitted.
Reimplemented from niftk::Single3DViewWidget.
|
overrideprotectedvirtual |
Called when a DataStorage Node Removed Event was emitted.
Reimplemented from niftk::Single3DViewWidget.
|
overrideprotectedvirtual |
Re-implemented so we can correctly scale image while resizeing.
Reimplemented from niftk::Single3DViewWidget.
|
overridevirtual |
Stores ds in base-class and sets it on the niftk::BitmapOverlay.
Reimplemented from niftk::Single3DViewWidget.
void niftk::SingleVideoWidget::SetEyeHandFileName | ( | const std::string & | fileName | ) |
If specified, will attempt to load the given file, and will assume that the provided transform is a tracking matrix, and calculate the camera-to-world transformation.
|
overridevirtual |
Overrides base class to set the selected node on the niftk::BitmapOverlay.
Reimplemented from niftk::Single3DViewWidget.
void niftk::SingleVideoWidget::SetOpacity | ( | const float & | value | ) |
Sets the opacity on the niftk::BitmapOverlayWidget.
value | [0..1] |
void niftk::SingleVideoWidget::SetTransformNode | ( | const mitk::DataNode * | node | ) |
Sets a node, which should contain a niftk::CoordinateAxesData, which is used for moving the camera around.
For example, if this viewer is to render like a tracked laparoscope, then this transform node should represent the world-to-camera (i.e. tracker-to-hand, followed by hand-to-eye/camera) transform.
void niftk::SingleVideoWidget::SetUseOverlay | ( | const bool & | b | ) |
If true, will enable the bitmap overlay, if false, will disable it.
Called from base class and gives us an opportunity to update renderings etc.
Implements niftk::Single3DViewWidget.