25 #include <QApplication>
26 #include <itksys/SystemTools.hxx>
35 int main(
int argc,
char *argv[])
37 QApplication qtapplication(argc, argv);
41 fprintf(stderr,
"Usage: %s [filename] \n\n", itksys::SystemTools::GetFilenameName(argv[0]).c_str());
68 reader->SetFileName(filename);
75 dataStorage->Add(reader->GetOutput());
79 fprintf(stderr,
"Could not open file %s \n\n", filename);
100 if (sliceNaviController)
101 sliceNaviController->GetSlice()->SetPos(0);
125 overlayManager->AddLayouter(topleftLayouter.GetPointer());
130 overlayManager->AddLayouter(bottomLayouter.GetPointer());
137 textOverlay->SetText(
"Test!");
138 textOverlay->SetFontSize(40);
139 textOverlay->SetColor(1, 0, 0);
140 textOverlay->SetOpacity(1);
144 pos[0] = 10, pos[1] = 20;
145 textOverlay->SetPosition2D(pos);
148 overlayManager->AddOverlay(textOverlay.GetPointer());
153 overlayManager->AddLayouter(
173 for (
int i = 0; i < 10; i++)
181 pointset->InsertPoint(i, point);
182 textOverlay3D->SetText(
"A Point");
185 textOverlay3D->SetPosition3D(point);
188 textOverlay3D->SetOffsetVector(offset);
190 overlayManager->AddOverlay(textOverlay3D.GetPointer());
195 datanode->SetData(pointset);
196 datanode->SetName(
"pointSet");
197 dataStorage->Add(datanode);
200 renderWindow.resize(256, 256);
202 return qtapplication.exec();
virtual bool InitializeViews(const BaseGeometry *geometry, RequestType type=REQUEST_UPDATE_ALL, bool preserveRoughOrientationInWorldSpace=false)
int main(int argc, char *argv[])
[includes]
itk::SmartPointer< Self > Pointer
static BaseRenderer * GetInstance(vtkRenderWindow *renWin)
virtual void SetDataStorage(mitk::DataStorage *storage) override
set the datastorage that will be used for rendering
void SetOverlayManager(itk::SmartPointer< OverlayManager > overlayManager)
Sets an OverlayManager which is used to add various Overlays to this renderer. If an OverlayManager w...
Organizes the rendering process.
static std::string STANDARD_2D_TOPLEFT()
MITKQTWIDGETS_EXPORT void QmitkRegisterClasses()
static std::string STANDARD_2D_BOTTOM()
virtual vtkRenderWindow * GetVtkRenderWindow() override
static RenderingManager * GetInstance()
static const std::string filename
MITK implementation of the QVTKWidget.
virtual mitk::VtkPropRenderer * GetRenderer()
itk::SmartPointer< OverlayManager > GetOverlayManager()
Get the OverlayManager registered with this renderer if none was set, it will be created at this poin...
virtual mitk::SliceNavigationController * GetSliceNavigationController()
static Overlay2DLayouter::Pointer CreateLayouter(Alignment alignment, BaseRenderer *renderer)
Factory method for the different kinds of Layouters.