mitk tutorial theory session
TRANSCRIPT
4/24/2016
MITK Tutorial
Theory Session
Caspar Goch & Stefan Kislinskiy
Page 24/24/2016 | Overview
• MITK (super-)superbuild
• Third-party vs. MITK
• Source/build tree layout
• MITK architecture
• High-level
• Modules, plugins, command line apps
• Low-level
• mitk::BaseData environment
Page 34/24/2016 | MITK (super-)superbuild
• Two build levels
• MITK superbuild
• MITK build
• Same source directory, nested build directories
Page 44/24/2016 | MITK (super-)superbuild
• MITK superbuild level
• Download, configure, generate, and build
third-party toolkits
• Configure, generate, and build MITK
• Switch on third-party toolkits via
MITK_USE_<toolkit> CMake variables
Page 54/24/2016 | MITK (super-)superbuild
• MITK build level
• Successfully run superbuild first
• Already built by superbuild
• Re-configure, generate, and build as needed
• Switch on MITK plugins
Page 64/24/2016 | MITK (super-)superbuild
• Source tree layout
/Applications e.g. MITK Workbench
CMake CMake macros and functions
CMakeExternals Third-party toolkit scripts
DocumentationExamplesModules Modules & command line apps
Plugins Application plugins
Utilities
Page 74/24/2016 | MITK (super-)superbuild
• Superbuild tree layout
/ Superbuild MSVC solution / make directory
MITK-build MITK build MSVC solution / make directory
binlib
MITK-Data useful test data (BUILD_TESTING = ON)
ep External projects (third-party)
binlib install destinations
includesrc source/build directories
Page 84/24/2016 | MITK (super-)superbuild
MITK-ProjectTemplate
superbuild
MITK-ProjectTemplate
buildExternal projects
MITK
superbuild
MITK
buildExternal projectsYour third-party stuffYour own stuff
Page 94/24/2016 | MITK architecture: Low-level
Page 104/24/2016 | MITK architecture: Low-level
DataUser interface & interaction
Page 114/24/2016 | MITK architecture: Low-level
We derive from ITK
User interface & interaction
Page 124/24/2016 | MITK architecture: Low-level
We use VTK
Data
Page 134/24/2016 | MITK architecture: Low-level
Images
Surfaces
Point sets
DataUser interface & interaction
Page 144/24/2016 | MITK derives from ITK, uses/wraps VTK
class BaseData : public itk::DataObject{};
class Surface : BaseData{
std::vector<vtkPolyData*> m_PolyDatas;};
ITK
VTK
Page 154/24/2016 | MITK architecture: Low-level
DataUser interface & interaction
Page 164/24/2016 | mitk::PropertyList
• Meta-data dictionary
• Properties are key-value pairs
• Key is a string
• Value type depends on property type
• mitk::BoolProperty
• mitk::StringProperty
• mitk::EnumProperty
• mitk::LevelWindowProperty
• …
Page 174/24/2016 | MITK architecture: Low-level
DataUser interface & interaction
Page 184/24/2016 | mitk::TimeGeometry
• Encapsulates spatial and temporal information of data
t=0 t=1 t=n…
Temporal sequence of
3-d image volumes
Page 194/24/2016 | mitk::TimeGeometry
• Encapsulates spatial and temporal information of data
t=0 t=1 t=n…
Temporal sequence of
3-d image volumes
Spatial extent of
3-d image volume
Page 204/24/2016 | mitk::TimeGeometry
• Encapsulates spatial and temporal information of data
t=0 t=1 t=n…
Slice spacing
Temporal sequence of
3-d image volumes
Spatial extent of
3-d image volume
Page 214/24/2016 | mitk::TimeGeometry
• Encapsulates spatial and temporal information of data
t=0 t=1 t=n…
Temporal sequence of
3-d image volumes
Spatial extent of
3-d image volume
Pixel spacing
Slice spacing
Page 224/24/2016 | mitk::TimeGeometry
• Encapsulates spacial and temporal information of data
mitk::SlicedGeometry3D
mitk::TimeGeometry
mitk::Geometry3D
mitk::PlaneGeometry
contains n
derive from
mitk::BaseGeometry
contains n
Page 234/24/2016 | Center-based vs. corner-based coordinates
http://docs.mitk.org/2015.05/GeometryOverviewPage.html
Page 244/24/2016 | MITK architecture: Low-level
DataUser interface & interaction
I/O?
Page 254/24/2016 | Input/Output
#include <mitkIOUtil.h>
try
{auto data = mitk::IOUtil::Load(“path/to/file.ext”);// ormitk::IOUtil::Save(data, “path/to/file.ext”);
}
catch (...)
{
}
Page 264/24/2016 | MITK architecture: Low-level
DataUser interface & interaction
Page 274/24/2016 | MITK architecture: Low-level
DataUser interface & interaction
1..n
Page 284/24/2016 | mitk::PropertyList revisited
• mitk::DataNode has a property list, too
• Contains properties related to rendering / user interface
• Also has specific property lists for each render window
• Override common properties
Page 294/24/2016 | MITK architecture: Low-level
DataUser interface & interaction
Page 304/24/2016 | mitk::DataNode mitk::DataStorage
• Share data between modules/plugins
• Any number of data items
• Any kind of data item
• Related to each other through
geometry
Abdominal CT (Image)
Liver (Surface)
Tumor (Surface)
Vessels (Graph)
MRI (Image)
Helper Objects
Landmarks (Points)
1n
Page 314/24/2016 | MITK architecture: Low-level
DataUser interface & interaction
Page 324/24/2016 | mitk::Mapper
Page 334/24/2016 | mitk::Mapper
2-d image mapper
2-d image mapper
2-d image mapper3-d image mapper
Page 344/24/2016 | mitk::Mapper
2-d image mapper
2-d image mapper
2-d image mapper3-d image mapper
2-d image mapper
2-d image mapper
2-d image mapper3-d image mapper
Page 354/24/2016 | mitk::Mapper
2-d image mapper
2-d image mapper
2-d image mapper3-d image mapper
2-d image mapper
2-d image mapper
2-d image mapper3-d image mapper
2-d surface mapper
2-d surface mapper
2-d surface mapper
3-d surface mapper
Page 364/24/2016 | Good news
• Mappers are automatically attached to data nodes based on
the type of their data
Page 374/24/2016 | Actually great news
sliced original image
sliced segmentation image
segmentation surface cross section
coronal slice position
sagittal slice position
sliced original image
sliced segmentation image
segmentation surface cross section
axial slice position
coronal slice position
sliced original image
sliced segmentation image
segmentation surface cross section
axial slice position
sagittal slice position
sliced original image
sliced segmentation image
segmentation surface
Page 384/24/2016 | Actually great news
sliced original image
sliced segmentation image
segmentation surface cross section
coronal slice position
sagittal slice position
sliced original image
sliced segmentation image
segmentation surface cross section
axial slice position
coronal slice position
sliced original image
sliced segmentation image
segmentation surface cross section
axial slice position
sagittal slice position
sliced original image
sliced segmentation image
segmentation surface
• 18 entities in 4 scene graphs
• Each entity has its own mitk::Mapper
• Everything is generated automatically
• From 3 mitk::DataNodes in mitk::DataStorage
• Original Image
• Segmentation Image
• Segmentation Surface
Page 394/24/2016 | MITK architecture: Low-level
DataUser interface & interaction
Page 404/24/2016 | mitk::DataInteractor
Keyboard / mouse events mitk::Dispatcher
mitk::DataInteractor
State machine
(XML)
Page 414/24/2016 | mitk::DataInteractor – Undo/Redo Support
Keyboard / mouse events mitk::Dispatcher
mitk::DataInteractor
State machine
(XML)
mitk::UndoController
mitk::Operation
mitk::Operation
inverse
Page 424/24/2016 | MITK architecture: Low-level - Summary
Further
information
on www.dkfz.de
Thank you for
your attention!