diff --git a/Documentation/Doxygen/2-UserManual/Applications.dox b/Documentation/Doxygen/2-UserManual/Applications.dox
index 6ffd3c0af2..30399faa7f 100644
--- a/Documentation/Doxygen/2-UserManual/Applications.dox
+++ b/Documentation/Doxygen/2-UserManual/Applications.dox
@@ -1,33 +1,30 @@
/**
\page ApplicationsPage Using MITK and Applications
\tableofcontents
\section ApplicationsPageApplications What are Applications?
Applications are special versions of MITK which contain functionality aimed at solving a special task.
Usually they are aimed at a selective audience or solving a particular problem.
As such they focus on certain capabilities of MITK, while ignoring others.
The main reason for this is to supply the users of the application with the power of MITK for solving their tasks, without daunting them with an overwhelming number of menus and options.
At the same time, this allows the creation of an elegant and easily comprehensible workflow for your task.
-The Diffusion Imaging Application for example contains all the functionality necessary for the field of neuro-imaging, but does not contain support for ultrasound imaging.
A typical example of this would be an application which contains only views related to the analysis of the human brain (particular question) or one which contains only what is necessary for displaying medical data in the classroom (specific audience).
\section ApplicationsPageWhatAmIUsing Which Application am I using?
If you are unsure which application you are currently using, start the application and have a look in the Title Bar.
You should see it's name there.
\imageMacro{ApplicationTitle.jpg,"The application name is displayed in the title bar",16}
\section ApplicationsPageApplicationsList List of Applications
If you are interested in using a specific application, currently developed by the MITK team you might want to take a look first at the \ref MITKUserManualPage . Further information on any application can be found here:
\subpage org_mitkworkbench
-
\subpage org_dti_atlas_application
-
\subpage org_mitk_gui_qt_diffusionimagingapp
-*/
\ No newline at end of file
+*/
diff --git a/Documentation/Doxygen/3-DeveloperManual/Starting/Architecture.dox b/Documentation/Doxygen/3-DeveloperManual/Starting/Architecture.dox
index 912a2a1cef..4387b2c242 100644
--- a/Documentation/Doxygen/3-DeveloperManual/Starting/Architecture.dox
+++ b/Documentation/Doxygen/3-DeveloperManual/Starting/Architecture.dox
@@ -1,47 +1,47 @@
/**
\page Architecture The Architecture of MITK
MITK is an open source software toolkit for medical image processing, subsequent data analysis and integration of medical hardware.
It is designed with the aim of providing a modular and reusable code base to enable rapid development of new features. Following
this design philosophy, MITK includes many specialized modules.
This document is aimed at giving an overview of the general structure of MITK. It will give you an introduction to the coding
and design concepts behind the toolkit.
\section OverviewPage_DesignOverview Design Overview
MITK is designed to be used either as a pure software library or as a complete application framework. Thus, a user
of MITK can decide if he or she simply wants to add a new plug-in to the existing application framework or to implement an
own application by using MITK as a software library. Depending on the type of use MITK uses different software libraries, which is
shown in the next figure for overview.
\imageMacro{MitkOverview.png,"Overview of MITK",16}
As shown above, MITK uses the following libraries.
The Insight Toolkit (ITK), which provides registration and
segmentation algorithms, but is not designed for visualization or interaction.
The Visualization Toolkit (VTK), which provides powerful visualization capabilities
and low-level support for interaction such as picking methods, rotation, movement and scaling of objects.
The Common Toolkit (CTK), which focuses on DICOM support and a plug-in framework.
These are the main libraries MITK is based on. For more functionality you can optionally include other libraries as well. A list of used libraries can be found \ref thirdpartylibs "here" .
Based on these libraries, MITK includes the following features:
High level interactions with data.
Specialized medical imaging algorithms (e.g. segmentation)
Support of 3D + t data.
Complete application framework, expandable by plug-ins
Standard tools for medical imaging as default plug-ins (e.g. measurement, segmentation)
-
Many specialized modules for different topics on medical imaging (e.g. diffusion imaging, image guided therapy, live image/ultrasound data processing)
+
Many specialized modules for different topics on medical imaging (e.g. image guided therapy, live image/ultrasound data processing)
*/
diff --git a/Modules/Classification/CLMiniApps/CMakeLists.txt b/Modules/Classification/CLMiniApps/CMakeLists.txt
index 0bb6f5e560..162e071d36 100644
--- a/Modules/Classification/CLMiniApps/CMakeLists.txt
+++ b/Modules/Classification/CLMiniApps/CMakeLists.txt
@@ -1,122 +1,120 @@
option(BUILD_ClassificationMiniApps "Build commandline tools for classification" OFF)
if(BUILD_ClassificationMiniApps OR MITK_BUILD_ALL_APPS)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
# list of miniapps
# if an app requires additional dependencies
# they are added after a "^^" and separated by "_"
set( classificationminiapps
RandomForestTraining^^MitkCLVigraRandomForest
NativeHeadCTSegmentation^^MitkCLVigraRandomForest
ManualSegmentationEvaluation^^MitkCLVigraRandomForest
CLScreenshot^^MitkCore_MitkQtWidgetsExt_MitkCLUtilities
CLDicom2Nrrd^^MitkCore
CLResampleImageToReference^^MitkCore
CLGlobalImageFeatures^^MitkCLUtilities_MitkQtWidgetsExt
CLMRNormalization^^MitkCLUtilities_MitkCLMRUtilities
CLStaple^^MitkCLUtilities
CLVoxelFeatures^^MitkCLUtilities
CLPolyToNrrd^^
CLPlanarFigureToNrrd^^MitkCore_MitkSegmentation_MitkMultilabel
CLSimpleVoxelClassification^^MitkDataCollection_MitkCLVigraRandomForest
CLVoxelClassification^^MitkDataCollection_MitkCLImportanceWeighting_MitkCLVigraRandomForest
CLBrainMask^^MitkCLUtilities
XRaxSimulationFromCT^^MitkCLUtilities
CLRandomSampling^^MitkCore_MitkCLUtilities
CLRemoveEmptyVoxels^^MitkCore
CLN4^^MitkCore
CLSkullMask^^MitkCore
CLPointSetToSegmentation^^
CLMultiForestPrediction^^MitkDataCollection_MitkCLVigraRandomForest
CLNrrdToPoly^^MitkCore
CL2Dto3DImage^^MitkCore
CLWeighting^^MitkCore_MitkCLImportanceWeighting_MitkCLUtilities
CLOverlayRoiCenterOfMass^^MitkCore_MitkCLUtilities_MitkQtWidgetsExt
CLLungSegmentation^^MitkCore_MitkSegmentation_MitkMultilabel
# RandomForestPrediction^^MitkCLVigraRandomForest
)
foreach(classificationminiapps ${classificationminiapps})
# extract mini app name and dependencies
string(REPLACE "^^" "\\;" miniapp_info ${classificationminiapps})
set(miniapp_info_list ${miniapp_info})
list(GET miniapp_info_list 0 appname)
list(GET miniapp_info_list 1 raw_dependencies)
string(REPLACE "_" "\\;" dependencies "${raw_dependencies}")
set(dependencies_list ${dependencies})
mitk_create_executable(${appname}
DEPENDS MitkCore MitkCLCore MitkCommandLine ${dependencies_list}
PACKAGE_DEPENDS ITK Qt5|Core Vigra
CPP_FILES ${appname}.cpp
)
# CPP_FILES ${appname}.cpp mitkCommandLineParser.cpp
if(EXECUTABLE_IS_ENABLED)
# On Linux, create a shell script to start a relocatable application
if(UNIX AND NOT APPLE)
install(PROGRAMS "${MITK_SOURCE_DIR}/CMake/RunInstalledApp.sh" DESTINATION "." RENAME ${EXECUTABLE_TARGET}.sh)
endif()
get_target_property(_is_bundle ${EXECUTABLE_TARGET} MACOSX_BUNDLE)
if(APPLE)
if(_is_bundle)
set(_target_locations ${EXECUTABLE_TARGET}.app)
set(${_target_locations}_qt_plugins_install_dir ${EXECUTABLE_TARGET}.app/Contents/MacOS)
set(_bundle_dest_dir ${EXECUTABLE_TARGET}.app/Contents/MacOS)
set(_qt_plugins_for_current_bundle ${EXECUTABLE_TARGET}.app/Contents/MacOS)
set(_qt_conf_install_dirs ${EXECUTABLE_TARGET}.app/Contents/Resources)
install(TARGETS ${EXECUTABLE_TARGET} BUNDLE DESTINATION . )
else()
if(NOT MACOSX_BUNDLE_NAMES)
set(_qt_conf_install_dirs bin)
set(_target_locations bin/${EXECUTABLE_TARGET})
set(${_target_locations}_qt_plugins_install_dir bin)
install(TARGETS ${EXECUTABLE_TARGET} RUNTIME DESTINATION bin)
else()
foreach(bundle_name ${MACOSX_BUNDLE_NAMES})
list(APPEND _qt_conf_install_dirs ${bundle_name}.app/Contents/Resources)
set(_current_target_location ${bundle_name}.app/Contents/MacOS/${EXECUTABLE_TARGET})
list(APPEND _target_locations ${_current_target_location})
set(${_current_target_location}_qt_plugins_install_dir ${bundle_name}.app/Contents/MacOS)
message( " set(${_current_target_location}_qt_plugins_install_dir ${bundle_name}.app/Contents/MacOS) ")
install(TARGETS ${EXECUTABLE_TARGET} RUNTIME DESTINATION ${bundle_name}.app/Contents/MacOS/)
endforeach()
endif()
endif()
else()
set(_target_locations bin/${EXECUTABLE_TARGET}${CMAKE_EXECUTABLE_SUFFIX})
set(${_target_locations}_qt_plugins_install_dir bin)
set(_qt_conf_install_dirs bin)
install(TARGETS ${EXECUTABLE_TARGET} RUNTIME DESTINATION bin)
endif()
endif()
endforeach()
- # This mini app does not depend on mitkDiffusionImaging at all
-
mitk_create_executable(CLMatchPointReg
DEPENDS MitkCore MitkCLUtilities MitkMatchPointRegistration MitkCommandLine MitkMatchPointRegistrationUI
PACKAGE_DEPENDS ITK Qt5|Core Vigra MatchPoint
- CPP_FILES CLMatchPointReg.cpp
+ CPP_FILES CLMatchPointReg.cpp
)
# On Linux, create a shell script to start a relocatable application
if(UNIX AND NOT APPLE)
install(PROGRAMS "${MITK_SOURCE_DIR}/CMake/RunInstalledApp.sh" DESTINATION "." RENAME ${EXECUTABLE_TARGET}.sh)
endif()
if(EXECUTABLE_IS_ENABLED)
MITK_INSTALL_TARGETS(EXECUTABLES ${EXECUTABLE_TARGET})
endif()
endif()
diff --git a/Modules/Classification/DataCollection/ReaderWriter/mitkCollectionWriter.h b/Modules/Classification/DataCollection/ReaderWriter/mitkCollectionWriter.h
index 5fdf9917b2..95a6eae1d3 100755
--- a/Modules/Classification/DataCollection/ReaderWriter/mitkCollectionWriter.h
+++ b/Modules/Classification/DataCollection/ReaderWriter/mitkCollectionWriter.h
@@ -1,77 +1,69 @@
/*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
============================================================================*/
#ifndef MITK_COLLECTION_WRITER_H
#define MITK_COLLECTION_WRITER_H
//#include "mitkCommon.h"
#include "mitkDataCollection.h"
#include "mitkCollectionReader.h"
#include
namespace mitk {
class MITKDATACOLLECTION_EXPORT CollectionWriter
{
public:
-
- typedef float TensorScalar;
/**
* @brief ExportCollectionToFolder
*
* Creates an XML file and stores all data in the same folder as the xml file (creating sub-folders for sub-collections)
*
- *
- * Naming Conventions (Neccessary for proper saving of these images):
- * DWI - Diffusion Weighted Images
- * DTI - Diffusion Tensor Images
- * FIB - Fiber Bundles
- *
* @param dataCollection
* @param xmlFile
* @param filter - (optional) only items with names contained in this list are written, if list is empty all items are written
* @return
*/
static bool ExportCollectionToFolder(DataCollection* dataCollection, std::string xmlFile , std::vector filter);
static bool ExportCollectionToFolder(DataCollection* dataCollection, std::string xmlFile);
/**
* @brief SaveCollection - Stores data collection at original location
*
* Writes the collection back to the files given in the original XML file.
* New data items are stored into the default location, which is relative to the XML file.
*
* If a XML file is provided the files are stored as stated above with the differences that a new XML file is generated and new files are saved
* relative to the newly generated xml.
*
* @param dataCollection
* @param filter
* @param xmlFile
* @return
*/
static bool SaveCollection(DataCollection* dataCollection, std::vector filter, std::string xmlFile = "");
static bool FolderToXml(std::string folder, std::string collectionType, std::string xmlFile, std::vector filter, std::vector seriesNames);
// GTV last entry in filter list, this item will be made to TARGET
static bool SingleFolderToXml(std::string folder, std::string xmlFile, std::vector filter, std::vector seriesNames, bool longDate = true, int skipUntil = 0, float months = 0);
protected:
private:
static size_t GetIndexForinXMonths(CollectionReader::FileListType fileList, float months, size_t curIndex, std::vector filter);
};
} // namespace mitk
#endif /* MITK_COLLECTION_WRITER_H */
diff --git a/Modules/Core/include/vtkMitkLevelWindowFilter.h b/Modules/Core/include/vtkMitkLevelWindowFilter.h
index c1604f429a..6b4d7caad7 100644
--- a/Modules/Core/include/vtkMitkLevelWindowFilter.h
+++ b/Modules/Core/include/vtkMitkLevelWindowFilter.h
@@ -1,98 +1,97 @@
/*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
============================================================================*/
#ifndef __vtkMitkLevelWindowFilter_h
#define __vtkMitkLevelWindowFilter_h
class vtkScalarsToColors;
class vtkPiecewiseFunction;
#include
#include
#include
/** Documentation
* \brief Applies the grayvalue or color/opacity level window to scalar or RGB(A) images.
*
-* This filter is used to apply the color level window to RGB images (e.g.
-* diffusion tensor images). Therefore, the RGB channels are converted to
-* the HSI color space, where the level window can be applied. Afterwards,
-* the HSI values transformed back to the RGB space.
+* This filter is used to apply the color level window to RGB images.
+* Therefore, the RGB channels are converted to the HSI color space, where the level
+* window can be applied. Afterwards, the HSI values transformed back to the RGB space.
*
* The filter is also able to apply an opacity level window to RGBA images.
*
* \ingroup Renderer
*/
class MITKCORE_EXPORT vtkMitkLevelWindowFilter : public vtkThreadedImageAlgorithm
{
public:
vtkTypeMacro(vtkMitkLevelWindowFilter, vtkThreadedImageAlgorithm);
static vtkMitkLevelWindowFilter *New();
vtkMTimeType GetMTime() override;
/** \brief Get the lookup table for the RGB level window */
vtkScalarsToColors *GetLookupTable();
/** \brief Set the lookup table for the RGB level window */
void SetLookupTable(vtkScalarsToColors *lookupTable);
/** \brief Get the piecewise function used to map scalar to alpha component value (only
* used when the lookupTable is a vtkColorTransferFunction) */
vtkPiecewiseFunction *GetOpacityPiecewiseFunction() { return m_OpacityFunction; }
/** \brief Set the piecewise function used to map scalar to alpha component value (only
* used when the lookupTable is a vtkColorTransferFunction) */
void SetOpacityPiecewiseFunction(vtkPiecewiseFunction *opacityFunction);
/** \brief Get/Set the lower window opacity for the alpha level window */
void SetMinOpacity(double minOpacity);
inline double GetMinOpacity() const;
/** \brief Get/Set the upper window opacity for the alpha level window */
void SetMaxOpacity(double maxOpacity);
inline double GetMaxOpacity() const;
/** \brief Set clipping bounds for the opaque part of the resliced 2d image */
void SetClippingBounds(double *);
protected:
/** Default constructor. */
vtkMitkLevelWindowFilter();
/** Default deconstructor. */
~vtkMitkLevelWindowFilter() override;
/** \brief Method for threaded execution of the filter.
* \param *inData: The input.
* \param *outData: The output of the filter.
* \param extent: Specifies the region of the image to be updated inside this thread.
* It is a six-component array of the form (xmin, xmax, ymin, ymax, zmin, zmax).
* \param id: The thread id.
*/
void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int extent[6], int id) override;
// /** Standard VTK filter method to apply the filter. See VTK documentation.*/
int RequestInformation(vtkInformation *request,
vtkInformationVector **inputVector,
vtkInformationVector *outputVector) override;
// /** Standard VTK filter method to apply the filter. See VTK documentation. Not used at the moment.*/
// void ExecuteInformation(vtkImageData *vtkNotUsed(inData), vtkImageData *vtkNotUsed(outData));
private:
/** m_LookupTable contains the lookup table for the RGB level window.*/
vtkScalarsToColors *m_LookupTable;
/** The transfer function to map the scalar to alpha (4th component of the RGBA output value) */
vtkPiecewiseFunction *m_OpacityFunction;
/** m_MinOpacity contains the lower bound for the alpha level window.*/
double m_MinOpacity;
/** m_MaxOpacity contains the upper bound for the alpha level window.*/
double m_MaxOpacity;
double m_ClippingBounds[4];
};
#endif
diff --git a/Modules/DICOMReader/doc/Doxygen/Modules.dox b/Modules/DICOMReader/doc/Doxygen/Modules.dox
index a23b919558..2867b4a88e 100644
--- a/Modules/DICOMReader/doc/Doxygen/Modules.dox
+++ b/Modules/DICOMReader/doc/Doxygen/Modules.dox
@@ -1,39 +1,38 @@
/**
\defgroup DICOMReaderModule The DICOMReader Module
\ingroup MITKModules
\brief DICOM This module contains a number of classes for DICOM image loading within MITK.
\section DICOMReaderModule_overview Scope
When people around MITK talk about loading DICOM images or series, they are really not interested in the
images (2D slices) but in a 3D mitk::Image instance that groups DICOM images in a meaningful way.
The task of this module is to provide
- an interface for the general "DICOM files to mitk::Images" transformation: mitk::DICOMFileReader
- a flexible default reader for the most common DICOM images: mitk::DICOMITKSeriesGDCMReader
Most documentation is kept with these classes, so please have a look at their documentations.
\remark Prior to this module, a class called DicomSeriesReader grew too much to be maintainable anymore. Its functionality is conserved by class mitk::ClassicDICOMSeriesReader.
\section DICOMReaderModule_interface Module Interface
The general loading proceduce is structured by mitk::DICOMFileReader, under the assumption that the best reader for a set of files is not known prior to inspection.
To facilitate applications that need to select between possible readers based on what would be loaded,
file readers are required to implement loading in two separate steps:
1. analysis of a list of files and description of potential mitk::Image%s by means of mitk::DICOMImageBlockDescriptor
2. actual loading of pixel data into mitk::Image%s
A very simple implementation is mitk::DICOMFileReaderSelector which selects the reader with the least possible number of mitk::Images (least confusing for the user?).
\section DICOMReaderModule_tasks Tasks for future development
Unstructured development tasks and ideas for future extensions
- - a reader for vector-valued diffusion images is currently being implemented
- a multi-frame image reader based on DCMTK
- perspective: slice-by-slice loading
*/
diff --git a/Modules/SceneSerialization/src/mitkSceneReaderV1.cpp b/Modules/SceneSerialization/src/mitkSceneReaderV1.cpp
index 2775433865..adc64156f3 100644
--- a/Modules/SceneSerialization/src/mitkSceneReaderV1.cpp
+++ b/Modules/SceneSerialization/src/mitkSceneReaderV1.cpp
@@ -1,425 +1,421 @@
/*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
============================================================================*/
#include "mitkSceneReaderV1.h"
#include "Poco/Path.h"
#include "mitkBaseRenderer.h"
#include "mitkIOUtil.h"
#include "mitkProgressBar.h"
#include "mitkPropertyListDeserializer.h"
#include "mitkSerializerMacros.h"
#include
MITK_REGISTER_SERIALIZER(SceneReaderV1)
namespace
{
typedef std::pair> NodesAndParentsPair;
bool NodeSortByLayerIsLessThan(const NodesAndParentsPair &left, const NodesAndParentsPair &right)
{
if (left.first.IsNotNull() && right.first.IsNotNull())
{
int leftLayer;
int rightLayer;
if (left.first->GetIntProperty("layer", leftLayer) && right.first->GetIntProperty("layer", rightLayer))
{
return leftLayer < rightLayer;
}
else
{
// fall back to name sort
return left.first->GetName() < right.first->GetName();
}
}
// in all other cases, fall back to stupid pointer comparison
// this is not reasonable but at least answers the sorting
// question clearly
return left.first.GetPointer() < right.first.GetPointer();
}
}
bool mitk::SceneReaderV1::LoadScene(TiXmlDocument &document, const std::string &workingDirectory, DataStorage *storage)
{
assert(storage);
bool error(false);
// TODO prepare to detect errors (such as cycles) from wrongly written or edited xml files
// Get number of elements to initialze progress bar
// 1. if there is a element,
// - construct a name for the appropriate serializer
// - try to instantiate this serializer via itk object factory
// - if serializer could be created, use it to read the file into a BaseData object
// - if successful, call the new node's SetData(..)
// create a node for the tag "data" and test if node was created
typedef std::vector DataNodeVector;
DataNodeVector DataNodes;
unsigned int listSize = 0;
for (TiXmlElement *element = document.FirstChildElement("node"); element != nullptr;
element = element->NextSiblingElement("node"))
{
++listSize;
}
ProgressBar::GetInstance()->AddStepsToDo(listSize * 2);
for (TiXmlElement *element = document.FirstChildElement("node"); element != nullptr;
element = element->NextSiblingElement("node"))
{
DataNodes.push_back(LoadBaseDataFromDataTag(element->FirstChildElement("data"), workingDirectory, error));
ProgressBar::GetInstance()->Progress();
}
// iterate all nodes
// first level nodes should be elements
auto nit = DataNodes.begin();
for (TiXmlElement *element = document.FirstChildElement("node"); element != nullptr || nit != DataNodes.end();
element = element->NextSiblingElement("node"), ++nit)
{
mitk::DataNode::Pointer node = *nit;
// in case dataXmlElement is valid test whether it containts the "properties" child tag
// and process further if and only if yes
TiXmlElement *dataXmlElement = element->FirstChildElement("data");
if (dataXmlElement && dataXmlElement->FirstChildElement("properties"))
{
TiXmlElement *baseDataElement = dataXmlElement->FirstChildElement("properties");
if (node->GetData())
{
DecorateBaseDataWithProperties(node->GetData(), baseDataElement, workingDirectory);
}
else
{
MITK_WARN << "BaseData properties stored in scene file, but BaseData could not be read" << std::endl;
}
}
// 2. check child nodes
const char *uida = element->Attribute("UID");
std::string uid("");
if (uida)
{
uid = uida;
m_NodeForID[uid] = node.GetPointer();
m_IDForNode[node.GetPointer()] = uid;
}
else
{
MITK_ERROR << "No UID found for current node. Node will have no parents.";
error = true;
}
// 3. if there are nodes,
// - instantiate the appropriate PropertyListDeSerializer
// - use them to construct PropertyList objects
// - add these properties to the node (if necessary, use renderwindow name)
bool success = DecorateNodeWithProperties(node, element, workingDirectory);
if (!success)
{
MITK_ERROR << "Could not load properties for node.";
error = true;
}
// remember node for later adding to DataStorage
m_OrderedNodePairs.push_back(std::make_pair(node, std::list()));
// 4. if there are