20 #include <QMessageBox> 23 : QWidget(parent), m_ToolManager(nullptr),
m_DataStorage(nullptr)
25 m_Controls.setupUi(
this);
26 m_Controls.m_InformationWidget->hide();
29 assert(m_ToolManager);
36 m_Controls.m_cbSurfaceNodeSelector->SetPredicate(m_SurfacePredicate);
38 connect(m_Controls.m_pbStamp, SIGNAL(clicked()),
this, SLOT(
OnStamp()));
39 connect(m_Controls.m_cbShowInformation, SIGNAL(toggled(
bool)),
this, SLOT(
OnShowInformation(
bool)));
40 m_Controls.m_InformationWidget->hide();
49 m_DataStorage = storage;
50 m_Controls.m_cbSurfaceNodeSelector->SetDataStorage(m_DataStorage);
55 mitk::DataNode *surfaceNode = m_Controls.m_cbSurfaceNodeSelector->GetSelectedNode();
59 QMessageBox::information(
this,
"Surface Stamp",
"Please load and select a surface before starting some action.");
64 assert(m_ToolManager);
70 QMessageBox::information(
this,
"Surface Stamp",
"Please load and select a surface before starting some action.");
78 QMessageBox::information(
79 this,
"Surface Stamp",
"Please load and select a segmentation before starting some action.");
87 QMessageBox::information(
88 this,
"Surface Stamp",
"Please load and select a segmentation before starting some action.");
92 QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
100 QApplication::restoreOverrideCursor();
101 MITK_ERROR <<
"Exception caught: " << e.GetDescription();
102 QMessageBox::information(
103 this,
"Surface Stamp",
"Could not stamp the selected surface.\n See error log for details.\n");
107 QApplication::restoreOverrideCursor();
115 m_Controls.m_InformationWidget->show();
117 m_Controls.m_InformationWidget->hide();
Class for storing surfaces (vtkPolyData).
Data management class that handles 'was created by' relations.
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)
static Pointer New(const char *_arg)
static Pointer New(const char *_arg)
LabelSetImage class for handling labels and layers in a segmentation session.
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)
Class for nodes of the DataTree.