Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
QmitkAdaptiveRegionGrowingToolGUI. More...
#include <QmitkAdaptiveRegionGrowingToolGUI.h>
Public Member Functions | |
mitkClassMacro (QmitkAdaptiveRegionGrowingToolGUI, QmitkToolGUI) | |
mitkClassMacro More... | |
Pointer | Clone () const |
QmitkAdaptiveRegionGrowingToolGUI (QWidget *parent=nullptr) | |
virtual void | CreateConnections () |
Method to create the connections for the component. This Method is obligatory even if no connections is needed. More... | |
virtual void | SetDataStorage (mitk::DataStorage *dataStorage) |
Method to set the default data storage. More... | |
void | SetDataNodeNames (std::string labledSegmentation, std::string binaryImage, std::string surface, std::string maskedSegmentation) |
Method to set the name of a data node. More... | |
void | EnableControls (bool enable) |
Method to enable/disable controls for region growing. More... | |
void | SetInputImageNode (mitk::DataNode *node) |
Method to set the input image node. More... | |
void | Deactivated () |
void | Activated () |
![]() | |
mitkClassMacroItkParent (QmitkToolGUI, itk::Object) | |
void | SetTool (mitk::Tool *tool) |
void | Register () const override |
void | UnRegister () const ITK_NOEXCEPT ITK_OVERRIDE |
void | SetReferenceCount (int) override |
~QmitkToolGUI () override | |
Static Public Member Functions | |
static Pointer | New () |
Public Attributes | |
Ui::QmitkAdaptiveRegionGrowingToolGUIControls | m_Controls |
The created GUI from the .ui-File. This Attribute is obligatory. More... | |
Protected Slots | |
void | RunSegmentation () |
Method to start the segmentation. More... | |
void | ChangeLevelWindow (double newValue) |
Method to change the level window. More... | |
void | IncreaseSlider () |
Method to increase the preview slider. More... | |
void | DecreaseSlider () |
Method to decrease the preview slider. More... | |
void | ConfirmSegmentation () |
Method to confirm the preview segmentation. More... | |
void | UseVolumeRendering (bool on) |
Method to switch the volume rendering on/off. More... | |
void | SetLowerThresholdValue (double lowerThreshold) |
Method to set the lower threshold. More... | |
void | SetUpperThresholdValue (double upperThreshold) |
Method to set upper threshold. More... | |
void | OnNewToolAssociated (mitk::Tool *) |
Method to determine which tool to activate. More... | |
Protected Member Functions | |
~QmitkAdaptiveRegionGrowingToolGUI () override | |
Destructor. More... | |
void | OnPointAdded () |
Method to calculate parameter settings, when a seed point is set. More... | |
![]() | |
virtual void | BusyStateChanged (bool) |
Protected Attributes | |
mitk::AdaptiveRegionGrowingTool::Pointer | m_RegionGrow3DTool |
mitk::DataStorage * | m_DataStorage |
mitk::DataNode::Pointer | m_InputImageNode |
![]() | |
mitk::Tool::Pointer | m_Tool |
Additional Inherited Members | |
![]() | |
void | NewToolAssociated (mitk::Tool *) |
QmitkAdaptiveRegionGrowingToolGUI.
Adaptive Region Growing View class of the segmentation.
Definition at line 40 of file QmitkAdaptiveRegionGrowingToolGUI.h.
QmitkAdaptiveRegionGrowingToolGUI::QmitkAdaptiveRegionGrowingToolGUI | ( | QWidget * | parent = nullptr | ) |
Definition at line 43 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
|
overrideprotected |
Destructor.
Definition at line 71 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References m_RegionGrow3DTool.
void QmitkAdaptiveRegionGrowingToolGUI::Activated | ( | ) |
Definition at line 946 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
|
protectedslot |
Method to change the level window.
This method is called, when the level window slider is changed via the slider in the control widget
new | value |
Definition at line 613 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References mitk::RenderingManager::GetInstance(), mitk::DataStorage::GetNamedNode(), m_DataStorage, mitk::RenderingManager::RequestUpdateAll(), and mitk::LevelWindow::SetLevelWindow().
Referenced by CreateConnections(), DecreaseSlider(), EnableControls(), IncreaseSlider(), and RunSegmentation().
Pointer QmitkAdaptiveRegionGrowingToolGUI::Clone | ( | ) | const |
Referenced by RunSegmentation().
|
protectedslot |
Method to confirm the preview segmentation.
This method is called, when the "Confirm Segmentation" button is clicked.
Definition at line 673 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References AccessByItk, QmitkConfirmSegmentationDialog::CANCEL_SEGMENTATION, mitk::CastToItkImage(), QmitkConfirmSegmentationDialog::CREATE_NEW_SEGMENTATION, mitk::BaseRenderer::GetInstance(), mitk::RenderingManager::GetInstance(), mitk::DataStorage::GetNamedNode(), mitk::DataStorage::GetNamedObject(), mitk::BaseRenderer::GetRenderWindowByName(), mitk::BaseRenderer::GetTimeStep(), ITKThresholding(), m_Controls, m_DataStorage, m_InputImageNode, m_RegionGrow3DTool, mitk::ImageTimeSelector::New(), QmitkConfirmSegmentationDialog::OVERWRITE_SEGMENTATION, mitk::RenderingManager::RequestUpdateAll(), and QmitkConfirmSegmentationDialog::SetSegmentationName().
Referenced by CreateConnections().
|
virtual |
Method to create the connections for the component. This Method is obligatory even if no connections is needed.
Definition at line 121 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References ChangeLevelWindow(), ConfirmSegmentation(), m_Controls, RunSegmentation(), SetLowerThresholdValue(), and SetUpperThresholdValue().
void QmitkAdaptiveRegionGrowingToolGUI::Deactivated | ( | ) |
Definition at line 932 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References mitk::DataStorage::GetNamedNode(), m_Controls, and m_DataStorage.
|
protectedslot |
Method to decrease the preview slider.
This method is called, when the - button is clicked and decreases the value by 1
Definition at line 651 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References ChangeLevelWindow(), and m_Controls.
void QmitkAdaptiveRegionGrowingToolGUI::EnableControls | ( | bool | enable | ) |
Method to enable/disable controls for region growing.
This method checks if a seed point is set and a segmentation exists.
enable/disable | controls |
Definition at line 804 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References mitk::CastToItkImage(), ChangeLevelWindow(), mitk::RenderingManager::GetInstance(), mitk::DataStorage::GetNamedNode(), m_Controls, m_DataStorage, m_RegionGrow3DTool, max(), min(), MITK_ERROR, mitk::RenderingManager::RequestUpdateAll(), and mitk::DataNode::SetData().
Referenced by OnNewToolAssociated(), and RunSegmentation().
|
protectedslot |
Method to increase the preview slider.
This method is called, when the + button is clicked and increases the value by 1
Definition at line 662 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References ChangeLevelWindow(), and m_Controls.
QmitkAdaptiveRegionGrowingToolGUI::mitkClassMacro | ( | QmitkAdaptiveRegionGrowingToolGUI | , |
QmitkToolGUI | |||
) |
mitkClassMacro
|
static |
|
protectedslot |
Method to determine which tool to activate.
This method listens to the tool manager and activates this tool if requested otherwise disables this view
Definition at line 82 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References EnableControls(), mitk::DataStorage::GetNamedNode(), m_DataStorage, m_RegionGrow3DTool, OnPointAdded(), mitk::DataStorage::Remove(), and SetInputImageNode().
|
protected |
Method to calculate parameter settings, when a seed point is set.
Definition at line 172 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References AccessPixel(), mitk::FastSinglePixelAccess(), mitk::Image::GetChannelDescriptor(), mitk::DataNode::GetData(), mitk::BaseData::GetGeometry(), mitk::BaseRenderer::GetInstance(), mitk::ChannelDescriptor::GetPixelType(), mitk::BaseRenderer::GetRenderWindowByName(), mitk::ImageStatisticsHolder::GetScalarValueMax(), mitk::ImageStatisticsHolder::GetScalarValueMin(), mitk::Image::GetStatistics(), image, mitk::BaseGeometry::IsIndexInside(), mitk::BaseGeometry::IsInside(), k(), m_Controls, m_InputImageNode, m_RegionGrow3DTool, max(), min(), mitkPixelTypeMultiplex3, mitkPixelTypeMultiplex4, and mitk::BaseGeometry::WorldToIndex().
Referenced by OnNewToolAssociated().
|
protectedslot |
Method to start the segmentation.
This method is called, when the "Start Segmentation" button is clicked.
Definition at line 319 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References AccessByItk_2, mitk::DataStorage::Add(), ChangeLevelWindow(), Clone(), EnableControls(), mitk::BaseData::GetGeometry(), mitk::ProgressBar::GetInstance(), mitk::BaseRenderer::GetInstance(), mitk::RenderingManager::GetInstance(), mitk::DataStorage::GetNamedNode(), mitk::BaseRenderer::GetRenderWindowByName(), mitk::BaseRenderer::GetTimeStep(), mitk::ImportItkImage(), mitk::BaseGeometry::IsInside(), m_Controls, m_DataStorage, m_InputImageNode, m_RegionGrow3DTool, max(), min(), MITK_INFO, mitk::BoolProperty::New(), mitk::IntProperty::New(), mitk::FloatProperty::New(), mitk::ImageTimeSelector::New(), mitk::StringProperty::New(), mitk::ColorProperty::New(), mitk::DataNode::New(), mitk::ProgressBar::Progress(), mitk::DataStorage::Remove(), mitk::RenderingManager::RequestUpdateAll(), mitk::LevelWindow::SetLevelWindow(), mitk::LevelWindow::SetRangeMinMax(), StartRegionGrowing(), and mitk::BaseGeometry::WorldToIndex().
Referenced by CreateConnections().
void QmitkAdaptiveRegionGrowingToolGUI::SetDataNodeNames | ( | std::string | labledSegmentation, |
std::string | binaryImage, | ||
std::string | surface, | ||
std::string | maskedSegmentation | ||
) |
Method to set the name of a data node.
labledSegmentation | Name of the labeled segmentation |
binaryImage | Name of the binary image |
surface | Name of the surface |
Definition at line 133 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
|
virtual |
Method to set the default data storage.
Definition at line 144 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References m_DataStorage.
void QmitkAdaptiveRegionGrowingToolGUI::SetInputImageNode | ( | mitk::DataNode * | node | ) |
Method to set the input image node.
data | node |
Definition at line 149 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
References mitk::ImageStatisticsHolder::GetScalarValueMax(), mitk::ImageStatisticsHolder::GetScalarValueMin(), mitk::Image::GetStatistics(), m_Controls, m_InputImageNode, max(), and min().
Referenced by OnNewToolAssociated().
|
protectedslot |
Method to set the lower threshold.
This method is called, when the minimum threshold slider has changed
lower | threshold |
Definition at line 922 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
Referenced by CreateConnections().
|
protectedslot |
Method to set upper threshold.
This Method is called, when the maximum threshold slider has changed
upper | threshold |
Definition at line 927 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
Referenced by CreateConnections().
|
protectedslot |
Method to switch the volume rendering on/off.
on/off |
Definition at line 915 of file QmitkAdaptiveRegionGrowingToolGUI.cpp.
Ui::QmitkAdaptiveRegionGrowingToolGUIControls QmitkAdaptiveRegionGrowingToolGUI::m_Controls |
The created GUI from the .ui-File. This Attribute is obligatory.
Definition at line 94 of file QmitkAdaptiveRegionGrowingToolGUI.h.
Referenced by ConfirmSegmentation(), CreateConnections(), Deactivated(), DecreaseSlider(), EnableControls(), IncreaseSlider(), OnPointAdded(), RunSegmentation(), and SetInputImageNode().
|
protected |
Definition at line 169 of file QmitkAdaptiveRegionGrowingToolGUI.h.
Referenced by ChangeLevelWindow(), ConfirmSegmentation(), Deactivated(), EnableControls(), OnNewToolAssociated(), RunSegmentation(), and SetDataStorage().
|
protected |
Definition at line 171 of file QmitkAdaptiveRegionGrowingToolGUI.h.
Referenced by ConfirmSegmentation(), OnPointAdded(), RunSegmentation(), and SetInputImageNode().
|
protected |
Definition at line 164 of file QmitkAdaptiveRegionGrowingToolGUI.h.
Referenced by ConfirmSegmentation(), EnableControls(), OnNewToolAssociated(), OnPointAdded(), RunSegmentation(), and ~QmitkAdaptiveRegionGrowingToolGUI().