18 #include <QApplication> 19 #include <itksys/SystemTools.hxx> 31 int main(
int argc,
char *argv[])
33 QApplication qtapplication(argc, argv);
37 fprintf(stderr,
"Usage: %s [filename] \n\n", itksys::SystemTools::GetFilenameName(argv[0]).c_str());
56 auto geo = ds->ComputeBoundingGeometry3D(ds->GetAll());
65 textAnnotation->SetText(
"Test!");
66 textAnnotation->SetFontSize(40);
67 textAnnotation->SetColor(1, 0, 0);
68 textAnnotation->SetOpacity(1);
74 textAnnotation->SetPosition2D(pos);
94 std::vector<mitk::TextAnnotation3D::Pointer> annotationReferences;
97 for (
unsigned long i = 0; i < 10; i++)
105 pointset->InsertPoint(i, point);
106 textAnnotation3D->SetText(
"A Point");
109 textAnnotation3D->SetPosition3D(point);
112 textAnnotation3D->SetOffsetVector(offset);
114 annotationReferences.push_back(textAnnotation3D);
119 std::string serviceID = textAnnotation->GetMicroserviceID();
124 annotation->
SetText(
"changed text!");
128 datanode->SetData(pointset);
129 datanode->SetName(
"pointSet");
133 renderWindow.resize(256, 256);
136 renderWindow.resize(256, 256);
virtual bool InitializeViews(const BaseGeometry *geometry, RequestType type=REQUEST_UPDATE_ALL, bool preserveRoughOrientationInWorldSpace=false)
void SetText(std::string text)
void SetDataStorage(mitk::DataStorage *storage) override
set the datastorage that will be used for rendering
XipAnnotationPart annotation
static mitk::Annotation * GetAnnotation(const std::string &AnnotationID)
GetAnnotation returns a registered Annotation for a specified ID.
MITKQTWIDGETS_EXPORT void QmitkRegisterClasses()
static void AddAnnotation(Annotation *annotation, const std::string &rendererID, Alignment alignment=TopLeft, double marginX=5, double marginY=5, int priority=-1)
int main(int argc, char *argv[])
Load image (nrrd format) and display it in a 2D view.
static RenderingManager * GetInstance()
MITK implementation of the QVTKWidget.
virtual mitk::VtkPropRenderer * GetRenderer()
static void AddAnnotation(Annotation *Annotation, const std::string &rendererID)
Base class for all Annotation This class is to be implemented in order to create Annotation which are...
static DataStorage::SetOfObjects::Pointer Load(const std::string &path, DataStorage &storage, const ReaderOptionsFunctorBase *optionsCallback=nullptr)
Load a file into the given DataStorage.
const char * GetName() const
get the name of the Renderer