MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkKinectParameterWidget.cpp
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
14
15const std::string QmitkKinectParameterWidget::VIEW_ID = "org.mitk.views.qmitkkinectparameterwidget";
16
17QmitkKinectParameterWidget::QmitkKinectParameterWidget(QWidget* p, Qt::WindowFlags f): QWidget(p, f)
18{
19 m_ToFImageGrabber = nullptr;
20 m_Controls = nullptr;
22}
23
27
29{
30 if (!m_Controls)
31 {
32 // create GUI widgets
33 m_Controls = new Ui::QmitkKinectParameterWidgetControls;
34 m_Controls->setupUi(parent);
35
36 this->CreateConnections();
37 }
38}
39
41{
42 if ( m_Controls )
43 {
44 connect( m_Controls->m_RGB, SIGNAL(toggled(bool)), this, SLOT(OnAcquisitionModeChanged()) );
45 connect( m_Controls->m_IR, SIGNAL(toggled(bool)), this, SLOT(OnAcquisitionModeChanged()) );
46 connect( m_Controls->m_RGB, SIGNAL(toggled(bool)), this, SIGNAL(AcquisitionModeChanged()) );
47 connect( m_Controls->m_IR, SIGNAL(toggled(bool)), this, SIGNAL(AcquisitionModeChanged()) );
48 }
49}
50
55
57{
58 this->m_ToFImageGrabber = aToFImageGrabber;
59}
60
65
67{
68 if (m_ToFImageGrabber.IsNotNull())
69 {
70 if (!m_ToFImageGrabber->IsCameraConnected())
71 {
72 this->m_ToFImageGrabber->SetBoolProperty("RGB", m_Controls->m_RGB->isChecked());
73 this->m_ToFImageGrabber->SetBoolProperty("IR", m_Controls->m_IR->isChecked());
74 }
75 else
76 {
77 MITK_WARN << "Kinect Acquisition mode cannot be changed, if the device is connected. Please disconnect first.";
78 }
79 }
80}
81
83{
84 return m_Controls->m_RGB->isChecked();
85}
86
88{
89 return m_Controls->m_IR->isChecked();
90}
91
mitk::ToFImageGrabber * GetToFImageGrabber()
returns the ToFImageGrabber
mitk::ToFImageGrabber::Pointer m_ToFImageGrabber
image grabber object to be configured by the widget
Ui::QmitkKinectParameterWidgetControls * m_Controls
member holding the UI elements of this widget
void SetToFImageGrabber(mitk::ToFImageGrabber *aToFImageGrabber)
sets the ToFImageGrabber
virtual void CreateQtPartControl(QWidget *parent)
QmitkKinectParameterWidget(QWidget *p=nullptr, Qt::WindowFlags f={})
void ActivateAllParameters()
activate camera settings according to the parameters from GUI
Image source providing ToF images. Interface for filters provided in ToFProcessing module.