diff --git a/Documentation/Doxygen/DeveloperManual/BuildInstructions.dox b/Documentation/Doxygen/DeveloperManual/BuildInstructions.dox index d682ed5462..bb17b3b64a 100644 --- a/Documentation/Doxygen/DeveloperManual/BuildInstructions.dox +++ b/Documentation/Doxygen/DeveloperManual/BuildInstructions.dox @@ -1,201 +1,201 @@ /** \page BuildInstructionsPage Build Instructions \section BuildInstructions_Introduction Introduction The MITK build system (which is based on CMake) supports a "superbuild" process, meaning that it will download, configure, and build all required third-party libraries (except Qt) automatically. These instructions will show you how to use the MITK superbuild. \note This page explains explicitly how to build MITK itself. If you want to create your own project based on MITK, the process -described below is completely automated. Please see Setup a MITK-based project +described below is completely automated. Please see \ref HowToNewProject. For more advanced users, the last sections explain how to inject custom build libraries into the superbuild process. \section BuildInstructions_Prerequisites Prerequisites You need: -# Git from http://git-scm.com (there are also numerous third-party graphical clients available). We recomment using Git, but see below for a way how to get the current source code without using it. -# CMake (version 2.8.4 or higher) - -# Qt 4.x if you plan to develop Qt-based applications + -# Qt 4.x if you plan to develop Qt-based applications (version 4.6 or above is recommended, we cannot guarantee compatibility with lower versions) -# If you are using Mac OS X you need an Xcode installation as this provides the neccessary compilers and SDKs \attention For Mac OS X it is strongly recommended to use CMake version 2.8.8 or higher - + \section BuildInstructions_Qt A note about Qt Nokia provides several binary packages for Qt. You must make sure that the package you download matches your toolchain. On Linux, getting Qt by installing the packages provided by your Linux package manager is the preferred way. On Windows, the Nokia provided binaries are compiled for 32bit architectures. You cannot build your own project for a 64bit machine and use the 32bit Qt libraries. You have two options for a 64bit Qt-based application: -# Download an inofficial 64bit installer, for example here. Note that we cannot offer support for problems with MITK due to the usage of this kind of installers. -# Compile Qt yourself. This is shortly described below. - + To compile Qt on Windows using Visual Studio, follow the steps below: -# Download the Qt sources and unpack them, e.g. to C:/qt-everywhere-opensource-src-4.7.4 -# Open a Visual Studio command prompt. Make sure to use the appropriate command prompt for either a 32 bit or 64 bit build. Note that Visual Studio Express does not come with 64bit compilers out of the box (the Professional version does). -# Configure Qt by executing the configure.exe command in your Qt source directory. The following configure options will build a Qt compatible with MITK: \verbatim configure.exe -prefix C:\Qt\4.7.4_vc9_x64 -debug-and-release -qt-sql-sqlite -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -mp -nomake examples -nomake demos -nomake docs \endverbatim -# Build and install the Qt libraries \verbatim nmake nmake install \endverbatim After "nmake install" completed successfully, you may delete your Qt source directory. - + \section BuildInstructions_Get_Source Get a source tree Since MITK is under active development we recommend to use git to get the most recent version. To make sure you get a stable tree, check the MITK dashboard before checking out. If the build tree is not clean, you can specify an older revision for the checkout or get a stable tar ball from www.mitk.org. If you don't want to use Git, you may also download the current source code (or any other older version) as a tar.gz package by clicking on the snapshot link. You can then skip the clone step below. To clone MITK's current git repository do: \code git clone http://git.mitk.org/MITK.git \endcode \section BuildInstructions_Build_With_CMake Build MITK with CMake Create a new directory for the superbuild binary tree, change to it and call CMake: In the shell (assuming you current directory is the same as the one where you issued the git clone command): \code mkdir MITK-superbuild cd MITK-superbuild ccmake ../MITK \endcode If you use Windows, then you just start the CMake GUI and enter the location of the source and of the binary tree, choose a suitable generator and configure the project. If you use Mac OS X you will have to tweak the CMake configuration: - First of all you have to check the selected compilers, i.e.: - CMAKE_CXX_COMPILER - CMAKE_C_COMPILER - both should be either apple's clang or apple's gcc compiler - Next you have to assure hat CMAKE_OSX_SYSROOT points to the correct SDK location: - This is either /Developer/SDKs/Developer/SDKs/MacOSX10.7.sdk or if you have installed Xcode 4.3+ it is located in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ - Finally you should set the cmake variable MITK_USE_VTK_5_8_IN_SUPERBUILD to ON CMake will present you a couple of options, these are the most important ones: - MITK_USE_BLUEBERRY Build the BlueBerry application framework - MITK_USE_Boost Build MITK code which depends on Boost (this will download Boost 1.45.0) - MITK_USE_Boost_LIBRARIES If you need binary Boost libraries, specify them here. - MITK_USE_OpenCV Build MITK code which depends on OpenCV (this will download and build OpenCV 2.3) - MITK_USE_Python Enables Python wrapping in MITK. This will also configure ITK, VTK, and OpenCV (if enabled) to build Python wrappers. - MITK_USE_QT Build MITK code which depends on Qt - QT_QMAKE_EXECUTABLE The path to the qmake executable of your Qt installation - -If you are satisfied with the configuration of your MITK superbuild, generate the project files with + +If you are satisfied with the configuration of your MITK superbuild, generate the project files with CMake by pressing "Generate". Linux and Mac OS X users usually just enter "make" (optionally supplying the number threads to be used for a parallel build): \code make -j4 \endcode \note On Mac OS X: If you follow these steps CMake will produce Makefiles and therefore you cannot use Xcode but you have to use e.g. the QtCreator for programming. At the moment developing MITK with Xcode is not supported and using Xcode the superbuild doesn't complete without errors. Windows users using Visual Studio can open the generated MITK-superbuild.sln solution file in the MITK-superbuild directory and start the build by building the BUILD_ALL project. \section BuildInstructions_Customize Customize your MITK superbuild The MITK superbuild configured MITK with all needed external libraries. The build directories of these libraries, and of MITK itself are located inside the MITK-superbuild directory. For example, the directory layout may look like: \code MITK-superbuild |- ITK-build |- VTK-build |- MITK-build \endcode To change the configuration of the MITK build, choose the MITK-build directory as the binary directory in the CMake GUI. After generating the project files, build the MITK project by either issuing "make" in the MITK-build directory (Linux), or by opening MITK-build/MITK.sln and building the project with Visual Studio. You may also change the configuration of any project configured via the superbuild process. Make sure to also build the changed project and also the projects which depend on it. \section BuildInstructions_Running Running Applications On Linux, just execute the application you want to run. MITK executables are located in MITK-superbuild/MITK-build/bin On Windows, the PATH environment variable must contain the directories containging third-party libraries. The MITK build system generated Windows Batch files in the MITK-build directory which set up a correct environment and opens the appropriate Visual Studio solution file. Use (and maybe modify/enhance) these Batch files to be able to start and debug MITK applications from inside Visual Studio. \section BuildInstructions_Documentation Documentation If you have the Doxygen documentation tool installed, you get a new project -(Visual Studio) or "make" target named "doc". You can build this to generate the HTML documentation of MITK in +(Visual Studio) or "make" target named "doc". You can build this to generate the HTML documentation of MITK in the Documentation/Doxygen directory of your MITK-build binary tree or in the MITK_DOXYGEN_OUTPUT_DIR CMake variable (if specified). \section BuildInstructions_Extending Extend MITK on your own (using the application framework BlueBerry) Please see \ref NewPluginPage \section BuildInstructions_As_Toolkit Use MITK in your own project (as a toolkit) To use MITK in your external project, add the CMake command find_package(MITK REQUIRED) to your CMakeLists.txt and make use of the CMake macros MITK_CHECK_MODULE(result_var ) and MITK_USE_MODULE() provided by MITK. Here is an example CMakeLists.txt (from the Examples/QtAppExample/ directory) which allows you to create a Qt based application using MITK to display an image. \include QtAppExample/CMakeLists.txt \section BuildInstructions_Advanced_Customization Superbuild Customization You can inject pre-build third-party libraries into the MITK superbuild by setting certain CMake variables before the first configure step. MITK will then use these third-party libraries instead of downloading and building them itself. Note you must take care to configure those libraries with all options MITK requires. The variables listed below are provided for injecting third-party libraries. Their occurrence in the CMake GUI or in ccmake may depend on specific MITK_USE_* options set to ON. You may also use the variable names below without the EXTERNAL_ prefix, for example when providing their values on a command line call to CMake. - EXTERNAL_BOOST_ROOT Set this variable to your custom Boost installation - EXTERNAL_CTK_DIR Set this variable to your CTK binary tree (the directory containing the CTKConfig.cmake file) - EXTERNAL_CableSwig_DIR Set this variable to your CableSwig binary tree for Python wrapping (the directory containing the CableSwigConfig.cmake file) - EXTERNAL_DCMTK_DIR Set this variable to your DCMTK binary tree (the directory containing the DCMTKConfig.cmake file) - EXTERNAL_GDCM_DIR Set this variable to your GDCM binary tree (the directory containing the GDCMConfig.cmake file) - EXTERNAL_ITK_DIR Set this variable to your ITK binary tree (the directory containing the ITKConfig.cmake file) - EXTERNAL_OpenCV_DIR Set this variable to your OpenCV binary tree (the directory containing the OpenCVConfig.cmake file) - EXTERNAL_VTK_DIR Set this variable to your VTK binary tree (the directory containing the VTKConfig.cmake file) - + To set CMake options before the first configure step is invoked, supply them on the command line, i.e. \code ccmake -DITK_DIR:PATH=/opt/ITK-release ../MITK \endcode See the following link for more information about how to configure third-party libraries: \subpage BuildToolkits "How to build ITK, VTK and QT" */ diff --git a/Documentation/Doxygen/DeveloperManual/Deployment.dox b/Documentation/Doxygen/DeveloperManual/Deployment.dox new file mode 100644 index 0000000000..ea81e022c7 --- /dev/null +++ b/Documentation/Doxygen/DeveloperManual/Deployment.dox @@ -0,0 +1,46 @@ +/** +\page DeploymentPage Deployment + +\section DeploymentPageIntroduction Introduction + + + +\note This does not install the MITK headers (like an SDK). If you want to develop applications based on MITK you still have to compile MITK yourself. + +\section DeploymentPagePlatform Platform specific notes + +\subsection DeploymentPagePlatformLinux Linux + +You can create a tarball (.tar.gz) of your MITK application which includes all necessary non-system libraries by following these steps: + + + +\note Libraries in system locations (/lib/, /lib32/, /lib64/, /usr/lib/, /usr/lib32/,/usr/lib64/, and /usr/X11R6/) will not be included in the tarball. If you want to distribute Qt (for example), you have to do a custom Qt installation outside of these directories. + +\subsection DeploymentPagePlatformWindows Windows + +You can create a Zip file (.zip) or an NSIS installer (needs an installation of NSIS) for Windows platforms. Only "Release" builds are supported during packaging, the results of trying to package "Debug" builds are undefined. + +\note Building installers based on MinGW is not supported. + + + +On some systems, it might still be necessary to install the Microsoft Visual C++ Redistributable Package to start the installed application successfully. + +\subsection DeploymentPagePlatformMacOS MacOS + +You can create a drag'n drop disk image (.dmg) file for MacOS. The procedure is pretty much the same as for Linux. + +\note On MacOS, libraries in system locations as pointed out in the Linux section \b and libraries located in /System/Library will not be copied. If you want to distribute any libraries from these locations, you have to install them somewhere else prior to configuring your MITK build. + +*/ \ No newline at end of file diff --git a/Documentation/Doxygen/DeveloperManual/Development.dox b/Documentation/Doxygen/DeveloperManual/Development.dox index e31b633cf4..925c9f8509 100644 --- a/Documentation/Doxygen/DeveloperManual/Development.dox +++ b/Documentation/Doxygen/DeveloperManual/Development.dox @@ -1,47 +1,49 @@ /** \page Development Development with MITK The following items are concerned with the practical use of the MITK library for software development. Some abstract concepts of MITK are described in \ref Concepts \section DevelopmentSetup Setting Up MITK \li \subpage SupportedPlatformsPage \li \subpage BuildInstructionsPage \li \subpage thirdpartylibs +\li \ref HowToNewProject \section DevelopmentGettingToKnow Getting To Know MITK \li \subpage DirectoryStructurePage \li \subpage TutorialPage \section DevelopmentWith Developing With MITK \li \subpage DICOMTesting \li \subpage NewPluginPage \li \subpage StatemachineEditor \li \subpage mitkExtPointsIndex +\li \subpage DeploymentPage \li \subpage KnownProblemsPage \section DevelopmentContributing Contributing To MITK \li \subpage DocumentationGuide \li \subpage StyleGuideAndNotesPage \section DevelopmentGettingToKnowBlueberry Getting To Know BlueBerry \li \subpage BlueBerryExamples \section DevelopmentFurtherInfo Further Information This section lists some ressources you might want to look at if you could not find what you need in the \ref Development or \ref Concepts sections. We hold regular internal seminars which may or may not have something to do with MITK directly. The slides can be found here. If you have some problems with MITK you might want to take a look at the FAQ. If the above does not prove sufficient you can contact the Mailinglist. */ diff --git a/Documentation/Doxygen/DeveloperManual/HowToNewProject-MyProjectLayout.png b/Documentation/Doxygen/DeveloperManual/HowToNewProject-MyProjectLayout.png new file mode 100644 index 0000000000..d3d9d3c7a3 Binary files /dev/null and b/Documentation/Doxygen/DeveloperManual/HowToNewProject-MyProjectLayout.png differ diff --git a/Documentation/Doxygen/DeveloperManual/HowToNewProject.dox b/Documentation/Doxygen/DeveloperManual/HowToNewProject.dox new file mode 100644 index 0000000000..d961d9c9e4 --- /dev/null +++ b/Documentation/Doxygen/DeveloperManual/HowToNewProject.dox @@ -0,0 +1,161 @@ +/** +\page HowToNewProject Creating a new MITK project + +This page is intended to give a comprehensive guide to setting up your own MITK based project. It will use the application framework provided by MITK and is probably the preferred way for most users. + +The first part of this document is a tutorial aimed at newcomers to MITK and possibly %CMake and tries to give as much help as possible on setting up your own project. If you are looking for more technical information about customizing MITK, the structure of the superbuild or packaging you might want to read the \ref HowToNewProjectAdvancedInformation. + +If you have set up your MITK project already and want to start developing you could take a look at \ref TutorialPage. + +\section HowToNewProjectGettingStarted Getting Started + +To bootstrap your project MITK offers two convenient options: + +
    +
  1. Use the MITK Plugin Generator, a command line tool used to generate a customized MITK project and/or MITK plug-ins (available for download here). +
  2. Use the MITK project template as an example project. +
+ +Both options will provide you with a project which contains a "superbuild" mechanism to automatically download, configure, and build MITK as a dependency of your own project. + +The MITK Plugin Generator generates code using the supplied command line arguments, whereas the MITK project template needs immediate modifications to customize it to your naming schemes. However, the project template will potentially contain more code demonstrating features of MITK. + +\note Using the MITK Plugin Generator is recommended for beginners. + +\section HowToNewProjectPrerequisites Prerequisites + +What ever option you choose, a MITK-based project needs essentially the same prerequisites as MITK itself. Please see \ref BuildInstructions_Prerequisites for details. +\note If you use one of the two options above you will \b not \b need to build MITK yourself. This will be done automatically. + +\section HowToNewProjectCreatingSourceDir Preparing your source directory + +In order to start developing with MITK, you first have to set up the source directory for your project. + +\subsection HowToNewProjectSourceUsingGenerator Using the MITK Plugin Generator + +The usage of the Plugin Generator for creating a new project is described in \ref NewPluginWithProject, please have a look there. + +\subsection HowToNewProjectSourceUsingTemplate Using the MITK Project Template + +Download the project as a tarball or zipball and extract it to your desired source directory. + +\note This is a \b template \b. You must modify it such that it fits the needs of your particular project. Especially you should do a global search and replace for the string "awesome" to rename the template application and plug-in. You may want to rename some files too. + +\section HowToNewProjectGeneratingCMake Generating your binary with CMake + +After you have set up your source directory you can proceed to generate your binary directory using %CMake. Depending on your operating system and preferences you might want to use "cmake-gui" or "ccmake" (shell). This document assumes you are using cmake-gui. + +
    +
  1. Start "cmake-gui" and enter your source (e.g. "D:\AwesomeProject") and binary directory (e.g. "D:\AwesomeProject-superbuild"). +
  2. Upon first pressing "Configure" you will be prompted to select your generator. This determines what project files will be generated by %CMake. Set this to the development tool you are intending to use (e.g. "Visual Studio 2010 64Bit" or "linux makefiles". +
  3. Press "Configure" until no new variables appear and then "Generate". Now all project files have been generated into your binary directory. +
  4. Double-check that the right Qt version is used. +
+ +Now you are ready to compile your code. Depending on your choice of tool this will be done differently, we cover two possibilities here. + +\subsection HowToNewProjectCompilingLinuxMakefiles Compiling using linux makefiles + +
    +
  1. In the shell, switch to your binary directory. +
  2. type "make" and hit enter +
+ +\subsection HowToNewProjectCompilingVisualStudio Compiling using visual studio + +We assume your application is called "AwesomeApp" and your project "AwesomeProject" and your binary directory is "D:\AwesomeProject-superbuild\". Replace names and paths accordingly. + +
    +
  1. Close %CMake and open "D:\AwesomeProject-superbuild\AwesomeProject-superbuild.sln" . Your Visual Studio should appear and by pressing F7 you start the compilation. This will clone the MITK source code, build it, and then start building your own project. +
  2. After the superbuild compilation has finished, close the solution file and start the batch file "D:\AwesomeProject-superbuild\AwesomeProject-build\StartVS_debug.bat" (or _release.bat if you built in Release mode) which opens the "D:\AwesomeProject-superbuild\AweseomeProject-build\AwesomeProject.sln" solution. +
  3. Set the "AwesomeApp" project as start-up project (right click > "Set as StartUp Project") and press "F5" to start your MITK AwesomeApp. +
+ +\note Just opening AwesomeProject.sln from your explorer by double-cliking won`t allow you to start or debug your application because the required environment variables would be missing. Use the supplied batch files or set your PATH variable accordingly. + +\section HowToNewProjectAddingMITKFunctionality I want to use some MITK plugin but it is not available + +Due to the sheer number of MITK plugins not every plugin is activated by default. To activate a specific plugin (again replace paths as needed): +
    +
  1. Start "cmake-gui" and set the binary directory to "D:\AwesomeProject-superbuild\MITK-superbuild\MITK-build\", the source will adjust automatically and you will see new settings appear. +
  2. Navigate to the plugin you want to use (e.g. "MITK_BUILD_org.mitk.gui.qt.segmentation") and tick the checkbox behind it +
  3. Press "Configure" until no new variables appear and then "Generate". +
  4. Build MITK using your development tool (as in \ref HowToNewProjectCompilingLinuxMakefiles or \ref HowToNewProjectCompilingVisualStudio only in the "D:\AwesomeProject-superbuild\MITK-superbuild\MITK-build\" directory ) +
  5. Start "cmake-gui" and set the binary directory to "D:\AwesomeProject-superbuild\AwesomeProject-build\", the source will adjust automatically and you will see new settings appear. +
  6. Press "Configure" until no new variables appear and then "Generate". +
  7. Build your project +
  8. Start your application +
+ +\note If you want to use an application provided by MITK (e.g. MITK Workbench) you have to tick the appropriate checkbox as well (in this case MITK_BUILD_APP_mitkWorkbench ) and build MITK. Do note, that this application will be located in the bin directory of the "D:\AwesomeProject-superbuild\MITK-superbuild\MITK-build\" folder. + + +\section HowToNewProjectAdvancedInformation Information for avanced users + +\subsection HowToNewProjectCustomizingMITK Customizing MITK + +The %CMake scripts from the Plugin Generator of the project template provide some handy options which allow you to customize the MITK build used in your project. You can either inject an already build MITK to be used by your project or configure some MITK options directly in your project's superbuild configuration if MITK is going to be build inside your project. + +\subsubsection HowToNewProjectCustomizingMITKInjectMITK Inject a MITK build + +By setting the \b EXTERNAL_MITK_DIR \b variable in your project's superbuild %CMake configuration to a MITK build directory (containing the MITKConfig.cmake) you can skip the MITK build process. + +If MITK is the only external project in your project, you might want to disable the superbuild of your project completely (set _USE_SUPERBUILD to OFF or edit your CMakeLists.txt file to set it to OFF by default) and set the \b MITK_DIR \b %CMake variable to your MITK build directory. + +\subsubsection HowToNewProjectCustomizingMITKConfigure Configure the MITK superbuild + +If MITK is being build inside your project's superbuild process, you can enable the use of certain third-party libraries inside of MITK. The following variables control the MITK configuration: + + + +You can also inject already build third-party libraries from inside your project's superbuild in the MITK superbuild by using any of the following %CMake variables: + + + +If the corresponding \b MITK_USE_ \b option is set to on, the MITK superbuild will use the provided build directory instead of building the project itself. + +You can also control the source code location for MITK in your project's superbuild configuration by using the following %CMake variables: + + + +\subsubsection HowToNewProjectProjectStructure Project Structure + +If you are using the superbuild feature of the generated project (the default), you might want to familiarise yourself with the layout of your build tree. The top-level build directory which you specified in %CMake when configuring your project will contain all the required dependencies. + +Suppose we call our project MyProject and the build directory is "C:\MyProject-superbuild". Then the layout looks something like this: + +MyProjectLayout.png The top-level directory contains the source code and the build directories from the dependencies of your project. In the current case, the only dependency of MyProject is MITK, which in turn has downloaded and built its own dependencies (CTK, DCMTK, ITK, etc.). The "real" build tree for your project is located in MyProject-superbuild/MyProject-build, so point the %CMake-GUI to this build directory if you want to change the set of enabled plug-ins for example. + +Further, you should open the MyProject.sln solution file (for Visual Studio) or execute "make" in the MyProject-superbuild/MyProject-build/ directory. Only for the very first time or if you want to update and newly build the project's dependencies should you use the project files in the MyProject-superbuild directory directly. + +The same applies for the MyProject-superbuild/MITK-superbuild directory. This directory contains the MITK superbuild, nested inside your project's superbuild. If you want to change %CMake options for MITK, use the MyProject-superbuild/MITK-superbuild/MITK-build build directory. + +\image html HowToNewProject-MyProjectLayout.png "Layout of MyProject" + +\subsubsection HowToNewProjectPackaging Packaging + +The project template and the generated projects by the Plugin Generator come with full packaging support. You can create deployable packages of your project for all supported operating systems my building the PACKAGE target. On Linux, this will create a tarball, on MacOS a .dmg file, and on Windows a zipball and an NSIS installer (if NSIS is installed and found). + +You can read more about deployment \ref DeploymentPage "here". + +*/ \ No newline at end of file diff --git a/Documentation/Doxygen/DeveloperManual/NewPlugin.dox b/Documentation/Doxygen/DeveloperManual/NewPlugin.dox index e664deaada..d937ffa225 100644 --- a/Documentation/Doxygen/DeveloperManual/NewPlugin.dox +++ b/Documentation/Doxygen/DeveloperManual/NewPlugin.dox @@ -1,97 +1,97 @@ /** \page NewPluginPage How to create a new MITK Plug-in The MITK Plugin Generator is a command line tool to simplify the process of creating your own MITK project (optional) and plug-ins. It can either be downloaded here or used from an existing MITK build. The Plugin Generator takes the following command line arguments: \verbatim ./MITKPluginGenerator -h A CTK plug-in generator for MITK (version 1.2.0) -h, --help Show this help text -o, --out-dir Output directory (default: /tmp) -l, --license Path to a file containing license information (default: :/MITKLicense.txt) -v, --vendor The vendor of the generated code (default: DKFZ, Medical and Biological Informatics) -q, --quiet Do not print additional information -y, --confirm-all Answer all questions with 'yes' -u, --check-update Check for updates and exit -n, --no-networking Disable all network requests Plug-in View options -vc, --view-class The View's' class name -vn, --view-name * The View's human readable name Plug-in options -ps, --plugin-symbolic-name * The plugin's symbolic name -pn, --plugin-name The plug-in's human readable name Project options --project-copyright Path to a file containing copyright information (default: :/LICENSE.txt) --project-name The project name --project-app-name The application name [* - options are required] \endverbatim If a project name is provided via the --project-name argument, the new plug-in will be generated as part of a new project. \section NewPluginOnly Creating a new MITK plug-in Here is an example call to the Plugin Generator, creating one plug-in with the symbolic name com.mycompany.myplugin and a View named My View: \verbatim ./MITKPluginGenerator --plugin-symbolic-name org.mycompany.myplugin --view-name "My View" \endverbatim If you did not already specify the final location of the plug-in via the --out-dir argument, move the directory (in our example /tmp/org.mycompany.myplugin) to your existing project. Do not forget to add the plug-in in your project's build system (usually in the file <your-project>/Plugins/Plugins.cmake). \section NewPluginWithProject Creating a new MITK project \subsection NewPluginProjectPrerequisites Prerequisites MITK-based projects created with the Plugin Generator need the same prerequisites as MITK itself. See the \ref BuildInstructionsPage for MITK for details. Here is an example call to the Plugin Generator, creating the same plug-in as above but integrated in a new project: \verbatim ./MITKPluginGenerator --plugin-symbolic-name org.mycompany.myplugin --view-name "My View" --project-name "MyProject" --project-app-name "MyApp" \endverbatim The generated project is completely self-contained and can be configured via CMake immediately. When building the generated project, it will first download all required dependencies (like MITK itself). For an explanation of the project's build directory layout and how to configure MITK from your project's superbuild CMake configuration, -see SetupAMITKBasedProject. +see \ref HowToNewProject. \subsection NewPluginLimitations Limitations The Plugin Generator supports only a very limited set of possible configuration options. For more customizations of your project or plug-in, you must familiarize yourself with CMake and the generated build system. Further, the generator is not able to modify existing projects, it can only create new ones. \section NewPluginBuildSystem Build system for plug-ins Just put new files in your plug-in's \c src or \c src/internal directory and edit the \c files.cmake file there. If you have any fancy stuff like external libraries and include directories you should have a look at the CMake manual and general MITK build system documentation. \section NewPluginTroubleshooting Troubleshooting \par I get "Could not find library" messages and similar stuff when I try to start my project's executable. This is mostly due to wrong environment settings. On Windows, make sure that you use the supplied batch files to start Visual Studio or your project's executable. If you still get errors, double check the value of the PATH variable in your batch files (it must contain MITK's binary directory and paths to the ITK, VTK and Qt libraries. \par On Linux, set your LD_LIBRARY_PATH variable accordingly. */ diff --git a/Documentation/Doxygen/MainPage.dox.in b/Documentation/Doxygen/MainPage.dox.in index e2a96c1b86..363fee2509 100644 --- a/Documentation/Doxygen/MainPage.dox.in +++ b/Documentation/Doxygen/MainPage.dox.in @@ -1,53 +1,55 @@ /** \mainpage Medical Imaging Interaction Toolkit \image html mitkLogo.jpg \section intro Introduction -Welcome to the Medical Imaging Interaction Toolkit (MITK). -Currently under active development, MITK aims at supporting the -development of leading-edge medical imaging software -with a high degree of interaction. It combines VTK, -ITK and the pic-based-libraries of the -Div. Medical and Biological Informatics -of the DKFZ and adds those features that are most important +Welcome to the Medical Imaging Interaction Toolkit (MITK). +Currently under active development, MITK aims at supporting the +development of leading-edge medical imaging software +with a high degree of interaction. It combines VTK, +ITK and the pic-based-libraries of the +Div. Medical and Biological Informatics +of the DKFZ and adds those features that are most important for developing interactive medical imaging software covered neither by VTK nor ITK, i.e: \li multiple, consistent views on the same data. For example, when you have three orthogonal -2D-views and a 3D view and data consisting of a green surface, the surface will be visible and green -in all views (as contour lines in 2D, as a surface in 3D), and when you move the surface, it will -move in all views. When you try to implement this with basic VTK, you will need to coordinate the -position/orientation/color/... of all the views somewhere in your program - exactly this can MITK +2D-views and a 3D view and data consisting of a green surface, the surface will be visible and green +in all views (as contour lines in 2D, as a surface in 3D), and when you move the surface, it will +move in all views. When you try to implement this with basic VTK, you will need to coordinate the +position/orientation/color/... of all the views somewhere in your program - exactly this can MITK do for you. -\li interactions that create and/or modify data (not only actors as in basic VTK) +\li interactions that create and/or modify data (not only actors as in basic VTK) \li complex interactions with multiple states, e.g., for interaction with active contours \li undo/redo of interactions \li organization of data objects in a tree at run-time, e.g., to represent logical dependencies (e.g., a heart cavity is a part of the heart) or to control the rendering process \li additional properties of arbitrary type can be assigned to data objects contained in the data tree -\li visualization and interaction with 3D+t data (basic VTK can handle only 3D data and ITK is not +\li visualization and interaction with 3D+t data (basic VTK can handle only 3D data and ITK is not for visualization and interaction) -\li although MITK is mainly a toolkit and not an application, it offers some support on the -application-level, e.g, for structured combination of modules (so-called functionalities), e.g., for +\li although MITK is mainly a toolkit and not an application, it offers some support on the +application-level, e.g, for structured combination of modules (so-called functionalities), e.g., for combining and switching between one functionality for segmentation and another for registration. -MITK re-uses virtually anything from VTK and ITK. Thus, it is not at all a competitor to VTK or ITK, but +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 the features outlined above. \section FurtherReading Further Reading -\ref Concepts +\ref Concepts \ref Development +\ref HowToNewProject "A comprehensive newcomers guide to setting up your own MITK project" + @MITK_XP_LINK@ @BLUEBERRY_DOXYGEN_LINK@ \ref thirdpartylibs */ diff --git a/Documentation/Doxygen/Tutorial/Tutorial.dox b/Documentation/Doxygen/Tutorial/Tutorial.dox index 77087f8b91..76564c5e43 100644 --- a/Documentation/Doxygen/Tutorial/Tutorial.dox +++ b/Documentation/Doxygen/Tutorial/Tutorial.dox @@ -1,34 +1,45 @@ /** \page TutorialPage The MITK Tutorial - -This tutorial gives an introduction to MITK. -We will start with the first steps of just compiling what you get after downloading MITK, continue to show how to -display and do basic interaction with images, and finally show how to build an application module (functionality). + +If you have set up and compiled MITK already and want to know more about developing with MITK you might want to read the \ref TutorialSection. If you want help setting up MITK and creating your own project using MITK you should take a look at \ref HowToNewProject. + +\section TutorialFirstSteps First steps in MITK + +If you are absolutely new to MITK you might want to read up on setting up MITK to use in your development. The following pages will help you in this task. + + + +\section TutorialSection Tutorial chapters + +This tutorial will give you an introduction to developing with MITK. +We will start with configuring MITK to compile the tutorial, continue to show how to +display and do basic interaction with images, and finally show how to build a plug-in and add new interactions. The source code of the examples can be found in mitk/QApplications/Tutorial/ \n Two data files are used to execute the example code. \li Pic3D.nrrd \n This file contains an image and is located in bin/CMakeExternals/Source/MITK-Data/Pic3D.nrrd. \li lungs.vtk \n This file contains a surface and is located in src/MITK/Modules/MitkExt/Testing/Data/lungs.vtk. -\section TutorialSection Tutorial chapters - \li \subpage Step00Page "Step 0: Getting started" \li \subpage Step01Page "Step 1: Displaying an image" \li \subpage Step02Page "Step 2: Load one or more data sets" \li \subpage Step03Page "Step 3: Create 3D view" \li \subpage Step04Page "Step 4: Use several views to explore data" \li \subpage Step05Page "Step 5: Interactively add points" \li \subpage Step06Page "Step 6: Use an interactive region-grower" \li \subpage Step07Page "Step 7: Convert result of region growing into a surface" \li \subpage Step08Page "Step 8: Use QmitkStdMultiWidget as widget" -\li \subpage Step09Page "Step 9: A functionality" +\li \subpage Step09Page "Step 9: A plug-in" \li \subpage Step10Page "Step 10: A new Interaction" Enjoy MITK! */