23 #include <QMessageBox>
28 m_Controls.setupUi(
this);
29 m_Controls.m_InformationWidget->hide();
32 assert(m_ToolManager);
41 maskPredicate->AddPredicate(isMask);
44 m_Controls.m_cbMaskNodeSelector->SetPredicate(maskPredicate);
46 connect(m_Controls.m_pbStamp, SIGNAL(clicked()),
this, SLOT(
OnStamp()));
47 connect(m_Controls.m_cbShowInformation, SIGNAL(toggled(
bool)),
this, SLOT(
OnShowInformation(
bool)));
48 m_Controls.m_InformationWidget->hide();
57 m_DataStorage = storage;
58 m_Controls.m_cbMaskNodeSelector->SetDataStorage(m_DataStorage);
63 mitk::DataNode *maskNode = m_Controls.m_cbMaskNodeSelector->GetSelectedNode();
67 QMessageBox::information(
this,
"Mask Stamp",
"Please load and select a mask before starting some action.");
74 QMessageBox::information(
this,
"Mask Stamp",
"Please load and select a mask before starting some action.");
82 QMessageBox::information(
this,
"Mask Stamp",
"Please load and select a segmentation before starting some action.");
90 QMessageBox::information(
this,
"Mask Stamp",
"Please load and select a segmentation before starting some action.");
94 QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
97 workingImage->
MaskStamp(mask, m_Controls.m_chkOverwrite->isChecked());
101 QApplication::restoreOverrideCursor();
102 MITK_ERROR <<
"Exception caught: " << e.GetDescription();
103 QMessageBox::information(
this,
"Mask Stamp",
"Could not stamp the selected mask.\n See error log for details.\n");
107 QApplication::restoreOverrideCursor();
117 m_Controls.m_InformationWidget->show();
119 m_Controls.m_InformationWidget->hide();
Data management class that handles 'was created by' relations.
void SetVisibility(bool visible, const mitk::BaseRenderer *renderer=nullptr, const char *propertyKey="visible")
Convenience method for setting visibility properties (instances of BoolProperty)
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
mitk::DataStorage::Pointer m_DataStorage
An object of this class represents an exception of MITK. Please don't instantiate exceptions manually...
static RenderingManager * GetInstance()
static Pointer New(const mitk::NodePredicateBase *_arg)
Image class for storing images.
static Pointer New(const char *_arg)
LabelSetImage class for handling labels and layers in a segmentation session.
void MaskStamp(mitk::Image *mask, bool forceOverwrite)
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)
Class for nodes of the DataTree.