20 #include <FL/Fl_Window.h>
21 #include <FL/Fl_Box.h>
22 #include <Fl/Fl_File_Chooser.h>
23 #include "FLmitkRenderWindow/FLmitkRenderWindow.h"
26 #include "mitkPicFileReader.h"
33 #include "mitkSample.h"
35 int main(
int argc,
char **argv) {
36 const char* fileName = NULL;
37 if (argc == 2 && argv[1]) {
40 fileName = fl_file_chooser(
"Open file",
"*.dcm;*.png;*.jog;*.tiff;*.dcm;*.DCM;*.seq;*.pic;*.pic.gz;*.seq.gz;*.pic;*.pic.gz;*.png;*.stl",NULL);
42 if (!fileName) { exit(0);}
47 ui.mainWid->InitRenderer();
48 ui.mainWid->GetRenderer()->SetMapperID(1);
53 factory->SetFileName( fileName );
55 if (factory->GetNumberOfOutputs() > 1) {
56 fl_alert(
"WARNING: More than one image in file. Only showing first one.");
58 mitk::DataTreePreOrderIterator it(tree);
60 assert(node.IsNotNull());
63 ui.mainWid->SetNode(node);
65 ui.mainWid->GetRenderer()->SetData(&it);
66 ui.mainWid->RequestUpdate();
71 geometry->Initialize();
72 geometry->SetBounds(bb->GetBounds());
75 sliceCtrl->SetInputWorldGeometry(geometry.GetPointer());
83 sliceCtrl->ConnectGeometrySliceEvent(ui.mainWid->GetRenderer());
86 sliceCtrl->GetSlice()->SetPos(3);
88 ui.sliceSlider->bounds(0,sliceCtrl->GetSlice()->GetSteps()-1);
89 ui.sliceSlider->precision(0);
90 ui.mainWid->RequestUpdate();
91 ui.mainWin->show(argc, argv);
itk::SmartPointer< Self > Pointer
int main(int argc, char **argv)
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.