Commit 3adf288a authored by Emilie Harquel's avatar Emilie Harquel
Browse files

Updated doxygen for:

 - SActivityLauncher
 - Activity configuration
 - AppConfig

--HG--
branch : fw4spl_0.10.2
parent 9013e13b
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2015.
* FW4SPL - Copyright (C) IRCAD, 2009-2016.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
......@@ -93,8 +93,12 @@ protected:
</service>
@endverbatim
* With:
* @li \b mode : must be "stop" or "dummy". The dummy mode doesn't stop the services when its attached object is
* deleted but swap it on a dummy object.
* @li \b mode : must be "stop", "dummy" or "startAndUpdate".
* - The mode "stop", used by default, starts the services when their attached object is added in the compsite
* and stop and unregister the services when the object is deleted.
* - The mode "dummy" doesn't stop the services when its attached object is deleted but swap it on a dummy
* object.
* - The mode "startAndUpdate" start and update the services when its attached object is added in the composite.
* @li the objects and services tags are defined as same as the configuration of objects and services.
* @li \b autoConnect: optional (default value = false), if true allows to listen signals from the associated object.
* @li \b worker: optional, allows to manage the service in another thread.
......
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2015.
* FW4SPL - Copyright (C) IRCAD, 2009-2016.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
......@@ -24,6 +24,15 @@ namespace activities
namespace action
{
/**
* @brief This action launchs an activity according to the selected data
*
* This action works on a ::fwData::Vector. It proposes all the available activity according to the selected data and
* the given configuration. And then, send a signal with all the activity information.
*
* This action should be followed by the service '::guiQt::editor::DynamicView' : this service listens the action
* signals and launchs the activity in a new tab.
*/
class ACTIVITIES_CLASS_API SActivityLauncher : public ::fwGui::IActionSrv
{
......@@ -101,6 +110,36 @@ protected:
</config>
</service>
@endverbatim
*
* - \b mode (optional): there are two mode: "message" and "immediate"
* - \b message (used by défaut): the action send a signal containing the information needed to launch the
* choosen activity. The service '::guiQt::editor::DynamicView' allows to launch the activity in a new tab. For
* that, it must listen the action signal.
* - \b immediate: the activity is automatically started et stopped by this action. It is used to run a process
* without creating a new tab, for example, to save the selected data.
* - \b parameters (optional): list of the parameters used to launch the activity, it is the parameters for the
* AppConfig associated to the activity.
* - \b parameter: defines a parameter
* - \b replace: name of the parameter as defined in the AppConfig
* - \b by: defines the string that will replace the parameter name. It should be a simple string (ex.
* frontal) or define a sesh@ path (ex. @values.myImage). The root object of the sesh@ path if the
* composite contained in the ActivitySeries.
* - \b filter (optional): it allows to filter the activity that can be proposed.
* - \b mode: 'include' or 'exclude'. Defines if the activity in the following list are proposed (include) or not
* (exclude).
* - \b id: id of the activity
* - \b quickLaunch (optional): defines the activity that will be launched on a double-click on a series. The
* launched activity depends of the series type (ImageSeries, ModelSeries, ...).
* - \b association: allows to associate an activity to launch with a type of series
* - \b type: type of series (::fwMedData::ImageSeries, ::fwMedData::ModelSeries, ....)
* - \b id: identifier of the activity.
*
*
* @note A sesh@ path is a path used to browse an object (and sub-object) using the introspection (see fwDataCamp).
* The path begins with a '@' or a '!'.
* - '@' : the returned string is the fwID of the sub-object defined by the path.
* - '!' : the returned string is the value of the sub-object, it works only on String, Integer, Float and
* Boolean object.
*/
virtual void configuring() throw(fwTools::Failed);
......
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2015.
* FW4SPL - Copyright (C) IRCAD, 2009-2016.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
......@@ -66,6 +66,93 @@ namespace factory
} // namespace validator
/**
* @page Activity Activity configuration
*
* An activity is defined by the extension "::fwActivities::registry::Activities". It is used to launch an
* AppConfig with the selected data, it will create a new data ::fwMedData::ActivitySeries that inherits from a
* ::fwMedData::Series.
*
* The service ::activities::action::SActivityLauncher allows to launch an activity. Its role is to create the specific
* Activity associated with the selected data.
*
* This action should be followed by the service ::guiQt::editor::DynamicView : this service listens the action signals
* and launchs the activity in a new tab.
*
* - ::activities::action::SActivityLauncher uses the selected data to generate the activity.
* - ::guiQt::editor::DynamicView displays the activity in the application.
* - ::fwData::Vector contains the set of selected data .
*
* @verbatim
<extension implements="::fwActivities::registry::Activities">
<id>myActivityId</id>
<title>3D Visu</title>
<desc>Activity description ...</desc>
<icon>Bundles/media_0-1/icons/icon-3D.png</icon>
<requirements>
<requirement name="param1" type="::fwData::Image" /> <!-- defaults : minOccurs = 1, maxOccurs = 1-->
<requirement name="param2" type="::fwData::Mesh" maxOccurs="3" container="composite">
<key>Item1</key>
<key>Item2</key>
<key>Item3</key>
</requirement>
<requirement name="imageSeries" type="::fwMedData::ImageSeries" minOccurs="0" maxOccurs="2" />
<requirement name="modelSeries" type="::fwMedData::ModelSeries" minOccurs="1" maxOccurs="1" />
<!-- ...-->
</requirements>
<builder>::fwActivities::builder::ActivitySeries</builder>
<validator>::fwActivities::validator::ImageProperties</validator><!-- pour fw4spl_0.9.2 -->
<appConfig id="myAppConfigId">
<parameters>
<parameter replace="registeredImageUid" by="@values.param1" />
<parameter replace="orientation" by="frontal" />
<!-- ...-->
</parameters>
</appConfig>
</extension>
@endverbatim
*
* The activity parameters are (in this order):
*
* - \b id: it is the activity unique identifier.
* - \b title: it is the activity title that will be displayed on the tab.
* - \b desc: it is the description of the activity. It is displayed by the SActivityLauncher when several activity can
* be launched with the selected data.
* - \b icon: it is the path to the activity icon. It is displayed by the SActivityLauncher when several activity can be
* launched with the selected data.
* - \b requirements: it is the list of the data required to launch the activity. This data must be selected in the
* vector (``::fwData::Vector``).
* - \b requirement: a required data.
* - \b name: key used to add the data in the activity Composite.
* - \b type: the data type (ex: ``::fwMedData::ImageSeries``).
* - \b minOccurs (optional, "1" by default): the minimum number of occurrences of this type of object in the
* vector.
* - \b maxOccurs (optional, "1" by default): the maximum number of occurrences of this type of object in the
* vector.
* - \b container (optional, "vector" or "composite", default: composite): container used to contain the data if
* minOccurs or maxOccurs are not "1". if the container is "composite", you need to specify the "key" of each
* object in the composite.
* - \b builder: implementation of the activity builder. The default builder is
* ``::fwActivities::builder::ActivitySeries`` : it creates the ``::fwMedData::ActivitySeries`` and adds the required
* data in its composite with de defined key.
* The builder ``::fwActivities::builder::ActivitySeriesInitData`` allows, in addition to what the default builder
* does, to create data when minOccurs == 0 et maxOccurs == 0.
* - \b validators (optional): it defines the list of validator. If you need only one validator, you don't need the
* "validators" tag (only "validator").
* - \b validator (optional): it allows to validate if the selected required object are correct for the activity.
* For example, the validator ``::fwActivities::validator::ImageProperties`` checks that all the selected images
* have the same size, spacing and origin.
* - \b appConfig: it defines the AppConfig to launch and its parameters
* - \b id: identifier of the AppConfig
* - \b parameters: list of the parameters required by the AppConfig
* - \b parameter: defines a parameter
* - \b replace: name of the parameter as defined in the AppConfig
* - \b by: defines the string that will replace the parameter name. It should be a simple string (ex.
* frontal) or define a sesh@ path (ex. @values.myImage). The root object of the sesh@ path if the
* composite contained in the ActivitySeries.
*/
} // namespace fwActivities
#endif /* __FWACTIVITIES_NAMESPACE_HPP__ */
......
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-2015.
* FW4SPL - Copyright (C) IRCAD, 2009-2016.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
......@@ -13,14 +13,205 @@
* \li IService : API to normalize manipulation, using a limited set of well defined methods
* \li IService : contract for service implementation
* \li macros.hpp : declaration of service to object bindings
* \li A set of high level methods to facilitate the use of implemented concepts (Add.hpp, New.hpp, Info.hpp, Erase.hpp, Get.hpp and Run.hpp)
* \li ObjectMsg and IEditionService : communication management (implementation of an adaptation of the observer design pattern), high-level methods being available in Com.hpp
* @namespace fwServices
*
* @date 2009-2010.
*
*/
namespace fwServices
{
/**
* @page AppConfig AppConfig
*
* The FW4SPL architecture provides a dynamic management of configurations to allow the use of multiple objects and
* services.
*
* The xml configuration for an application is defines with the extension ``::fwServices::registry::AppConfig``.
*
* @verbatim
<extension implements="::fwServices::registry::AppConfig">
<id>myAppConfigId</id>
<parameters>
<param name="appName" default="my Application" />
<param name="appIconPath" />
</parameters>
<desc>Image Viewer</desc>
<config>
<object type="::fwData::Composite">
<!--
Description service of the GUI:
The ::gui::frame::SDefaultFrame service automatically positions the various
containers in the application main window.
Here, it declares a container for the 3D rendering service.
-->
<service uid="myFrame" impl="::gui::frame::SDefaultFrame">
<gui>
<frame>
<name>${appName}</name>
<icon>${appIconPath}</icon>
<minSize width="800" height="600" />
</frame>
</gui>
<registry>
<!-- Associate the container for the rendering service. -->
<view sid="myRendering" />
</registry>
</service>
<item key="myImage">
<object uid="myImageUid" type="::fwData::Image">
<!--
Reading service:
The <file> tag defines the path of the image to load. Here, it is a relative
path from the repository in which you launch the application.
-->
<service uid="myReaderPathFile" impl="::ioVTK::SImageReader">
<file>./TutoData/patient1.vtk</file>
</service>
<!--
Visualization service of a 3D medical image:
This service will render the 3D image.
-->
<service uid="myRendering" impl="::vtkSimpleNegato::SRenderer" />
</object>
</item>
<!--
Definition of the starting order of the different services:
The frame defines the 3D scene container, so it must be started first.
The services will be stopped the reverse order compared to the starting one.
-->
<start uid="myFrame" />
<start uid="myReaderPathFile" />
<start uid="myRendering" />
<!--
Definition of the service to update:
The reading service load the data on the update.
The render update must be called after the reading of the image.
-->
<update uid="myReaderPathFile" />
<update uid="myRendering" />
</object>
</config>
</extension>
@endverbatim
*
* - \b id: it is the configuration identifier
* - \b parameters (optional): it defines the list of the parameters used by the configuration
* - \b param: defines a parameter
* - \b name: parameter name, used as "${paramName}" in the configuration. It will be replaced by the string
* defined by the service, activity or application that launchs the configuration.
* - \b default(optional): default value for the parameter, it is used if the value is not given by the config
* launcher.
* - \b desc (optional): it is the description of the application
* - \b config: it defines the services and objects to launch
*
* - \b object: it defines an object of the AppConfig. We usually use a ::fwData::Composite in order to add
* sub-objects. An object can defines a list of services. Some object object can have a specific configuration :
* ::fwData::TransformationMatrix3D, ::fwData::Float, ::fwData::List, ...
* - \b uid (optional): unique identifier of the object (::fwTools::fwID). If it is not defined, it will be
* automatically generated.
* - \b type: object type (ex: ::fwData::Image, ::fwData::Composite)
* - \b src (optional, "new" by default): defines if the object should be created ("new") or if it already
* exists in the application ("ref"). In the last case, the uid must be the same as the first declaration of
* this object (with "new").
* - \b service: it represents a service working on the object. Some services needs a specific configuration, it is
* usually described in the doxygen of the method configuring().
* - \b uid (optional): unique identifier of the service. If it is not defined, it will be automatically
* generated.
* - \b impl: service implementation
* - \b type (optional): service type (ex: ::fwGui::IFrameSrv)
* - \b autoConnect (optional, "no" by default): defines if the service listen the signals of the working object
* - \b worker (optional): allows to run the service in another worker (see ::fwThread::Worker)
*
* - \b matrix (optional): it works only for ::fwData::TransformationMatrix3D objects. It defines the value of the
* matrix.
*
* @verbatim
<object uid="matrix" type="::fwData::TransformationMatrix3D">
<matrix>
<![CDATA[
1  0  0  0
0  1  0  0
0  0  1  0
0  0  0  1
]]>
</matrix>
</object>
@endverbatim
*
* - \b value (optional): it works only for ::fwData::Boolean, ::fwData::Integer, ::fwData::Float and
* ::fwData::String. It allows to define the value of the object.
*
* @verbatim
<object type="::fwData::Integer">
<value>42</value>
</object>
@endverbatim
*
* - \b item (optional): it defines a sub-object of a composite. It can only be used if the parent object is a
* ::fwData::Composite.
* - \b key: key of the object in the composite
* - \b object: the 'item' tag can only contain 'object' tags that represents the composite sub-object
*
* @verbatim
<item key="myImage">
<object uid="myImageUid" type="::fwData::Image" />
</item>
@endverbatim
*
* - \b colors (optional): it works only for ::fwData::TransferFunction. It allows to fill the transfer function values.
*
* @verbatim
<object type="::fwData::TransferFunction">
<colors>
<step color="#ff0000ff" value="1" />
<step color="#ffff00ff" value="500" />
<step color="#00ff00ff" value="1000" />
<step color="#00ffffff" value="1500" />
<step color="#0000ffff" value="2000" />
<step color="#000000ff" value="4000" />
</colors>
</object>
@endverbatim
*
* - \b connect (optional): allows to connect a signal to one or more slot(s). The signal and slots must be
* compatible.
*
* @verbatim
<connect>
<signal>object_uid/signal_name</signal>
<slot>service_uid/slot_name</slot>
</connect>
@endverbatim
*
* - \b proxy (optional): allows to connect one or more signal(s) to one or more slot(s). The signals and slots must
* be compatible.
* - \b channel: name of the channel use for the proxy.
*
* @verbatim
<proxy channel="myChannel">
<signal>object_uid/signal_name</signal>
<slot>service_uid/slot_name</slot>
</proxy>
@endverbatim
*
* - \b start: defines the service to start when the AppConfig is launched. The services will be automatically
* stopped in the reverse order when the AppConfig is stopped.
*
* @verbatim
<start uid="service_uid" />
@endverbatim
*
* - \b update: defines the service to update when the AppConfig is launched.
*
* @verbatim
<update uid="service_uid" />
@endverbatim
*/
}
#endif /* __FWSERVICES_NAMESPACE_HPP__ */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment