Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
QmitkSimpleLabelSetListWidget.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkSimpleLabelSetListWidget_h
14 #define QmitkSimpleLabelSetListWidget_h
15 
16 #include "mitkLabel.h"
17 #include "mitkLabelSetImage.h"
19 #include <QListWidget>
20 
26 {
27  Q_OBJECT
28 
29 public:
30  QmitkSimpleLabelSetListWidget(QWidget* parent = nullptr);
32 
33  using LabelVectorType = std::vector<mitk::Label::ConstPointer>;
34 
35  LabelVectorType SelectedLabels() const;
36  const mitk::LabelSetImage* GetLabelSetImage() const;
37 
38 signals:
39  void SelectedLabelsChanged(const LabelVectorType& selectedLabels);
40  void ActiveLayerChanged();
41 
42 public slots :
43  void SetLabelSetImage(const mitk::LabelSetImage* image);
44  void SetSelectedLabels(const LabelVectorType& selectedLabels);
45 
46 protected slots:
47 
48  void OnLabelSelectionChanged();
49 
50 protected:
51  void OnLayerChanged();
52  void OnLabelChanged(mitk::LabelSetImage::LabelValueType lv);
53 
54  void OnLooseLabelSetConnection();
55  void OnEstablishLabelSetConnection();
56 
57  void ResetList();
58 
60  QListWidget* m_LabelList;
61  bool m_Emmiting;
62 };
63 
64 #endif
mitkLabel.h
MITKSEGMENTATIONUI_EXPORT
#define MITKSEGMENTATIONUI_EXPORT
Definition: MitkSegmentationUIExports.h:15
itk::SmartPointer< const Self >
QmitkSimpleLabelSetListWidget
Widget that offers a simple list that displays all labels (color and name) in the active layer of a L...
Definition: QmitkSimpleLabelSetListWidget.h:25
QmitkSimpleLabelSetListWidget::m_LabelSetImage
mitk::LabelSetImage::ConstPointer m_LabelSetImage
Definition: QmitkSimpleLabelSetListWidget.h:59
QmitkSimpleLabelSetListWidget::m_LabelList
QListWidget * m_LabelList
Definition: QmitkSimpleLabelSetListWidget.h:60
QmitkSimpleLabelSetListWidget::LabelVectorType
std::vector< mitk::Label::ConstPointer > LabelVectorType
Definition: QmitkSimpleLabelSetListWidget.h:33
MitkSegmentationUIExports.h
QmitkSimpleLabelSetListWidget::m_Emmiting
bool m_Emmiting
Definition: QmitkSimpleLabelSetListWidget.h:61
mitk::LabelSetImage
LabelSetImage class for handling labels and layers in a segmentation session.
Definition: mitkLabelSetImage.h:29
mitk::LabelSetImage::LabelValueType
mitk::Label::PixelType LabelValueType
Definition: mitkLabelSetImage.h:62
mitkLabelSetImage.h