diff --git a/Modules/US/Documentation/doxygen/USHierarchy.png b/Modules/US/Documentation/doxygen/USHierarchy.png new file mode 100644 index 0000000000..0ba713736a Binary files /dev/null and b/Modules/US/Documentation/doxygen/USHierarchy.png differ diff --git a/Modules/US/Documentation/doxygen/USLifecycle.png b/Modules/US/Documentation/doxygen/USLifecycle.png new file mode 100644 index 0000000000..028b801910 Binary files /dev/null and b/Modules/US/Documentation/doxygen/USLifecycle.png differ diff --git a/Modules/US/Documentation/doxygen/USModule.dox b/Modules/US/Documentation/doxygen/USModule.dox index 724500752a..477bacdc55 100644 --- a/Modules/US/Documentation/doxygen/USModule.dox +++ b/Modules/US/Documentation/doxygen/USModule.dox @@ -1,29 +1,61 @@ /** \page USModulePage The Ultrasound Module \section USModulePageOverview Overview The Ultrasound Module provides a microservice Based API for ultrasound devices. The main features are: 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 \section USDeviceHierarchy Ultrasound Device Hierarchy +Ultrasound Devices are managed in a simple hierarchy: + +\image html USHierarchy.png + + + +\section USDeviceLifecycle USDevice Lifecycle + +Once you a USDevice is constructed, it can be connected via call to mitk::USDevice::Connect(). +This will cause the Device to register itself in the Microservice Framework and will make the device available to other Modules, the UltrasoundSUpport Plugin and the USDeviceManagerWidget in the USUI Module. +The Connect() method is not virtual and should never be overwritten. +Instead, override mitk::USDevice::OnConnect(), which will be called during the connection Process and enables you to react to this event. +A connected device is available to other modules, but is not aquiring image data. +Analogously to Connect, there is a function mitk::USDevice::Activate which will start the image aquisition. +Again, this method is not virtual, override mitk::USDevice::OnActivate to react to activation. + +Matching functions mitk::USDevice::Disconnect(), mitk::USDevice::OnDisconnect, mitk::USDevice::Deactivate, mitk::USDevice::OnDeactivate exist as well. + +The following diagram illustrates the situation: + +\image html USLifecycle.png + +The blue message symbols indicate that the corresponding method of the subclass is called to react to the event. + */ \ No newline at end of file