Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
MITK uses a very modular concept to maximize reusability and portability. A MITK application based on the BlueBerry application framework (for example the MITK Workbench) consists of several bundles (or plug-ins). A bundle can contain resources and program logic. It can also contribute so-called Views to the main application, which provide a specific user interface for controlling the bundles functions.
The creation of a MITK plug-in is considerably facilitated by using the MITK PluginGenerator as described in How to create a new MITK Plugin if you want to add a new view to an existing plugin see Adding a new view to a MITK Plugin.
The mentioned tool was used to create a plug-in called org.mitk.example.gui.regiongrowing. Let's first take a look at which files the PluginGenerator has created:
documentation\doxygen\ modules.dox......................... Doxygen file for documenting your plug-in resources\ icon.png............................ The icon of your plug-in. GIMP or other programs (including your text editor) can be used to change this src\internal\ QmitkRegionGrowingView.cpp.......... The most important file, implementing behaviour QmitkRegionGrowingView.h............ Header file of the functionality QmitkRegionGrowingViewControls.ui... XML file of the Qt Designer, describes buttons, combo boxes, etc. of your controls CMakeLists.txt \...................... Build system related files for CMake files.cmake / manifest_headers.cmake................ Information about your plug-in plugin.xml ........................... BlueBerry integration
If you are not familiar with Qt development, please look into this Qt company page describing .ui files (no, forget about the please, DO it!)
The C++ files implement a subclass of QmitkAbstractView. In this special case of QmitkRegionGrowing, we added the option to set some seed points and run a region grower. If you are interested in the concrete changes necessary to turn a freshly generated QmitkRegionGrowing into an integrated one:
The plug-in will be build as part of MITK Workbench. Do use it start MITK Workbench an select the region growing view in the view menu.
To add a mitk::PointSet for the seed points: QmitkRegionGrowingView.h
Add includes and forward declarations:
Add the point set and a pointer to a QmitkPointListWidget as a private member:
QmitkRegionGrowingView.cpp
CreateQtPartControl():
To use the ITK region grower:
QmitkRegionGrowingView.h
Add the private method:
QmitkRegionGrowingView.cpp
Add includes:
DoImageProcessing():
And add the new method:
Have fun using MITK!
If you meet any difficulties during your first steps, don't hesitate to ask on the MITK mailing list mitk-! People there are kind and will try to help you. user s@lis ts.s ource forg e.net