Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
GUI for mitk::BinaryThresholdTool. More...
#include <QmitkBinaryThresholdToolGUI.h>
Signals | |
void | thresholdAccepted () |
Emitted when threshold Accepted. More... | |
void | thresholdCanceled () |
Emitted when threshold Canceled. More... | |
Signals inherited from QmitkToolGUI | |
void | NewToolAssociated (mitk::Tool *) |
Public Member Functions | |
mitkClassMacro (QmitkBinaryThresholdToolGUI, QmitkToolGUI) | |
Pointer | Clone () const |
void | OnThresholdingIntervalBordersChanged (double lower, double upper, bool isFloat) |
void | OnThresholdingValueChanged (double current) |
Public Member Functions inherited from QmitkToolGUI | |
mitkClassMacroItkParent (QmitkToolGUI, itk::Object) | |
void | SetTool (mitk::Tool *tool) |
virtual void | Register () const override |
virtual void | UnRegister () const ITK_NOEXCEPT ITK_OVERRIDE |
virtual void | SetReferenceCount (int) override |
virtual | ~QmitkToolGUI () |
Static Public Member Functions | |
static Pointer | New () |
Protected Slots | |
void | OnNewToolAssociated (mitk::Tool *) |
void | OnAcceptThresholdPreview () |
void | OnSpinnerValueChanged () |
Called when Spinner value has changed. Consider: Spinner contains DOUBLE values. More... | |
void | OnSliderValueChanged (int value) |
Called when Slider value has changed. Consider: Slider contains INT values. More... | |
Protected Member Functions | |
QmitkBinaryThresholdToolGUI () | |
virtual | ~QmitkBinaryThresholdToolGUI () |
double | SliderIntToDouble (int val) |
When Slider (int value) has changed, we need to convert it to a respective double value for the spinner. More... | |
int | DoubleToSliderInt (double val) |
When Spinner (double value) has changed, we need to convert it to a respective int value for the slider. More... | |
Protected Member Functions inherited from QmitkToolGUI | |
virtual void | BusyStateChanged (bool) |
Protected Attributes | |
QSlider * | m_Slider |
QDoubleSpinBox * | m_Spinner |
bool | m_isFloat |
is image float or int? More... | |
double | m_RangeMin |
double | m_RangeMax |
double | m_Range |
bool | m_ChangingSlider |
helper bool values to find out, which of the GUI elements has been touched by the user. More... | |
bool | m_ChangingSpinner |
mitk::BinaryThresholdTool::Pointer | m_BinaryThresholdTool |
Protected Attributes inherited from QmitkToolGUI | |
mitk::Tool::Pointer | m_Tool |
GUI for mitk::BinaryThresholdTool.
This GUI shows a slider to change the tool's threshold and an OK button to accept a preview for actual thresholding.
There is only a slider for INT values in QT. So, if the working image has a float/double pixeltype, we need to convert the original float intensity into a respective int value for the slider. The slider range is then between 0 and 99.
If the pixeltype is INT, then we do not need any conversion.
Last contributor: $Author$
Definition at line 40 of file QmitkBinaryThresholdToolGUI.h.
|
protected |
Definition at line 28 of file QmitkBinaryThresholdToolGUI.cpp.
|
protectedvirtual |
Definition at line 76 of file QmitkBinaryThresholdToolGUI.cpp.
References m_BinaryThresholdTool, OnThresholdingIntervalBordersChanged(), and OnThresholdingValueChanged().
Pointer QmitkBinaryThresholdToolGUI::Clone | ( | ) | const |
|
protected |
When Spinner (double value) has changed, we need to convert it to a respective int value for the slider.
Definition at line 205 of file QmitkBinaryThresholdToolGUI.cpp.
References m_isFloat, m_Range, and m_RangeMin.
Referenced by OnSpinnerValueChanged(), and OnThresholdingValueChanged().
QmitkBinaryThresholdToolGUI::mitkClassMacro | ( | QmitkBinaryThresholdToolGUI | , |
QmitkToolGUI | |||
) |
|
static |
|
protectedslot |
Definition at line 138 of file QmitkBinaryThresholdToolGUI.cpp.
References QmitkConfirmSegmentationDialog::CANCEL_SEGMENTATION, QmitkConfirmSegmentationDialog::CREATE_NEW_SEGMENTATION, m_BinaryThresholdTool, QmitkConfirmSegmentationDialog::OVERWRITE_SEGMENTATION, QmitkConfirmSegmentationDialog::SetSegmentationName(), and thresholdAccepted().
|
protectedslot |
Definition at line 89 of file QmitkBinaryThresholdToolGUI.cpp.
References m_BinaryThresholdTool, OnThresholdingIntervalBordersChanged(), and OnThresholdingValueChanged().
|
protectedslot |
Called when Slider value has changed. Consider: Slider contains INT values.
Definition at line 126 of file QmitkBinaryThresholdToolGUI.cpp.
References m_BinaryThresholdTool, m_ChangingSlider, m_ChangingSpinner, m_Spinner, and SliderIntToDouble().
|
protectedslot |
Called when Spinner value has changed. Consider: Spinner contains DOUBLE values.
Definition at line 112 of file QmitkBinaryThresholdToolGUI.cpp.
References DoubleToSliderInt(), m_BinaryThresholdTool, m_ChangingSlider, m_ChangingSpinner, m_Slider, and m_Spinner.
void QmitkBinaryThresholdToolGUI::OnThresholdingIntervalBordersChanged | ( | double | lower, |
double | upper, | ||
bool | isFloat | ||
) |
Definition at line 165 of file QmitkBinaryThresholdToolGUI.cpp.
References m_isFloat, m_Range, m_RangeMax, m_RangeMin, m_Slider, and m_Spinner.
Referenced by OnNewToolAssociated(), and ~QmitkBinaryThresholdToolGUI().
void QmitkBinaryThresholdToolGUI::OnThresholdingValueChanged | ( | double | current | ) |
Definition at line 187 of file QmitkBinaryThresholdToolGUI.cpp.
References DoubleToSliderInt(), m_Slider, and m_Spinner.
Referenced by OnNewToolAssociated(), and ~QmitkBinaryThresholdToolGUI().
|
protected |
When Slider (int value) has changed, we need to convert it to a respective double value for the spinner.
Definition at line 193 of file QmitkBinaryThresholdToolGUI.cpp.
References m_isFloat, m_Range, and m_RangeMin.
Referenced by OnSliderValueChanged().
|
signal |
Emitted when threshold Accepted.
Referenced by OnAcceptThresholdPreview().
|
signal |
Emitted when threshold Canceled.
|
protected |
Definition at line 95 of file QmitkBinaryThresholdToolGUI.h.
Referenced by OnAcceptThresholdPreview(), OnNewToolAssociated(), OnSliderValueChanged(), OnSpinnerValueChanged(), and ~QmitkBinaryThresholdToolGUI().
|
protected |
helper bool values to find out, which of the GUI elements has been touched by the user.
Definition at line 93 of file QmitkBinaryThresholdToolGUI.h.
Referenced by OnSliderValueChanged(), and OnSpinnerValueChanged().
|
protected |
Definition at line 93 of file QmitkBinaryThresholdToolGUI.h.
Referenced by OnSliderValueChanged(), and OnSpinnerValueChanged().
|
protected |
is image float or int?
Definition at line 86 of file QmitkBinaryThresholdToolGUI.h.
Referenced by DoubleToSliderInt(), OnThresholdingIntervalBordersChanged(), and SliderIntToDouble().
|
protected |
Definition at line 90 of file QmitkBinaryThresholdToolGUI.h.
Referenced by DoubleToSliderInt(), OnThresholdingIntervalBordersChanged(), and SliderIntToDouble().
|
protected |
Definition at line 89 of file QmitkBinaryThresholdToolGUI.h.
Referenced by OnThresholdingIntervalBordersChanged().
|
protected |
Definition at line 88 of file QmitkBinaryThresholdToolGUI.h.
Referenced by DoubleToSliderInt(), OnThresholdingIntervalBordersChanged(), and SliderIntToDouble().
|
protected |
Definition at line 82 of file QmitkBinaryThresholdToolGUI.h.
Referenced by OnSpinnerValueChanged(), OnThresholdingIntervalBordersChanged(), and OnThresholdingValueChanged().
|
protected |
Definition at line 83 of file QmitkBinaryThresholdToolGUI.h.
Referenced by OnSliderValueChanged(), OnSpinnerValueChanged(), OnThresholdingIntervalBordersChanged(), and OnThresholdingValueChanged().