diff --git a/Modules/Bundles/CMakeLists.txt b/Modules/Bundles/CMakeLists.txt index af31859ec0..442afd1970 100644 --- a/Modules/Bundles/CMakeLists.txt +++ b/Modules/Bundles/CMakeLists.txt @@ -1,66 +1,67 @@ IF(MITK_USE_BLUEBERRY) SET(MITK_DEFAULT_SUBPROJECTS MITK-Plugins) SET(_mitk_bundles_default ) IF(QT4_FOUND) LIST(APPEND _mitk_bundles_default "org.mitk.gui.qt.imagenavigator") # BlueBerry depends on CTK which depends on Qt, so we # need the Qt include direcotries INCLUDE(${QT_USE_FILE}) ENDIF() SET(PLUGIN_EXCLUDE_LIST org.mitk.core.ext org.mitk.gui.qt.volumetry org.mitk.core.jobs org.mitk.diffusionimaging org.mitk.gui.qt.diffusionimaging + org.mitk.gui.qt.dtiatlasapp org.mitk.gui.qt.diffusionimagingapp org.mitk.gui.qt.ext org.mitk.gui.qt.extapplication org.mitk.gui.qt.datamanager org.mitk.gui.qt.regiongrowing org.mitk.gui.qt.segmentation org.mitk.planarfigure org.mitk.gui.qt.igtnavigationtoolmanager org.mitk.gui.qt.igttrackingtoolbox org.mitk.gui.qt.igttutorial org.mitk.gui.qt.igttoolpairnavigation org.mitk.gui.qt.basicimageprocessing org.mitk.gui.qt.colourimageprocessing org.mitk.gui.qt.navigationdataplayer org.mitk.gui.qt.tofutil org.mitk.gui.qt.toftutorial org.mitk.gui.qt.imagenavigator org.mitk.gui.qt.moviemaker org.mitk.gui.qt.deformableregistration org.mitk.gui.qt.rigidregistration org.mitk.gui.qt.imagestatistics org.mitk.gui.qt.materialeditor org.mitk.gui.qt.simpleexample org.mitk.gui.qt.ugvisualization org.mitk.gui.qt.measurement org.mitk.gui.qt.simplemeasurement org.mitk.gui.qt.imagecropper org.mitk.gui.qt.pointbasedregistration org.mitk.gui.qt.viewinitialization org.mitk.gui.qt.volumevisualization ) MACRO_COLLECT_PLUGINS(OUTPUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ExtBundles CACHE_PLUGIN_SOURCE_DIRS MITK_MODULES_PLUGIN_SOURCE_DIRS CACHE_PLUGIN_OUTPUT_DIRS MITK_MODULES_PLUGIN_OUTPUT_DIRS CACHE_PLUGIN_TARGETS MITK_MODULES_ENABLED_PLUGINS BUNDLE_LIST_PATH "${MITK_BINARY_DIR}/Bundles/MITKModulesBundleList.cmake" CMAKE_CACHE_PREFIX "MITK" PLUGIN_DEFAULT_ON ${_mitk_bundles_default} PLUGIN_EXCLUDES ${PLUGIN_EXCLUDE_LIST} ${MITK_BUILD_ALL_PLUGINS_OPTION}) ENDIF(MITK_USE_BLUEBERRY) diff --git a/Modules/Bundles/PluginList.cmake b/Modules/Bundles/PluginList.cmake index 4d76c3e25f..27ee402f28 100644 --- a/Modules/Bundles/PluginList.cmake +++ b/Modules/Bundles/PluginList.cmake @@ -1,37 +1,38 @@ SET(MITK_EXT_PLUGINS org.mitk.core.ext:ON org.mitk.core.jobs:OFF org.mitk.planarfigure:ON org.mitk.diffusionimaging:OFF org.mitk.gui.qt.ext:ON org.mitk.gui.qt.extapplication:ON org.mitk.gui.qt.datamanager:ON org.mitk.gui.qt.segmentation:OFF org.mitk.gui.qt.diffusionimaging:OFF + org.mitk.gui.qt.dtiatlasapp:OFF org.mitk.gui.qt.diffusionimagingapp:OFF org.mitk.gui.qt.igtnavigationtoolmanager:OFF org.mitk.gui.qt.igttoolpairnavigation:OFF org.mitk.gui.qt.igttrackingtoolbox:OFF org.mitk.gui.qt.regiongrowing:OFF org.mitk.gui.qt.navigationdataplayer:OFF org.mitk.gui.qt.basicimageprocessing:OFF org.mitk.gui.qt.igttutorial:OFF org.mitk.gui.qt.colourimageprocessing:OFF org.mitk.gui.qt.tofutil:OFF org.mitk.gui.qt.toftutorial:OFF org.mitk.gui.qt.imagenavigator:ON org.mitk.gui.qt.moviemaker:OFF org.mitk.gui.qt.deformableregistration:OFF org.mitk.gui.qt.rigidregistration:OFF org.mitk.gui.qt.imagestatistics:OFF org.mitk.gui.qt.volumetry:OFF org.mitk.gui.qt.materialeditor:OFF org.mitk.gui.qt.simpleexample:OFF org.mitk.gui.qt.ugvisualization:OFF org.mitk.gui.qt.measurement:OFF org.mitk.gui.qt.simplemeasurement:OFF org.mitk.gui.qt.imagecropper:OFF org.mitk.gui.qt.pointbasedregistration:OFF org.mitk.gui.qt.viewinitialization:OFF org.mitk.gui.qt.volumevisualization:OFF ) diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/CMakeLists.txt b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/CMakeLists.txt new file mode 100644 index 0000000000..e2265be9fa --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/CMakeLists.txt @@ -0,0 +1,18 @@ +SET (QT_USE_QTWEBKIT TRUE) +INCLUDE(${QT_USE_FILE}) + +IF(QT_QTWEBKIT_FOUND) + ADD_DEFINITIONS(-DQT_WEBKIT) +ENDIF(QT_QTWEBKIT_FOUND) + +# The project name must correspond to the directory name of your plug-in +# and must not contain periods. +PROJECT(org_mitk_gui_qt_dtiatlasapp) + +MACRO_CREATE_MITK_CTK_PLUGIN( + EXPORT_DIRECTIVE DTIATLAS_APP_EXPORT + EXPORTED_INCLUDE_SUFFIXES src + MODULE_DEPENDENCIES Qmitk SceneSerialization +) + +TARGET_LINK_LIBRARIES(${PLUGIN_TARGET} ${QT_LIBRARIES}) diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/MitkDTIAtlasAppQtHelpCollectionProject.qhcp b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/MitkDTIAtlasAppQtHelpCollectionProject.qhcp new file mode 100644 index 0000000000..fa48318c3b --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/MitkDTIAtlasAppQtHelpCollectionProject.qhcp @@ -0,0 +1,22 @@ + + + + MITK 3M3 Help + assistant-logo.png + qthelp://org.mitk.gui.qt.dtiatlasapp/bundle/index.html + assistant-icon.png + false + false + true + Mitk3M3 + + About MITK 3M3 Help + + + about-logo.png + + + + + + diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Crosshair_Modes.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Crosshair_Modes.png new file mode 100644 index 0000000000..ffc2717c6f Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Crosshair_Modes.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/GUI.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/GUI.png new file mode 100644 index 0000000000..a31fbfb5c2 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/GUI.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/GUI_Commented.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/GUI_Commented.png new file mode 100644 index 0000000000..22ca0a4211 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/GUI_Commented.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Open_Perspective.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Open_Perspective.png new file mode 100644 index 0000000000..5d48dea11e Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Open_Perspective.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/QmitkDTIAtlasAppUserManual.dox b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/QmitkDTIAtlasAppUserManual.dox new file mode 100644 index 0000000000..f1924cff96 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/QmitkDTIAtlasAppUserManual.dox @@ -0,0 +1,139 @@ +/** +\mainpage The Main Application + +Welcome to the MITK 3M3 application, build with the Medical Imaging Toolkit ( http://mitk.org/ ). + +Available sections: + - \ref Qmitk3mApplicationUserManualOverview + - \ref Qmitk3mApplicationUserManualUserInterface + - \ref Qmitk3mApplicationUserManualPerspectives + \isHtml- \ref Qmitk3mApplicationUserManualPerspectivesList + \isHtmlend + +\section Qmitk3mApplicationUserManualOverview About MITK and MITK 3M3 + +\image html Welcome.png "The MITK 3M3 Welcome screen" + +MITK is an open-source framework that was originally developed as a common framework for Ph.D. students in the Division of Medical and Biological Informatics (MBI) at the German Cancer Research Center. MITK aims at supporting the development of leading-edge medical imaging software with a high degree of interaction. + +MITK re-uses virtually anything from VTK and ITK. Thus, it is not at all a competitor to VTK or ITK, but an extension, which tries to ease the combination of both and to add features not supported by VTK or ITK. + +Research institutes, medical professionals and companies alike can use MITK as a basic framework for their research and even commercial (thorough code research needed) software due to the BSD-like software license. + +Research institutes will profit from the high level of integration of ITK and VTK enhanced with data management, advanced visualization and interaction functionality in a single framework that is supported by a wide variety of researchers and developers. You will not have to reinvent the wheel over and over and can concentrate on your work. + +Medical Professionals will profit from MITK and the MITK 3M3 application by using its basic functionalities for research projects. But nonetheless they will be better off, unless they are programmers themselves, to cooperate with a research institute developing with MITK to get the functionalitiy they need. MITK and the presented MITK 3M3 application are not certified medical products and may be used in a research setting only. They must not be used in patient care. + +MITK 3M3 is a demonstration of the capabilites of the MITK framework and has been created in a joint effort by the Division of Medical and Biological Informatics (MBI) at the German Cancer Research Center and mint medical. + +\section Qmitk3mApplicationUserManualUserInterface The User Interface + +The layout of the MITK 3M3 application is designed to give a clear distinction between the different work areas. The following figure gives an overview of the main sections of the user interface. + +\image html GUI_Commented.png "The MITK 3M3 User Interface" + +The datamanager and the \ref Qmitk3mApplicationUserManualPerspectives have their own help sections. This document explains the use of: + - The \ref Qmitk3mApplicationUserManualMultiWidget + - The \ref Qmitk3mApplicationUserManualMenu + - The \ref Qmitk3mApplicationUserManualLevelWindow + - The \ref Qmitk3mApplicationUserManualMemoryUsage + +\section Qmitk3mApplicationUserManualMultiWidget Four Window View + +\subsection Qmitk3mApplicationUserManualMultiWidgetOverview Overview + +The four window view is the heart of the MITK 3M3 image viewing. The standard layout is three 2D windows and one 3D window, with the transversal window in the top left quarter, the sagittal window in the top right quarter, the coronal window in the lower left quarter and the 3D window in the lower right quarter. The different planes form a crosshair that can be seen in the 3D window. + +Once you select a point within the picture informations about it are displayed at the bottom of the screen. + +\subsection Qmitk3mApplicationUserManualMultiWidgetNavigation Navigation + +Left click in any of the 2D windows centers the crosshair on that point. Pressing the right mouse button and moving the mouse zooms in and out. By scrolling with the mouse wheel you can navigate through the slices of the active window and pressing the mouse wheel while moving the mouse moves the image section. + +In the 3D window you can rotate the object by pressing the left mouse button and moving the mouse, zoom either with the right mouse button as in 2D or with the mouse wheel, and pan the object by moving the mouse while the mouse wheel is pressed. Placing the cursor within the 3D window and holding the "F" key allows free flight into the 3D view. + +\subsection Qmitk3mApplicationUserManualMultiWidgetCustomizingViews Customizing + +By moving the cursor to the upper right corner of any window you can activate the window menu. It consists of three buttons. + +\image html Crosshair_Modes.png "Crosshair" + +The crosshair button allows you toggle the crosshair, reset the view and change the behaviour of the planes. + +Activating either of the rotation modes allows you to rotate the planes visible in a 2D window by moving the mouse cursor close to them and click and dragging once it changes to indicate that rotation can be done. + +The swivel mode is recommended only for advanced users as the planes can be moved freely by clicking and dragging anywhere within a 2D window. + + +The middle button expands the corresponding window to fullscreen within the four window view. + +\image html Views_Choices.png "Layout Choices" + +The right button allows you to choose between many different layouts of the four window view to use the one most suited to your task. + +\section Qmitk3mApplicationUserManualMenu Menu + +\subsection Qmitk3mApplicationUserManualFile File +This dialog allows you to save, load and clear entire projects, this includes any nodes in the data manager. + +\subsection Qmitk3mApplicationUserManualEdit Edit +This dialog supports undo and redo operations as well as the image navigator, which gives you sliders to navigate through the data quickly. + +\subsection Qmitk3mApplicationUserManualWindow Window + +This dialog allows you to open a new window, change between perspectives and reset your current one to default settings. + +\image html Open_Perspective.png "Open Perspective" + +If you want to use an operation of a certain perspective within another perspective the "Show View" menu allows to select a specific function that is opened and can be moved within the working areas according to your wishes. Be aware that not every function works with every perspective in a meaningful way. + +\image html Show_Views.png "Show View" + +The Preferences dialog allows you to adjust and save your custom settings. + +\image html Window_Dropdown.png "Preferences" + +\subsection Qmitk3mApplicationUserManualHelp Help +This dialog contains this help, the welcome screen and information about MITK 3M3. + +\section Qmitk3mApplicationUserManualLevelWindow Levelwindow + +Once an image is loaded the levelwindow appears to the right hand side of the four window view. With this tool you can adjust the range of grey values displayed and the gradient between them. Moving the lower boundary up results in any pixels having a value lower than that boundary to be displayed as black. Lowering the upper boundary causes all pixels having a value higher than it to be displayed as white. + +The pixels with a value between the lower and upper boundary are displayed in different shades of grey. This way a smaller levelwindow results in higher contrasts while cutting of the information outside its range whereas a larger levelwindow displays more information at the cost of contrast and detail. + +You can pick the levelwindow with the mouse to move it up and down, while moving the mouse cursor to the left or right to change its size. Picking one of the boundaries with a left click allows you to change the size symmetrically. Holding CTRL and clicking a boundary adjusts only that value. + +\section Qmitk3mApplicationUserManualMemoryUsage System Load Indicator + +The are in the lower right hand corner of the screen gives information about the memory currently required by the MITK 3M3 application. Keep in mind that image processing is a highly memory intensive task and monitor the indicator to avoid your system freezing while constantly swapping to the hard drive. + +\section Qmitk3mApplicationUserManualPerspectives Perspectives + + The different tasks that arise in medical imaging need very different approaches. To acknowledge this circumstance MITK supplies a framework that can be build uppon by very different solutions to those tasks. These solutions are called perspectives, each of them works independently of others although they might be used in sequence to achieve the solution of more difficult problems. + +The welcome screen gives an overview and a short description of the perpectives currently supported in MITK 3M3. More information is supplied by their respective help entries. + +It is also possible to switch between the perspectives either using the perspective switcher (as seen in \ref Qmitk3mApplicationUserManualUserInterface) or the "Window"->"Open Perspective" dialog. + + +See \ref Qmitk3mApplicationUserManualMenu for more information about switching perspectives. +\isHtml +\section Qmitk3mApplicationUserManualPerspectivesList List of perspectives in MITK 3M3 + +MITK 3M3 features the following perspectives: + + - \subpage org.basicimageprocessing + - \subpage org.datamanager + - \subpage org.dicom + - \subpage org.diffusion + - \subpage org.measure + - The Registration perspective with + - \subpage org.deform.registration + - \subpage org.pointbased.reg + - \subpage org.rigid.regis + - \subpage org.segment + - \subpage org_vesseltreeseg + - \subpage org.volvis +\isHtmlend +*/ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Show_Views.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Show_Views.png new file mode 100644 index 0000000000..722ed00d39 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Show_Views.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Top_Right_Corner_Menu.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Top_Right_Corner_Menu.png new file mode 100644 index 0000000000..865400cc98 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Top_Right_Corner_Menu.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Views_Choices.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Views_Choices.png new file mode 100644 index 0000000000..26c6c332d8 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Views_Choices.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Welcome.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Welcome.png new file mode 100644 index 0000000000..5d457e766c Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Welcome.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Window_Dropdown.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Window_Dropdown.png new file mode 100644 index 0000000000..b3af19556e Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/Window_Dropdown.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/theme_black.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/theme_black.png new file mode 100644 index 0000000000..a6fefe17d6 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/theme_black.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/theme_default.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/theme_default.png new file mode 100644 index 0000000000..4848e4f3c9 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/UserManual/theme_default.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/about-logo.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/about-logo.png new file mode 100644 index 0000000000..bee986bb1c Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/about-logo.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/assistant-icon.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/assistant-icon.png new file mode 100644 index 0000000000..169d1d439b Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/assistant-icon.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/doxygen/modules.dox b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/doxygen/modules.dox new file mode 100644 index 0000000000..4afd7b3e69 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/documentation/doxygen/modules.dox @@ -0,0 +1,16 @@ +/** + \defgroup org_mitk_dtiatlasapp org.mitk.dtiatlasapp Plugin + \ingroup MITKPlugins + + \brief Describe your plugin here. + +*/ + +/** + \defgroup org_mitk_dtiatlasapp_internal Internal + \ingroup org_mitk_dtiatlasapp + + \brief This subcategory includes the internal classes of the org.mitk.dtiatlasapp plugin. Other + plugins must not rely on these classes. They contain implementation details and their interface + may change at any time. We mean it. +*/ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/files.cmake b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/files.cmake new file mode 100644 index 0000000000..f824847149 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/files.cmake @@ -0,0 +1,62 @@ +SET(SRC_CPP_FILES + QmitkDTIAtlasAppApplication.cpp + QmitkDTIAtlasAppWorkbenchAdvisor.cpp +) + +SET(INTERNAL_CPP_FILES + QmitkDTIAtlasAppApplicationPlugin.cpp + QmitkDTIAtlasAppIntroPart.cpp + QmitkDTIAtlasAppPerspective.cpp + QmitkWelcomePerspective.cpp +) + +SET(UI_FILES + src/internal/QmitkWelcomeScreenViewControls.ui +) + +SET(MOC_H_FILES + src/internal/QmitkDTIAtlasAppIntroPart.h + src/internal/QmitkDTIAtlasAppApplicationPlugin.h + src/QmitkDTIAtlasAppApplication.h + src/internal/QmitkDTIAtlasAppPerspective.h + src/internal/QmitkWelcomePerspective.h +) + +SET(CACHED_RESOURCE_FILES +# list of resource files which can be used by the plug-in +# system without loading the plug-ins shared library, +# for example the icon used in the menu and tabs for the +# plug-in views in the workbench + plugin.xml + resources/diffusionimaging.png +) + +SET(QRC_FILES +# uncomment the following line if you want to use Qt resources + resources/welcome/QmitkWelcomeScreenView.qrc + resources/org_mitk_gui_qt_dtiatlasapp.qrc +) + +# SET(CPP_FILES) + +foreach(file ${SRC_CPP_FILES}) + SET(CPP_FILES ${CPP_FILES} src/${file}) +endforeach(file ${SRC_CPP_FILES}) + +foreach(file ${INTERNAL_CPP_FILES}) + SET(CPP_FILES ${CPP_FILES} src/internal/${file}) +endforeach(file ${INTERNAL_CPP_FILES}) + + +#----------- Qt Help Collection Project -------------# + +IF (BLUEBERRY_USE_QT_HELP) + SET(_plugin_qhcp_input "${CMAKE_CURRENT_SOURCE_DIR}/documentation/MitkDTIAtlasAppQtHelpCollectionProject.qhcp") + SET(_plugin_qhcp_output "${PLUGIN_OUTPUT_DIR}/resources/MitkDTIAtlasAppQtHelpCollection_${MBI_WC_REVISION_HASH}.qhc") + ADD_CUSTOM_COMMAND(OUTPUT ${_plugin_qhcp_output} + COMMAND ${QT_COLLECTIONGENERATOR_EXECUTABLE} ${_plugin_qhcp_input} -o ${_plugin_qhcp_output} + DEPENDS ${_plugin_qhcp_input} + ) + + SET(FILE_DEPENDENCIES ${_plugin_qhcp_output}) +ENDIF() diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/manifest_headers.cmake b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/manifest_headers.cmake new file mode 100644 index 0000000000..9ffbd64d97 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/manifest_headers.cmake @@ -0,0 +1,8 @@ +set(Plugin-Name "DTI Atlas Application Bundle") +set(Plugin-Version "1.0") +set(Plugin-Vendor "DKFZ, Medical and Biological Informatics") +set(Plugin-ContactAddress "http://www.mitk.org") +set(Require-Plugin org.mitk.gui.qt.ext) +set(Plugin-Activator QmitkDTIAtlasAppApplicationPlugin) + + diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/plugin.xml b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/plugin.xml new file mode 100644 index 0000000000..976f176565 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/ImageProcessing_48.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/ImageProcessing_48.png new file mode 100644 index 0000000000..27dc941ac4 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/ImageProcessing_48.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/Measurement_48.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/Measurement_48.png new file mode 100644 index 0000000000..b986ef5a84 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/Measurement_48.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/RigidRegistration.xpm b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/RigidRegistration.xpm new file mode 100644 index 0000000000..51a5f9c4bb --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/RigidRegistration.xpm @@ -0,0 +1,231 @@ +/* XPM */ +static char *RigidRegistration___[] = { +/* columns rows colors chars-per-pixel */ +"48 48 177 2", +" c #6F5F67", +". c #735C62", +"X c #5B6B74", +"o c #577076", +"O c #587177", +"+ c #5C747B", +"@ c #5D797F", +"# c #796167", +"$ c #71636B", +"% c #7F656B", +"& c #696872", +"* c #63747C", +"= c #9B4E61", +"- c #8A5662", +"; c #A84D63", +": c #A55367", +"> c #AA5167", +", c #A55569", +"< c #AB5368", +"1 c #A45A6C", +"2 c #AA5A6D", +"3 c #AC5E71", +"4 c #81656C", +"5 c #8F6F77", +"6 c #906D76", +"7 c #8F7078", +"8 c #94767D", +"9 c #9B727C", +"0 c #AE6375", +"q c #B3687A", +"w c #547B85", +"e c #5E7B82", +"r c #5E7D8C", +"t c #657981", +"y c #6C7F87", +"u c #6C7F88", +"i c #7B7486", +"p c #707388", +"a c #887A83", +"s c #9E7F87", +"d c #3E8B9E", +"f c #3B92A7", +"g c #3696AD", +"h c #3F98AE", +"j c #5E8088", +"k c #548797", +"l c #558698", +"z c #598B9C", +"x c #60858E", +"c c #6E848B", +"v c #73868E", +"b c #7A828D", +"n c #6C8391", +"m c #6A8F97", +"M c #7D8792", +"N c #758C94", +"B c #7B8D95", +"V c #748F9B", +"C c #7A8E9A", +"Z c #6D919A", +"A c #7A9097", +"S c #72939B", +"D c #7C949B", +"F c #7E989E", +"G c #548FA3", +"H c #4399AE", +"J c #4C9AAD", +"K c #5293A5", +"L c #5C95A5", +"P c #5597A9", +"I c #5499AA", +"U c #5B9BAB", +"Y c #459EB3", +"T c #5A9EB0", +"R c #6597A2", +"E c #6994A5", +"W c #6D9AA5", +"Q c #659CAB", +"! c #6C9CAB", +"~ c #7296A5", +"^ c #7499A3", +"/ c #7A9CA5", +"( c #779BA9", +") c #45A0B7", +"_ c #4BA1B6", +"` c #47A2B8", +"' c #4AA3B9", +"] c #4FA8BE", +"[ c #56A1B4", +"{ c #5CA1B3", +"} c #52A6BA", +"| c #5CA6B8", +" . c #54A8BC", +".. c #5CA9BC", +"X. c #68A0AF", +"o. c #7DA1A9", +"O. c #63A1B3", +"+. c #6EA7B7", +"@. c #62A7B9", +"#. c #63ABBD", +"$. c #6BADBE", +"%. c #74A2B0", +"&. c #78A7B3", +"*. c #70AEBE", +"=. c #5AAEC2", +"-. c #67B5C8", +";. c #74B1C0", +":. c #7EB5C2", +">. c #7FBCCB", +",. c #9F888D", +"<. c #828C96", +"1. c #928A92", +"2. c #9C8990", +"3. c #82959D", +"4. c #8A959F", +"5. c #81989F", +"6. c #A2848B", +"7. c #A2888E", +"8. c #AE8E96", +"9. c #A99297", +"0. c #AD9399", +"q. c #B2999F", +"w. c #8497A0", +"e. c #8E96A1", +"r. c #829CA2", +"t. c #8A9DA5", +"y. c #8C9FA8", +"u. c #9097A2", +"i. c #9B9EA8", +"p. c #B59EA4", +"a. c #8AA0A7", +"s. c #83A4AC", +"d. c #8DA2AA", +"f. c #91A4AC", +"g. c #98A0AA", +"h. c #91A8AF", +"j. c #80A7B6", +"k. c #87A9B1", +"l. c #8CAAB2", +"z. c #94ACB3", +"x. c #9AACB4", +"c. c #87B2BD", +"v. c #95B1B7", +"b. c #98B1B7", +"n. c #94B2B9", +"m. c #98B2B8", +"M. c #9FB8BF", +"N. c #A0B5BC", +"B. c #A1B9BF", +"V. c #BCB1B8", +"C. c #CAB3B9", +"Z. c #8FBAC5", +"A. c #93BCC7", +"S. c #9EBAC1", +"D. c #A3BDC3", +"F. c #A8BEC5", +"G. c #9DC0C9", +"H. c #83C2D1", +"J. c #A7C0C6", +"K. c #A8C1C7", +"L. c #A4C3CA", +"P. c #AEC7CD", +"I. c #A5CFDB", +"U. c #B6CDD4", +"Y. c #B9D1D7", +"T. c #BAD5DB", +"R. c #BFD9DF", +"E. c #B0D8E2", +"W. c #BEDFE7", +"Q. c #C2C1C9", +"!. c #DBC4CA", +"~. c #DDC8CE", +"^. c #E0C9CF", +"/. c #C3DDE3", +"(. c #C7E0E7", +"). c #CEE7ED", +"_. c None", +/* pixels */ +"3 3 3 3 3 3 3 3 3 ; : = = = = = = = = < 3 2 2 2 2 2 2 2 ; , , , , , , , , : _._._._._._._._._._.", +"0 C.C.C.C.C.C.C.C.s . . . . . . . . 4 6.p.p.p.p.p.p.p.p.8 7.,.7.,.,.,.,.,.1 _._._._._._._._._._.", +"0 C.C.C.C.C.C.C.C.s # . . . . . . . 4 6.p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.,.1 _._._._._._._._._._.", +"0 C.C.C.C.C.C.C.C.s # . . . . . . . % 6.p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.,.1 _._._._._._._._._._.", +"0 C.C.C.C.C.C.C.C.s . . . . . . . . % s p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.,.1 _._._._._._._._._._.", +"0 C.C.C.C.C.C.C.C.,.# . . . . . . . % 6.p.p.p.p.p.p.p.p.8 ,.,.,.,.,.,.,.D 1 _._._._._._._._._._.", +"0 C.C.C.C.C.C.C.C.s # . . . . . . . % s p.p.p.p.p.p.p.q.8 ,.,.,.7.1.L U I i _._._._._._._._._._.", +"0 C.C.C.C.C.C.C.C.s # . . . . . . . % ,.p.p.p.p.p.p.p.p.8 ,.,.S P U F r.r.K _._._._._._._._._._.", +"0 C.C.C.C.C.C.C.C.s . . . . . . . . % 6.p.p.p.p.p.p.p.p.a L P W o.5.5.r.r.U _._._._._._._._._._.", +"< s s s s s s s s 9 6 8 5 5 5 7 5 5 5 6 7 5 5 5 7 7 n I K ^ r.r.F a.a.F a.F H _._._._._._._._._.", +"q !.!.!.!.!.!.!.!.6.9.p.q.p.p.p.q.p.6.4 # . . $ k I &.m.A 3.r.r.a.F r.r.F r.J _._._._._._._._._.", +"q ^.^.^.^.^.^.^.^.6.9.p.p.p.p.p.p.p.7.4 . * K T v.b.b.b.h.t.r.r.r.r.r.r./ r.o.f _._._._._._._._.", +"q ^.^.^.^.^.^.^.^.6.0.p.p.p.p.p.p.p.,.k K %.m.m.m.m.b.m.b.a.F r.r.r.r.r.r.r.r.H _._._._._._._._.", +"q ^.^.^.^.^.^.^.^.6.q.p.p.p.p.p.g.O.{ S A m.m.m.m.m.m.m.b.d.w.r.r.r.r.r.r.r.r.R _._._._._._._._.", +"q ^.^.^.^.^.^.^.^.7.8.p.p.p.%.{ X.r.r.r.v z.m.m.m.b.m.m.b.b.t.5.r.r.r.5./ B Z ^ ` _._._._._._._.", +"q ^.^.^.^.^.^.^.^.7.8.i.O.O.( r.r.r.r.r.N F b.m.m.m.m.m.b.b.d.r.r.r.5.5.t.4.v.P.;._._._._._._._.", +"q ^.^.^.^.^.~.~.~.E T X.a.5.a.F r.r.r.r.5.v b.b.m.b.m.m.m.b.v.5.3.5.d.h.D.P.P.P.P._ _._._._._._.", +"q ^.^.^.^.^.Q.*.$.A.P.r.F / F a.r.r.r.r.r.N a.b.m.m.m.m.m.z.d.f.f.x.P.P.P.P.P.P.P.#._._._._._._.", +"< 8.0.0.^ [ *.P.P.P.P.a.5.a.r.r./ r.r.r.r.5.B b.m.m.b.a.3.3.5.5.5.P.P.P.P.P.P.P.P.L.' _._._._._.", +"0 q.( @.Z.P.P.P.P.P.P.J.D F r.r.r.r.r.r.r.r.w.h.z.r.w.r.5.r.r.r.5.h.P.P.P.P.P.P.P.P..._._._._._.", +"0 C.x.:.P.P.P.P.P.P.P.P.t.5.r.r.r.r.r.r.r.r.t.d.d.d.r.r.r.r.r.r.a.5.P.P.P.P.P.P.P.P.Z._._._._._.", +"0 C.C.@.P.P.P.P.P.P.P.P.m.4.r.r.r.r.r.5.a.d.d.d.r.r.r.r.r.r.r.r.5.5.m.P.P.P.P.P.P.P.P.} _._._._.", +"0 C.C.j.G.P.P.P.P.P.P.P.P.5.5.r.r.5.3.3.d.h.b.a.a.r.r.r.r.r.r.r.F 5.a.P.P.P.P.P.P.P.l.{ _._._._.", +"0 C.C.C.#.P.P.P.P.P.P.P.P.h.5.5.3.3.r.v.b.b.m.h.d.r.r.r.r.r.r.r.a.5.3.L.P.P.P.M.s.^ Z S H _._._.", +"0 C.C.C.+.L.P.P.P.P.P.P.m.t.<.3.d.m.n.m.m.m.b.m.d.r.r.r.r.r.r.r.r.r.5.d.P.h.o.Z S F r.r.I _._._.", +"0 C.C.C.C.$.P.P.P.P.f.3.t.m.h.5.m.m.m.b.m.m.m.m.d.d.r.r.r.r.r.r.r.r.r.3.3.b D 5.r.r.r.r./ Y _._.", +"0 C.C.C.C.@.P.D.h.3.d.P.).)./.<.v.m.m.m.m.b.m.m.b.d.w.r.r.r.r.r.5.4.5.3.A r.r.r.r.r.r.r.r.J _._.", +"2 0.0.0.0.e.Q t.m.R.).).).).).f./ m.m.m.m.m.m.m.b.r.t.5.r.r.5.D 3.f.P.m.M r.r.r./ r.r.r.r.^ H _.", +"= 4 4 4 4 4 T ).).).).).).).).U.3.b.m.m.m.m.m.b.b.z.v 5.D 5.d.M.P.P.P.P.5.D r.r.r.r.r.r.r.r.H _.", +"= . . . . . r I.).).).).).).).).h.d.m.m.b.m.m.m.z.N X * d.P.P.P.P.P.P.P.b.M r.r.r.r.r.r.r.r.R _.", +"= . . . . . . | ).).).).).).).).K.d.m.m.m.m.r.c + t N t P.P.P.P.P.P.P.P.P.<.F r.r.r.r.r.r.r.r.H ", +"= . . . . . . z (.).).).).).).).).f.h.z.A * * c 5.r.r.* f.P.P.P.P.P.P.P.P.e.S r.r.r.r.r.F S Z Y ", +"= . . . . . $.).).).).).).).).m.3.y * B r.r.r.r.r.N A P.P.P.P.P.P.P.P.K.Z a./ 5.S m S k.B...", +"= . . . . . . P ).).).).).(.F.x.f.3.D r.r.r.r.r.r.F a.v M.P.P.P.P.P.P.P.P.s.N S Z o.v.P.P.P...", +"= . . . . . . . & >.).).Y.N.h.h.m.P.d.N r.r.r.r.F a.o.5.S f.P.P.P.P.P.P.P.x./ _.s.M.P.P.P.P.P...", +"= . . . . . . . . T F.x.y.h.F.P.P.P.N.c r.r.r.r.o.F a.5.5.4.J.P.P.P.K.h.d.4.J.k.b.P.P.P.P.P.P...", +"= - - - - - - - - p ~ x.P.P.P.P.P.P.P.A N r.r.r.5.r.r.r.r.A d.P.m.g.4.z.U.).).P.o.P.P.P.P.P.P.#.", +"_._._._._._._._._._.[ P.P.P.P.P.P.P.P.m.N r.r.r.r.r.r.F r.F S D a.N.(.).).).).).o.B.P.P.P.P.P...", +"_._._._._._._._._._.Y G.P.P.P.P.P.P.P.P.S F r.r.r.r.r.D S Z ^ l.).).).).).).).).S.s.P.P.P.P.P...", +"_._._._._._._._._._._.#.P.P.P.P.P.P.P.P.l.Z r.r.5.S Z o.l.K.m.o.).).).).).).).).(./ P.P.P.P.P...", +"_._._._._._._._._._._.` K.P.P.P.P.P.P.P.P.Z A Z Z s.M.P.P.P.P./ P.).).).).).).).).n.h.P.P.P.L.' ", +"_._._._._._._._._._._._.;.P.P.P.P.P.P.P.l.W ^ k.K.P.P.P.P.P.P.l.l.).).).).).).).).T.^ P.Z...` _.", +"_._._._._._._._._._._._.` P.P.P.P.S.s.m j @ S P.P.P.P.P.P.P.P.P.^ T.).).).).).).).)..._ _._._._.", +"_._._._._._._._._._._._._.:.P.n.o.x e + o o j v.P.P.P.P.P.P.P.P.k.n.).).).).).E.-.] _._._._._._.", +"_._._._._._._._._._._._._.` Z j @ o o o o o + / P.P.P.P.P.P.P.P.J.^ /.).).H.=._ _._._._._._._._.", +"_._._._._._._._._._._._._.g w o o o o o o o o x M.P.P.P.P.P.P.P.P.s.c.-.] _._._._._._._._._._._.", +"_._._._._._._._._._._._._._.d o o o o o o o O e o.P.P.P.P.P.P.P.;.[ _._._._._._._._._._._._._._.", +"_._._._._._._._._._._._._._.f d d d d d d d d d h ............' _._._._._._._._._._._._._._._._." +}; diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/app-icon.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/app-icon.png new file mode 100644 index 0000000000..1616208654 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/app-icon.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/diffusionimaging.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/diffusionimaging.png new file mode 100644 index 0000000000..d875ea96bd Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/diffusionimaging.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/icon_dicom.xpm b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/icon_dicom.xpm new file mode 100644 index 0000000000..d35e45238c --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/icon_dicom.xpm @@ -0,0 +1,71 @@ +/* XPM */ +static char *Dicom___[] = { +/* columns rows colors chars-per-pixel */ +"48 48 17 1", +" c #00AAD1", +". c #00A9D2", +"X c #00A8D3", +"o c #00A9D3", +"O c #00AAD2", +"+ c #00ABD2", +"@ c #00AAD3", +"# c #00ABD3", +"$ c #00ACD3", +"% c #00A9D4", +"& c #00A9D5", +"* c #00AAD4", +"= c #00ABD4", +"- c #00AAD5", +"; c #00ABD5", +": c #00ACD4", +"> c None", +/* pixels */ +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>*>>>>>>>>>>>>>>>>>>", +">o@@@@*@>>>>@o>>>>>*Oo*#>>*@%O@o>>>>@@%>>>>>@@>>", +">O@>>>@@@>>>@o>>o.@>>>>>>@O=>>*@#>>>Oo@>>>>+o@o>", +">O@>>>>>#@>>@o>>+@>>>>>>>*->>>>>@o>>@@@>>>>@@@+>", +">O@>>>>>%@>>@o>##>>>>>>>o@>>>>>>*%>>@@@.>>>@-@#>", +">O@>>>>>o@>>@o>@@>>>>>>>=@>>>>>>+@>>O@**>>:@>@@>", +">O@>>>>>@@>>@o>@@>>>>>>>o*>>>>>>#@>>OX>@>>@O>@@>", +">O@>>>>>OO>>@o>@@>>>>>>>#@>>>>>>@O>>@+>@O>@@>o*>", +">O@>>>>>==>>@o>+@>>>>>>>*.>>>>>>@@>>@@> O+@>>#@>", +">O@>>>>*@>>>@o>>@%>>>>>>>O@>>>>#@->>@>>>***>>@*>", +">O#@$=@@&>>>@o>>+@@O*=O>>=@.o #O@>>O@>>>@@>>>@@>", +">O***@->>>>>#->>>>OO@oo>>>>@O+@@>>>;@>>>oO>>>@O>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", +">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" +}; diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/icon_vesseltreesegmentation.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/icon_vesseltreesegmentation.png new file mode 100644 index 0000000000..825792fe64 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/icon_vesseltreesegmentation.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/mintLogo.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/mintLogo.png new file mode 100644 index 0000000000..377094bb86 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/mintLogo.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/org_mitk_gui_qt_dtiatlasapp.qrc b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/org_mitk_gui_qt_dtiatlasapp.qrc new file mode 100644 index 0000000000..6b68f42133 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/org_mitk_gui_qt_dtiatlasapp.qrc @@ -0,0 +1,6 @@ + + + app-icon.png + mintLogo.png + + diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/segmentation.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/segmentation.png new file mode 100644 index 0000000000..0b6181225b Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/segmentation.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/volvis.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/volvis.png new file mode 100644 index 0000000000..37347e5a12 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/volvis.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/QmitkWelcomeScreenView.qrc b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/QmitkWelcomeScreenView.qrc new file mode 100644 index 0000000000..e300c13787 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/QmitkWelcomeScreenView.qrc @@ -0,0 +1,34 @@ + + + style.css + function.js + pics/background.jpg + pics/popup_bttn_close.png + pics/dti.jpg + pics/dti_animated.gif + pics/experimental.png + pics/0aref_alltracts.png + pics/0aaref_alltracts.png + pics/0bref_colormap.gif + pics/0bref_colormap.png + pics/0cref_t1.gif + pics/0cref_t1.png + pics/01aCING.png + pics/01CING.png + pics/02aCORPUS.png + pics/02CORPUS.png + pics/03aCST.png + pics/03CST.png + pics/04aFORNIX.png + pics/04FORNIX.png + pics/05aILF+IFO+UNCUS.png + pics/05ILF+IFO+UNCUS.png + pics/06aSLF+SOFF+ARCUATE.png + pics/06SLF+SOFF+ARCUATE.png + pics/07aPEDUNCLES.png + pics/07PEDUNCLES.png + pics/button_mitka.png + pics/button_mitk.png + mitkdtiatlasappwelcomeview.html + + diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/function.js b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/function.js new file mode 100644 index 0000000000..0076523ac4 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/function.js @@ -0,0 +1,317 @@ +// If you want to create a new button you have to add some data (strings) to the following five arrays. +// Make sure that you add your data at the same position in each array. +// The buttons will be generated in order to the array's index. e.g. data at array's index '0' will generate the first button. + +// enter the name of your module here +var moduleNames = new Array("Colormap", + "T1 Image", + "3D Background", + "Cingulum", + "Corpus Callosum", + "Corticospinal Tract", + "Fornix", + "ILF, IFO, Uncus", + "SLF, SOFF, Arcuate", + "ICP, MCP, SCP, ML", + "Download MITK"); + +// add the MITK-link to your module +var moduleLinks = new Array("mitk://mitk.perspectives/org.mitk.dtiatlasapp.perspectives.dtiatlasapp?clear=false&dataset=./bin/atlas-data/0bref_colormap.mitk", + "mitk://mitk.perspectives/org.mitk.dtiatlasapp.perspectives.dtiatlasapp?clear=false&dataset=./bin/atlas-data/0cref_t1.mitk", + "mitk://mitk.perspectives/org.mitk.dtiatlasapp.perspectives.dtiatlasapp?clear=false&dataset=./bin/atlas-data/0aref_alltracts.mitk", + "mitk://mitk.perspectives/org.mitk.dtiatlasapp.perspectives.dtiatlasapp?clear=false&dataset=./bin/atlas-data/01CING.mitk", + "mitk://mitk.perspectives/org.mitk.dtiatlasapp.perspectives.dtiatlasapp?clear=false&dataset=./bin/atlas-data/02CORPUS.mitk", + "mitk://mitk.perspectives/org.mitk.dtiatlasapp.perspectives.dtiatlasapp?clear=false&dataset=./bin/atlas-data/03CST.mitk", + "mitk://mitk.perspectives/org.mitk.dtiatlasapp.perspectives.dtiatlasapp?clear=false&dataset=./bin/atlas-data/04FORNIX.mitk", + "mitk://mitk.perspectives/org.mitk.dtiatlasapp.perspectives.dtiatlasapp?clear=false&dataset=./bin/atlas-data/05ILF+IFO+UNCUS.mitk", + "mitk://mitk.perspectives/org.mitk.dtiatlasapp.perspectives.dtiatlasapp?clear=false&dataset=./bin/atlas-data/06SLF+SOFF+ARCUATE.mitk", + "mitk://mitk.perspectives/org.mitk.dtiatlasapp.perspectives.dtiatlasapp?clear=true&dataset=./bin/atlas-data/07PEDUNCLES.mitk", + "http://www.mitk.org"); + +// add the filename of your icon for the module. Place the picture in subdirectory "pics". +// The picture's width should be 136 pixel; the height 123 pixel. +var picFilenames = new Array("0bref_colormap.png", + "0cref_t1.png", + "0aref_alltracts.png", + "01CING.png", + "02CORPUS.png", + "03CST.png", + "04FORNIX.png", + "05ILF+IFO+UNCUS.png", + "06SLF+SOFF+ARCUATE.png", + "07PEDUNCLES.png", + "button_mitk.png"); + +// if you want to create an animated icon, add the name of your animated gif (placed in subdirectory "pics"). Otherwise enter an empty string "". +// The animation's width should be 136 pixel; the height 123 pixel. +var aniFilenames = new Array("0bref_colormap.gif", + "0cref_t1.gif", + "0aaref_alltracts.png", + "01aCING.png", + "02aCORPUS.png", + "03aCST.png", + "04aFORNIX.png", + "05aILF+IFO+UNCUS.png", + "06aSLF+SOFF+ARCUATE.png", + "07aPEDUNCLES.png", + "button_mitka.png"); + +// if your module is not stable, you can mark it as experimental. +// just set true for experimental or false for stable. +var experimental = new Array(false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false); + +// add the description for your module. The description is displayed in a PopUp-window. +var moduleDescriptions = new Array("This colormap represents the original diffusion acquisition that was used as input for tractography.", + "This T1-weighted image was aquired during the same imaging session as the diffusion image. It is roughly aligned with the diffusion image and provides additional, complementary information.", + "This dataset contains all fibers that were found by the global tractography approach. It can serve as a background for better orientation in the 3D view.", + "This dataset contains the Cingulum fibers and most important regions of interest that were used to extract it.", + "This dataset contains the Corpus Callosum fibers and most important regions of interest that were used to extract it.", + "This dataset contains the Corticospinal Tract fibers and most important regions of interest that were used to extract it.", + "This dataset contains the Fornix fibers and most important regions of interest that were used to extract it.", + "This dataset contains the Inferior Longitudinal Fasciculus, Inferior Fronto-Occipital, and the Uncus fibers and most important regions of interest that were used to extract it.", + "This dataset contains the Superior Longitudinal Fasciculus, Superior OFF, and Arcuate fibers and most important regions of interest that were used to extract it.", + "This dataset is not in the same world coordinate system as the others and should not be opend in combination with any of the other datasets. It contains a 3D visualization of the cerebellum and the Inferior Cerebral Peduncles, Medial Cerebral Peduncle, Superior Cerebral Peduncles, and Medial Limnisci fibers and the and most important regions of interest that were used to extract it.", + "Open the MITK website in an external browser."); + +var bttns = new Array(); + +var d = document, da = d.all; + +// holds id of current mouseover-HTML-element +var currentTarget; + +// get the id of current mouseover-HTML-element +d.onmouseover = function(o){ + var e = da ? event.srcElement : o.target; + currentTarget = e.id; +} + + +// build-function called by onload-event in HTML-document +function createButtons(){ + + for (i=0; i < moduleNames.length; i++){ + bttns[i] = new Button(moduleNames[i],moduleLinks[i], picFilenames[i], aniFilenames[i],moduleDescriptions[i]); + bttns[i].createButton(); + } + + for (i=0; i < moduleNames.length; i++){ + + if(experimental[i]){ + setExperimental(i); + } + } + + createClearFloat(); +} + +// Class Button +function Button(moduleName, moduleLink, picFilename, aniFilename, moduleDescr){ + + // Properties + this.bttnID = "bttn" + moduleName; + this.modName = moduleName; + this.modLink = moduleLink; + this.picPath = "pics/" + picFilename; + this.aniPath = "pics/" + aniFilename; + this.modDescr = moduleDescr; + + // Methods + this.createButton = function(){ + + // get DIV-wrapper for Button and append it to HTML-document + bttnWrapper = this.createWrapper(); + document.getElementById("bttnField").appendChild(bttnWrapper); + + // get link-element for picture and append it to DIV-wrapper + bttnPicLink = this.createPicLink(); + bttnWrapper.appendChild(bttnPicLink); + + // set HTML attributes for button-element + bttn = document.createElement("img"); + bttn.src = this.picPath; + bttn.id = this.bttnID; + bttn.className = "modBttn"; + bttn.height = 123; + bttn.width = 136; + bttn.onmouseover = function(){startAni(this.id);}; + bttn.onmouseout = function(){stopAni(this.id);}; + + // append button to link-element + bttnPicLink.appendChild(bttn); + + // create text-link and add it to DIV-wrapper + bttnTxtLink = document.createElement("a"); + bttnTxtLink.href = this.modLink; + bttnTxtLink.className = "txtLink"; + bttnTxtLink.appendChild(document.createTextNode(this.modName)); + bttnWrapper.appendChild(bttnTxtLink); + + // create pop-up link for module description + bttnPopUpLink = document.createElement("a"); + modName = this.modName; + modDescr = this.modDescr; + bttnPopUpLink.onclick = function(){showPopUpWindow();}; + bttnPopUpLink.className = "popUpLink"; + bttnPopUpLink.id = "popup" + this.modName; + bttnPopUpLink.appendChild(document.createTextNode("more info >>")); + bttnWrapper.appendChild(document.createElement("br")); + bttnWrapper.appendChild(bttnPopUpLink); + + return bttn; + } + + this.createWrapper = function(){ + bttnWrapper = document.createElement("div"); + bttnWrapper.id = "wrapper" + this.modName; + bttnWrapper.className = "bttnWrap"; + + return bttnWrapper; + } + + this.createPicLink = function(){ + picLink = document.createElement("a"); + picLink.href = this.modLink; + picLink.id = "link" + this.modName; + + return picLink; + } + +} + + +function showPopUpWindow(){ + + // modules position in array? + modulePos = getPos(currentTarget,"popup"); + + // get reference to anchor-element in HTML-document + popUpAnchor = document.getElementById("popupAnchor"); + + // check if a popUp is open + if(popUpAnchor.hasChildNodes()){ + // if a popUp is open, remove it! + popUpAnchor.removeChild(document.getElementById("popup")); + } + + // create new container for popUp + container = document.createElement("div"); + container.id = "popup"; + container.align = "right"; + + // append popUp-container to HTML-document + popUpAnchor.appendChild(container); + + // create close-button and append it to popUp-container + bttnClose = document.createElement("img"); + bttnClose.src = "pics/popup_bttn_close.png"; + bttnClose.id = "bttnClose"; + bttnClose.onclick = function(){closeInfoWindow();}; + container.appendChild(bttnClose); + + // create container for content-elements + contHeadline = document.createElement("div"); + contHeadline.id = "contHeadline"; + contDescription = document.createElement("div"); + contDescription.id = "contDescription"; + contModLink = document.createElement("div"); + contModLink.id = "contModLink"; + + // append content-container to popUp-container + container.appendChild(contHeadline); + container.appendChild(contDescription); + container.appendChild(contModLink); + + // create text-elements with content + headline = document.createTextNode(moduleNames[modulePos] + " "); + description = document.createTextNode(moduleDescriptions[modulePos]); + moduleLink = document.createElement("a"); + moduleLink.href = moduleLinks[modulePos] ; + moduleLink.className = 'moduleLink'; + moduleLinkTxt = document.createTextNode("Click here to open the " + moduleNames[modulePos].toLowerCase() + " dataset"); + moduleLink.appendChild(moduleLinkTxt); + + // append text-elements to their container + contHeadline.appendChild(headline); + contDescription.appendChild(description); + contModLink.appendChild(moduleLink); +} + +function getPos(id,prefix){ + + if(prefix == "popup"){ + targetID = id.slice(5); + }else{ + if(prefix == "bttn"){ + targetID = id.slice(4); + } + } + + for(i=0; i < moduleNames.length; i++ ){ + if(moduleNames[i] == targetID){ + return i; + } + } +} + +function setExperimental(modPos){ + linkID = "link" + moduleNames[modPos]; + + expPic = document.createElement("img"); + expPic.src = "pics/experimental.png"; + expPic.className = "expPic"; + //alert(bttns[modPos].bttnID); + expPic.onmouseover = function(){startAni(bttns[modPos].bttnID);changeToHover(bttns[modPos].bttnID);}; + expPic.onmouseout = function(){stopAni(bttns[modPos].bttnID);changeToNormal(bttns[modPos].bttnID);}; + + document.getElementById(linkID).appendChild(expPic); +} + +function changeToHover(targetId){ + bttn = document.getElementById(targetId); + bttn.className = "modBttnHover"; +} + +function changeToNormal(targetId){ + bttn = document.getElementById(targetId); + bttn.className = "modBttn"; +} + +// function to close PopUp-window +function closeInfoWindow(){ + popUpAnchor = document.getElementById("popupAnchor"); + popUpAnchor.removeChild(document.getElementById("popup")); +} + +function createClearFloat(){ + cf = document.createElement("div"); + cf.className = "clearfloat"; + document.getElementById("bttnField").appendChild(cf); +} + +startAni = function(targetId){ + modulePos = getPos(targetId,"bttn"); + + if(aniFilenames[modulePos] != ''){ + bttn = document.getElementById(targetId); + bttn.src = "pics/" + aniFilenames[modulePos]; + } +} + +stopAni = function(targetId){ + modulePos = getPos(targetId,"bttn"); + + bttn = document.getElementById(targetId); + bttn.src = "pics/" + picFilenames[modulePos]; +} + diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/mitkdtiatlasappwelcomeview.html b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/mitkdtiatlasappwelcomeview.html new file mode 100644 index 0000000000..bff2a7e4ca --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/mitkdtiatlasappwelcomeview.html @@ -0,0 +1,36 @@ + + + + + + Springer DTI Atlas - MITK Diffusion Imaging App + + + + + + +
+ + +
+ +

Welcome to the Diffusion Imaging Atlas!

+ + +
+ +
+ This viewer will navigate you through all datasets of the Springer Diffusion Imaging Atlas. The application was developed by the German Cancer Research Center (DKFZ) on the basis of the well established, free open source software toolkit MITK. If you are interested in fiber tracking, quantification, group analysis, connectomics, or other open source medical imaging tools, please visit our website www.mitk.org.

Instructions:

First click on "Colormap" or "T1 Image". Then navigate back to the welcome view and click on one of the fiber bundles. Exception: "ICP, MCP, SCP, ML" should be opened exclusively due to its different position in space. +
+ +
+ + +
+ +
+ +
+ + diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/01CING.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/01CING.png new file mode 100644 index 0000000000..ace6381849 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/01CING.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/01aCING.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/01aCING.png new file mode 100644 index 0000000000..9ed520200a Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/01aCING.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/02CORPUS.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/02CORPUS.png new file mode 100644 index 0000000000..64c1f4ddcb Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/02CORPUS.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/02aCORPUS.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/02aCORPUS.png new file mode 100644 index 0000000000..484095abce Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/02aCORPUS.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/03CST.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/03CST.png new file mode 100644 index 0000000000..d322f6a8ec Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/03CST.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/03aCST.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/03aCST.png new file mode 100644 index 0000000000..16d5296b12 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/03aCST.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/04FORNIX.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/04FORNIX.png new file mode 100644 index 0000000000..d111d85f1e Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/04FORNIX.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/04aFORNIX.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/04aFORNIX.png new file mode 100644 index 0000000000..7abf26080a Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/04aFORNIX.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/05ILF+IFO+UNCUS.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/05ILF+IFO+UNCUS.png new file mode 100644 index 0000000000..2cf33842c6 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/05ILF+IFO+UNCUS.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/05aILF+IFO+UNCUS.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/05aILF+IFO+UNCUS.png new file mode 100644 index 0000000000..ef0287c138 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/05aILF+IFO+UNCUS.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/06SLF+SOFF+ARCUATE.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/06SLF+SOFF+ARCUATE.png new file mode 100644 index 0000000000..92a6c731ba Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/06SLF+SOFF+ARCUATE.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/06aSLF+SOFF+ARCUATE.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/06aSLF+SOFF+ARCUATE.png new file mode 100644 index 0000000000..142312c98d Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/06aSLF+SOFF+ARCUATE.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/07PEDUNCLES.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/07PEDUNCLES.png new file mode 100644 index 0000000000..2ca7f6192c Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/07PEDUNCLES.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/07aPEDUNCLES.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/07aPEDUNCLES.png new file mode 100644 index 0000000000..a6b02a7578 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/07aPEDUNCLES.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0aaref_alltracts.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0aaref_alltracts.png new file mode 100644 index 0000000000..15a9758f32 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0aaref_alltracts.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0aref_alltracts.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0aref_alltracts.png new file mode 100644 index 0000000000..b00a6ebc45 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0aref_alltracts.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0bref_colormap.gif b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0bref_colormap.gif new file mode 100644 index 0000000000..ac374c6888 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0bref_colormap.gif differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0bref_colormap.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0bref_colormap.png new file mode 100644 index 0000000000..4915331758 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0bref_colormap.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0cref_t1.gif b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0cref_t1.gif new file mode 100644 index 0000000000..76c0121dea Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0cref_t1.gif differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0cref_t1.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0cref_t1.png new file mode 100644 index 0000000000..341fe0b49a Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/0cref_t1.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/background.jpg b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/background.jpg new file mode 100644 index 0000000000..c93f36df92 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/background.jpg differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/button_mitk.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/button_mitk.png new file mode 100644 index 0000000000..821e041d36 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/button_mitk.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/button_mitka.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/button_mitka.png new file mode 100644 index 0000000000..baf4f14a46 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/button_mitka.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/dti.jpg b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/dti.jpg new file mode 100644 index 0000000000..2a368ea235 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/dti.jpg differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/dti_animated.gif b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/dti_animated.gif new file mode 100644 index 0000000000..dcfd99498d Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/dti_animated.gif differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/experimental.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/experimental.png new file mode 100644 index 0000000000..b05093ea2e Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/experimental.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg.png new file mode 100644 index 0000000000..9fef73a742 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg_bottom.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg_bottom.png new file mode 100644 index 0000000000..f181fb97e2 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg_bottom.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg_middle.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg_middle.png new file mode 100644 index 0000000000..fd477da298 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg_middle.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg_top.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg_top.png new file mode 100644 index 0000000000..99424cbbb7 Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bg_top.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bttn_close.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bttn_close.png new file mode 100644 index 0000000000..279e340beb Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/popup_bttn_close.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/shadow.png b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/shadow.png new file mode 100644 index 0000000000..83eda7b89e Binary files /dev/null and b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/pics/shadow.png differ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/style.css b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/style.css new file mode 100644 index 0000000000..edc5605bb4 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/resources/welcome/style.css @@ -0,0 +1,174 @@ +@charset "utf-8"; + +body{ + margin:0px 0px; + padding: 0px 0px; +} + +h1{ + margin:0px 0px; + padding: 0px 0px; + font-family:"Times New Roman", Times, serif; + color:#333; +} + +img{border:none;} + +#screen{ + width:100%; + min-height:1060px; + height:100%; + padding-top:15px; + background-color:#888888; + background-image:url(pics/background.jpg); + background-repeat:repeat-x; +} + +#welcome{ + min-width:150px; + max-width:690px; + margin: 0 auto; + padding-left:5px; + font-family:"Times New Roman", Times, serif; + color:#333; +} + +#welcomeText{ + margin-top:15px; + margin-bottom:15px; + z-index:1; +} + +#bttnField{ + min-width:150px; + max-width:690px; + margin: 0 auto; + padding-left:5px; +} + +.bttnWrap{ + position:relative; + float:left; + width:140px; + height:190px; + margin-right:32px; + margin-top:5px; + z-index:2; +} + +.modBttn{ + margin-bottom:8px; + border: solid 2px #000; + -webkit-box-shadow: 5px 5px 6px rgba(0,0,0,0.6); +} + +.modBttn:hover{ + border: solid 2px #FFF; + cursor:pointer; + -webkit-box-shadow: none; +} + +.modBttnHover{ + margin-bottom:8px; + border: solid 2px #FFF; + cursor:pointer; + -webkit-box-shadow: none; +} + +.txtLink{ + font-family:"Times New Roman", Times, serif; + font-size:16px; + font-weight:bold; + text-decoration:none; + cursor:pointer; + color:#333; +} + +.txtLink:hover{ + text-decoration:underline; +} + +.popUpLink{ + font-family:"Times New Roman", Times, serif; + font-size:14px; + font-weight:normal; + line-height:16px; + color:#333; +} + +.popUpLink:hover{ + text-decoration:underline; + cursor:pointer; +} + +#popup{ + position:fixed; + max-width:690px; + min-width:150px; + background-color:#000000; + opacity: 0.8; + -webkit-border-radius: 1em; + z-index:3; + font-family:Arial, Helvetica, sans-serif; + color:#FFF; +} + +#bttnClose{ + position:relative; + right:10px; + top:10px; + cursor:pointer; +} + +#contHeadline{ + max-width:690px; + min-width:150px; + margin-left:10px; + margin-right:10px; + font-weight:bold; + font-size:14px; + text-align:left; +} + +#contDescription{ + max-width:690px; + min-width:150px; + margin-top:15px; + margin-bottom:15px; + margin-left:10px; + margin-right:10px; + line-height:21px; + font-family:Arial, Helvetica, sans-serif; + font-weight:normal; + font-size:14px; + text-align:left; +} + +#contModLink{ + max-width:690px; + min-width:150px; + height:50px; + margin-left:10px; + margin-right:10px; + text-align:left; +} + +.moduleLink{ + font-family:Arial, Helvetica, sans-serif; + color:#FFF; +} + +.expPic{ + margin-top:-126px; +} + +.clearfloat{clear:both;} + + + + + + + + + diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppApplication.cpp b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppApplication.cpp new file mode 100644 index 0000000000..8c965fd7a9 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppApplication.cpp @@ -0,0 +1,38 @@ +/*========================================================================= + +Program: Medical Imaging & Interaction Toolkit +Language: C++ +Date: $Date$ +Version: $Revision$ + +Copyright (c) German Cancer Research Center, Division of Medical and +Biological Informatics. All rights reserved. +See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "QmitkDTIAtlasAppApplication.h" + +#include + +#include "QmitkDTIAtlasAppWorkbenchAdvisor.h" + +int QmitkDTIAtlasAppApplication::Start() +{ + berry::Display* display = berry::PlatformUI::CreateDisplay(); + + int code = berry::PlatformUI::CreateAndRunWorkbench(display, new QmitkDTIAtlasAppWorkbenchAdvisor()); + + // exit the application with an appropriate return code + return code == berry::PlatformUI::RETURN_RESTART + ? EXIT_RESTART : EXIT_OK; +} + +void QmitkDTIAtlasAppApplication::Stop() +{ + +} diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppApplication.h b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppApplication.h new file mode 100644 index 0000000000..b7d5eeebfa --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppApplication.h @@ -0,0 +1,42 @@ +/*========================================================================= + +Program: Medical Imaging & Interaction Toolkit +Language: C++ +Date: $Date$ +Version: $Revision$ + +Copyright (c) German Cancer Research Center, Division of Medical and +Biological Informatics. All rights reserved. +See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef QMITKDTIAtlasAppAPPLICATION_H_ +#define QMITKDTIAtlasAppAPPLICATION_H_ + +#include + +class QmitkDTIAtlasAppApplication : public QObject, public berry::IApplication +{ + Q_OBJECT + Q_INTERFACES(berry::IApplication) + +public: + + QmitkDTIAtlasAppApplication() {} + QmitkDTIAtlasAppApplication(const QmitkDTIAtlasAppApplication& other) + { + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); + } + ~QmitkDTIAtlasAppApplication() {} + + int Start(); + void Stop(); +}; + +#endif /*QMITKDTIAtlasAppAPPLICATION_H_*/ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppWorkbenchAdvisor.cpp b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppWorkbenchAdvisor.cpp new file mode 100644 index 0000000000..9e53cb1d72 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppWorkbenchAdvisor.cpp @@ -0,0 +1,112 @@ +/*========================================================================= + + Program: BlueBerry Platform + Language: C++ + Date: $Date: 2009-10-23 02:59:36 +0200 (Fri, 23 Oct 2009) $ + Version: $Revision$ + + Copyright (c) German Cancer Research Center, Division of Medical and + Biological Informatics. All rights reserved. + See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ + +#include "QmitkDTIAtlasAppWorkbenchAdvisor.h" + +#include "internal/QmitkDTIAtlasAppApplicationPlugin.h" + +#include +#include +#include +#include +#include + +#include + +const std::string QmitkDTIAtlasAppWorkbenchAdvisor::WELCOME_PERSPECTIVE_ID = "org.mitk.dtiatlasapp.perspectives.welcome"; + + +void +QmitkDTIAtlasAppWorkbenchAdvisor::Initialize(berry::IWorkbenchConfigurer::Pointer configurer) +{ + berry::QtWorkbenchAdvisor::Initialize(configurer); + + configurer->SetSaveAndRestore(true); + + // TODO This should go into the products plugin_customization.ini file (when + // the product and branding support is finished, see bug 2146). + // This will not work anymore, if bug 2822 is fixed. + berry::IPreferencesService::Pointer prefService = berry::Platform::GetServiceRegistry().GetServiceById(berry::IPreferencesService::ID); + prefService->GetSystemPreferences()->Put(berry::WorkbenchPreferenceConstants::PREFERRED_SASH_LAYOUT, berry::WorkbenchPreferenceConstants::RIGHT); + + QString collectionFile = QmitkDTIAtlasAppApplicationPlugin::GetDefault()->GetQtHelpCollectionFile(); + if (!collectionFile.isEmpty()) + { +// berry::QtAssistantUtil::SetHelpCollectionFile(collectionFile); +// berry::QtAssistantUtil::SetDefaultHelpUrl("qthelp://org.mitk.gui.qt.dtiatlasapp/bundle/index.html"); + + typedef std::vector BundleContainer; + BundleContainer bundles = berry::Platform::GetBundles(); + berry::QtAssistantUtil::RegisterQCHFiles(bundles); + } + +} + +berry::WorkbenchWindowAdvisor* +QmitkDTIAtlasAppWorkbenchAdvisor::CreateWorkbenchWindowAdvisor( + berry::IWorkbenchWindowConfigurer::Pointer configurer) +{ + std::vector perspExcludeList; + perspExcludeList.push_back( std::string("org.mitk.dtiatlasapp.perspectives.welcome") ); + perspExcludeList.push_back( std::string("org.mitk.perspectives.diffusionimaginginternal") ); + perspExcludeList.push_back( std::string("org.mitk.perspectives.publicdiffusionimaging") ); + perspExcludeList.push_back( std::string("org.mitk.extapp.defaultperspective") ); + perspExcludeList.push_back( std::string("org.mitk.coreapp.defaultperspective") ); + + std::vector viewExcludeList; + viewExcludeList.push_back( std::string("org.mitk.views.partialvolumeanalysis") ); + viewExcludeList.push_back( std::string("org.mitk.views.globalfibertracking") ); + viewExcludeList.push_back( std::string("org.mitk.views.tractbasedspatialstatistics") ); + viewExcludeList.push_back( std::string("org.mitk.views.fibertracking") ); + viewExcludeList.push_back( std::string("org.mitk.views.ivim") ); + viewExcludeList.push_back( std::string("org.mitk.views.qballreconstruction") ); + viewExcludeList.push_back( std::string("org.mitk.views.diffusiondicomimport") ); + viewExcludeList.push_back( std::string("org.mitk.views.diffusionpreprocessing") ); + viewExcludeList.push_back( std::string("org.mitk.views.diffusionquantification") ); + viewExcludeList.push_back( std::string("org.mitk.views.tensorreconstruction") ); + viewExcludeList.push_back( std::string("org.mitk.views.perspectiveswitcher") ); + viewExcludeList.push_back( std::string("org.mitk.views.basicimageprocessing") ); + viewExcludeList.push_back( std::string("org.mitk.views.fiberbundleoperations") ); + viewExcludeList.push_back( std::string("org.mitk.views.measurement") ); + viewExcludeList.push_back( std::string("org.mitk.views.moviemaker") ); + viewExcludeList.push_back( std::string("org.mitk.views.odfdetails") ); + viewExcludeList.push_back( std::string("org.mitk.views.propertylistview") ); + viewExcludeList.push_back( std::string("org.mitk.views.screenshotmaker") ); + viewExcludeList.push_back( std::string("org.mitk.views.segmentation") ); + viewExcludeList.push_back( std::string("org.mitk.views.imagestatistics") ); +// viewExcludeList.push_back( std::string("org.mitk.views.controlvisualizationpropertiesview") ); + viewExcludeList.push_back( std::string("org.mitk.views.volumevisualization") ); + viewExcludeList.push_back( std::string("org.mitk.views.simplemeasurement") ); + + configurer->SetShowPerspectiveBar(false); + configurer->SetInitialSize(berry::Point(1000,770)); + + QmitkExtWorkbenchWindowAdvisor* advisor = new QmitkExtWorkbenchWindowAdvisor(this, configurer); + advisor->SetPerspectiveExcludeList(perspExcludeList); + advisor->SetViewExcludeList(viewExcludeList); + advisor->ShowViewToolbar(false); + advisor->ShowVersionInfo(false); + advisor->ShowMitkVersionInfo(false); + advisor->SetProductName("based on MITK Diffusion Imaging App"); + advisor->SetWindowIcon(":/org.mitk.gui.qt.dtiatlasapp/app-icon.png"); + return advisor; +} + +std::string QmitkDTIAtlasAppWorkbenchAdvisor::GetInitialWindowPerspectiveId() +{ + return WELCOME_PERSPECTIVE_ID; +} diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppWorkbenchAdvisor.h b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppWorkbenchAdvisor.h new file mode 100644 index 0000000000..b87e2706fc --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/QmitkDTIAtlasAppWorkbenchAdvisor.h @@ -0,0 +1,40 @@ +/*========================================================================= + + Program: BlueBerry Platform + Language: C++ + Date: $Date$ + Version: $Revision$ + + Copyright (c) German Cancer Research Center, Division of Medical and + Biological Informatics. All rights reserved. + See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ + + +#ifndef QMITKDTIATLASAPPWORKBENCHADVISOR_H_ +#define QMITKDTIATLASAPPWORKBENCHADVISOR_H_ + +#include + +class QmitkDTIAtlasAppWorkbenchAdvisor : public berry::QtWorkbenchAdvisor +{ + +public: + + static const std::string WELCOME_PERSPECTIVE_ID; // = "org.mitk.qt.dtiatlasapp.defaultperspective" + + void Initialize(berry::IWorkbenchConfigurer::Pointer configurer); + + berry::WorkbenchWindowAdvisor* CreateWorkbenchWindowAdvisor( + berry::IWorkbenchWindowConfigurer::Pointer configurer); + + std::string GetInitialWindowPerspectiveId(); + +}; + +#endif /* QMITKDTIATLASAPPWORKBENCHADVISOR_H_ */ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplication.h~bug-8511-DTI-atlas-app b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplication.h~bug-8511-DTI-atlas-app new file mode 100644 index 0000000000..285949bdc0 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplication.h~bug-8511-DTI-atlas-app @@ -0,0 +1,41 @@ +/*========================================================================= + +Program: Medical Imaging & Interaction Toolkit +Language: C++ +Date: $Date$ +Version: $Revision$ + +Copyright (c) German Cancer Research Center, Division of Medical and +Biological Informatics. All rights reserved. +See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef QMITKDTIAtlasAppAPPLICATION_H_ +#define QMITKDTIAtlasAppAPPLICATION_H_ + +#include + +class QmitkDTIAtlasAppApplication : public QObject, public berry::IApplication +{ + Q_OBJECT + +public: + + QmitkDTIAtlasAppApplication() {} + QmitkDTIAtlasAppApplication(const QmitkDTIAtlasAppApplication& other) + { + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); + } + ~QmitkDTIAtlasAppApplication() {} + + int Start(); + void Stop(); +}; + +#endif /*QMITKDTIAtlasAppAPPLICATION_H_*/ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.cpp b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.cpp new file mode 100644 index 0000000000..8689d718d7 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.cpp @@ -0,0 +1,122 @@ +/*========================================================================= + + Program: BlueBerry Platform + Language: C++ + Date: $Date$ + Version: $Revision$ + + Copyright (c) German Cancer Research Center, Division of Medical and + Biological Informatics. All rights reserved. + See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ + +#include "QmitkDTIAtlasAppApplicationPlugin.h" +#include +#include +#include + +#include "src/QmitkDTIAtlasAppApplication.h" + +#include "src/internal/QmitkDTIAtlasAppIntroPart.h" +#include "src/internal/QmitkDTIAtlasAppPerspective.h" +#include "src/internal/QmitkWelcomePerspective.h" + +#include +#include + +QmitkDTIAtlasAppApplicationPlugin* QmitkDTIAtlasAppApplicationPlugin::inst = 0; + +QmitkDTIAtlasAppApplicationPlugin::QmitkDTIAtlasAppApplicationPlugin() + : pluginListener(0) +{ + inst = this; +} + +QmitkDTIAtlasAppApplicationPlugin::~QmitkDTIAtlasAppApplicationPlugin() +{ + delete pluginListener; +} + +QmitkDTIAtlasAppApplicationPlugin* QmitkDTIAtlasAppApplicationPlugin::GetDefault() +{ + return inst; +} + +void QmitkDTIAtlasAppApplicationPlugin::start(ctkPluginContext* context) +{ + berry::AbstractUICTKPlugin::start(context); + + this->context = context; + + BERRY_REGISTER_EXTENSION_CLASS(QmitkDTIAtlasAppApplication, context) + BERRY_REGISTER_EXTENSION_CLASS(QmitkDTIAtlasAppIntroPart, context) + BERRY_REGISTER_EXTENSION_CLASS(QmitkDTIAtlasAppPerspective, context) + BERRY_REGISTER_EXTENSION_CLASS(QmitkWelcomePerspective, context) + +// QString collectionFile = GetQtHelpCollectionFile(); + +// berry::QtAssistantUtil::SetHelpCollectionFile(collectionFile); +// berry::QtAssistantUtil::SetDefaultHelpUrl("qthelp://org.mitk.gui.qt.dtiatlasapp/bundle/index.html"); + + delete pluginListener; + pluginListener = new berry::QCHPluginListener(context); + context->connectPluginListener(pluginListener, SLOT(pluginChanged(ctkPluginEvent)), Qt::DirectConnection); + + // register all QCH files from all the currently installed plugins + pluginListener->processPlugins(); + + +} + +QString QmitkDTIAtlasAppApplicationPlugin::GetQtHelpCollectionFile() const +{ + + if (!helpCollectionFile.isEmpty()) + { + return helpCollectionFile; + } + + QString collectionFilename; + QString na("n/a"); +// if (na != MITK_REVISION) +// collectionFilename = "MitkDTIAtlasAppQtHelpCollection_" MITK_REVISION ".qhc"; +// else + collectionFilename = "MitkDTIAtlasAppQtHelpCollection.qhc"; + + QFileInfo collectionFileInfo = context->getDataFile(collectionFilename); + QFileInfo pluginFileInfo = QFileInfo(QUrl(context->getPlugin()->getLocation()).toLocalFile()); + if (!collectionFileInfo.exists() || + pluginFileInfo.lastModified() > collectionFileInfo.lastModified()) + { + // extract the qhc file from the plug-in + QByteArray content = context->getPlugin()->getResource(collectionFilename); + if (content.isEmpty()) + { + BERRY_WARN << "Could not get plug-in resource: " << collectionFilename.toStdString(); + } + else + { + QFile file(collectionFileInfo.absoluteFilePath()); + file.open(QIODevice::WriteOnly); + file.write(content); + file.close(); + } + } + + if (QFile::exists(collectionFileInfo.absoluteFilePath())) + { + helpCollectionFile = collectionFileInfo.absoluteFilePath(); + } + + return helpCollectionFile; + +} + +Q_EXPORT_PLUGIN2(org_mitk_gui_qt_dtiatlasapp, QmitkDTIAtlasAppApplicationPlugin) + + diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.h b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.h new file mode 100644 index 0000000000..ea5f4e2e3f --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.h @@ -0,0 +1,58 @@ +/*========================================================================= + + Program: BlueBerry Platform + Language: C++ + Date: $Date$ + Version: $Revision$ + + Copyright (c) German Cancer Research Center, Division of Medical and + Biological Informatics. All rights reserved. + See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ + +#ifndef QMITKDTIATLASAPPAPPLICATIONPLUGIN_H_ +#define QMITKDTIATLASAPPAPPLICATIONPLUGIN_H_ + +#include +#include +#include + +#include + +class QmitkDTIAtlasAppApplicationPlugin : + public QObject, public berry::AbstractUICTKPlugin +{ + Q_OBJECT + Q_INTERFACES(ctkPluginActivator) + +public: + + QmitkDTIAtlasAppApplicationPlugin(); + ~QmitkDTIAtlasAppApplicationPlugin(); + + static QmitkDTIAtlasAppApplicationPlugin* GetDefault(); + + ctkPluginContext* GetPluginContext() const; + + void start(ctkPluginContext*); + + QString GetQtHelpCollectionFile() const; + + private: + + static QmitkDTIAtlasAppApplicationPlugin* inst; + + ctkPluginContext* context; + berry::QCHPluginListener* pluginListener; + + mutable QString helpCollectionFile; + + +}; // QmitkDTIAtlasAppApplicationPlugin + +#endif // QMITKDTIATLASAPPAPPLICATIONPLUGIN_H_ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppIntroPart.cpp b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppIntroPart.cpp new file mode 100644 index 0000000000..77bed8dc62 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppIntroPart.cpp @@ -0,0 +1,294 @@ +/*========================================================================= + + Program: BlueBerry Platform + Language: C++ + Date: $Date$ + Version: $Revision$ + + Copyright (c) German Cancer Research Center, Division of Medical and + Biological Informatics. All rights reserved. + See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ + +#include "QmitkDTIAtlasAppIntroPart.h" + +#include "mitkNodePredicateDataType.h" +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#ifdef QT_WEBKIT +#include +#include +#endif +#include +#include +#include +#include +#include +#include + + +#include "QmitkStdMultiWidgetEditor.h" +#include "QmitkDTIAtlasAppApplicationPlugin.h" +#include "mitkDataStorageEditorInput.h" + +#include "mitkBaseDataIOFactory.h" +#include "mitkSceneIO.h" +#include "mitkProgressBar.h" +#include "mitkDataNodeFactory.h" +#include "mitkNodePredicateNot.h" +#include "mitkNodePredicateProperty.h" + +QmitkDTIAtlasAppIntroPart::QmitkDTIAtlasAppIntroPart() + : m_Controls(NULL) +{ + berry::IPreferences::Pointer workbenchPrefs = QmitkDTIAtlasAppApplicationPlugin::GetDefault()->GetPreferencesService()->GetSystemPreferences(); + workbenchPrefs->PutBool(berry::WorkbenchPreferenceConstants::SHOW_INTRO, true); + workbenchPrefs->Flush(); +} + +QmitkDTIAtlasAppIntroPart::~QmitkDTIAtlasAppIntroPart() +{ + // if the workbench is not closing (that means, welcome screen was closed explicitly), set "Show_intro" false + if (!this->GetIntroSite()->GetPage()->GetWorkbenchWindow()->GetWorkbench()->IsClosing()) + { + berry::IPreferences::Pointer workbenchPrefs = QmitkDTIAtlasAppApplicationPlugin::GetDefault()->GetPreferencesService()->GetSystemPreferences(); + workbenchPrefs->PutBool(berry::WorkbenchPreferenceConstants::SHOW_INTRO, false); + workbenchPrefs->Flush(); + } + else + { + berry::IPreferences::Pointer workbenchPrefs = QmitkDTIAtlasAppApplicationPlugin::GetDefault()->GetPreferencesService()->GetSystemPreferences(); + workbenchPrefs->PutBool(berry::WorkbenchPreferenceConstants::SHOW_INTRO, true); + workbenchPrefs->Flush(); + } + + // if workbench is not closing (Just welcome screen closing), open last used perspective + if (this->GetIntroSite()->GetPage()->GetPerspective()->GetId() + == "org.mitk.dtiatlasapp.perspectives.welcome" && !this->GetIntroSite()->GetPage()->GetWorkbenchWindow()->GetWorkbench()->IsClosing()) + { + berry::IPerspectiveDescriptor::Pointer perspective = this->GetIntroSite()->GetWorkbenchWindow()->GetWorkbench()->GetPerspectiveRegistry()->FindPerspectiveWithId("org.mitk.dtiatlasapp.perspectives.dtiatlasapp"); + if (perspective) + { + this->GetIntroSite()->GetPage()->SetPerspective(perspective); + } + } + +} + + +void QmitkDTIAtlasAppIntroPart::CreateQtPartControl(QWidget* parent) +{ + if (!m_Controls) + { + // create GUI widgets + m_Controls = new Ui::QmitkWelcomeScreenViewControls; + m_Controls->setupUi(parent); +#ifdef QT_WEBKIT + + // create a QWebView as well as a QWebPage and QWebFrame within the QWebview + m_view = new QWebView(parent); + m_view->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); + + QUrl urlQtResource(QString("qrc:/org.mitk.gui.qt.welcomescreen/mitkdtiatlasappwelcomeview.html"), QUrl::TolerantMode ); + m_view->load( urlQtResource ); + + // adds the webview as a widget + parent->layout()->addWidget(m_view); + this->CreateConnections(); +#else + parent->layout()->addWidget(new QLabel("

Please install Qt with the WebKit option to see cool pictures!

")); +#endif + } +} + +#ifdef QT_WEBKIT +void QmitkDTIAtlasAppIntroPart::CreateConnections() +{ + if ( m_Controls ) + { + connect( (QObject*)(m_view->page()), SIGNAL(linkClicked(const QUrl& )), this, SLOT(DelegateMeTo(const QUrl& )) ); + } +} + + +void QmitkDTIAtlasAppIntroPart::DelegateMeTo(const QUrl& showMeNext) +{ + QString scheme = showMeNext.scheme(); + QByteArray urlHostname = showMeNext.encodedHost(); + QByteArray urlPath = showMeNext.encodedPath(); + QByteArray dataset = showMeNext.encodedQueryItemValue("dataset"); + QByteArray clear = showMeNext.encodedQueryItemValue("clear"); + + if (scheme.isEmpty()) MITK_INFO << " empty scheme of the to be delegated link" ; + + // if the scheme is set to mitk, it is to be tested which action should be applied + if (scheme.contains(QString("mitk")) ) + { + if(urlPath.isEmpty() ) MITK_INFO << " mitk path is empty " ; + + // searching for the perspective keyword within the host name + if(urlHostname.contains(QByteArray("perspectives")) ) + { + // the simplified method removes every whitespace + // ( whitespace means any character for which the standard C++ isspace() method returns true) + urlPath = urlPath.simplified(); + QString tmpPerspectiveId(urlPath.data()); + tmpPerspectiveId.replace(QString("/"), QString("") ); + std::string perspectiveId = tmpPerspectiveId.toStdString(); + + // is working fine as long as the perspective id is valid, if not the application crashes + GetIntroSite()->GetWorkbenchWindow()->GetWorkbench()->ShowPerspective(perspectiveId, GetIntroSite()->GetWorkbenchWindow() ); + + mitk::DataStorageEditorInput::Pointer editorInput; + editorInput = new mitk::DataStorageEditorInput(); + berry::IEditorPart::Pointer editor = GetIntroSite()->GetPage()->OpenEditor(editorInput, QmitkStdMultiWidgetEditor::EDITOR_ID); + + + QmitkStdMultiWidgetEditor::Pointer multiWidgetEditor; + mitk::DataStorage::Pointer dataStorage; + + if (editor.Cast().IsNull()) + { + editorInput = new mitk::DataStorageEditorInput(); + dataStorage = editorInput->GetDataStorageReference()->GetDataStorage(); + } + else + { + multiWidgetEditor = editor.Cast(); + multiWidgetEditor->GetStdMultiWidget()->RequestUpdate(); + dataStorage = multiWidgetEditor->GetEditorInput().Cast()->GetDataStorageReference()->GetDataStorage(); + } + + bool dsmodified = false; + + QString *fileName = new QString(dataset.data()); + + if ( fileName->right(5) == ".mitk" ) + { + mitk::SceneIO::Pointer sceneIO = mitk::SceneIO::New(); + + bool clearDataStorageFirst(false); + QString *sClear = new QString(clear.data()); + if ( sClear->right(4) == "true" ) + { + clearDataStorageFirst = true; + } + + mitk::ProgressBar::GetInstance()->AddStepsToDo(2); + dataStorage = sceneIO->LoadScene( fileName->toLocal8Bit().constData(), dataStorage, clearDataStorageFirst ); + dsmodified = true; + mitk::ProgressBar::GetInstance()->Progress(2); + } + else + { + mitk::DataNodeFactory::Pointer nodeReader = mitk::DataNodeFactory::New(); + try + { + nodeReader->SetFileName(fileName->toLocal8Bit().data()); + nodeReader->Update(); + for ( unsigned int i = 0 ; i < nodeReader->GetNumberOfOutputs( ); ++i ) + { + mitk::DataNode::Pointer node; + node = nodeReader->GetOutput(i); + if ( node->GetData() != NULL ) + { + dataStorage->Add(node); + dsmodified = true; + } + } + } + catch(...) + { + MITK_INFO << "Could not open file!"; + } + } + + + + if(dataStorage.IsNotNull() && dsmodified) + { + // get all nodes that have not set "includeInBoundingBox" to false + mitk::NodePredicateNot::Pointer pred + = mitk::NodePredicateNot::New(mitk::NodePredicateProperty::New("includeInBoundingBox" + , mitk::BoolProperty::New(false))); + + mitk::DataStorage::SetOfObjects::ConstPointer rs = dataStorage->GetSubset(pred); + + if(rs->Size() > 0) + { + // calculate bounding geometry of these nodes + mitk::TimeSlicedGeometry::Pointer bounds = dataStorage->ComputeBoundingGeometry3D(rs); + // initialize the views to the bounding geometry + mitk::RenderingManager::GetInstance()->InitializeViews(bounds); + } + } + + + + + + } + // searching for the load + if(urlHostname.contains(QByteArray("perspectives")) ) + { + // the simplified method removes every whitespace + // ( whitespace means any character for which the standard C++ isspace() method returns true) + urlPath = urlPath.simplified(); + QString tmpPerspectiveId(urlPath.data()); + tmpPerspectiveId.replace(QString("/"), QString("") ); + std::string perspectiveId = tmpPerspectiveId.toStdString(); + + // is working fine as long as the perspective id is valid, if not the application crashes + GetIntroSite()->GetWorkbenchWindow()->GetWorkbench()->ShowPerspective(perspectiveId, GetIntroSite()->GetWorkbenchWindow() ); + + mitk::DataStorageEditorInput::Pointer editorInput; + editorInput = new mitk::DataStorageEditorInput(); + GetIntroSite()->GetPage()->OpenEditor(editorInput, QmitkStdMultiWidgetEditor::EDITOR_ID); + } + else + { + MITK_INFO << "Unkown mitk action keyword (see documentation for mitk links)" ; + } + } + // if the scheme is set to http, by default no action is performed, if an external webpage needs to be + // shown it should be implemented below + else if (scheme.contains(QString("http")) ) + { + QDesktopServices::openUrl(showMeNext); +// m_view->load( ) ; + } + else if(scheme.contains("qrc")) + { + m_view->load(showMeNext); + } + +} + +#endif + +void QmitkDTIAtlasAppIntroPart::StandbyStateChanged(bool standby) +{ + +} + + +void QmitkDTIAtlasAppIntroPart::SetFocus() +{ + +} diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppIntroPart.h b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppIntroPart.h new file mode 100644 index 0000000000..fa8aad7a15 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppIntroPart.h @@ -0,0 +1,95 @@ +/*========================================================================= + + Program: BlueBerry Platform + Language: C++ + Date: $Date$ + Version: $Revision$ + + Copyright (c) German Cancer Research Center, Division of Medical and + Biological Informatics. All rights reserved. + See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ + + +#ifndef QMITKDTIATLASAPPINTROPART_H_ +#define QMITKDTIATLASAPPINTROPART_H_ + +#include + +#include +#include + + +/** + * \ingroup org_mitk_gui_qt_welcomescreen_internal + * \brief QmitkWelcomeScreenView + * The WelcomeView Module is an helpful feature to people new to MITK. The main idea is to provide first + * information about the particular working modes of the 3 M-3 application suited to specific medical working task. + * Links to external documentation or information pages such as the mitk.org homepage are thinkable but have + * not been implemented yet. The WelcomeView is realized by making use of the QTWebKit Module. The Qt WebKit module + * provides an HTML browser engine that makes it easy to embed web content into native applications, and to enhance + * web content with native controls. + * For the welcome view of the application the QWebView, QWebPage classes have been used. The shown WelcomeView + * html start page is styled by an external css stylesheet. The required resources as well as the html pages are integrated + * into the QtResource system. The QT resource system allows the storage of files like html pages, css pages, jpgs etc. + * as binaries within the executable. + * This minimizes the risk of loosing resource files as well as the risk of getting files deleted. In order to use the Qt + * resource system the resource files have to be added to the associated qrt resource file list. + * Due to time issues the html pages of the welcome view do make use of jpegs with hotspots to switch + * into the particular working modes. < + * Nevertheless the foundation is set to design more complex html pages. The Q::WebPage gives options to set a + * LinkDelegationPolicy. The used policy defines how links to external or internal resources are handled. To fit our needs + * the delegate all links policy is used. This requires all external as well as internal links of the html pages to be handle + * explicitly. In order to change mitk working modes (perspectives) a mitk url scheme has been designed. The url scheme + * is set to mitk. The url host provides information about what's next to do. In our case, the case of switching to a + * particular working mode the host is set to perspectives. The followed path provides information about the perspective id. + * (e.g. mitk//::mitk.perspectives/org.mitk.qt.defaultperspective) The the generic design of the mitk url scheme allows to * execute other task depending on the mitk url host. + * \sa QmitkWelcomePage Editor + */ + +class QWebView ; + +class QmitkDTIAtlasAppIntroPart : public berry::QtIntroPart +{ + +// this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) + Q_OBJECT + +public: + + QmitkDTIAtlasAppIntroPart(); + QmitkDTIAtlasAppIntroPart(const QmitkDTIAtlasAppIntroPart& other) + { + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); + } + ~QmitkDTIAtlasAppIntroPart(); + + + virtual void CreateQtPartControl(QWidget *parent); + + void StandbyStateChanged(bool standby); + + void SetFocus(); +#ifdef QT_WEBKIT + + virtual void CreateConnections(); + + +protected slots: + + + void DelegateMeTo(const QUrl& ShowMeNext); +#endif +protected: + + Ui::QmitkWelcomeScreenViewControls* m_Controls; + QWebView* m_view; +}; + +#endif /* QMITKDTIATLASAPPINTROPART_H_ */ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppPerspective.cpp b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppPerspective.cpp new file mode 100644 index 0000000000..91cdbf59f2 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppPerspective.cpp @@ -0,0 +1,90 @@ +/*========================================================================= + + Program: BlueBerry Platform + Language: C++ + Date: $Date: 2009-10-23 02:59:36 +0200 (Fr, 23 Okt 2009) $ + Version: $Revision: 19652 $ + + Copyright (c) German Cancer Research Center, Division of Medical and + Biological Informatics. All rights reserved. + See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ + +#include "QmitkDTIAtlasAppPerspective.h" +#include "berryIViewLayout.h" + +void QmitkDTIAtlasAppPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) +{ + std::string editorArea = layout->GetEditorArea(); + + layout->AddStandaloneView("org.mitk.views.datamanager", + false, berry::IPageLayout::LEFT, 0.3f, editorArea); + + layout->AddStandaloneView("org.mitk.views.controlvisualizationpropertiesview", + false, berry::IPageLayout::BOTTOM, .5f, "org.mitk.views.datamanager"); + + layout->AddStandaloneView("org.mitk.views.imagenavigator", + false, berry::IPageLayout::BOTTOM, .8f, "org.mitk.views.controlvisualizationpropertiesview"); + + +// berry::IFolderLayout::Pointer left = +// layout->CreateFolder("org.mitk.diffusionimaginginternal.leftcontrols", +// berry::IPageLayout::BOTTOM, 0.2f, "org.mitk.views.controlvisualizationpropertiesview"); + +// layout->AddStandaloneView("org.mitk.views.perspectiveswitcher", +// false, berry::IPageLayout::BOTTOM, 0.99f, "org.mitk.diffusionimaginginternal.leftcontrols"); + + //////////////////////////////////////// + // public views go here + //////////////////////////////////////// +// left->AddView("org.mitk.views.fiberbundleoperations"); +// berry::IViewLayout::Pointer lo = layout->GetViewLayout("org.mitk.views.fiberbundleoperations"); +// lo->SetCloseable(false); + +// left->AddView("org.mitk.views.diffusionpreprocessing"); +// berry::IViewLayout::Pointer lo = layout->GetViewLayout("org.mitk.views.diffusionpreprocessing"); +// lo->SetCloseable(true); + +// left->AddView("org.mitk.views.tensorreconstruction"); +// lo = layout->GetViewLayout("org.mitk.views.tensorreconstruction"); +// lo->SetCloseable(true); + +// left->AddView("org.mitk.views.qballreconstruction"); +// lo = layout->GetViewLayout("org.mitk.views.qballreconstruction"); +// lo->SetCloseable(true); + +// left->AddView("org.mitk.views.diffusionquantification"); +// lo = layout->GetViewLayout("org.mitk.views.diffusionquantification"); +// lo->SetCloseable(true); + +// left->AddView("org.mitk.views.diffusiondicomimport"); +// lo = layout->GetViewLayout("org.mitk.views.diffusiondicomimport"); +// lo->SetCloseable(true); + + //////////////////////////////////////// + // end public views + //////////////////////////////////////// + + +// berry::IFolderLayout::Pointer right = +// layout->CreateFolder("org.mitk.diffusionimaginginternal.rightcontrols", berry::IPageLayout::RIGHT, 0.5f, editorArea); + + //////////////////////////////////////// + // internal views go here + //////////////////////////////////////// +// right->AddView("org.mitk.views.globalfibertracking"); +// right->AddView("org.mitk.views.partialvolumeanalysis"); +// right->AddView("org.mitk.views.ivim"); +// right->AddView("org.mitk.views.tractbasedspatialstatistics"); +// right->AddView("org.mitk.views.fibertracking"); + + //////////////////////////////////////// + // end internal views + //////////////////////////////////////// + +} diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppPerspective.h b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppPerspective.h new file mode 100644 index 0000000000..88d647d859 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppPerspective.h @@ -0,0 +1,42 @@ +/*========================================================================= + + Program: BlueBerry Platform + Language: C++ + Date: $Date: 2009-10-23 02:59:36 +0200 (Fr, 23 Okt 2009) $ + Version: $Revision: 19652 $ + + Copyright (c) German Cancer Research Center, Division of Medical and + Biological Informatics. All rights reserved. + See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ + + +#ifndef QMITKDTIATLASAPPPERSPECTIVE_H_ +#define QMITKDTIATLASAPPPERSPECTIVE_H_ + +#include + +class QmitkDTIAtlasAppPerspective : public QObject, public berry::IPerspectiveFactory +{ + Q_OBJECT + Q_INTERFACES(berry::IPerspectiveFactory) + +public: + + QmitkDTIAtlasAppPerspective() {} + QmitkDTIAtlasAppPerspective(const QmitkDTIAtlasAppPerspective& other) + { + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); + } + ~QmitkDTIAtlasAppPerspective() {} + + void CreateInitialLayout(berry::IPageLayout::Pointer layout); +}; + +#endif /* QMITKDTIATLASAPPPERSPECTIVE_H_ */ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkNavigationButtonsView.cpp b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkNavigationButtonsView.cpp new file mode 100644 index 0000000000..56f47ba707 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkNavigationButtonsView.cpp @@ -0,0 +1,947 @@ +/*========================================================================= + +Program: Medical Imaging & Interaction Toolkit +Module: $RCSfile$ +Language: C++ +Date: $Date: 2009-05-28 17:19:30 +0200 (Do, 28 Mai 2009) $ +Version: $Revision: 17495 $ + +Copyright (c) German Cancer Research Center, Division of Medical and +Biological Informatics. All rights reserved. +See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "QmitkNavigationButtonsView.h" + +#include "mitkNodePredicateDataType.h" +#include "mitkDataNodeObject.h" +#include "mitkOdfNormalizationMethodProperty.h" +#include "mitkOdfScaleByProperty.h" +#include "mitkResliceMethodProperty.h" +#include "mitkRenderingManager.h" + +#include "mitkDiffusionImage.h" +#include "mitkPlanarFigure.h" +#include "mitkFiberBundle.h" +#include "QmitkDataStorageComboBox.h" +#include "QmitkStdMultiWidget.h" +#include "mitkFiberBundleInteractor.h" +#include "mitkPlanarFigureInteractor.h" + +#include "mitkGlobalInteraction.h" + +#include "mitkGeometry2D.h" + +#include "berryIWorkbenchWindow.h" +#include "berryIWorkbenchPage.h" +#include "berryISelectionService.h" +#include "berryConstants.h" +#include "berryPlatformUI.h" + +#include "itkRGBAPixel.h" +#include "itkTractsToProbabilityImageFilter.h" + +#include "qwidgetaction.h" +#include "qcolordialog.h" + +const std::string QmitkNavigationButtonsView::VIEW_ID = "org.mitk.views.NavigationButtonsview"; + +using namespace berry; + + +QmitkNavigationButtonsView::QmitkNavigationButtonsView() + : QmitkFunctionality(), + m_Controls(NULL), + m_MultiWidget(NULL), +{ +} + +QmitkNavigationButtonsView::QmitkNavigationButtonsView(const QmitkNavigationButtonsView& other) +{ + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); +} + +QmitkNavigationButtonsView::~QmitkNavigationButtonsView() +{ + this->GetSite()->GetWorkbenchWindow()->GetSelectionService()->RemovePostSelectionListener(/*"org.mitk.views.datamanager",*/ m_SelListener); +} + + + +void QmitkNavigationButtonsView::CreateQtPartControl(QWidget *parent) +{ + if (!m_Controls) + { + // create GUI widgets + m_Controls = new Ui::QmitkNavigationButtonsViewControls; + m_Controls->setupUi(parent); + this->CreateConnections(); + + } +} + + +void QmitkNavigationButtonsView::StdMultiWidgetAvailable (QmitkStdMultiWidget &stdMultiWidget) +{ + m_MultiWidget = &stdMultiWidget; +} + +void QmitkNavigationButtonsView::StdMultiWidgetNotAvailable() +{ + m_MultiWidget = NULL; +} + +void QmitkNavigationButtonsView::CreateConnections() +{ + if ( m_Controls ) + { + connect( (QObject*)(m_Controls->m_TextureIntON), SIGNAL(clicked()), this, SLOT(TextIntON()) ); + } +} + +void QmitkNavigationButtonsView::Activated() +{ + QmitkFunctionality::Activated(); +} + +void QmitkNavigationButtonsView::Deactivated() +{ + QmitkFunctionality::Deactivated(); +} + +int QmitkNavigationButtonsView::GetSizeFlags(bool width) +{ + if(!width) + { + return berry::Constants::MIN | berry::Constants::MAX | berry::Constants::FILL; + } + else + { + return 0; + } +} + +int QmitkNavigationButtonsView::ComputePreferredSize(bool width, int /*availableParallel*/, int /*availablePerpendicular*/, int preferredResult) +{ + if(width==false) + { + return m_FoundSingleOdfImage ? 120 : 80; + } + else + { + return preferredResult; + } +} + +mitk::DataStorage::SetOfObjects::Pointer + QmitkNavigationButtonsView::ActiveSet(std::string classname) +{ + if (m_CurrentSelection) + { + mitk::DataStorage::SetOfObjects::Pointer set = + mitk::DataStorage::SetOfObjects::New(); + + int at = 0; + for (IStructuredSelection::iterator i = m_CurrentSelection->Begin(); + i != m_CurrentSelection->End(); + ++i) + { + + if (mitk::DataNodeObject::Pointer nodeObj = i->Cast()) + { + mitk::DataNode::Pointer node = nodeObj->GetDataNode(); + if(QString(classname.c_str()).compare(node->GetData()->GetNameOfClass())==0) + { + set->InsertElement(at++, node); + } + } + } + + return set; + } + + return 0; +} + +void QmitkNavigationButtonsView::SetBoolProp( + mitk::DataStorage::SetOfObjects::Pointer set, + std::string name, bool value) +{ + if(set.IsNotNull()) + { + + mitk::DataStorage::SetOfObjects::const_iterator itemiter( set->begin() ); + mitk::DataStorage::SetOfObjects::const_iterator itemiterend( set->end() ); + while ( itemiter != itemiterend ) + { + (*itemiter)->SetBoolProperty(name.c_str(), value); + ++itemiter; + } + } +} + +void QmitkNavigationButtonsView::SetIntProp( + mitk::DataStorage::SetOfObjects::Pointer set, + std::string name, int value) +{ + if(set.IsNotNull()) + { + + mitk::DataStorage::SetOfObjects::const_iterator itemiter( set->begin() ); + mitk::DataStorage::SetOfObjects::const_iterator itemiterend( set->end() ); + while ( itemiter != itemiterend ) + { + (*itemiter)->SetIntProperty(name.c_str(), value); + ++itemiter; + } + } +} + +void QmitkNavigationButtonsView::SetFloatProp( + mitk::DataStorage::SetOfObjects::Pointer set, + std::string name, float value) +{ + if(set.IsNotNull()) + { + + mitk::DataStorage::SetOfObjects::const_iterator itemiter( set->begin() ); + mitk::DataStorage::SetOfObjects::const_iterator itemiterend( set->end() ); + while ( itemiter != itemiterend ) + { + (*itemiter)->SetFloatProperty(name.c_str(), value); + ++itemiter; + } + } +} + +void QmitkNavigationButtonsView::SetLevelWindowProp( + mitk::DataStorage::SetOfObjects::Pointer set, + std::string name, mitk::LevelWindow value) +{ + if(set.IsNotNull()) + { + + mitk::LevelWindowProperty::Pointer prop = mitk::LevelWindowProperty::New(value); + + mitk::DataStorage::SetOfObjects::const_iterator itemiter( set->begin() ); + mitk::DataStorage::SetOfObjects::const_iterator itemiterend( set->end() ); + while ( itemiter != itemiterend ) + { + (*itemiter)->SetProperty(name.c_str(), prop); + ++itemiter; + } + } +} + +void QmitkNavigationButtonsView::SetEnumProp( + mitk::DataStorage::SetOfObjects::Pointer set, + std::string name, mitk::EnumerationProperty::Pointer value) +{ + if(set.IsNotNull()) + { + mitk::DataStorage::SetOfObjects::const_iterator itemiter( set->begin() ); + mitk::DataStorage::SetOfObjects::const_iterator itemiterend( set->end() ); + while ( itemiter != itemiterend ) + { + (*itemiter)->SetProperty(name.c_str(), value); + ++itemiter; + } + } +} + +void QmitkNavigationButtonsView::DisplayIndexChanged(int dispIndex) +{ + + QString label = "Channel %1"; + label = label.arg(dispIndex); + m_Controls->label_channel->setText(label); + + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("DiffusionImage"); + + if(set.IsNotNull()) + { + + mitk::DataStorage::SetOfObjects::const_iterator itemiter( set->begin() ); + mitk::DataStorage::SetOfObjects::const_iterator itemiterend( set->end() ); + while ( itemiter != itemiterend ) + { + (*itemiter)->SetIntProperty("DisplayChannel", dispIndex); + ++itemiter; + } + + //m_MultiWidget->RequestUpdate(); + mitk::RenderingManager::GetInstance()->RequestUpdateAll(); + } +} + +void QmitkNavigationButtonsView::Reinit() +{ + if (m_CurrentSelection) + { + mitk::DataNodeObject::Pointer nodeObj = + m_CurrentSelection->Begin()->Cast(); + mitk::DataNode::Pointer node = nodeObj->GetDataNode(); + mitk::BaseData::Pointer basedata = node->GetData(); + if (basedata.IsNotNull()) + { + mitk::RenderingManager::GetInstance()->InitializeViews( + basedata->GetTimeSlicedGeometry(), mitk::RenderingManager::REQUEST_UPDATE_ALL, true ); + mitk::RenderingManager::GetInstance()->RequestUpdateAll(); + } + } +} + +void QmitkNavigationButtonsView::TextIntON() +{ + if(m_TexIsOn) + { + m_Controls->m_TextureIntON->setIcon(*m_IconTexOFF); + } + else + { + m_Controls->m_TextureIntON->setIcon(*m_IconTexON); + } + + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("DiffusionImage"); + SetBoolProp(set,"texture interpolation", !m_TexIsOn); + + set = ActiveSet("TensorImage"); + SetBoolProp(set,"texture interpolation", !m_TexIsOn); + + set = ActiveSet("QBallImage"); + SetBoolProp(set,"texture interpolation", !m_TexIsOn); + + set = ActiveSet("Image"); + SetBoolProp(set,"texture interpolation", !m_TexIsOn); + + m_TexIsOn = !m_TexIsOn; + + if(m_MultiWidget) + m_MultiWidget->RequestUpdate(); + +} + +void QmitkNavigationButtonsView::VisibleOdfsON_S() +{ + if(m_GlyIsOn_S) + { + m_Controls->m_VisibleOdfsON_S->setIcon(*m_IconGlyOFF_S); + } + else + { + m_Controls->m_VisibleOdfsON_S->setIcon(*m_IconGlyON_S); + } + + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("QBallImage"); + SetBoolProp(set,"VisibleOdfs_S", !m_GlyIsOn_S); + + set = ActiveSet("TensorImage"); + SetBoolProp(set,"VisibleOdfs_S", !m_GlyIsOn_S); + + m_GlyIsOn_S = !m_GlyIsOn_S; + + VisibleOdfsON(0); +} + +void QmitkNavigationButtonsView::VisibleOdfsON_T() +{ + if(m_GlyIsOn_T) + { + m_Controls->m_VisibleOdfsON_T->setIcon(*m_IconGlyOFF_T); + } + else + { + m_Controls->m_VisibleOdfsON_T->setIcon(*m_IconGlyON_T); + } + + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("QBallImage"); + SetBoolProp(set,"VisibleOdfs_T", !m_GlyIsOn_T); + + set = ActiveSet("TensorImage"); + SetBoolProp(set,"VisibleOdfs_T", !m_GlyIsOn_T); + + m_GlyIsOn_T = !m_GlyIsOn_T; + + VisibleOdfsON(1); + +} + +void QmitkNavigationButtonsView::VisibleOdfsON_C() +{ + if(m_GlyIsOn_C) + { + m_Controls->m_VisibleOdfsON_C->setIcon(*m_IconGlyOFF_C); + } + else + { + m_Controls->m_VisibleOdfsON_C->setIcon(*m_IconGlyON_C); + } + + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("QBallImage"); + SetBoolProp(set,"VisibleOdfs_C", !m_GlyIsOn_C); + + set = ActiveSet("TensorImage"); + SetBoolProp(set,"VisibleOdfs_C", !m_GlyIsOn_C); + + m_GlyIsOn_C = !m_GlyIsOn_C; + + VisibleOdfsON(2); + +} + +void QmitkNavigationButtonsView::VisibleOdfsON(int view) +{ + + if(m_MultiWidget) + m_MultiWidget->RequestUpdate(); + +} + +void QmitkNavigationButtonsView::ShowMaxNumberChanged() +{ + int maxNr = m_Controls->m_ShowMaxNumber->value(); + if ( maxNr < 1 ) + { + m_Controls->m_ShowMaxNumber->setValue( 1 ); + maxNr = 1; + } + + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("QBallImage"); + SetIntProp(set,"ShowMaxNumber", maxNr); + + set = ActiveSet("TensorImage"); + SetIntProp(set,"ShowMaxNumber", maxNr); + + if(m_MultiWidget) + m_MultiWidget->RequestUpdate(); + +} + +void QmitkNavigationButtonsView::NormalizationDropdownChanged(int normDropdown) +{ + typedef mitk::OdfNormalizationMethodProperty PropType; + PropType::Pointer normMeth = PropType::New(); + + switch(normDropdown) + { + case 0: + normMeth->SetNormalizationToMinMax(); + break; + case 1: + normMeth->SetNormalizationToMax(); + break; + case 2: + normMeth->SetNormalizationToNone(); + break; + case 3: + normMeth->SetNormalizationToGlobalMax(); + break; + default: + normMeth->SetNormalizationToMinMax(); + } + + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("QBallImage"); + SetEnumProp(set,"Normalization", normMeth.GetPointer()); + + set = ActiveSet("TensorImage"); + SetEnumProp(set,"Normalization", normMeth.GetPointer()); + + if(m_MultiWidget) + m_MultiWidget->RequestUpdate(); + +} + +void QmitkNavigationButtonsView::ScalingFactorChanged(double scalingFactor) +{ + + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("QBallImage"); + SetFloatProp(set,"Scaling", scalingFactor); + + set = ActiveSet("TensorImage"); + SetFloatProp(set,"Scaling", scalingFactor); + + if(m_MultiWidget) + m_MultiWidget->RequestUpdate(); + +} + +void QmitkNavigationButtonsView::AdditionalScaling(int additionalScaling) +{ + + typedef mitk::OdfScaleByProperty PropType; + PropType::Pointer scaleBy = PropType::New(); + + switch(additionalScaling) + { + case 0: + scaleBy->SetScaleByNothing(); + break; + case 1: + scaleBy->SetScaleByGFA(); + //m_Controls->params_frame->setVisible(true); + break; +#ifdef DIFFUSION_IMAGING_EXTENDED + case 2: + scaleBy->SetScaleByPrincipalCurvature(); + // commented in for SPIE paper, Principle curvature scaling + //m_Controls->params_frame->setVisible(true); + break; +#endif + default: + scaleBy->SetScaleByNothing(); + } + + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("QBallImage"); + SetEnumProp(set,"ScaleBy", scaleBy.GetPointer()); + + set = ActiveSet("TensorImage"); + SetEnumProp(set,"ScaleBy", scaleBy.GetPointer()); + + if(m_MultiWidget) + m_MultiWidget->RequestUpdate(); + +} + +void QmitkNavigationButtonsView::IndexParam1Changed(double param1) +{ + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("QBallImage"); + SetFloatProp(set,"IndexParam1", param1); + + set = ActiveSet("TensorImage"); + SetFloatProp(set,"IndexParam1", param1); + + if(m_MultiWidget) + m_MultiWidget->RequestUpdate(); +} + +void QmitkNavigationButtonsView::IndexParam2Changed(double param2) +{ + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("QBallImage"); + SetFloatProp(set,"IndexParam2", param2); + + set = ActiveSet("TensorImage"); + SetFloatProp(set,"IndexParam2", param2); + + if(m_MultiWidget) + m_MultiWidget->RequestUpdate(); +} + +void QmitkNavigationButtonsView::OpacityChanged(double l, double u) +{ + mitk::LevelWindow olw; + olw.SetRangeMinMax(l*255, u*255); + + mitk::DataStorage::SetOfObjects::Pointer set = + ActiveSet("QBallImage"); + SetLevelWindowProp(set,"opaclevelwindow", olw); + + set = ActiveSet("TensorImage"); + SetLevelWindowProp(set,"opaclevelwindow", olw); + + set = ActiveSet("Image"); + SetLevelWindowProp(set,"opaclevelwindow", olw); + + m_Controls->m_OpacityMinFaLabel->setText(QString::number(l,'f',2) + " : " + QString::number(u,'f',2)); + + if(m_MultiWidget) + m_MultiWidget->RequestUpdate(); + +} + +void QmitkNavigationButtonsView::ScalingCheckbox() +{ + m_Controls->m_ScalingFrame->setVisible( + m_Controls->m_ScalingCheckbox->isChecked()); +} + + +void QmitkNavigationButtonsView::BundleRepresentationWire() +{ + if(m_SelectedNode) + { + int width = m_Controls->m_LineWidth->value(); + m_SelectedNode->SetProperty("LineWidth",mitk::IntProperty::New(width)); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(15)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(18)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(1)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(2)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(3)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(4)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(0)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + } +} + +void QmitkNavigationButtonsView::BundleRepresentationTube() +{ + if(m_SelectedNode) + { + float radius = m_Controls->m_TubeRadius->value() / 100.0; + m_SelectedNode->SetProperty("TubeRadius",mitk::FloatProperty::New(radius)); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(17)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(13)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(16)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(0)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + } +} + +void QmitkNavigationButtonsView::BundleRepresentationColor() +{ + if(m_SelectedNode) + { + QColor color = QColorDialog::getColor(); + + m_Controls->m_Color->setAutoFillBackground(true); + QString styleSheet = "background-color:rgb("; + styleSheet.append(QString::number(color.red())); + styleSheet.append(","); + styleSheet.append(QString::number(color.green())); + styleSheet.append(","); + styleSheet.append(QString::number(color.blue())); + styleSheet.append(")"); + m_Controls->m_Color->setStyleSheet(styleSheet); + + m_SelectedNode->SetProperty("color",mitk::ColorProperty::New(color.red()/255.0, color.green()/255.0, color.blue()/255.0)); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(14)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(3)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + m_SelectedNode->SetProperty("ColorCoding",mitk::IntProperty::New(0)); + mitk::RenderingManager::GetInstance()->ForceImmediateUpdateAll(); + } +} + +void QmitkNavigationButtonsView::PlanarFigureFocus() +{ + if(m_SelectedNode) + { + mitk::PlanarFigure* _PlanarFigure = 0; + _PlanarFigure = dynamic_cast (m_SelectedNode->GetData()); + + if (_PlanarFigure) + { + + QmitkRenderWindow* selectedRenderWindow = 0; + bool PlanarFigureInitializedWindow = false; + + QmitkRenderWindow* RenderWindow1 = + this->GetActiveStdMultiWidget()->GetRenderWindow1(); + + if (m_SelectedNode->GetBoolProperty("PlanarFigureInitializedWindow", + PlanarFigureInitializedWindow, RenderWindow1->GetRenderer())) + { + selectedRenderWindow = RenderWindow1; + } + + QmitkRenderWindow* RenderWindow2 = + this->GetActiveStdMultiWidget()->GetRenderWindow2(); + + if (!selectedRenderWindow && m_SelectedNode->GetBoolProperty( + "PlanarFigureInitializedWindow", PlanarFigureInitializedWindow, + RenderWindow2->GetRenderer())) + { + selectedRenderWindow = RenderWindow2; + } + + QmitkRenderWindow* RenderWindow3 = + this->GetActiveStdMultiWidget()->GetRenderWindow3(); + + if (!selectedRenderWindow && m_SelectedNode->GetBoolProperty( + "PlanarFigureInitializedWindow", PlanarFigureInitializedWindow, + RenderWindow3->GetRenderer())) + { + selectedRenderWindow = RenderWindow3; + } + + QmitkRenderWindow* RenderWindow4 = + this->GetActiveStdMultiWidget()->GetRenderWindow4(); + + if (!selectedRenderWindow && m_SelectedNode->GetBoolProperty( + "PlanarFigureInitializedWindow", PlanarFigureInitializedWindow, + RenderWindow4->GetRenderer())) + { + selectedRenderWindow = RenderWindow4; + } + + const mitk::PlaneGeometry + * _PlaneGeometry = + dynamic_cast (_PlanarFigure->GetGeometry2D()); + mitk::VnlVector normal = _PlaneGeometry->GetNormalVnl(); + + mitk::Geometry2D::ConstPointer worldGeometry1 = + RenderWindow1->GetRenderer()->GetCurrentWorldGeometry2D(); + mitk::PlaneGeometry::ConstPointer _Plane1 = + dynamic_cast( worldGeometry1.GetPointer() ); + mitk::VnlVector normal1 = _Plane1->GetNormalVnl(); + + mitk::Geometry2D::ConstPointer worldGeometry2 = + RenderWindow2->GetRenderer()->GetCurrentWorldGeometry2D(); + mitk::PlaneGeometry::ConstPointer _Plane2 = + dynamic_cast( worldGeometry2.GetPointer() ); + mitk::VnlVector normal2 = _Plane2->GetNormalVnl(); + + mitk::Geometry2D::ConstPointer worldGeometry3 = + RenderWindow3->GetRenderer()->GetCurrentWorldGeometry2D(); + mitk::PlaneGeometry::ConstPointer _Plane3 = + dynamic_cast( worldGeometry3.GetPointer() ); + mitk::VnlVector normal3 = _Plane3->GetNormalVnl(); + + normal[0] = fabs(normal[0]); normal[1] = fabs(normal[1]); normal[2] = fabs(normal[2]); + normal1[0] = fabs(normal1[0]); normal1[1] = fabs(normal1[1]); normal1[2] = fabs(normal1[2]); + normal2[0] = fabs(normal2[0]); normal2[1] = fabs(normal2[1]); normal2[2] = fabs(normal2[2]); + normal3[0] = fabs(normal3[0]); normal3[1] = fabs(normal3[1]); normal3[2] = fabs(normal3[2]); + + double ang1 = angle(normal, normal1); + double ang2 = angle(normal, normal2); + double ang3 = angle(normal, normal3); + + if(ang1 < ang2 && ang1 < ang3) + { + selectedRenderWindow = RenderWindow1; + } + else + { + if(ang2 < ang3) + { + selectedRenderWindow = RenderWindow2; + } + else + { + selectedRenderWindow = RenderWindow3; + } + } + + // make node visible + if (selectedRenderWindow) + { + mitk::Point3D centerP = _PlaneGeometry->GetOrigin(); + selectedRenderWindow->GetSliceNavigationController()->ReorientSlices( + centerP, _PlaneGeometry->GetNormal()); + selectedRenderWindow->GetSliceNavigationController()->SelectSliceByPoint( + centerP); + } + } + + // set interactor for new node (if not already set) + mitk::PlanarFigureInteractor::Pointer figureInteractor + = dynamic_cast(m_SelectedNode->GetInteractor()); + + if(figureInteractor.IsNull()) + figureInteractor = mitk::PlanarFigureInteractor::New("PlanarFigureInteractor", m_SelectedNode); + + mitk::GlobalInteraction::GetInstance()->AddInteractor(figureInteractor); + + m_SelectedNode->SetProperty("planarfigure.iseditable",mitk::BoolProperty::New(true)); + + } +} + +void QmitkNavigationButtonsView::SetInteractor() +{ + typedef std::vector Container; + Container _NodeSet = this->GetDataManagerSelection(); + mitk::DataNode* node = 0; + mitk::FiberBundle* bundle = 0; + mitk::FiberBundleInteractor::Pointer bundleInteractor = 0; + + // finally add all nodes to the model + for(Container::const_iterator it=_NodeSet.begin(); it!=_NodeSet.end() + ; it++) + { + node = const_cast(*it); + bundle = dynamic_cast(node->GetData()); + + if(bundle) + { + bundleInteractor = dynamic_cast(node->GetInteractor()); + + if(bundleInteractor.IsNotNull()) + mitk::GlobalInteraction::GetInstance()->RemoveInteractor(bundleInteractor); + + if(!m_Controls->m_Crosshair->isChecked()) + { + m_Controls->m_Crosshair->setChecked(false); + this->GetActiveStdMultiWidget()->GetRenderWindow4()->setCursor(Qt::ArrowCursor); + m_CurrentPickingNode = 0; + } + else + { + m_Controls->m_Crosshair->setChecked(true); + bundleInteractor = mitk::FiberBundleInteractor::New("FiberBundleInteractor", node); + mitk::GlobalInteraction::GetInstance()->AddInteractor(bundleInteractor); + this->GetActiveStdMultiWidget()->GetRenderWindow4()->setCursor(Qt::CrossCursor); + m_CurrentPickingNode = node; + } + + } + } + +} + +void QmitkNavigationButtonsView::PFWidth(int w) +{ + + double width = w/10.0; + m_SelectedNode->SetProperty("planarfigure.line.width", mitk::FloatProperty::New(width) ); + m_SelectedNode->SetProperty("planarfigure.shadow.widthmodifier", mitk::FloatProperty::New(width) ); + m_SelectedNode->SetProperty("planarfigure.outline.width", mitk::FloatProperty::New(width) ); + m_SelectedNode->SetProperty("planarfigure.helperline.width", mitk::FloatProperty::New(width) ); + + mitk::RenderingManager::GetInstance()->RequestUpdateAll(); + + QString label = "Width %1"; + label = label.arg(width); + m_Controls->label_pfwidth->setText(label); + +} + +void QmitkNavigationButtonsView::PFColor() +{ + + QColor color = QColorDialog::getColor(); + + m_Controls->m_PFColor->setAutoFillBackground(true); + QString styleSheet = "background-color:rgb("; + styleSheet.append(QString::number(color.red())); + styleSheet.append(","); + styleSheet.append(QString::number(color.green())); + styleSheet.append(","); + styleSheet.append(QString::number(color.blue())); + styleSheet.append(")"); + m_Controls->m_PFColor->setStyleSheet(styleSheet); + + m_SelectedNode->SetProperty( "planarfigure.default.line.color", mitk::ColorProperty::New(color.red()/255.0, color.green()/255.0, color.blue()/255.0)); + m_SelectedNode->SetProperty( "planarfigure.default.outline.color", mitk::ColorProperty::New(color.red()/255.0, color.green()/255.0, color.blue()/255.0)); + m_SelectedNode->SetProperty( "planarfigure.default.helperline.color", mitk::ColorProperty::New(color.red()/255.0, color.green()/255.0, color.blue()/255.0)); + m_SelectedNode->SetProperty( "planarfigure.default.markerline.color", mitk::ColorProperty::New(color.red()/255.0, color.green()/255.0, color.blue()/255.0)); + m_SelectedNode->SetProperty( "planarfigure.default.marker.color", mitk::ColorProperty::New(color.red()/255.0, color.green()/255.0, color.blue()/255.0)); + + m_SelectedNode->SetProperty( "planarfigure.hover.line.color", mitk::ColorProperty::New(color.red()/255.0, color.green()/255.0, color.blue()/255.0) ); + m_SelectedNode->SetProperty( "planarfigure.hover.outline.color", mitk::ColorProperty::New(color.red()/255.0, color.green()/255.0, color.blue()/255.0) ); + m_SelectedNode->SetProperty( "planarfigure.hover.helperline.color", mitk::ColorProperty::New(color.red()/255.0, color.green()/255.0, color.blue()/255.0) ); +// m_SelectedNode->SetProperty( "planarfigure.hover.markerline.color", mitk::ColorProperty::New(0.0,1.0,0.0) ); +// m_SelectedNode->SetProperty( "planarfigure.hover.marker.color", mitk::ColorProperty::New(0.0,1.0,0.0) ); + +// m_SelectedNode->SetProperty( "planarfigure.selected.line.color", mitk::ColorProperty::New(1.0,0.0,0.0) ); +// m_SelectedNode->SetProperty( "planarfigure.selected.outline.color", mitk::ColorProperty::New(1.0,0.0,0.0) ); +// m_SelectedNode->SetProperty( "planarfigure.selected.helperline.color", mitk::ColorProperty::New(1.0,0.0,0.0) ); +// m_SelectedNode->SetProperty( "planarfigure.selected.markerline.color", mitk::ColorProperty::New(1.0,0.0,0.0) ); +// m_SelectedNode->SetProperty( "planarfigure.selected.marker.color", mitk::ColorProperty::New(1.0,0.0,0.0) ); + + mitk::RenderingManager::GetInstance()->RequestUpdateAll(); +} + +void QmitkNavigationButtonsView::PFColor3D() +{ + + QColor color = QColorDialog::getColor(); + + m_Controls->m_PFColor3D->setAutoFillBackground(true); + QString styleSheet = "background-color:rgb("; + styleSheet.append(QString::number(color.red())); + styleSheet.append(","); + styleSheet.append(QString::number(color.green())); + styleSheet.append(","); + styleSheet.append(QString::number(color.blue())); + styleSheet.append(")"); + m_Controls->m_PFColor3D->setStyleSheet(styleSheet); + + m_SelectedNode->SetProperty( "color", mitk::ColorProperty::New(color.red()/255.0, color.green()/255.0, color.blue()/255.0)); + + mitk::RenderingManager::GetInstance()->RequestUpdateAll(); +} + +void QmitkNavigationButtonsView::Heatmap() +{ + if(m_SelectedNode) + { + mitk::FiberBundle* bundle = dynamic_cast(m_SelectedNode->GetData()); + if(!bundle) + return; + + /////////////////////////////// + // Generate unsigned char Image + typedef unsigned char OutPixType2; + + // run generator + typedef itk::Image< float, 3 > WMPImageType; + typedef itk::TractsToProbabilityImageFilter ImageGeneratorType2; + ImageGeneratorType2::Pointer generator = ImageGeneratorType2::New(); + //generator->SetInput(NULL); + generator->SetFiberBundle(bundle); + generator->SetInvertImage(false); + generator->SetUpsamplingFactor(2); + generator->SetBinaryEnvelope(false); + generator->Update(); + + // get result + typedef itk::Image OutType2; + OutType2::Pointer outImg = generator->GetOutput(); + + mitk::Image::Pointer img2 = mitk::Image::New(); + img2->InitializeByItk(outImg.GetPointer()); + img2->SetVolume(outImg->GetBufferPointer()); + + // to datastorage + mitk::DataNode::Pointer node = mitk::DataNode::New(); + node->SetData(img2); + QString name(m_SelectedNode->GetName().c_str()); + name += "_heatmap"; + node->SetName(name.toStdString()); + node->SetVisibility(true); + + GetDataStorage()->Add(node); + } +} + +void QmitkNavigationButtonsView::LineWidthChanged(int w) +{ + m_SelectedNode->SetIntProperty("LineWidth", w); + + QString label = "Width %1"; + label = label.arg(w); + m_Controls->label_linewidth->setText(label); +} + +void QmitkNavigationButtonsView::TubeRadiusChanged(int r) +{ + m_SelectedNode->SetFloatProperty("TubeRadius", (float) r / 100.0); + + QString label = "Radius %1"; + label = label.arg(r / 100.0); + m_Controls->label_tuberadius->setText(label); +} + +void QmitkNavigationButtonsView::Welcome() +{ + berry::PlatformUI::GetWorkbench()->GetIntroManager()->ShowIntro( + GetSite()->GetWorkbenchWindow(), false); +} diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkNavigationButtonsView.h b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkNavigationButtonsView.h new file mode 100644 index 0000000000..c9fbb661b3 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkNavigationButtonsView.h @@ -0,0 +1,163 @@ +/*========================================================================= + +Program: Medical Imaging & Interaction Toolkit +Module: $RCSfile$ +Language: C++ +Date: $Date: 2009-05-28 17:19:30 +0200 (Do, 28 Mai 2009) $ +Version: $Revision: 17495 $ + +Copyright (c) German Cancer Research Center, Division of Medical and +Biological Informatics. All rights reserved. +See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef _QMITKNavigationButtonsView_H_INCLUDED +#define _QMITKNavigationButtonsView_H_INCLUDED + +#include + +#include + +#include "berryISelectionListener.h" +#include "berryIStructuredSelection.h" +#include "berryISizeProvider.h" + +#include "ui_QmitkNavigationButtonsViewControls.h" + +#include "mitkEnumerationProperty.h" + +/*! + * \ingroup org_mitk_gui_qt_diffusionquantification_internal + * + * \brief QmitkNavigationButtonsView + * + * Document your class here. + * + * \sa QmitkFunctionality + */ +class QmitkNavigationButtonsView : public QmitkFunctionality//, public berry::ISizeProvider +{ + + friend struct CvpSelListener; + + // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) + Q_OBJECT + + public: + + static const std::string VIEW_ID; + + QmitkNavigationButtonsView(); + QmitkNavigationButtonsView(const QmitkNavigationButtonsView& other); + virtual ~QmitkNavigationButtonsView(); + + virtual void CreateQtPartControl(QWidget *parent); + + /// \brief Creation of the connections of main and control widget + virtual void CreateConnections(); + + /// \brief Called when the functionality is activated + virtual void Activated(); + + virtual void Deactivated(); + + virtual void StdMultiWidgetAvailable (QmitkStdMultiWidget &stdMultiWidget); + virtual void StdMultiWidgetNotAvailable(); + + mitk::DataStorage::SetOfObjects::Pointer ActiveSet(std::string); + + void SetBoolProp (mitk::DataStorage::SetOfObjects::Pointer,std::string,bool); + void SetIntProp (mitk::DataStorage::SetOfObjects::Pointer,std::string,int); + void SetFloatProp(mitk::DataStorage::SetOfObjects::Pointer,std::string,float); + void SetLevelWindowProp(mitk::DataStorage::SetOfObjects::Pointer,std::string,mitk::LevelWindow); + void SetEnumProp (mitk::DataStorage::SetOfObjects::Pointer,std::string,mitk::EnumerationProperty::Pointer); + + virtual int GetSizeFlags(bool width); + virtual int ComputePreferredSize(bool width, int availableParallel, int availablePerpendicular, int preferredResult); + +protected slots: + + void DisplayIndexChanged(int); + void TextIntON(); + void Reinit(); + + void VisibleOdfsON(int view); + void VisibleOdfsON_S(); + void VisibleOdfsON_T(); + void VisibleOdfsON_C(); + + void ShowMaxNumberChanged(); + void NormalizationDropdownChanged(int); + void ScalingFactorChanged(double); + void AdditionalScaling(int); + void IndexParam1Changed(double); + void IndexParam2Changed(double); + void OpacityChanged(double,double); + void ScalingCheckbox(); + + void OnThickSlicesModeSelected( QAction* action ); + void OnTSNumChanged(int num); + void OnMenuAboutToShow (); + + void BundleRepresentationWire(); + void BundleRepresentationTube(); + void BundleRepresentationColor(); + void PlanarFigureFocus(); + + void SetInteractor(); + + void PFWidth(int); + void PFColor(); + void PFColor3D(); + + void LineWidthChanged(int); + void TubeRadiusChanged(int); + + void Heatmap(); + void Welcome(); + +protected: + + Ui::QmitkNavigationButtonsViewControls* m_Controls; + + QmitkStdMultiWidget* m_MultiWidget; + + berry::ISelectionListener::Pointer m_SelListener; + berry::IStructuredSelection::ConstPointer m_CurrentSelection; + + bool m_FoundSingleOdfImage; + bool m_IsInitialized; + + QIcon* m_IconTexOFF; + QIcon* m_IconTexON; + QIcon* m_IconGlyOFF_T; + QIcon* m_IconGlyON_T; + QIcon* m_IconGlyOFF_C; + QIcon* m_IconGlyON_C; + QIcon* m_IconGlyOFF_S; + QIcon* m_IconGlyON_S; + + bool m_TexIsOn; + bool m_GlyIsOn_T; + bool m_GlyIsOn_C; + bool m_GlyIsOn_S; + + int currentThickSlicesMode; + QLabel* m_TSLabel; + QMenu* m_MyMenu; + + // for planarfigure and bundle handling: + mitk::DataNode* m_SelectedNode; + mitk::DataNode* m_CurrentPickingNode; +}; + + + + +#endif // _QMITKNavigationButtonsView_H_INCLUDED + diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkNavigationButtonsViewControls.ui b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkNavigationButtonsViewControls.ui new file mode 100644 index 0000000000..698a27ca2b --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkNavigationButtonsViewControls.ui @@ -0,0 +1,47 @@ + + + QmitkNavigationButtonsViewControls + + + + 0 + 0 + 432 + 25 + + + + + 0 + 100 + + + + + 0 + 0 + + + + QmitkTemplate + + + + 0 + + + + + Show Welcome Screen + + + + + + + + QmitkDataStorageComboBox.h + + + + diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkWelcomePerspective.cpp b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkWelcomePerspective.cpp new file mode 100644 index 0000000000..6a59624ce5 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkWelcomePerspective.cpp @@ -0,0 +1,22 @@ +/*========================================================================= + + Program: BlueBerry Platform + Language: C++ + Date: $Date: 2009-10-23 02:59:36 +0200 (Fr, 23 Okt 2009) $ + Version: $Revision: 19652 $ + + Copyright (c) German Cancer Research Center, Division of Medical and + Biological Informatics. All rights reserved. + See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ + +#include "QmitkWelcomePerspective.h" + +void QmitkWelcomePerspective::CreateInitialLayout(berry::IPageLayout::Pointer /*layout*/) +{ +} diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkWelcomePerspective.h b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkWelcomePerspective.h new file mode 100644 index 0000000000..2239700630 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkWelcomePerspective.h @@ -0,0 +1,42 @@ +/*========================================================================= + + Program: BlueBerry Platform + Language: C++ + Date: $Date: 2009-10-23 02:59:36 +0200 (Fr, 23 Okt 2009) $ + Version: $Revision: 19652 $ + + Copyright (c) German Cancer Research Center, Division of Medical and + Biological Informatics. All rights reserved. + See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + + =========================================================================*/ + + +#ifndef QMITKWelcomePERSPECTIVE_H_ +#define QMITKWelcomePERSPECTIVE_H_ + +#include + +class QmitkWelcomePerspective : public QObject, public berry::IPerspectiveFactory +{ + Q_OBJECT + Q_INTERFACES(berry::IPerspectiveFactory) + +public: + + QmitkWelcomePerspective() {} + QmitkWelcomePerspective(const QmitkWelcomePerspective& other) + { + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); + } + ~QmitkWelcomePerspective() {} + + void CreateInitialLayout(berry::IPageLayout::Pointer /*layout*/); +}; + +#endif /* QMITKWelcomePERSPECTIVE_H_ */ diff --git a/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkWelcomeScreenViewControls.ui b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkWelcomeScreenViewControls.ui new file mode 100644 index 0000000000..4a7cda1314 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkWelcomeScreenViewControls.ui @@ -0,0 +1,34 @@ + + + QmitkWelcomeScreenViewControls + + + + 0 + 0 + 458 + 398 + + + + + 0 + 0 + + + + QmitkTemplate + + + + 0 + + + + + + + + + +