diff --git a/Documentation/CMakeLists.txt b/Documentation/CMakeLists.txt
index 9ea907bf5a..b64686269f 100644
--- a/Documentation/CMakeLists.txt
+++ b/Documentation/CMakeLists.txt
@@ -1,175 +1,174 @@
#
# Variables:
# MITK_DOXYGEN_OUTPUT_DIR: doxygen output directory (optional)
# Compile source code snippets
#add_subdirectory(Snippets)
find_package(Doxygen)
if(DOXYGEN_FOUND)
option(USE_DOT "Use dot program for generating graphical class diagrams with doxygen, if available" ON)
option(MITK_DOXYGEN_BUILD_ALWAYS "Always build the MITK documentation when building the default target" OFF)
option(MITK_DOXYGEN_GENERATE_QCH_FILES "Use doxygen to generate Qt compressed help files for MITK docs" OFF)
mark_as_advanced(USE_DOT MITK_DOXYGEN_BUILD_ALWAYS MITK_DOXYGEN_GENERATE_QCH_FILES)
set(HAVE_DOT "NO")
if(DOXYGEN_DOT_EXECUTABLE AND USE_DOT)
set(HAVE_DOT "YES")
endif()
set(MITK_DOXYGEN_OUTPUT_DIR ${PROJECT_BINARY_DIR}/Documentation/Doxygen CACHE PATH "Output directory for doxygen generated documentation." )
set(MITK_DOXYGEN_TAGFILE_NAME ${MITK_DOXYGEN_OUTPUT_DIR}/MITK.tag CACHE INTERNAL "MITK Doxygen tag file")
# This is relative to the working directory of the doxygen command
set(MITK_DOXYGEN_STYLESHEET mitk_doxygen.css)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${MITK_DOXYGEN_STYLESHEET}
${CMAKE_CURRENT_BINARY_DIR}/${MITK_DOXYGEN_STYLESHEET} @COPYONLY)
# Create QCH files for MITK and external projects
set(MITK_DOXYGEN_GENERATE_QHP "NO")
if(MITK_DOXYGEN_GENERATE_QCH_FILES)
find_program(QT_HELPGENERATOR_EXECUTABLE
NAMES qhelpgenerator qhelpgenerator-qt4 qhelpgenerator4
PATHS ${QT_BINARY_DIR}
DOC "The location of the the Qt help generator executable"
NO_DEFAULT_PATH
)
mark_as_advanced(QT_HELPGENERATOR_EXECUTABLE)
if(NOT QT_HELPGENERATOR_EXECUTABLE)
message(SEND_ERROR "The Qt help generator could not be found. Disabling qch generation")
else()
set(MITK_DOXYGEN_GENERATE_QHP "YES")
endif()
# The name of the generated MITK qch file, relative to the
# Doxygen HTML output folder
set(MITK_DOXYGEN_QCH_FILE "${MITK_BINARY_DIR}/MITK-${MITK_REVISION_ID}.qch")
# Generating ITK and VTK docs it not done yet
#option(MITK_DOXYGEN_GENERATE_VTK_QCH_FILE "Use doxygen to generate a Qt compressed help file for VTK docs" OFF)
#option(MITK_DOXYGEN_GENERATE_ITK_QCH_FILE "Use doxygen to generate a Qt compressed help file for ITK docs" OFF)
#mark_as_advanced(MITK_DOXYGEN_GENERATE_VTK_QCH_FILE MITK_DOXYGEN_GENERATE_ITK_QCH_FILE)
endif()
if(MITK_USE_BLUEBERRY)
file(RELATIVE_PATH _blueberry_doxygen_path ${MITK_DOXYGEN_OUTPUT_DIR}/html ${BLUEBERRY_DOXYGEN_OUTPUT_DIR}/html)
set(BLUEBERRY_DOXYGEN_TAGFILE "${BLUEBERRY_DOXYGEN_TAGFILE_NAME}=${_blueberry_doxygen_path}")
set(BLUEBERRY_DOXYGEN_LINK "BlueBerry Documentation")
set(MITK_XP_LINK "\\ref mitkExtPointsIndex")
configure_file(schema.css ${MITK_DOXYGEN_OUTPUT_DIR}/html/schema.css)
set(MITK_DOXYGEN_ENABLED_SECTIONS "${MITK_DOXYGEN_ENABLED_SECTIONS} BLUEBERRY")
endif(MITK_USE_BLUEBERRY)
# Compile a doxygen input filter for processing CMake scripts
include(mitkFunctionCMakeDoxygenFilterCompile)
mitkFunctionCMakeDoxygenFilterCompile(NAMESPACE "CMake")
# Configure some doxygen options
if(NOT MITK_DOXYGEN_INTERNAL_DOCS)
set(MITK_DOXYGEN_INTERNAL_DOCS "NO")
set(MITK_DOXYGEN_HIDE_FRIEND_COMPOUNDS "YES")
set(MITK_DOXYGEN_EXCLUDE_PATTERNS "*_p.* *Private.h */internal/*")
else()
set(MITK_DOXYGEN_HIDE_FRIEND_COMPOUNDS "NO")
set(MITK_DOXYGEN_EXCLUDE_PATTERNS "")
endif()
if(NOT MITK_DOXYGEN_GENERATE_TODOLIST)
set(MITK_DOXYGEN_GENERATE_TODOLIST "NO")
endif()
if(NOT MITK_DOXYGEN_GENERATE_BUGLIST)
set(MITK_DOXYGEN_GENERATE_BUGLIST "NO")
endif()
if(NOT MITK_DOXYGEN_HTML_DYNAMIC_SECTIONS)
set(MITK_DOXYGEN_HTML_DYNAMIC_SECTIONS "NO")
endif()
if(NOT MITK_DOXYGEN_UML_LOOK)
set(MITK_DOXYGEN_UML_LOOK "NO")
endif()
if(NOT MITK_DOXYGEN_GENERATE_DEPRECATEDLIST)
set(MITK_DOXYGEN_GENERATE_DEPRECATEDLIST "YES")
endif()
if(NOT DEFINED MITK_DOXYGEN_DOT_NUM_THREADS)
set(MITK_DOXYGEN_DOT_NUM_THREADS 0)
endif()
configure_file(Doxygen/MainPage.dox.in
${CMAKE_CURRENT_BINARY_DIR}/Doxygen/MainPage.dox)
configure_file(doxygen.conf.in
${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf)
if(MITK_DOXYGEN_BUILD_ALWAYS)
set(_doc_in_all "ALL")
else()
set(_doc_in_all "")
endif()
add_custom_target(doc ${_doc_in_all}
${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
if(MITK_USE_BLUEBERRY)
# convert the extension points schema files into html
find_package(Ant)
if(ANT_FOUND AND BLUEBERRY_DOC_TOOLS_DIR)
list(APPEND MITK_XP_GLOB_EXPRESSIONS
- ${MITK_SOURCE_DIR}/CoreUI/Bundles/plugin.xml
- ${MITK_SOURCE_DIR}/Modules/Bundles/plugin.xml)
+ ${MITK_SOURCE_DIR}/Plugins/plugin.xml)
file(GLOB_RECURSE _plugin_xmls ${MITK_XP_GLOB_EXPRESSIONS})
MACRO_CONVERT_SCHEMA(INPUT ${_plugin_xmls}
OUTPUT_DIR "${MITK_DOXYGEN_OUTPUT_DIR}/html/extension-points/html"
TARGET_NAME mitkXPDoc
)
add_dependencies(doc mitkXPDoc)
if(${PROJECT_NAME} STREQUAL "MITK")
add_dependencies(doc BlueBerryDoc)
endif()
endif(ANT_FOUND AND BLUEBERRY_DOC_TOOLS_DIR)
endif(MITK_USE_BLUEBERRY)
#if(MITK_DOXYGEN_GENERATE_ITK_QCH_FILE)
# # add the command to generate the ITK documantation
# add_custom_target(doc-itk
# COMMAND ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.itk.conf)
# add_dependencies(doc doc-itk)
#endif()
#if(MITK_DOXYGEN_GENERATE_VTK_QCH_FILE)
# # add the command to generate the VTK documantation
# add_custom_target(doc-vtk
# COMMAND ${DOXYGEN} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.vtk.conf)
# add_dependencies(doc doc-vtk)
#endif()
else(DOXYGEN_FOUND)
# copy blank documentation page to prevent QtHelp from being shown
# copy the .qhc and .qch files to $MITK_BIN/mitk/bin/ExtBundles/resources/
configure_file(pregenerated/MITKBlankPage.qch
${MITK_BINARY_DIR}/bin/ExtBundles/org.mitk.gui.qt.extapplication/resources/MITKBlankPage.qch
COPYONLY)
configure_file(pregenerated/MitkExtQtHelpCollection.qhc
${MITK_BINARY_DIR}/bin/ExtBundles/org.mitk.gui.qt.extapplication/resources/MitkExtQtHelpCollection.qhc
COPYONLY)
endif(DOXYGEN_FOUND)
diff --git a/Examples/Tutorial/Step1.cpp b/Examples/Tutorial/Step1.cpp
index 55482c0e1c..f60d58d6f0 100644
--- a/Examples/Tutorial/Step1.cpp
+++ b/Examples/Tutorial/Step1.cpp
@@ -1,115 +1,115 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#include "QmitkRegisterClasses.h"
#include "QmitkRenderWindow.h"
#include
#include
#include
#include
//##Documentation
-//## @brief Load image (pic format) and display it in a 2D view
+//## @brief Load image (nrrd format) and display it in a 2D view
int main(int argc, char* argv[])
{
QApplication qtapplication( argc, argv );
if (argc < 2)
{
fprintf( stderr, "Usage: %s [filename] \n\n", itksys::SystemTools::GetFilenameName(argv[0]).c_str() );
return 1;
}
// Register Qmitk-dependent global instances
QmitkRegisterClasses();
//*************************************************************************
// Part I: Basic initialization
//*************************************************************************
// Create a DataStorage
// The DataStorage manages all data objects. It is used by the
// rendering mechanism to render all data objects
// We use the standard implementation mitk::StandaloneDataStorage.
mitk::StandaloneDataStorage::Pointer ds = mitk::StandaloneDataStorage::New();
//*************************************************************************
// Part II: Create some data by reading a file
//*************************************************************************
// Create a DataNodeFactory to read a data format supported
// by the DataNodeFactory (many image formats, surface formats, etc.)
mitk::DataNodeFactory::Pointer reader=mitk::DataNodeFactory::New();
const char * filename = argv[1];
try
{
reader->SetFileName(filename);
reader->Update();
//*************************************************************************
// Part III: Put the data into the datastorage
//*************************************************************************
// Add the node to the DataStorage
ds->Add(reader->GetOutput());
}
catch(...)
{
fprintf( stderr, "Could not open file %s \n\n", filename );
exit(2);
}
//*************************************************************************
// Part IV: Create window and pass the datastorage to it
//*************************************************************************
// Create a RenderWindow
QmitkRenderWindow renderWindow;
// Tell the RenderWindow which (part of) the datastorage to render
renderWindow.GetRenderer()->SetDataStorage(ds);
// Initialize the RenderWindow
mitk::TimeSlicedGeometry::Pointer geo = ds->ComputeBoundingGeometry3D(ds->GetAll());
mitk::RenderingManager::GetInstance()->InitializeViews( geo );
//mitk::RenderingManager::GetInstance()->InitializeViews();
// Select a slice
mitk::SliceNavigationController::Pointer sliceNaviController = renderWindow.GetSliceNavigationController();
if (sliceNaviController)
sliceNaviController->GetSlice()->SetPos( 0 );
//*************************************************************************
// Part V: Qt-specific initialization
//*************************************************************************
renderWindow.show();
renderWindow.resize( 256, 256 );
// for testing
#include "QtTesting.h"
if (strcmp(argv[argc-1], "-testing") != 0)
return qtapplication.exec();
else
return QtTesting();
// cleanup: Remove References to DataStorage. This will delete the object
ds = NULL;
}
/**
\example Step1.cpp
*/
diff --git a/Examples/Tutorial/Step2.cpp b/Examples/Tutorial/Step2.cpp
index 62806692b4..df3c30a0a9 100644
--- a/Examples/Tutorial/Step2.cpp
+++ b/Examples/Tutorial/Step2.cpp
@@ -1,121 +1,118 @@
/*===================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center,
Division of Medical and Biological Informatics.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE.txt or http://www.mitk.org for details.
===================================================================*/
#include "QmitkRegisterClasses.h"
#include "QmitkRenderWindow.h"
#include
#include
#include
#include
//##Documentation
//## @brief Load one or more data sets (many image, surface
//## and other formats) and display it in a 2D view
-//##
-//## Only very slightly different to Step1: Use DataNodeFactory
-//## instead of PicFileReader, and read more than one data set.
int main(int argc, char* argv[])
{
QApplication qtapplication( argc, argv );
if(argc<2)
{
fprintf( stderr, "Usage: %s [filename1] [filename2] ...\n\n",
itksys::SystemTools::GetFilenameName(argv[0]).c_str() );
return 1;
}
// Register Qmitk-dependent global instances
QmitkRegisterClasses();
//*************************************************************************
// Part I: Basic initialization
//*************************************************************************
// Create a data storage object. We will use it as a singleton
mitk::StandaloneDataStorage::Pointer storage = mitk::StandaloneDataStorage::New();
//*************************************************************************
// Part II: Create some data by reading files
//*************************************************************************
int i;
for(i=1; iSetFileName(filename);
nodeReader->Update();
//*********************************************************************
// Part III: Put the data into the datastorage
//*********************************************************************
// Since the DataNodeFactory directly creates a node,
// use the datastorage to add the read node
storage->Add(nodeReader->GetOutput());
}
catch(...)
{
fprintf( stderr, "Could not open file %s \n\n", filename );
exit(2);
}
}
//*************************************************************************
// Part IV: Create window and pass the datastorage to it
//*************************************************************************
// Create a RenderWindow
QmitkRenderWindow renderWindow;
// Tell the RenderWindow which (part of) the datastorage to render
renderWindow.GetRenderer()->SetDataStorage(storage);
// Initialize the RenderWindow
mitk::TimeSlicedGeometry::Pointer geo = storage->ComputeBoundingGeometry3D(storage->GetAll());
mitk::RenderingManager::GetInstance()->InitializeViews( geo );
// Select a slice
mitk::SliceNavigationController::Pointer sliceNaviController = renderWindow.GetSliceNavigationController();
if (sliceNaviController)
sliceNaviController->GetSlice()->SetPos( 2 );
//*************************************************************************
// Part V: Qt-specific initialization
//*************************************************************************
renderWindow.show();
renderWindow.resize( 256, 256 );
// for testing
#include "QtTesting.h"
if(strcmp(argv[argc-1], "-testing")!=0)
return qtapplication.exec();
else
return QtTesting();
}
/**
\example Step2.cpp
*/