MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkUSZoneManagementWidget.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#ifndef QmitkUSZoneManagementWidget_h
13#define QmitkUSZoneManagementWidget_h
14
15#include <QWidget>
16#include "mitkDataStorage.h"
17
18namespace itk {
19template<class T> class SmartPointer;
20}
21
22namespace mitk {
23class USZonesInteractor;
24}
25
26namespace Ui {
28}
29
31class QItemSelection;
32class QModelIndex;
33
43class QmitkUSZoneManagementWidget : public QWidget
44{
45 Q_OBJECT
46
47signals:
51 void ZoneAdded();
52
57
58public slots:
62 void RemoveSelectedRows();
63
69 void OnStartAddingZone();
70
74 void OnAbortAddingZone();
75
79 void OnResetZones();
80
81protected slots:
82 void OnSelectionChanged(const QItemSelection& selected, const QItemSelection & deselected);
83
88 void OnZoneSizeSliderValueChanged(int value);
89
94 void OnRowInsertion(const QModelIndex& parent, int start, int end);
95
100 void OnDataChanged(const QModelIndex& topLeft, const QModelIndex& /*bottomRight*/);
101
102public:
103 explicit QmitkUSZoneManagementWidget(QWidget* parent = nullptr);
105
110 void SetStateMachineFilename(const std::string& filename);
111
119 void SetDataStorage(mitk::DataStorage::Pointer dataStorage, const char* baseNodeName = "Zones");
120
128 void SetDataStorage(mitk::DataStorage::Pointer dataStorage, itk::SmartPointer<mitk::DataNode> baseNode);
129
133 mitk::DataStorage::SetOfObjects::ConstPointer GetZoneNodes();
134
135protected:
137
139 mitk::DataStorage::Pointer m_DataStorage;
140 mitk::DataNode::Pointer m_BaseNode;
141
143
144private:
145 Ui::QmitkUSZoneManagementWidget* ui;
146
147 unsigned int m_CurMaxNumOfZones;
148};
149
150#endif
Shows a table of the zone nodes and allows to change properties and add and delete zone nodes.
void ZoneRemoved()
Emitted whenever a new zone was removed from the data mode.
void SetDataStorage(mitk::DataStorage::Pointer dataStorage, itk::SmartPointer< mitk::DataNode > baseNode)
Setter for the DataStorage where the zone nodes will be stored. The nodes will be derivates of the ba...
void OnRowInsertion(const QModelIndex &parent, int start, int end)
Updates maximum number of added zones and selects the last row of the table. It is called every time ...
void OnZoneSizeSliderValueChanged(int value)
Updates zone radius according to the value of the zone size slider.
mitk::DataStorage::Pointer m_DataStorage
mitk::DataStorage::SetOfObjects::ConstPointer GetZoneNodes()
Get all zone nodes from the data storage.
void SetStateMachineFilename(const std::string &filename)
Sets the state machine file for being used by the mitk::USZonesInteractor.
void OnDataChanged(const QModelIndex &topLeft, const QModelIndex &)
Updates the zone size slider when data was changed. It is called every time a row was changed in the ...
void RemoveSelectedRows()
Removes all rows from the data model which are selected in the table.
QmitkUSZoneManagementWidget(QWidget *parent=nullptr)
void SetDataStorage(mitk::DataStorage::Pointer dataStorage, const char *baseNodeName="Zones")
Setter for the DataStorage where the zone nodes will be stored. The nodes will be derivates of the no...
void OnAbortAddingZone()
Aborts the creation of a new zone and deletes the corresponding node.
void OnSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
void OnStartAddingZone()
Creates a new zone node and activates the data interactor on this node. This slot has to be called wh...
void ZoneAdded()
Emitted whenever a new zone was added to the data model.
itk::SmartPointer< mitk::USZonesInteractor > m_Interactor
void OnResetZones()
Removes all nodes from the data model.
Implementation of the QAbstractTableModel for ultrasound risk zones. This class manages the data mode...
IGT Exceptions.