27 #include <itksys/SystemTools.hxx>
29 #include <QApplication>
42 int main(
int argc,
char *argv[])
44 QApplication qtapplication(argc, argv);
48 stderr,
"Usage: %s [filename1] [filename2] ...\n\n", itksys::SystemTools::GetFilenameName(argv[0]).c_str());
66 for (i = 1; i < argc; ++i)
69 if (strcmp(argv[i],
"-testing") == 0)
78 if (dataNodes->empty())
80 fprintf(stderr,
"Could not open file %s \n\n", argv[i]);
97 if (image.IsNotNull())
104 tf->InitializeByMitkImage(image);
107 tf->GetColorTransferFunction()->AddRGBPoint(tf->GetColorTransferFunction()->GetRange()[0], 1.0, 0.0, 0.0);
108 tf->GetColorTransferFunction()->AddRGBPoint(tf->GetColorTransferFunction()->GetRange()[1], 1.0, 1.0, 0.0);
111 tf->GetScalarOpacityFunction()->AddPoint(0, 0);
112 tf->GetScalarOpacityFunction()->AddPoint(tf->GetColorTransferFunction()->GetRange()[1], 1);
149 renderWindow.resize(256, 256);
155 if (strcmp(argv[argc - 1],
"-testing") != 0)
156 return qtapplication.exec();
itk::SmartPointer< Self > Pointer
virtual void SetDataStorage(mitk::DataStorage *storage) override
set the datastorage that will be used for rendering
int main(int argc, char *argv[])
Change the type of display to 3D.
MITKQTWIDGETS_EXPORT void QmitkRegisterClasses()
static RenderingManager * GetInstance()
Image class for storing images.
MITK implementation of the QVTKWidget.
virtual mitk::VtkPropRenderer * GetRenderer()
virtual void SetMapperID(const MapperSlotId mapperId) override
Set the MapperSlotId to use.
static DataStorage::SetOfObjects::Pointer Load(const std::string &path, DataStorage &storage)
Load a file into the given DataStorage.
vtkRenderer * GetVtkRenderer() const
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)