Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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"
20 #include <QListWidget>
21 
27 {
28  Q_OBJECT
29 
30 public:
31  QmitkSimpleLabelSetListWidget(QWidget* parent = nullptr);
33 
34  using LabelVectorType = std::vector<mitk::Label::ConstPointer>;
35 
36  LabelVectorType SelectedLabels() const;
37  const mitk::LabelSetImage* GetLabelSetImage() const;
38 
39 signals:
40  void SelectedLabelsChanged(const LabelVectorType& selectedLabels);
41  void ActiveLayerChanged();
42 
43 public slots :
44  void SetLabelSetImage(const mitk::LabelSetImage* image);
45  void SetSelectedLabels(const LabelVectorType& selectedLabels);
46 
47 protected slots:
48 
49  void OnLabelSelectionChanged();
50 
51 protected:
52  void OnLayerChanged();
53  void OnLabelChanged(mitk::LabelSetImage::LabelValueType lv);
54 
55  void ResetList();
56 
58  QListWidget* m_LabelList;
59  bool m_Emmiting;
60 
64 };
65 
66 #endif
mitkLabel.h
MITKSEGMENTATIONUI_EXPORT
#define MITKSEGMENTATIONUI_EXPORT
Definition: MitkSegmentationUIExports.h:15
mitk::ITKEventObserverGuard
Convenience class that helps to manage the lifetime of itk event observers.
Definition: mitkITKEventObserverGuard.h:55
QmitkSimpleLabelSetListWidget::m_LabelRemovedObserver
mitk::ITKEventObserverGuard m_LabelRemovedObserver
Definition: QmitkSimpleLabelSetListWidget.h:63
QmitkSimpleLabelSetListWidget::m_LabelModifiedObserver
mitk::ITKEventObserverGuard m_LabelModifiedObserver
Definition: QmitkSimpleLabelSetListWidget.h:62
QmitkSimpleLabelSetListWidget
Widget that offers a simple list that displays all labels (color and name) in the active layer of a L...
Definition: QmitkSimpleLabelSetListWidget.h:26
QmitkSimpleLabelSetListWidget::m_LabelSetImage
mitk::LabelSetImage::ConstPointer m_LabelSetImage
Definition: QmitkSimpleLabelSetListWidget.h:57
QmitkSimpleLabelSetListWidget::m_LabelList
QListWidget * m_LabelList
Definition: QmitkSimpleLabelSetListWidget.h:58
QmitkSimpleLabelSetListWidget::LabelVectorType
std::vector< mitk::Label::ConstPointer > LabelVectorType
Definition: QmitkSimpleLabelSetListWidget.h:34
mitk::Image::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: mitkImage.h:80
MitkSegmentationUIExports.h
QmitkSimpleLabelSetListWidget::m_LabelAddedObserver
mitk::ITKEventObserverGuard m_LabelAddedObserver
Definition: QmitkSimpleLabelSetListWidget.h:61
QmitkSimpleLabelSetListWidget::m_Emmiting
bool m_Emmiting
Definition: QmitkSimpleLabelSetListWidget.h:59
mitkITKEventObserverGuard.h
mitk::LabelSetImage
LabelSetImage class for handling labels and layers in a segmentation session.
Definition: mitkLabelSetImage.h:43
mitk::LabelSetImage::LabelValueType
mitk::Label::PixelType LabelValueType
Definition: mitkLabelSetImage.h:75
mitkLabelSetImage.h