diff --git a/Modules/IGT/Documentation/doxygen/IGTModule.dox b/Modules/IGT/Documentation/doxygen/IGTModule.dox index 5ac2b4538b..ed7c201c9d 100644 --- a/Modules/IGT/Documentation/doxygen/IGTModule.dox +++ b/Modules/IGT/Documentation/doxygen/IGTModule.dox @@ -1,32 +1,80 @@ /** -\page IGTGeneralModulePage The IGT Modules +\page NavigationGeneralModulePage The Navigation Modules \section IGTGeneralModulePageOverview Overview +Navigation modules consist of IGT (Tracking devices), US (Ultrasound) and TOF (3D range imaging) modules. Each module is separated into UI dependent and independent modules (e.g. IGT and IGTUI module). The navigation modules are based on the OpenCVVideoSupport modules and OpenIGTLink modules. In addition, there is the basic module IGTBase, which holds general functionality for all navigation modules. + +Most navigation modules support hardware devices. A current list of all supported devices can be found here: Hardware Support. + +\section IGTModules IGT modules The module IGT integrates image guided therapy (IGT) functionality to MITK. The main features of MITK-IGT are: -MITK-IGT consists of two layers for hardware control (Tracking Layer) and processing of tracking data (Navigation Layer). Additionally it offers components for rapid development of graphical user interfaces (GUIs) of navigation applications. To separate UI functionality from the rest of the code UI classes are encapsulated in the separate module IGT-UI. +MITK-IGT consists of two layers for hardware control (Tracking Layer) and processing of tracking data (Navigation Layer). Additionally it offers components for rapid development of graphicalt user interfaces (GUIs) of navigation applications. To separate UI functionality from the rest of the code UI classes are encapsulated in the separate module IGT-UI. + +The IGT documentation contains the following pages: + + + -\section IGTTutorial IGT Tutorial -If you want to learn more about IGT you can have a look -on the IGT tutorial, which can be found here: +\section USModules US modules - \li \subpage IGTTutorialOverview +\li The ultrasound user manual: USModulePage -If you want to implement your own tracking device, have a look here: - \li \subpage IGTHowToImplementATrackingDevice -\section IGTGeneralModulePageModuleList List of IGT Plugins +\section TOFModules TOF modules -There are also a few ready-to-use sample applications available as MITK-Plugins: +User manual vom Plugin TODO - \li \ref org_mitk_gui_qt_igtexample - \li \ref org_mitk_gui_qt_igttracking +An explanation on how to create a TOF Module can be found here: +\li \subpage GeneratingDeviceModulesPage */ diff --git a/Modules/IGT/Documentation/doxygen/IGTTutorialOverview.dox b/Modules/IGT/Documentation/doxygen/IGTTutorialOverview.dox index 431bb50159..5675fa63d3 100644 --- a/Modules/IGT/Documentation/doxygen/IGTTutorialOverview.dox +++ b/Modules/IGT/Documentation/doxygen/IGTTutorialOverview.dox @@ -1,35 +1,54 @@ /** \page IGTTutorialOverview IGT Tutorial Overview -The IGT tutorial consists of four steps which will introduce the reader to the basic concepts and functions of IGT. +The IGT tutorial consists of several steps which will introduce the you to the basic concepts and functions of IGT. The overview of all pages can be found here: \ref NavigationGeneralModulePage. + +\section TrackingPlugins Tracking Plugins + + Step 1 - Introduction to the Tracking Plugins \n +During the introduction, you will get familiar with the usage of the tracking plugins. We will guide you step by step through the most important functions of our plugins. An overview of all plugins can also be found here: \ref org_mitk_gui_qt_igttracking. +\li \subpage IGTTutorialStepPluginIntroduction -\section Step1 Step 1 - IGT filter pipeline -The first step will introduce the concept of the navigation pipeline. Via a virtual tracking device, tracking data -is written to the console. Everything is organized in a classic c++ main method. -\li \subpage IGTTutorialStep1 -\section Step2 Step 2 - Visualization Filter and MITK Concepts +\section IGTCode The IGT code -Step 2 adds a broader view of basic MITK concepts. The objects are now added to an mitkDataStorage and rendered + Step 2 - IGT filter pipeline \n +We will now start with a look at simple code examples to construct a simple navigation pipeline. Via a virtual tracking device, tracking data +is written to the console. Everything is organized in a classic c++ main method. +\li \subpage IGTTutorialStepFilterPipeline + + Step 3 - Visualization Filter and MITK Concepts \n +This step adds a broader view of basic MITK concepts. The objects are now added to an mitkDataStorage and rendered in an mitkRenderWindow. For visualization the NavigationDataObjectVisualizationFilter is used. Everything is organized in a classic c++ main method. -\li \subpage IGTTutorialStep2 +\li \subpage IGTTutorialStepVisualization + -\section Step3 Step 3 - Qt Gui Tutorial + +\section IGTWorkbench IGT within the MITK workbench + + Step 4 - Write your own simple Tracking Plugin \n This step shows how to seamlessly integrate an IGT plugin (the QmitkIGTTutorialView) into the mitkWorkbench. The plugin uses the virtual tracking device to generate data and renders the result in the mitkWorkbench. It is also possible to connect an NDI tracking device and use real hardware to track. The code is written in the QmitkView manner. -\li \subpage IGTTutorialStep3 +\li \subpage IGTTutorialStepSimplePlugin + + Step 5 - Example for a tracking application: The IGT Tracking Lab Plugin \n +\li \subpage IGTTutorialStepTrackingLab + + Step 6 - Advanced usage of IGT Modules \n +In this step, we will have a deeper look into the plugins which we already saw within the first introduction step. Here, we point out some details in the code, which might be useful for you to reuse them within your own projects. +\li \subpage IGTTutorialStepAdvanced + + Step 7 - OpenIGTLink Tutorial \n +This step gives examples how to use OpenIGTLink in MITK. The first two simple examples include code to open a OpenIGTLink client and server for tracking data. The third, more advanced example shows you how to stream tracking and ultrasound data simultaneously from an external server. +\li \subpage IGTTutorialStepOpenIGTLink + -\section Step4 Step 4 - Tracking Lab -Step 4 shows a variety of navigation applications. To this point, for documentation a user manual is available. -\li \subpage IGTTutorialStep4 +\section FurtherFunctionality Further IGT functionality -\section Step5 Step 5 - OpenIGTLink Tutorial -Step 5 gives examples how to use OpenIGTLink in MITK. The first two simple examples include code to open a OpenIGTLink client and server for tracking data. The third, more advanced example shows you how to stream tracking and ultrasound data simultaneously from an external server. -\li \subpage org_openigtlinkexample -\li \subpage org_openigtlinkproviderexample -\li \subpage org_openigtlinkplugin +If you want to implement your own tracking device, this page might be helpful: +\li \subpage IGTHowToImplementATrackingDevice */ diff --git a/Modules/IGT/Documentation/doxygen/IGTTutorialStep0.dox b/Modules/IGT/Documentation/doxygen/IGTTutorialStep0.dox new file mode 100644 index 0000000000..a02a136ab9 --- /dev/null +++ b/Modules/IGT/Documentation/doxygen/IGTTutorialStep0.dox @@ -0,0 +1,17 @@ +/** +\page IGTTutorialStepPluginIntroduction Introduction to the IGT Plugins + +\ref org_mitk_gui_qt_igttracking - Overview of all tracking views which could be used for your application + +\li igttrackingtoolbox - Connect your tracking device and start tracking + +\li igtnavigationtoolmanager - Edit your tool storage + +\li navigationdataplayer - Play your navigation data, e.g. recorded with the tracking toolbox + +\li calibration tool manager. Will follow soon. + + +\ref Return to the \ref IGTTutorialOverview "[IGT Tutorial Overview]" + +*/ diff --git a/Modules/IGT/Documentation/doxygen/IGTTutorialStep1.dox b/Modules/IGT/Documentation/doxygen/IGTTutorialStep1.dox index c927a32024..3e418a2902 100644 --- a/Modules/IGT/Documentation/doxygen/IGTTutorialStep1.dox +++ b/Modules/IGT/Documentation/doxygen/IGTTutorialStep1.dox @@ -1,46 +1,46 @@ /** -\page IGTTutorialStep1 IGT filter pipeline +\page IGTTutorialStepFilterPipeline IGT filter pipeline The IGT tutorial consists of four main parts for construction of a small navigation pipeline using a virtual tracking device. The virtual tracking device produces random tool data (position and orientation) so no additional hardware is required. \section sec1 In Tracking Layer Firstly a new object "tracker" of the type mitk::VirtualTrackingDevice is created, then two tools, named "tool1" and "tool2", are added to this "tracker". Since, the tracking device "tracker" is treated as a virtual tracking device "tool1" and "tool2" are just added to the object by method AddTool(name). \section sec2 In Navigation Layer \imageMacro{IGTTutorialStep1.png,"",15.90} Secondly, a new source of the type mitk::TrackingDeviceSource has to be created with outputs for each single tool of a tracker. The source sets the following tracking device by using method SetTrackingDevice as shown below \code source->SetTrackingDevice(tracker); \endcode So now, the source is initialized with the virtual tracking device. Next, the source is connected and tracking is started. In part II, a displacemt filter (object "displacer") is constructed to change the positions of the filtered NavigationData objects with an offset for each direction (X,Y,Z). The given filter has inputs and outputs for each tool, in this example we have 2 tools, hence there exists two inputs and outputs. Every output of the displacement filter object is connected to the recorder object in the next part. In part III, all the NavigationData is recorded with the NavigationDataRecorder. In order to record, we simply create an object "recorder" of the type mitk::NavigationDataRecorder and set the appropriate file to it. Now the displacer object is connected to the recorder object for every output by using a for-loop in the code, the method StartRecording() is called on the next line. Afterwards, the recorder has to be updated a couple of times. In this example the recorder is updating 100 times through the second for-loop statement in part III. This can also be seen as a simulation of a timer by using a for-loop. Part IV explains how the recoded file can be played for further use. After the object "player" of a type mitk::NavigationDataPlayer is created, the required file has to be set to the player and playing has to be started. Here, there exists a new pipeline which functions by reading the recorded file from the harddisc and plays it by using the player as source. During the play, the for-loop makes the file update as in part III. \imageMacro{IGTTutorialStep1-2.png,"",9.53} The full code of small navigation pipeline is shown below and can be found in MITK-Source/Modules/IGT/Tutorial/mitkIGTTutorialStep1.cpp. This tutorial is an extra target which can be build separately. \include mitkIGTTutorialStep1.cpp -\ref IGTTutorialStep2 "[Next step]" \ref IGTTutorialOverview "[IGT Tutorial Overview]" +\ref Return to the \ref IGTTutorialOverview "[IGT Tutorial Overview]" */ diff --git a/Modules/IGT/Documentation/doxygen/IGTTutorialStep2.dox b/Modules/IGT/Documentation/doxygen/IGTTutorialStep2.dox index 8e16595f2e..9eba724f43 100644 --- a/Modules/IGT/Documentation/doxygen/IGTTutorialStep2.dox +++ b/Modules/IGT/Documentation/doxygen/IGTTutorialStep2.dox @@ -1,11 +1,11 @@ /** -\page IGTTutorialStep2 IGT Visualization Filter and MITK Concepts +\page IGTTutorialStepVisualization IGT Visualization Filter and MITK Concepts The following code shows how to insert IGT tracking data into an mitk::DataStorage and render the data with the mitk::NavigationDataObjectVisualizationFilter in an mitk::RenderWindow. The full code is shown below and can be found in MITK-Source/Modules/IGT/Tutorial/mitkIGTTutorialStep2.cpp. This tutorial is an extra target which can be build separately. \include mitkIGTTutorialStep2.cpp -\ref IGTTutorialStep1 "[Previous step]" \ref IGTTutorialStep3 "[Next step]" \ref IGTTutorialOverview "[IGT Tutorial Overview]" +\ref Return to the \ref IGTTutorialOverview "[IGT Tutorial Overview]" */ diff --git a/Modules/IGT/Documentation/doxygen/IGTTutorialStep3.dox b/Modules/IGT/Documentation/doxygen/IGTTutorialStep3.dox index c4896d294b..73ea0dfe8d 100644 --- a/Modules/IGT/Documentation/doxygen/IGTTutorialStep3.dox +++ b/Modules/IGT/Documentation/doxygen/IGTTutorialStep3.dox @@ -1,13 +1,13 @@ /** -\page IGTTutorialStep3 Qt Gui Tutorial +\page IGTTutorialStepSimplePlugin Qt Gui Tutorial This tutorial shows how to integrate IGT in your plugin. You can enable this example in CMake with the option: MITK_BUILD_org.mitk.gui.qt.igtexamples. The code of the plugin/view is located in: MITK-Source/Plugins/org.mitk.gui.qt.igtexamples/src/internal/QmitkIGTTutorialView The plugin will automatically be lodaed in the mitkWorkbench. More information can be found in the user manual: \ref org_imageguidedtherapytutorial "User manual" -\ref IGTTutorialStep2 "[Previous step]" \ref IGTTutorialStep4 "[Next step]" \ref IGTTutorialOverview "[IGT Tutorial Overview]" +\ref Return to the \ref IGTTutorialOverview "[IGT Tutorial Overview]" */ diff --git a/Modules/IGT/Documentation/doxygen/IGTTutorialStep4.dox b/Modules/IGT/Documentation/doxygen/IGTTutorialStep4.dox index c3f4790915..62f5c738e2 100644 --- a/Modules/IGT/Documentation/doxygen/IGTTutorialStep4.dox +++ b/Modules/IGT/Documentation/doxygen/IGTTutorialStep4.dox @@ -1,13 +1,13 @@ /** -\page IGTTutorialStep4 Tracking Lab +\page IGTTutorialStepTrackingLab Tracking Lab The tracking lab is an IGT plugin containing various functions. You can enable this example in CMake with the option: MITK_BUILD_org.mitk.gui.qt.igtexamples. The code of the plugin/view is located in: MITK-Source/Plugins/org.mitk.gui.qt.igtexamples/src/internal/QmitkIGTTrackingLabView The plugin will automatically be lodaed in the mitkWorkbench. More information can be found in the user manual: \ref org_igttrackinglab "Tracking Lab User Manual" -\ref IGTTutorialStep3 "[Previous step]" \ref IGTTutorialOverview "[IGT Tutorial Overview]" +\ref Return to the \ref IGTTutorialOverview "[IGT Tutorial Overview]" */ diff --git a/Modules/IGT/Documentation/doxygen/IGTTutorialStep5.dox b/Modules/IGT/Documentation/doxygen/IGTTutorialStep5.dox new file mode 100644 index 0000000000..0293e3d035 --- /dev/null +++ b/Modules/IGT/Documentation/doxygen/IGTTutorialStep5.dox @@ -0,0 +1,17 @@ +/** +\page IGTTutorialStepAdvanced A deeper look into the IGT Plugins + +Please have a look at each of these plugins: + +\li \ref org_mitk_views_igttrackingtoolbox - Connect your tracking device and start tracking + +\li \ref org_mitk_views_igtnavigationtoolmanager - Edit your tool storage + +\li \ref org_mitk_views_navigationdataplayer - Play your navigation data, e.g. recorded with the tracking toolbox + +\li not available yet: tutorial to calibration tool manager. Will follow soon. + + +\ref Return to the \ref IGTTutorialOverview "[IGT Tutorial Overview]" + +*/ diff --git a/Modules/IGT/Documentation/doxygen/IGTTutorialStep6.dox b/Modules/IGT/Documentation/doxygen/IGTTutorialStep6.dox new file mode 100644 index 0000000000..6f3a11f435 --- /dev/null +++ b/Modules/IGT/Documentation/doxygen/IGTTutorialStep6.dox @@ -0,0 +1,11 @@ +/** +\page IGTTutorialStepOpenIGTLink OpenIGTLink Tutorial + +\li \subpage org_openigtlinkexample +\li \subpage org_openigtlinkproviderexample +\li \subpage org_openigtlinkplugin + + +\ref Return to the \ref IGTTutorialOverview "[IGT Tutorial Overview]" + +*/ diff --git a/Modules/IGT/Tutorial/mitkIGTTutorialStep1.cpp b/Modules/IGT/Tutorial/mitkIGTTutorialStep1.cpp index 09cbd8c4c4..2416e2e18f 100644 --- a/Modules/IGT/Tutorial/mitkIGTTutorialStep1.cpp +++ b/Modules/IGT/Tutorial/mitkIGTTutorialStep1.cpp @@ -1,190 +1,185 @@ /*=================================================================== 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 #include #include #include #include #include "mitkNavigationDataDisplacementFilter.h" #include -#include +#include #include //##Documentation //## \brief A small console tutorial about MITK-IGT int main(int /*argc*/, char* /*argv*/[]) { //************************************************************************* // What we will do... //************************************************************************* //In this tutorial we build up a small navigation pipeline with a virtual tracking device //which produce random positions and orientation so no additional hardware is required. //The source of the pipeline is a TrackingDeviceSource object. This we connect to a simple //filter which just displaces the positions with an offset. After that we use a recorder //to store this new positions and other information to disc in a XML file. After that we use //another source (NavigationDataPlayer) to replay the recorded data. //************************************************************************* // Part I: Basic initialization of the source and tracking device //************************************************************************* //First of all create a tracking device object and two tools for this "device". //Here we take the VirtualTrackingDevice. This is not a real tracking device it just delivers random //positions and orientations. You can use other/real tracking devices if you replace the following //code with different tracking devices, e.g. mitk::NDITrackingDevice. The tools represent the //sensors of the tracking device. The TrackingDevice fills the tools with data. std::cout << "Generating TrackingDevice ..." << std::endl; mitk::VirtualTrackingDevice::Pointer tracker = mitk::VirtualTrackingDevice::New(); tracker->AddTool("tool1"); tracker->AddTool("tool2"); //The tracking device object is used for the physical connection to the device. To use the //data inside of our tracking pipeline we need a source. This source encapsulate the tracking device //and provides objects of the type mitk::NavigationData as output. The NavigationData objects stores //position, orientation, if the data is valid or not and special error informations in a covariance //matrix. // //Typically the start of our pipeline is a TrackingDeviceSource. To work correct we have to set a //TrackingDevice object. Attention you have to set the tools before you set the whole TrackingDevice //object to the TrackingDeviceSource because the source need to know how many outputs should be //generated. std::cout << "Generating Source ..." << std::endl; mitk::TrackingDeviceSource::Pointer source = mitk::TrackingDeviceSource::New(); source->SetTrackingDevice(tracker); //here we set the device for the pipeline source source->Connect(); //here we connect to the tracking system //Note we do not call this on the TrackingDevice object source->StartTracking(); //start the tracking //Now the source generates outputs. //************************************************************************* // Part II: Create a NavigationDataToNavigationDataFilter //************************************************************************* //The next thing we do is using a NavigationDataToNavigationDataFilter. One of these filter is the //very simple NavigationDataDisplacementFilter. This filter just changes the positions of the input //NavigationData objects with an offset for each direction (X,Y,Z). The input of this filter is the //source and the output of this filter is the "displaced" input. std::cout << "Generating DisplacementFilter ..." << std::endl; mitk::NavigationDataDisplacementFilter::Pointer displacer = mitk::NavigationDataDisplacementFilter::New(); mitk::Vector3D offset; mitk::FillVector3D(offset, 10.0, 100.0, 1.0); //initialize the offset displacer->SetOffset(offset); //now set the offset in the NavigationDataDisplacementFilter object //Connect the two filters. You can use the ConnectTo method to automatically connect all outputs from one filter // to inputs from another filter. displacer->ConnectTo(source.GetPointer()); // Alternatively, you can manually connect inputs and outputs. // The code below shows what the ConnectTo Methods does internally: // //for (unsigned int i = 0; i < source->GetNumberOfOutputs(); i++) //{ // displacer->SetInput(i, source->GetOutput(i)); //here we connect to the displacement filter //} //************************************************************************* // Part III: Record the data with the NavigationDataRecorder //************************************************************************* //The next part of our pipeline is the recorder. The input of the recorder is the output of the displacement filter //and the output is a XML file with the name "Test Output-0.xml", which is written with a NavigationDataSetWriter. std::cout << "Start Recording ..." << std::endl; //we need the stringstream for building up our filename std::stringstream filename; //the .xml extension and an counter is NOT added automatically anymore -- that was the case in an earlier version filename << itksys::SystemTools::GetCurrentWorkingDirectory() << "/Test Output-0.xml"; std::cout << "Record to file: " << filename.str() << " ..." << std::endl; mitk::NavigationDataRecorder::Pointer recorder = mitk::NavigationDataRecorder::New(); //now the output of the displacer object is connected to the recorder object recorder->ConnectTo(displacer); recorder->StartRecording(); //after finishing the settings you can start the recording mechanism //now every update of the recorder stores one line into the file for //each added NavigationData for (unsigned int x = 0; x < 100; x++) //write 100 datasets { recorder->Update(); //the update causes one line in the XML file for every tool //in this case two lines itksys::SystemTools::Delay(100); //sleep a little } recorder->StopRecording(); //to get proper XML files you should stop recording //if your application crashes during recording no data //will be lost it is all stored to disc //The IO-System needs a filename. Otherwise the output //is redirected to the console. See MITK-Concepts page for more details on IO in MITK mitk::IOUtil::SaveBaseData(recorder->GetNavigationDataSet(), filename.str()); //************************************************************************* // Part IV: Play the data with the NavigationDataPlayer //************************************************************************* //The recording is finished now so now we can play the data. The NavigationDataPlayer is similar //to the TrackingDevice source. It also derives from NavigationDataSource. So you can use a player //instead of a TrackingDeviceSource. The input of this player is a NavigationDataSet, which we //read with a NavigationDataReader. std::cout << "Start playing from file: " << filename.str() << " ..." << std::endl; - mitk::NavigationDataPlayer::Pointer player = mitk::NavigationDataPlayer::New(); + mitk::NavigationDataSequentialPlayer::Pointer player = mitk::NavigationDataSequentialPlayer::New(); mitk::NavigationDataSet::Pointer naviDataSet = dynamic_cast (mitk::IOUtil::LoadBaseData(filename.str()).GetPointer()); player->SetNavigationDataSet(naviDataSet); - player->StartPlaying(); //this starts the player - //From now on the player provides NavigationDatas in the order and - //correct time as they were recorded + //From now on the player provides NavigationDatas in a sequential order. The next position is given, as soon as "update" is called, so this player is not in real time. + //If you need the correct time of your tracking Data, use the NavigationDataPlayer instead and call "StartPlaying" and "StopPlaying". //this connects the outputs of the player to the NavigationData objects mitk::NavigationData::Pointer nd = player->GetOutput(); mitk::NavigationData::Pointer nd2 = player->GetOutput(1); for (unsigned int x=0; x<100; x++) { if (nd.IsNotNull()) //check if the output is not null { - //With this update the NavigationData object propagates through the pipeline to get a new value. - //In this case we only have a source (NavigationDataPlayer). - nd->Update(); + //With this call, we go to the next recorded data set. + player->GoToNextSnapshot(); - std::cout << x << ": 1:" << nd->GetPosition() << std::endl; - std::cout << x << ": 2:" << nd2->GetPosition() << std::endl; - std::cout << x << ": 1:" << nd->GetOrientation() << std::endl; - std::cout << x << ": 2:" << nd2->GetOrientation() << std::endl; + MITK_INFO << "Time Step " << x; + MITK_INFO<< "Tool 1:" << nd->GetPosition(); + MITK_INFO << "Tool 2:" << nd2->GetPosition() ; - itksys::SystemTools::Delay(100); //sleep a little like in the recorder part + itksys::SystemTools::Delay(100); //sleep a little like in the recorder part, just for nice reading... } } - player->StopPlaying(); //This stops the player - //With another call of StartPlaying the player will start again at the beginning of the file itksys::SystemTools::Delay(2000); std::cout << "finished" << std::endl; } diff --git a/Modules/US/Documentation/doxygen/USModule.dox b/Modules/US/Documentation/doxygen/USModule.dox index 64fe2f4f92..257f6e3d15 100644 --- a/Modules/US/Documentation/doxygen/USModule.dox +++ b/Modules/US/Documentation/doxygen/USModule.dox @@ -1,93 +1,93 @@ /** \page USModulePage The Ultrasound Module \tableofcontents \section USModulePageOverview Overview The Ultrasound Module provides a microservice based API for ultrasound devices. The main features are:
  • Microservice-enabled life cycle management, allowing other modules to easily consume mitk::USDevice-functionality.
  • Handling and processing of ultrasound image data.
    • Fast image preprocessing capabilities (gray scale conversion, cropping) via OpenCV.
    • Advanced image processing functions via mitk filters.
  • The mitk::USVideoDevice class allows to connect any ultrasound device with a video-out via a frame grabber.
  • Connection of API-Enabled devices (specifically the Telemed LogicScan 128 is implemented).
    • The submodule USHardwareTelemed provides classes for handling a Telemed API device (mitk::USTelemedDevice).
    • Control of API-enabled Devices via MITK (Widgets for basic B mode controls and probe selection are available).
    -
  • Designed to interact with the \link IGTGeneralModulePage IGT Module \endlink for tracking functionality. +
  • Designed to interact with the \link NavigationGeneralModulePage IGT Module \endlink for tracking functionality.
This module requires OpenCV to be enabled in the superbuild options via CMake. Its functionality is made available to the user via the \link org_mitk_gui_qt_ultrasound UltrasoundSupport plugin \endlink Documentation on how to use Telemed API devices can be found on \subpage USHardwareTelemedPage. \section USDeviceHierarchy Ultrasound Device Hierarchy Ultrasound Devices are managed in a simple hierarchy: \imageMacro{ClassDiagramUSModuleOverview.png,"",14.92}
  • mitk::USDevice: The common superclass for all ultrasound devices. Deriving from this class will make sure that US-specific GUI-Components will be able to interact with your class. Especially, the microservice life cycle is modeled in this class.
  • mitk::USImageSource: Abstract class used by the mitk::USDevice for getting the images from the ultrasound device. The images are filtered by one ore more mitk::AbstractOpenCVImageFilter if they were set to the mitk::USImageSource object. Each concrete subclass of mitk::USDevice has to subclass mitk::USImageSource to handle the actual receiving of images from the ultrasound device.
  • Two devices are implemented in the ultrasound module:
    • mitk::USVideoDevice: This class can be used for every ultrasound device that is connected to the PC via a frame grabber or a similar video input device. The \link org_mitk_gui_qt_ultrasound UltrasoundSupport plugin \endlink enables the user to create instances of mitk::USVideoDevice. There also is a reusable Widget for this Task in the USUI Module.
    • mitk::USTelemedDevice: This class can be used for API-enabled ultrasound devices of Telemed (e.g. Telemed LogicScan 128).
    • One can add another device by subclassing mitk::USDevice and mitk::USImageSource. Additionally the control interfaces may be implemented (see \link USControlInterfaces).
\section USDeviceLifeCycle Ultrasound Device Life Cycle Each mitk::USDevice follows a life cycle handling the availabilty as a micro service and the connection to the hardware: \imageMacro{MicroServiceLifeCycle.png,"",16.00} For changing the states corresponding methods are available in mitk::USDevice: mitk::USDevice::Initialize() for initialization, mitk::USDevice::Connect() for connecting, mitk::USDevice::Disconnect() for disconnecting and so on. For example, once an object of mitk::USDevice is constructed it can be made available as a micro service via a call to mitk::USDevice::Initialize(). The state changes to Initialized then and the device is available to other modules or plugins (\link org_mitk_gui_qt_ultrasound UltrasoundSupport\endlink, QmitkUSDeviceManagerWidget) through the micro service framework. The methods for changing the states should not be overwritten by sublcasses. Instead mitk::USDevice::OnInitialization(), mitk::USDevice::OnConnection() and so on can be overwritten for handling everything that has to be done on the corresponding state change. When the mitk::USDevice object was created at first it is available just locally. An initialized device is available as a micro service, but not connected to the real hardware. A connected device is connected to the hardware, but no acquiring images. Finally, an activated device is acquiring images from the ultrasound hardware. \section USControlInterfaces Control Interfaces for API Devices Capabilities of API-based ultrasound devices are available through control interfaces which are shown below: \imageMacro{USControlInterfaces.png,"",16.00} The control interfaces mitk::USControlInterfaceProbes and mitk::USControlInterfaceBMode are available, while mitk::USControlInterfaceDoppler is empty at the moment. Every sublcass of mitk::USDevice can use an implementation of each of these interfaces, but this is not necessary. The mitk::USVideoDevice for example uses a custom control interface only (mitk::USVideoDeviceCustomControls), which is a subclass of mitk::USAbstractControlInterface. The mitk::USTelemedDevice uses mitk::USTelemedBModeControls for handling the ultrasound b mode and mitk::USTelemedProbesControls for handling the connected ultrasound probe. Each custom control interface needs its own Widget (subclassed of QmitkUSAbstractCustomWidget), if it should be possible to control its functionality by using the \link org_mitk_gui_qt_ultrasound UltrasoundSupport\endlink plugin. For the standard interfaces mitk::USControlInterfaceProbes, mitk::USControlInterfaceBMode and mitk::USControlInterfaceDoppler there are Widgets available in the USUI module (QmitkUSControlsProbesWidget, QmitkUSControlsBModeWidget, QmitkUSControlsDopplerWidget) which can be used by plugins. For each Widget an object of the corresponding control interface must be set on its constructor call. A class diagram showing how the Widgets are connected to the control interfaces can be seen below: \imageMacro{USControlWidgets.png,"",16.00} A plugin can use the Widgets by creating a new object of the Widget and setting the corresponding interface object of the mitk::USDevice which should be controlled. How to use custom widgets is described in the class documentation of QmitkUSAbstractCustomWidget. \section USDWidgets Available Widgets There are some Widgets available in the USUI module that can be used for plugin development: a device management Widget, a Widget for creating new mitk::USVideoDevice objects and widgets for the control interfaces of API device. The usage of the Widgets is described in more detail in the \link org_mitk_gui_qt_ultrasound UltrasoundSupport Plugin Documentation\endlink. \subsection USQmitkUSDeviceManagerWidget QmitkUSDeviceManagerWidget The QmitkUSDeviceManagerWidget can view every connected mitk::USDevice and allows the user to activate and deactivate devices. Additionally mitk::USVideoDevice can be created using the QmitkUSNewVideoDeviceWidget and removed by a corresponding button. \subsection USQmitkNewVideoDeviceWidget QmitkUSNewVideoDeviceWidget The QmitkUSNewVideoDeviceWidget allows the user to configure a frame grabber or other video input as a mitk::USVideoDevice. \subsection USControlInterfaceWidgets Control Interface Widgets There exists several widgets for controling ultrasound devices: QmitkUSControlsBModeWidget, QmitkUSControlsProbesWidget, QmitkUSControlsCustomVideoDeviceWidget. Own custom control widgets can be added by subclassing the available QmitkUSAbstractCustomWidget. */ \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.igtexamples/documentation/UserManual/QmitkIGTTtrackingLab.dox b/Plugins/org.mitk.gui.qt.igtexamples/documentation/UserManual/QmitkIGTTrackingLab.dox similarity index 98% rename from Plugins/org.mitk.gui.qt.igtexamples/documentation/UserManual/QmitkIGTTtrackingLab.dox rename to Plugins/org.mitk.gui.qt.igtexamples/documentation/UserManual/QmitkIGTTrackingLab.dox index 55836a3ded..9386f91b46 100644 --- a/Plugins/org.mitk.gui.qt.igtexamples/documentation/UserManual/QmitkIGTTtrackingLab.dox +++ b/Plugins/org.mitk.gui.qt.igtexamples/documentation/UserManual/QmitkIGTTrackingLab.dox @@ -1,56 +1,56 @@ /** \page org_igttrackinglab IGT Tutorial Step 4: The IGT-TrackingLab Available sections: - \ref QmitkIGTTrackingLabUsersManualOverview - \ref QmitkIGTTrackingLabUsersManualPrel - \ref QmitkIGTTrackingLabUsersManualConf - \ref QmitkIGTTrackingLabUsersManualIntialReg - \ref QmitkIGTTrackingLabUsersManualPermReg - \ref QmitkIGTTrackingLabUsersManualPtSetRec - \ref QmitkIGTTrackingLabUsersManualCamView \section QmitkIGTTrackingLabUsersManualOverview Introduction The IGT-TrackingLab is the last step of the IGT tutorial. It is a plugin which shows examples usage for many IGT classes and is also an example navigation implemented with IGT. In the following you can learn how to use the plugin by reading this manual together with the source code. \section QmitkIGTTrackingLabUsersManualPrel Preliminaries First connect your tracking device to your PC. Then start the MITK Workbench and configure your tracking device using the \ref org_mitk_views_igttrackingtoolbox "Tracking Toolbox View". \section QmitkIGTTrackingLabUsersManualConf Configuration -Select the desired Navigation Data Source. Now it's time to define which tool shall be used as object marker and which tool shall be used as pointer. Next load the Book surface +Select the desired Navigation Data Source. Now it's time to define which tool shall be used as object marker and which tool shall be used as pointer. Next load the Book surface provided with the example data (e.g. book.stl from the MITK-Data repository which comes with every superbuild or may also be checked out separately) into MITK. Fixate the object marker on a real book of your choice. Now we need to tell MITK that the object marker has been fixated on a physical object. To do this, select the Book as surface in the Object Selection submenu. \section QmitkIGTTrackingLabUsersManualIntialReg Initial Registration Now we need to register the object marker to the surface it's fixed upon, in our case the book. To do this, first press the initial registration button. For MITK to be able to do this registration, we need to 1. Select landmarks on the virtual object (e.g. the corners of the book) Press the plus button in the Image fiducials column. Shift + click on the corners on the book in the MITK Display. 2. Point to the corresponding landmarks in the real world using the pointer. Now press the plus button in the Real world fiducials column and point to the corners on the real book. Press Add current instrument position whenever you targeted a corner to tell MITK this is the desired landmark. Make sure you select the "real" edges in the same order as the edges in the image. Press Register to finalize the initial registration. Now the object marker is registered onto the book. You can see this in the MITK image. If needed the FRE is shown in the widget. \section QmitkIGTTrackingLabUsersManualPermReg Permanent Registration Now everything is set up and registered. We can thus activate permanent registration to continuously track the object, the object marker and the pointer. For this, simply press the Permanent Registration button and select Activate permanent registration. You can now move the book in the real world and see the same movement in the MITK Display. A nice test to see if everything was correctly registered is to target the corners of the book with the pointer and check if the correct corners are pointed to in the MITK Display. \section QmitkIGTTrackingLabUsersManualPtSetRec PointSet Recording A user might now want to track a tool's trajectory. For this, the PointSet Recording was created. First click on PointSet Recording. Now select your tracking source and the tool whose trajectory shall be recorded. Activate the Point Set Recording checkbox. In the MITK Display little green points will now be drawn for every measured position. Deactivate the checkbox to stop recording. The trajectory is saved in the PointSet Recorded Points visible in the Data Manager. \section QmitkIGTTrackingLabUsersManualCamView Camera View Another possible tracking application is the Camera View. Here, a virtual camera is placed at the pointers tip and its images are shown in the MITK Display. Select Camera View and as usual the Tracking Source and the tool you want to place the virtual camera on. Activate the "Activate Needle View" checkbox and move the pointer around the book. You can now see the book from the pointers perspective. You may need to adjust the Needle View Direction and the View Up Vector. This is always relative to your tools coordinate center origin. An example of the NDI pointer tool coordinate system is shown below: \imageMacro{QmitkIGTExamples_Tool.png,"The coordinate system of the NDI pointing tool",16.00} In the above case, the camera should look in inverse z-direction, and the view up vector should probably be set to positive x. Note this is just an example and may be different depending on your pointer. */ diff --git a/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkMITKIGTNavigationToolManager.dox b/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkMITKIGTNavigationToolManager.dox index 5614af4744..06f62d7dd4 100644 --- a/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkMITKIGTNavigationToolManager.dox +++ b/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkMITKIGTNavigationToolManager.dox @@ -1,51 +1,54 @@ /** \page org_mitk_views_igtnavigationtoolmanager The MITK-IGT Navigation Tool Manager \imageMacro{QmitkIGTTracking_IconNavigationToolManager.png,"Icon of the Navigation Tool Manager",2.00} \section QmitkMITKIGTNavigationToolManager Introduction This view allows for creating and editing NavigationToolStorages. These storages contains naviagtion tools of a tracking device, can be saved permanently and used later for any other IGT application. \tableofcontents \section QmitkMITKIGTNavigationToolManagerToolOverview Navigation Tools Overview A navigation tool of MITK-IGT represents a tracking tool (e.g. an emt sensor or an optically tracked tool) and it's corresponding data, like it's name and it's surface. A navigation tool is a generalized container for any trackable object in combination with it's additional information. Every navigation tool has different properties which are:
  • Name
  • Unique identifier
  • Tool definition file
  • Serial number
  • Surface for visualization
  • Type of tracking device
  • Type of the tool
  • Tool landmarks
Note that not all properties are needed for all types of tools. A tool definition file, for example, is only needed by optical tracking tools (e.g. a .rom file for Polaris or a toolfile for the MicronTracker). A tool associated with the aurora system is alwalys identified by it's serial number. You can also detect Aurora tools automatically with the TrackingToolbox view and edit the automatically detected tool storage later with this view. \section QmitkMITKIGTNavigationToolManagerManagingNavigationToolStorage Managing Navigation Tool Storage In order to create edit a tool storage container, you can select one of the available tool storages listed in the upper part of the UI. The list shows all tool storages which are available throug the micro services concept of MITK. The list also shows the current tool storage of the IGT tracking toolbox view if it is active. In addition to the listed tool storages, you can load new storages from the hard disc which will then appear in the list and might be edited as all other storage by simply selecting it in the list. You may also save a selected tool storage to the hard disc or create a new one. In the lower part of the UI you always see the list of tools of the tool storage which is currently selected in the upper part. Use the buttons "add", "edit" and "delete" to manage the contained navigation tools. If you click "edit" or "delete" the operation is applied on the currently selected tool, as shown in the screenshot below. \imageMacro{QmitkIGTTracking_NavigationToolManagemantStartScreen.png,"Screenshot of the main view of NavigationToolManagent",10.90} \section QmitkMITKIGTNavigationToolManagerAddingEditingNavigationTools Adding / Editing Navigation Tools If you add or edit a navigation tool, an input mask, as shown in the screenshot below, appears. The tool identifier is filled automatically, if you change it, remember that it is unique in the current storage. Also, choose a valid surface for every tool, this is nessesary for correct tool visualization. The other information depends on the tracking system type. So choose a tool file for the Polaris or the MicronTracker system and type in a serial number for the Aurora system. Two identical tools with the same serial number are also possible, they are assigned by the order in which they are attached to the device. As long as they also have the same surface as representation, this should not be a problem for most of the use cases. The tool type is additional information which is not needed by the tracking device but might be needed by further IGT applications. The same applies to the tool landmarks which might be defined for a tool. There are two different types of landmarks which are designed as described here:
  • Tool Calibration Landmarks: These landmarks may be used clearly define the tools pose only by using landmarks in the tool coordinate system. E.g., two landmarks for a 5DoF tool and three landmarks for a 6DoF tool. These landmarks may be used, e.g., for a point based registration of a tool from image space to tracking space.
  • Tool Registration Landmarks: These landmarks are designed for representing defined landmarks on a tools surface. The number of these landmarks might exeed the number of tool calibration landmarks for reasons of redundancy and averaging. They are used for, e.g., manually registering the pose of a tool by visual markers in a CT scan. If you would use these landmarks to do a point based registration from image space to tracking space later, you might overweight the tool because of two many landmarks compared to other markers.
\imageMacro{QmitkIGTTracking_NavigationToolManagementAddTool.png,"Screenshot of add/edit navigation tool screen",9.19} + +Return to the Tutorial overview: \ref IGTTutorialStepAdvanced + */ diff --git a/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkMITKIGTTrackingToolbox.dox b/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkMITKIGTTrackingToolbox.dox index f47a0e3cb7..29dadc708d 100644 --- a/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkMITKIGTTrackingToolbox.dox +++ b/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkMITKIGTTrackingToolbox.dox @@ -1,56 +1,59 @@ /** \page org_mitk_views_igttrackingtoolbox The MITK-IGT Tracking Toolbox \imageMacro{QmitkIGTTracking_IconTrackingToolbox.png,"Icon of the MITK-IGT Tracking Toolbox",2.00} \tableofcontents \section QmitkMITKIGTTrackingToolboxIntroduction Introduction The MITK-IGT Tracking Toolbox is a view which allows you to connect to a tracking device, track and visualize navigation tools and write the tracked data into a log file. Currently the devices Polaris, Aurora (both Northern Digital Inc. (NDI); Waterloo, Ontario, Canada) and MicronTracker (Claron Technology, Inc.; Toronto, Ontario, Canada) are supported. The MicroBird family (Ascension Technology Corporation, Inc.; Burlington, USA) will hopefully follow soon since it is already supported by the tracking layer of IGT. The logging feature of the Tracking Toolbox supports logging in XML or CSV format. \imageMacro{QmitkIGTTracking_ScreenshotMitk.png,"MITK Screenshot with the TrackingToolbox activated",16.00} \section QmitkMITKIGTTrackingToolboxWorkflow General workflow Introduction A general Workflow with the Tracking Toolbox may be:
  • Configuration of a tracking device
  • Loading a toolfile which holds tool definitions
  • Start tracking
  • Logging tracked data
\section QmitkMITKIGTTrackingToolboxConnecting Tracking Device Configuration The tracking device can be specified in the tracking device configuration section located in the upper area of the tracking tab. As shown in the screenshot below, you choose your tracking device in the drop down menu. If you use a tracking system connected to a serial port, like Aurora or Polaris, you then need to specifiy the serial port. In case of the MicronTracker you only need to ensure that all drivers are installed correctly and integrated into MITK. If you want to check the connection, press "test connection". The results are displayed in the small black box on the right. \imageMacro{QmitkIGTTracking_ConfigurationWidget.png,"Tracking Device Configuration",8.55} \section QmitkMITKIGTTrackingToolboxLoadingTools Loading tools To load tools which can be tracked you need a predefined tracking tool storage. If you use the Aurora system you also have the possibility to automatically detect the connected tools. In this case a tracking tool storage is created by the software (see section below). Otherwise you can use the MITK view NavigationToolManager to define a navigation tool storage. There you can create navigation tools with the corresponding toolfiles, visualization surfaces and so on. Please see NavigationToolManager manual for more details. Navigation tool storages can be loaded by pressing the button "Load Tools". Please ensure that the tracking device type of the tools matches the chosen tracking device, otherwise you will get an error message if you try to start tracking. All loaded tools will then be displayed in grey as shown in the screenshot below. If you start tracking they will become green if the tools were found and red if they were not found inside the tracking volume. \imageMacro{QmitkIGTTracking_TrackingToolsWidget.png,"Tracking Tools",9.08} \section QmitkMITKIGTTrackingToolboxAutoDetection Auto detection of tools (only Aurora) If the Aurora tracking system is used, a button "Auto Detection" appears. If you press this button the software connects to the system and automatically detects all connected tools. You will then be asked whether you want to save the detected tools as a tool storage to the hard drive. You might want to do this if you want to use or modify this tool storage later. In the automatically detected tool storage the tools are named AutoDetectedTools1, AutoDetectedTools2, and so on. Small spheres are used as tool surfaces. After autodetection the detected tools are loaded automatically even if you did not save them. \section QmitkMITKIGTTrackingToolboxStartTracking Start/stop tracking Tracking can simply be started by pressing "Start Tracking". Note that options may not be changed during tracking. Once tracking has started the tracking volume (only if the option is on) and the tools are visualized in the 3D view of MITK. \section QmitkMITKIGTTrackingToolboxLogging Logging features If your device is tracking, you are able to log the tracking data by using the logging tab. You first must define a file name. You can then choose whether you want comma seperated (csv) or xml format. Press "Start Logging" to start logging. You can also limit the number of logged frames, which will cause the logging to stop automatically after the given number. \section QmitkMITKIGTTrackingOptions Options In the options tab you can enable or disable the visualization of the tracking volume and of the tool quaternions. If enabled, the tool quaternions are shown in the tool information. You can also define the update rate of the tracking data. The update rate should not be set higher than the update rate of the tracking system. + +Return to the Tutorial overview: \ref IGTTutorialStepAdvanced + */ diff --git a/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkNavigationDataPlayer.dox b/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkNavigationDataPlayer.dox index 0066b56cf3..8dcf5e1caf 100644 --- a/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkNavigationDataPlayer.dox +++ b/Plugins/org.mitk.gui.qt.igttracking/documentation/UserManual/QmitkNavigationDataPlayer.dox @@ -1,25 +1,27 @@ /** \page org_mitk_views_navigationdataplayer The NavigationData Player \imageMacro{QmitkIGTTracking_IconNavigationDataPlayer.png,"Icon of the NavigationData Player",2.00} \tableofcontents \section NavigationDataPlayerOverview The navigation data player plays recorded or artificial navigation data of one ore more tracking tools and visualizes their trajectory. It can also make the data available als a NavigationDataSource to Plugins that require a stream of tracking data, without having to create a tracking device. \imageMacro{QmitkIGTTracking_NavigationDataPlayer.png, "The Navigation Data Player", 7} To use it, select a set of recorded navigation data using the "Open File" button. The Player will show the number of tools and the number of frames in the file. Select the sequential player if you want to play the data with a specified tempo (set the update Interval accordingly). Use the Time-based player to play the data in the speed they were originally acquired in.
  • Check "Repeat" to repeat the data as a loop indefinitely.
  • Check "Register as Microservice" to make the data available as a microservice TrackingDataSource. Other Filters can then be connected to it from other plugins. This is useful for development purposes or to replay previously recorded Situations.
  • Check "Display" to render the data in the render Window.
+Return to the Tutorial overview: \ref IGTTutorialStepAdvanced + */