29 #include <QHBoxLayout> 32 #include <QPushButton> 33 #include <QPushButton> 34 #include <QVBoxLayout> 38 Step6::Step6(
int argc,
char *argv[], QWidget *parent) : QWidget(parent)
53 QWidget *controlsParent =
new QWidget(
this);
54 this->layout()->addWidget(controlsParent);
56 QHBoxLayout *hlayout =
new QHBoxLayout(controlsParent);
57 hlayout->setSpacing(2);
59 QLabel *labelThresholdMin =
new QLabel(
"Lower Threshold:", controlsParent);
60 hlayout->addWidget(labelThresholdMin);
65 QLabel *labelThresholdMax =
new QLabel(
"Upper Threshold:", controlsParent);
66 hlayout->addWidget(labelThresholdMax);
73 QPushButton *startButton =
new QPushButton(
"start region growing", controlsParent);
74 hlayout->addWidget(startButton);
78 startButton->setEnabled(
false);
91 interactor->LoadStateMachine(
"PointSet.xml");
92 interactor->SetEventConfig(
"PointSetConfig.xml");
93 interactor->SetDataNode(pointSetNode);
125 for (i = 1; i < argc; ++i)
128 if (strcmp(argv[i],
"-testing") == 0)
134 if (dataNodes->empty())
136 fprintf(stderr,
"Could not open file %s \n\n", argv[i]);
153 QVBoxLayout *vlayout =
new QVBoxLayout(
this);
154 vlayout->setMargin(0);
155 vlayout->setSpacing(2);
158 QWidget *viewParent =
new QWidget(
this);
159 vlayout->addWidget(viewParent);
161 QHBoxLayout *hlayout =
new QHBoxLayout(viewParent);
162 hlayout->setMargin(0);
163 hlayout->setSpacing(2);
171 hlayout->addWidget(renderWindow);
189 hlayout->addWidget(view2);
194 mitk::DataStorage::SetOfObjects::ConstPointer rs =
m_DataStorage->GetAll();
208 hlayout->addWidget(view3);
virtual DataNode * GetCurrentWorldPlaneGeometryNode()
Get a DataNode pointing to a data object containing the current 2D-worldgeometry. ...
vtkRenderer * GetVtkRenderer() const
Step6(int argc, char *argv[], QWidget *parent=nullptr)
Start region-grower at interactively added points.
void SetDataStorage(mitk::DataStorage *storage) override
set the datastorage that will be used for rendering
virtual int GetThresholdMin()
virtual void StartRegionGrowing()
void Load(int argc, char *argv[])
mitk::Image::Pointer m_FirstImage
#define AccessByItk_1(mitkImage, itkImageTypeFunction, arg1)
friend void RegionGrowing(itk::Image< TPixel, VImageDimension > *itkImage, Step6 *step6)
static RenderingManager * GetInstance()
Image class for storing images.
MITK implementation of the QVTKWidget.
virtual mitk::VtkPropRenderer * GetRenderer()
virtual int GetThresholdMax()
QLineEdit * m_LineEditThresholdMin
mitk::Image::Pointer image
virtual void SetupWidgets()
mitk::PointSet::Pointer m_Seeds
void SetMapperID(const MapperSlotId mapperId) override
Set the MapperSlotId to use.
virtual void Initialize()
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)
static DataStorage::SetOfObjects::Pointer Load(const std::string &path, DataStorage &storage, const ReaderOptionsFunctorBase *optionsCallback=nullptr)
Load a file into the given DataStorage.
mitk::StandaloneDataStorage::Pointer m_DataStorage
QLineEdit * m_LineEditThresholdMax