Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <QmitkLabelSetWidget.h>
Public Slots | |
void | UpdateAllTableWidgetItems () |
Updates the current labels in the label set widget table. For each label (widget item) the 'UpdateTableWidgetItem' is called. More... | |
void | ResetAllTableWidgetItems () |
Resets the current labels in the label set widget table. For each label a widget item is inserted into the table. More... | |
void | SelectLabelByPixelValue (mitk::Label::PixelType pixelValue) |
Signals | |
void | goToLabel (const mitk::Point3D &) |
Send a signal when it was requested to go to a label. More... | |
void | resetView () |
Public Member Functions | |
QmitkLabelSetWidget (QWidget *parent=nullptr) | |
~QmitkLabelSetWidget () override | |
void | SetDataStorage (mitk::DataStorage *storage) |
void | SetOrganColors (const QStringList &organColors) |
void | UpdateControls () |
virtual void | setEnabled (bool enabled) |
QStringList & | GetLabelStringList () |
Definition at line 36 of file QmitkLabelSetWidget.h.
|
explicit |
Definition at line 52 of file QmitkLabelSetWidget.cpp.
References mitk::ToolManagerProvider::GetInstance(), GetLabelStringList(), mitk::ToolManagerProvider::GetToolManager(), and mitk::ColorSequenceRainbow::GoToBegin().
|
override |
Definition at line 86 of file QmitkLabelSetWidget.cpp.
References mitk::LabelSetImage::EraseLabel(), mitk::LabelSetImage::EraseLabels(), mitk::LabelSetImage::GetActiveLabelSet(), mitk::LabelSetImage::GetActiveLayer(), QmitkNewSegmentationDialog::GetColor(), mitk::Label::GetColor(), mitk::RenderingManager::GetInstance(), mitk::LabelSetImage::GetLabel(), QmitkSearchLabelDialog::GetLabelSetWidgetTableCompleteWord(), GetLabelStringList(), GetName(), mitk::ColorSequenceRainbow::GetNextColor(), QmitkNewSegmentationDialog::GetSegmentationName(), goToLabel(), menu, mitk::LabelSetImage::MergeLabel(), mitk::LabelSetImage::MergeLabels(), MITK_INFO, mitk::LabelSet::RemoveLabel(), mitk::LabelSetImage::RemoveLabels(), mitk::LabelSet::RenameLabel(), mitk::RenderingManager::RequestUpdateAll(), ResetAllTableWidgetItems(), mitk::LabelSet::SetAllLabelsLocked(), mitk::LabelSet::SetAllLabelsVisible(), QmitkNewSegmentationDialog::SetColor(), mitk::Label::SetColor(), QmitkSearchLabelDialog::SetLabelSuggestionList(), mitk::Label::SetLocked(), QmitkNewSegmentationDialog::SetSegmentationName(), QmitkNewSegmentationDialog::SetSuggestionList(), mitk::Label::SetVisible(), tmp1, tmp2, UpdateAllTableWidgetItems(), and mitk::LabelSet::UpdateLookupTable().
QStringList & QmitkLabelSetWidget::GetLabelStringList | ( | ) |
Definition at line 873 of file QmitkLabelSetWidget.cpp.
References mitk::LabelSetImage::GetActiveLabelSet(), mitk::LabelSetImage::GetLabel(), mitk::Label::SetOpacity(), and mitk::LabelSet::UpdateLookupTable().
Referenced by QmitkLabelSetWidget(), UpdateControls(), and ~QmitkLabelSetWidget().
|
signal |
Send a signal when it was requested to go to a label.
Referenced by SetDataStorage(), SetOrganColors(), and ~QmitkLabelSetWidget().
|
slot |
Resets the current labels in the label set widget table. For each label a widget item is inserted into the table.
Resetting means removing all rows of the widget table and inserting new rows (labels) from the active label set (= layer) of the current working node. The currently active label is selected and 'Number of labels' is set. As this function is typically used after one label has been removed or the reference node has been changed (e.g.) the render windows have to be updated.
Definition at line 824 of file QmitkLabelSetWidget.cpp.
References mitk::LabelSetImage::GetActiveLabel(), mitk::LabelSetImage::GetActiveLabelSet(), mitk::LabelSetImage::GetActiveLayer(), mitk::RenderingManager::GetInstance(), mitk::LabelSetImage::GetNumberOfLabels(), mitk::LabelSet::IteratorConstBegin(), mitk::LabelSet::IteratorConstEnd(), mitk::RenderingManager::RequestUpdateAll(), and SelectLabelByPixelValue().
Referenced by ~QmitkLabelSetWidget().
|
signal |
|
slot |
Definition at line 661 of file QmitkLabelSetWidget.cpp.
References mitk::Label::GetColor(), mitk::Label::GetLocked(), mitk::Label::GetName(), mitk::Label::GetValue(), mitk::Label::GetVisible(), and QmitkStyleManager::ThemeIcon().
Referenced by ResetAllTableWidgetItems(), and SetOrganColors().
void QmitkLabelSetWidget::SetDataStorage | ( | mitk::DataStorage * | storage | ) |
Definition at line 944 of file QmitkLabelSetWidget.cpp.
References mitk::LabelSetImage::GetActiveLabelSet(), mitk::Label::GetCenterOfMassCoordinates(), mitk::DataNode::GetData(), mitk::LabelSetImage::GetLabel(), mitk::ToolManager::GetWorkingData(), goToLabel(), mitk::LabelSet::SetActiveLabel(), mitk::LabelSetImage::UpdateCenterOfMass(), and mitk::ToolManager::WorkingDataChanged.
|
virtual |
Definition at line 938 of file QmitkLabelSetWidget.cpp.
References UpdateControls().
void QmitkLabelSetWidget::SetOrganColors | ( | const QStringList & | organColors | ) |
Definition at line 601 of file QmitkLabelSetWidget.cpp.
References mitk::LabelSetImage::GetActiveLabelSet(), mitk::LabelSetImage::GetActiveLayer(), mitk::SurfaceBasedInterpolationController::GetInstance(), mitk::RenderingManager::GetInstance(), mitk::LabelSetImage::GetLabel(), goToLabel(), mitk::RenderingManager::RequestUpdateAll(), SelectLabelByPixelValue(), mitk::SurfaceBasedInterpolationController::SetActiveLabel(), mitk::LabelSet::SetActiveLabel(), and mitk::LabelSetImage::UpdateCenterOfMass().
|
slot |
Updates the current labels in the label set widget table. For each label (widget item) the 'UpdateTableWidgetItem' is called.
Updating means setting the color box of the table, setting the column with and fill it with the label name. Furthermore the two push buttons for locking and showing/hiding the layer are checked/unchecked. This functions only changes the appearance of the table widget and no render window update is necessary.
Definition at line 769 of file QmitkLabelSetWidget.cpp.
References mitk::LabelSetImage::GetActiveLayer(), mitk::Label::GetColor(), mitk::RenderingManager::GetInstance(), mitk::LabelSetImage::GetLabel(), mitk::Label::GetLocked(), mitk::Label::GetName(), mitk::Label::GetVisible(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by ~QmitkLabelSetWidget().
void QmitkLabelSetWidget::UpdateControls | ( | ) |
Definition at line 1026 of file QmitkLabelSetWidget.cpp.
References mitk::ToolManager::ActivateTool(), mitk::DataStorage::Add(), mitk::StatusBar::Clear(), mitk::LabelSetImage::CreateLabelMask(), mitk::StatusBar::DisplayText(), mitk::LabelSetImage::GetActiveLayer(), mitk::DataNode::GetData(), mitk::StatusBar::GetInstance(), mitk::RenderingManager::GetInstance(), mitk::LabelSetImage::GetLabel(), GetLabelStringList(), GetName(), mitk::ToolManager::GetWorkingData(), MITK_ERROR, mitk::SegmentationSink::New(), mitk::AutoCropImageFilter::New(), mitk::DataNode::New(), mitk::RenderingManager::RequestUpdateAll(), and mitk::DataNode::SetBoolProperty().
Referenced by setEnabled().