diff --git a/Modules/FLApplications/MITKFLExample/CMakeLists.txt b/Modules/FLApplications/MITKFLExample/CMakeLists.txt deleted file mode 100644 index 8b13789179..0000000000 --- a/Modules/FLApplications/MITKFLExample/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Modules/FLApplications/MITKFLExample/FLmitkComfortWidget.cpp b/Modules/FLApplications/MITKFLExample/FLmitkComfortWidget.cpp deleted file mode 100644 index 90da3714c1..0000000000 --- a/Modules/FLApplications/MITKFLExample/FLmitkComfortWidget.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include -#include "FLmitkComfortWidget.h" -//#include "mitkLevelWindow.h" -// -FLmitkComfortWidget::FLmitkComfortWidget(int x,int y,int w,int h,const char* label) : FLmitkRenderWindow(x,y,w,h,label) { - -} -int FLmitkComfortWidget::handle(int event) { - switch(event) { - case FL_MOUSEWHEEL: - if (Fl::event_dy() > 0) { - sliceCtrl->GetSlice()->Next(); - } else { - sliceCtrl->GetSlice()->Previous(); - } - GetRenderer()->Render(); - draw(); - return 1; - break; - case FL_PUSH: - m_LastX = Fl::event_x(); - m_LastY = Fl::event_y(); - return 1; - break; - case FL_DRAG: - int dx = Fl::event_x() - m_LastX; - int dy = Fl::event_y() - m_LastY; - m_LastX = Fl::event_x(); - m_LastY = Fl::event_y(); - mitk::LevelWindow lvlWin; - if (m_Node.IsNotNull() && m_Node->GetLevelWindow(lvlWin,GetRenderer())) { - lvlWin.SetLevelWindow(lvlWin.GetLevel() + dy, lvlWin.GetWindow() + dx); - m_Node->SetLevelWindow(lvlWin,GetRenderer()); - m_Node->SetLevelWindow(lvlWin,nullptr); - GetRenderer()->Render(); - draw(); - } - return 1; - } - return FLmitkRenderWindow::handle(event); -} - diff --git a/Modules/FLApplications/MITKFLExample/FLmitkComfortWidget.h b/Modules/FLApplications/MITKFLExample/FLmitkComfortWidget.h deleted file mode 100644 index 1d94e28891..0000000000 --- a/Modules/FLApplications/MITKFLExample/FLmitkComfortWidget.h +++ /dev/null @@ -1,32 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef FLMITKCOMFORTWIDGET_INCLUDED -#define FLMITKCOMFORTWIDGET_INCLUDED -#include "FLmitkRenderWindow/FLmitkRenderWindow.h" -#include "mitkSliceNavigationController.h" -#include "mitkDataNode.h" -class FLmitkComfortWidget : public FLmitkRenderWindow { - public: - FLmitkComfortWidget(int x,int y,int w,int h,const char* label=nullptr); - - void SetNode(mitk::DataNode::Pointer node) {m_Node = node;} - int handle(int event); - mitk::SliceNavigationController::Pointer sliceCtrl; - int m_LastX,m_LastY; - mitk::DataNode::Pointer m_Node; -}; -#endif diff --git a/Modules/FLApplications/MITKFLExample/MITKFltkExample.cpp b/Modules/FLApplications/MITKFLExample/MITKFltkExample.cpp deleted file mode 100644 index 0dfa75da45..0000000000 --- a/Modules/FLApplications/MITKFLExample/MITKFltkExample.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include - -#include -#include -#include -#include -#include "FLmitkRenderWindow/FLmitkRenderWindow.h" - -// #include "mitkIpPic.h" -#include "mitkPicFileReader.h" - -#include "mitkStringProperty.h" -#include "mitkLevelWindowProperty.h" -#include "mitkSliceNavigationController.h" - -#include "mitkDataNodeFactory.h" -#include "mitkSample.h" - -int main(int argc, char **argv) { - const char* fileName = nullptr; - if (argc == 2 && argv[1]) { - fileName = argv[1]; - } else { - fileName = fl_file_chooser("Open file","*.dcm;*.png;*.jog;*.tiff;*.dcm;*.DCM;*.seq;*.pic;*.pic.gz;*.seq.gz;*.pic;*.pic.gz;*.png;*.stl",nullptr); - } - if (!fileName) { exit(0);} - - UserInterface ui; - mitk::SliceNavigationController::Pointer &sliceCtrl = ui.mainWid->sliceCtrl; - sliceCtrl = mitk::SliceNavigationController::New("navigation"); - ui.mainWid->InitRenderer(); - ui.mainWid->GetRenderer()->SetMapperID(1); - mitk::DataTree::Pointer tree = mitk::DataTree::New(); - - mitk::DataNodeFactory::Pointer factory = mitk::DataNodeFactory::New(); - - factory->SetFileName( fileName ); - factory->Update(); - if (factory->GetNumberOfOutputs() > 1) { - fl_alert("WARNING: More than one image in file. Only showing first one."); - } - mitk::DataTreePreOrderIterator it(tree); - mitk::DataNode::Pointer node = factory->GetOutput( 0 ); - assert(node.IsNotNull()); - { - it.Add( node ); - ui.mainWid->SetNode(node); - } - ui.mainWid->GetRenderer()->SetData(&it); - ui.mainWid->RequestUpdate(); - - mitk::BoundingBox::Pointer bb = mitk::DataTree::ComputeVisibleBoundingBox(&it); - - mitk::Geometry3D::Pointer geometry = mitk::Geometry3D::New(); - geometry->Initialize(); - geometry->SetBounds(bb->GetBounds()); - - //tell the navigator the geometry to be sliced (with geometry a Geometry3D::ConstPointer) - sliceCtrl->SetInputWorldGeometry(geometry.GetPointer()); - //tell the navigator in which direction it shall slice the data - sliceCtrl->SetViewDirection(mitk::SliceNavigationController::Axial); - //Connect one or more BaseRenderer to this navigator, i.e.: events sent - //by the navigator when stepping through the slices (e.g. by - //sliceCtrl->GetSlice()->Next()) will be received by the BaseRenderer - //(in this example only slice-changes, see also ConnectGeometryTimeEvent - //and ConnectGeometryEvents.) - sliceCtrl->ConnectGeometrySliceEvent(ui.mainWid->GetRenderer()); - //create a world geometry and send the information to the connected renderer(s) - sliceCtrl->Update(); - sliceCtrl->GetSlice()->SetPos(3); - - ui.sliceSlider->bounds(0,sliceCtrl->GetSlice()->GetSteps()-1); - ui.sliceSlider->precision(0); - ui.mainWid->RequestUpdate(); - ui.mainWin->show(argc, argv); - - return Fl::run(); -} diff --git a/Modules/FLApplications/MITKFLExample/MITKFltkExample.h b/Modules/FLApplications/MITKFLExample/MITKFltkExample.h deleted file mode 100644 index d4cbbb287b..0000000000 --- a/Modules/FLApplications/MITKFLExample/MITKFltkExample.h +++ /dev/null @@ -1,29 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef FLMITKCOMFORTWIDGET_INCLUDED -#define FLMITKCOMFORTWIDGET_INCLUDED -#include "FLmitkRenderWindow/FLmitkRenderWindow.h" -#include "mitkSliceNavigationController.h" -class FLmitkComfortWidget : public FLmitkRenderWindow { - public: - FLmitkComfortWidget(int x,int y,int w,int h,const char* label=nullptr) : FLmitkRenderWindow(x,y,w,h,label) { - - } - - mitk::SliceNavigationController::Pointer sliceCtrl; -} -#endif diff --git a/Modules/FLApplications/MITKFLExample/mitkSample.fl b/Modules/FLApplications/MITKFLExample/mitkSample.fl deleted file mode 100644 index 83a4c10bb9..0000000000 --- a/Modules/FLApplications/MITKFLExample/mitkSample.fl +++ /dev/null @@ -1,30 +0,0 @@ -# data file for the Fltk User Interface Designer (fluid) -version 1.0103 -header_name {.h} -code_name {.cxx} -class UserInterface {open -} { - Function {UserInterface()} {open - } { - Fl_Window mainWin {open - xywh {210 64 360 383} resizable visible - } { - Fl_Group {} {open - xywh {0 0 360 380} resizable - } { - Fl_Value_Slider sliceSlider { - callback {mainWid->sliceCtrl->GetSlice()->SetPos((unsigned int)(((Fl_Value_Slider*)o)->value())); -mainWid->GetRenderer()->Render(); -mainWid->draw();} - xywh {65 365 220 15} type Horizontal maximum 100 step 1 - } - Fl_Box mainWid { - label label selected - xywh {0 0 360 360} box SHADOW_FRAME resizable - code0 {\#include "FLmitkComfortWidget.h"} - class FLmitkComfortWidget - } - } - } - } -} diff --git a/Modules/FLmitk/CMakeLists.txt b/Modules/FLmitk/CMakeLists.txt deleted file mode 100644 index 8b13789179..0000000000 --- a/Modules/FLmitk/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Modules/FLmitk/FLmitkRenderWindow.cpp b/Modules/FLmitk/FLmitkRenderWindow.cpp deleted file mode 100644 index 620e1caf0f..0000000000 --- a/Modules/FLmitk/FLmitkRenderWindow.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -//#include "FLmitkRenderWindow.h" -//#include "mitkOpenGLRenderer.h" -//#include -//#include -//void FLmitkRenderWindow::InitRenderer() -//{ -// if(m_Renderer.IsNull()) -// m_Renderer = new mitk::OpenGLRenderer; -// -// mitk::RenderWindow::InitRenderer(); -//} -// -//void FLmitkRenderWindow::draw() { -// if(m_InitNeeded) -// { -// SetWindowId( (void *)fl_xid( this ) ); -// m_InitNeeded = false; -// } -// if(m_ResizeNeeded) -// { -// m_ResizeNeeded=false; -// m_Renderer->InitSize(w(),h()); -// } -// if(visible()) -// { -// make_current(); -// m_Renderer->Paint(); -// } -//} -// -// -//void FLmitkRenderWindow::resize(int x, int y, int w, int h) { -// std::cout << "resize() called" << std::endl; -// if (visible()) { -// m_Renderer->Resize(w,h); -// } -// Fl_Gl_Window::resize(x,y,w,h); -//} diff --git a/Modules/FLmitk/FLmitkRenderWindow.h b/Modules/FLmitk/FLmitkRenderWindow.h deleted file mode 100644 index f1a93fee18..0000000000 --- a/Modules/FLmitk/FLmitkRenderWindow.h +++ /dev/null @@ -1,68 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -//#ifndef FLMITKRENDERWINDOW_H_HEADER_INCLUDED -//#define FLMITKRENDERWINDOW_H_HEADER_INCLUDED -//#include -//#include -//#include "mitkGL.h" -//#include "mitkRenderWindow.h" -//#include "mitkBaseRenderer.h" -// -// -//class FLmitkRenderWindow : public mitk::RenderWindow, public Fl_Gl_Window { -// public: -// FLmitkRenderWindow(int x,int y,int width,int height,const char* label = "fltk gl win") : mitk::RenderWindow(label,nullptr ), Fl_Gl_Window(x,y,width,height), m_InitNeeded(true),m_ResizeNeeded(true) { std::cout << "c'tor FLmitkRenderWindow" << std::endl;} -// -// virtual void MakeCurrent() { make_current(); } -// -// //##Documentation -// //## @brief Swaps the screen contents with an off-screen buffer. -// //## -// //## This only works if the widget's format specifies double buffer mode. -// //## Normally, there is no need to explicitly call this function because it is done automatically -// //## after each widget repaint, i.e. each time after paintGL() has been executed. -// virtual void SwapBuffers () { swap_buffers(); } -// -// //##Documentation -// //## @brief Returns @a true if display list sharing with another window -// //## was requested and could be provided. -// //## -// //## For example, a OpenGL system may fail to provide display list sharing -// //## if the two windows use different formats. -// virtual bool IsSharing () const { return false;} -// -// //##Documentation -// //## @brief Immediately repaints the contents of the renderwindow -// //## -// //## Renderwindow will be updated before repainting. -// virtual void paint() { std::cout << "paint() called" << std::endl; } -// virtual void InitRenderer(); -// virtual void draw(); -// virtual int handle(int event) { return Fl_Gl_Window::handle(event); } -// virtual ~FLmitkRenderWindow() {}; -// virtual void resize(int x, int y, int w, int h); -// -//protected: -// virtual void Repaint() { invalidate(); } -// -// bool m_InitNeeded; -// bool m_ResizeNeeded; -// -//}; -// -//#endif /* FLMITKRENDERWINDOW_H_HEADER_INCLUDED */ -//