Skip to content

Commit fe82675

Browse files
author
Thomas Kilgus
committed
Clearing property list works if you remove the data nodes upon disconnect.
1 parent 457716f commit fe82675

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

Modules/ToFHardware/mitkToFCameraMITKPlayerDevice.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,7 @@ bool ToFCameraMITKPlayerDevice::DisconnectCamera()
6565
if (ok)
6666
{
6767
m_CameraConnected = false;
68-
// m_PropertyList->DeleteProperty("HasAmplitudeImage");
69-
// m_PropertyList->DeleteProperty("HasIntensityImage");
70-
// m_PropertyList->DeleteProperty("HasRGBImage");
71-
// m_PropertyList->DeleteProperty("DistanceImageFileName");
72-
// m_PropertyList->DeleteProperty("AmplitudeImageFileName");
73-
// m_PropertyList->DeleteProperty("IntensityImageFileName");
74-
// m_PropertyList->DeleteProperty("RGBImageFileName");
75-
// m_PropertyList->DeleteProperty("RGBImageHasDifferentResolution");
68+
m_PropertyList->Clear();
7669
}
7770
return ok;
7871
}

Modules/ToFUI/Qmitk/QmitkToFConnectionWidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void QmitkToFConnectionWidget::OnConnectCamera()
150150
{
151151
MITK_INFO<< "Kinect is connected here";
152152
//If the particular property is selected, the suitable data-node will be generated
153-
this->m_ToFImageGrabber->SetBoolProperty("RGB", m_Controls->m_KinectParameterWidget->IsAcquisitionModeRGB());//--------------------------------------------------------
153+
this->m_ToFImageGrabber->SetBoolProperty("RGB", m_Controls->m_KinectParameterWidget->IsAcquisitionModeRGB());
154154
this->m_ToFImageGrabber->SetBoolProperty("IR", m_Controls->m_KinectParameterWidget->IsAcquisitionModeIR());
155155
}
156156

Plugins/org.mitk.gui.qt.tofutil/src/internal/QmitkToFUtilView.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,16 @@ void QmitkToFUtilView::ResetGUIToDefault()
245245

246246
void QmitkToFUtilView::OnToFCameraDisconnected()
247247
{
248+
this->GetDataStorage()->Remove(m_DistanceImageNode);
249+
if(m_RGBImageNode)
250+
this->GetDataStorage()->Remove(m_RGBImageNode);
251+
if(m_AmplitudeImageNode)
252+
this->GetDataStorage()->Remove(m_AmplitudeImageNode);
253+
if(m_IntensityImageNode)
254+
this->GetDataStorage()->Remove(m_IntensityImageNode);
255+
if(m_SurfaceNode)
256+
this->GetDataStorage()->Remove(m_SurfaceNode);
257+
248258
m_Controls->m_ToFRecorderWidget->OnStop();
249259
m_Controls->m_ToFRecorderWidget->setEnabled(false);
250260
m_Controls->m_ToFVisualisationSettingsWidget->setEnabled(false);

0 commit comments

Comments
 (0)