Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmitkToFVisualisationSettingsWidget.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 QmitkToFVisualisationSettingsWidget_h
14 #define QmitkToFVisualisationSettingsWidget_h
15 
16 #include <MitkToFUIExports.h>
17 #include "ui_QmitkToFVisualisationSettingsWidgetControls.h"
18 
19 #include "mitkDataNode.h"
20 // QT headers
21 #include <QWidget>
22 // vtk includes
23 #include <vtkColorTransferFunction.h>
24 
32 class MITKTOFUI_EXPORT QmitkToFVisualisationSettingsWidget :public QWidget
33 {
34 
35  //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
36  Q_OBJECT
37 
38  public:
39 
40  static const std::string VIEW_ID;
41 
42  QmitkToFVisualisationSettingsWidget (QWidget* p = nullptr, Qt::WindowFlags f1 = nullptr);
44 
45  /* @brief This method is part of the widget an needs not to be called seperately. */
46  virtual void CreateQtPartControl(QWidget *parent);
47  /* @brief This method is part of the widget an needs not to be called seperately. (Creation of the connections of main and control widget.)*/
48  virtual void CreateConnections();
56  void Initialize(mitk::DataNode* distanceImageNode=nullptr, mitk::DataNode* amplitudeImageNode=nullptr,
57  mitk::DataNode* intensityImageNode=nullptr, mitk::DataNode* surfaceNode=nullptr);
58 
63  vtkColorTransferFunction* GetWidget1ColorTransferFunction();
68  vtkColorTransferFunction* GetWidget2ColorTransferFunction();
73  vtkColorTransferFunction* GetWidget3ColorTransferFunction();
78  vtkColorTransferFunction* GetSelectedColorTransferFunction();
82  int GetSelectedImageIndex();
83 
84 protected slots:
85  void OnShowAdvancedOptionsCheckboxChecked(bool checked);
86 
87  void OnSetXValueColor();
91  void OnResetSlider();
95  void OnSpanChanged (int lower, int upper);
99  void OnTransferFunctionReset();
103  void OnWidgetSelected(int index);
107  void OnRangeSliderMaxChanged();
111  void OnRangeSliderMinChanged();
115  void OnTransferFunctionTypeSelected(int index);
116 
117  protected:
118 
122  void UpdateCanvas();
126  void UpdateRanges();
127 
128  Ui::QmitkToFVisualisationSettingsWidgetControls* m_Controls;
129 
132 
137 
138  vtkColorTransferFunction* m_Widget1ColorTransferFunction;
139  vtkColorTransferFunction* m_Widget2ColorTransferFunction;
140  vtkColorTransferFunction* m_Widget3ColorTransferFunction;
141 
145 
146  private:
147 
151  void UpdateSurfaceProperty();
152 
153 
161  void ResetTransferFunction(vtkColorTransferFunction* colorTransferFunction, int type, double min, double max);
167  void ReinitTransferFunction(int widget, int type);
168 };
169 
170 #endif
QmitkToFVisualisationSettingsWidget::m_Widget3TransferFunctionType
int m_Widget3TransferFunctionType
member holding the type of the transfer function applied to the image shown in widget 3 (intensity im...
Definition: QmitkToFVisualisationSettingsWidget.h:144
QmitkToFVisualisationSettingsWidget::m_MitkSurfaceNode
mitk::DataNode::Pointer m_MitkSurfaceNode
DataNode holding the surface.
Definition: QmitkToFVisualisationSettingsWidget.h:136
QmitkToFVisualisationSettingsWidget::m_MitkDistanceImageNode
mitk::DataNode::Pointer m_MitkDistanceImageNode
DataNode holding the range image of the ToF camera as set by Initialize()
Definition: QmitkToFVisualisationSettingsWidget.h:133
itk::SmartPointer< Self >
QmitkToFVisualisationSettingsWidget::m_Widget1ColorTransferFunction
vtkColorTransferFunction * m_Widget1ColorTransferFunction
vtkColorTransferFunction of widget 1 (distance) that can be used to define a TransferFunctionProperty
Definition: QmitkToFVisualisationSettingsWidget.h:138
QmitkToFVisualisationSettingsWidget
Definition: QmitkToFVisualisationSettingsWidget.h:32
QmitkToFVisualisationSettingsWidget::m_Controls
Ui::QmitkToFVisualisationSettingsWidgetControls * m_Controls
Definition: QmitkToFVisualisationSettingsWidget.h:128
QmitkToFVisualisationSettingsWidget::m_Widget3ColorTransferFunction
vtkColorTransferFunction * m_Widget3ColorTransferFunction
vtkColorTransferFunction of widget 3 (intensity) that can be used to define a TransferFunctionPropert...
Definition: QmitkToFVisualisationSettingsWidget.h:140
QmitkToFVisualisationSettingsWidget::m_RangeSliderMin
int m_RangeSliderMin
Minimal value of the transfer function range. Initialized to the minimal value of the corresponding i...
Definition: QmitkToFVisualisationSettingsWidget.h:130
mitkDataNode.h
QmitkToFVisualisationSettingsWidget::m_MitkIntensityImageNode
mitk::DataNode::Pointer m_MitkIntensityImageNode
DataNode holding the intensity image of the ToF camera as set by Initialize()
Definition: QmitkToFVisualisationSettingsWidget.h:135
QmitkToFVisualisationSettingsWidget::m_MitkAmplitudeImageNode
mitk::DataNode::Pointer m_MitkAmplitudeImageNode
DataNode holding the amplitude image of the ToF camera as set by Initialize()
Definition: QmitkToFVisualisationSettingsWidget.h:134
QmitkToFVisualisationSettingsWidget::m_Widget2TransferFunctionType
int m_Widget2TransferFunctionType
member holding the type of the transfer function applied to the image shown in widget 2 (amplitude im...
Definition: QmitkToFVisualisationSettingsWidget.h:143
QmitkToFVisualisationSettingsWidget::VIEW_ID
static const std::string VIEW_ID
Definition: QmitkToFVisualisationSettingsWidget.h:40
QmitkToFVisualisationSettingsWidget::m_RangeSliderMax
int m_RangeSliderMax
Maximal value of the transfer function range. Initialized to the maximal value of the corresponding i...
Definition: QmitkToFVisualisationSettingsWidget.h:131
QmitkToFVisualisationSettingsWidget::m_Widget2ColorTransferFunction
vtkColorTransferFunction * m_Widget2ColorTransferFunction
vtkColorTransferFunction of widget 2 (amplitude) that can be used to define a TransferFunctionPropert...
Definition: QmitkToFVisualisationSettingsWidget.h:139
QmitkToFVisualisationSettingsWidget::m_Widget1TransferFunctionType
int m_Widget1TransferFunctionType
member holding the type of the transfer function applied to the image shown in widget 1 (distance ima...
Definition: QmitkToFVisualisationSettingsWidget.h:142
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63