MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkToFUtilView.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef QmitkToFUtilView_h
14#define QmitkToFUtilView_h
15
16#include <QmitkAbstractView.h>
17#include <berryIWorkbenchPartReference.h>
18#include <mitkIZombieViewPart.h>
19
20
21#include <ui_QmitkToFUtilViewControls.h>
22
23class QTimer;
24
25#include <mitkRealTimeClock.h>
26#include <mitkToFImageGrabber.h>
28#include <mitkSurface.h>
33
47class QmitkToFUtilView : public QmitkAbstractView, public mitk::IZombieViewPart
48{
49 // this is needed for all Qt objects that should have a Qt meta-object
50 // (everything that derives from QObject and wants to have signal/slots)
51 Q_OBJECT
52
53public:
54
55 static const std::string VIEW_ID;
56
58 ~QmitkToFUtilView() override;
59
60 void CreateQtPartControl(QWidget *parent) override;
62 void Activated() override;
64 void ActivatedZombieView(berry::IWorkbenchPartReference::Pointer zombieView) override;
65
66 void Deactivated() override;
67 void Visible() override;
68 void Hidden() override;
69
70 void SetFocus() override;
71
72protected slots:
73
77 void OnUpdateCamera();
89 void OnToFCameraStarted();
93 void OnToFCameraStopped();
94
98 void OnChangeCoronalWindowOutput(int index);
103
104protected:
105
110 void UseToFVisibilitySettings(bool useToF);
111
112 Ui::QmitkToFUtilViewControls* m_Controls;
113
115
116 QTimer* m_Frametimer;
117
119
120 mitk::Image::Pointer m_MitkDistanceImage;
121 mitk::Image::Pointer m_MitkAmplitudeImage;
122 mitk::Image::Pointer m_MitkIntensityImage;
123 mitk::Surface::Pointer m_Surface;
124
125 mitk::DataNode::Pointer m_DistanceImageNode;
126 mitk::DataNode::Pointer m_AmplitudeImageNode;
127 mitk::DataNode::Pointer m_IntensityImageNode;
128 mitk::DataNode::Pointer m_RGBImageNode;
129 mitk::DataNode::Pointer m_SurfaceNode;
130
131 // ToF processing and recording filter
132 mitk::ToFImageRecorder::Pointer m_ToFImageRecorder;
133 mitk::ToFImageGrabber::Pointer m_ToFImageGrabber;
134 mitk::ToFDistanceImageToSurfaceFilter::Pointer m_ToFDistanceImageToSurfaceFilter;
135 mitk::ToFCompositeFilter::Pointer m_ToFCompositeFilter;
136
138 // members for calculating the frame rate
139 mitk::RealTimeClock::Pointer m_RealTimeClock;
143
144 mitk::CameraIntrinsics::Pointer m_CameraIntrinsics;
145private:
146
153 mitk::DataNode::Pointer ReplaceNodeData(std::string nodeName, mitk::BaseData* data);
154
155 void ProcessVideoTransform();
156
160 void ResetGUIToDefault();
161};
162
163#endif
QmitkToFUtilView.
static const std::string VIEW_ID
bool m_Framerateoutput
defines if the framerate is computed condinously
void OnChangeCoronalWindowOutput(int index)
Slot invoked when user alters the coronal window input from RGB to Intensity or vice versa.
void UseToFVisibilitySettings(bool useToF)
initialize the visibility settings of ToF data (images + surface)
mitk::DataNode::Pointer m_RGBImageNode
DataNode holding the rgb image of the selected camera.
void OnToFCameraConnected()
Slot called when the "Connect" button of the ConnectionWidget is pressed.
void OnToFCameraStarted()
Slot called when the "Start" button of the RecorderWidget is pressed.
mitk::ToFImageGrabber::Pointer m_ToFImageGrabber
Source of a ToF image processing pipeline. Provides pointers to distance, amplitude and intensity ima...
mitk::ToFDistanceImageToSurfaceFilter::Pointer m_ToFDistanceImageToSurfaceFilter
Filter for calculating a surface representation from a given distance image.
mitk::DataNode::Pointer m_DistanceImageNode
DataNode holding the distance image of the selected camera.
mitk::Image::Pointer m_MitkIntensityImage
member holding a pointer to the intensity image of the selected camera
void Deactivated() override
mitk::Image::Pointer m_MitkDistanceImage
member holding a pointer to the distance image of the selected camera
void OnUpdateCamera()
Slot triggered from the timer to update the images and visualization.
void Hidden() override
mitk::ToFImageRecorder::Pointer m_ToFImageRecorder
ToF image recorder used for lossless recording of ToF image data.
int m_StepsForFramerate
number of steps used for calculating the display framerate
mitk::RealTimeClock::Pointer m_RealTimeClock
real time clock used to calculate the display framerate
QString m_SelectedCamera
String holding the selected camera.
void SetFocus() override
double m_2DTimeAfter
holds the time stamp at the end of the display framerate measurement
Ui::QmitkToFUtilViewControls * m_Controls
void OnToFCameraStopped()
Slot called when the "Stop" button of the RecorderWidget is pressed.
~QmitkToFUtilView() override
void OnToFCameraDisconnected()
Slot called when the "Disconnect" button of the ConnectionWidget is pressed.
mitk::Image::Pointer m_MitkAmplitudeImage
member holding a pointer to the amplitude image of the selected camera
void OnKinectAcquisitionModeChanged()
Slot invoked when acquisition mode of Kinect is changed.
mitk::ToFCompositeFilter::Pointer m_ToFCompositeFilter
Filter combining several processing steps (thresholding, Median filtering, Bilateral filtering)
int m_2DDisplayCount
member used to determine whether frame rate output should be shown
void CreateQtPartControl(QWidget *parent) override
mitk::DataNode::Pointer m_IntensityImageNode
DataNode holding the intensity image of the selected camera.
QTimer * m_Frametimer
Timer used to continuously update the images.
mitk::Surface::Pointer m_Surface
member holding a pointer to the surface generated from the distance image of the selected camera
double m_2DTimeBefore
holds the time stamp at the beginning of the display framerate measurement
void Activated() override
Called when the view gets activated.
void ActivatedZombieView(berry::IWorkbenchPartReference::Pointer zombieView) override
Called when the view gets deactivated. In this case the zombie view of this view becomes active!
void Visible() override
mitk::CameraIntrinsics::Pointer m_CameraIntrinsics
member holding the intrinsic parameters of the camera
mitk::DataNode::Pointer m_AmplitudeImageNode
DataNode holding the amplitude image of the selected camera.
mitk::DataNode::Pointer m_SurfaceNode
DataNode holding the surface generated from the distanc image of the selected camera.