fw4spl
fwActivities::registry::ActivityInfo Struct Reference

Holds Activities configuration. More...

#include <Activities.hpp>

+ Collaboration diagram for fwActivities::registry::ActivityInfo:

Public Types

typedef std::vector< ActivityRequirementRequirementsType
 
typedef std::pair< unsigned int, unsigned int > MinMaxType
 
typedef std::map< std::string, MinMaxType > RequirementsMinMaxCount
 
typedef std::map< std::string, unsigned int > DataCountType
 

Public Member Functions

FWACTIVITIES_API ActivityInfo (const std::shared_ptr< ::fwRuntime::Extension > &ext)
 
FWACTIVITIES_API bool usableWith (DataCountType dataCount) const
 

Public Attributes

std::string id
 
std::string title
 
std::string description
 
std::string icon
 
std::string tabInfo
 
RequirementsType requirements
 
std::string builderImpl
 
std::string bundleId
 Identifier of the bundle containing the activity.
 
std::string bundleVersion
 Version of the bundle containing the activity.
 
std::vector< std::string > validatorsImpl
 Validator implementations.
 
ActivityAppConfig appConfig
 

Protected Attributes

RequirementsMinMaxCount m_requirementCount
 

Detailed Description

Holds Activities configuration.

Activity parameters are (in this order) :

  • id : activity id
  • title : activity title (displayed in tab if tabinfo isn't specified)
  • tabinfo : activity title (displayed in tab)
  • desc : activity description
  • icon : path to the icon activity
  • requirements : required elements to launch specified activity (must be present in vector selection)
    • requirement : a required element
      • name : element key in ActivitySeries composite
      • type : object type
      • minOccurs (optional, default value = 1) : minimal number of object (with specified type) in vector
      • maxOccurs (optional, default value = 1) : maximal number of object (with specified type) in vector
        • key : if maxOccurs > 1, then you must defined keys for each objects
      • container (optional, default value = composite) : container type (vector or composite) to store required parameters
      • create (optional) : true if the data must be created if it is not present (only available if minOccurs = 0 and maxOccurs = 1)
      • desc (optional) : description of the requirement
      • validator (optional) : validate the current data
  • builder (optional): implementation of builder associate to the activity, the builder creates ActivitySeries.
  • validator (optional): check if specified activity can be launched with selected objects
  • validators (optional) : defines validators implementations instantiated to validate activity launch
    • validator : implementation name for a validator
  • appConfig : defined AppConfig launched by this activity
    • id : AppConfig id
    • parameters : parameters required by the AppConfig
      • parameter : defined an AppConfig parameter
        • replace : parameter name to replace in AppConfig
        • by : value to use for replacement (can be a string or sesh@ path)

Example of activity configuration:

1  <extension implements="::fwActivities::registry::Activities">
2  <id>3DVisualization</id>
3  <title>3D Visu</title>
4  <tabinfo>3D MPR - !values.modelSeries.patient.name</tabinfo>
5  <desc>Activity description ...</desc>
6  <icon>media-0.1/icons/icon-3D.png</icon>
7  <requirements>
8  <requirement name="param1" type="::fwData::Image" /> <!-- defaults : minOccurs = 1, maxOccurs = 1-->
9  <requirement name="param2" type="::fwData::Mesh" maxOccurs="3" >
10  <key>Item1</key>
11  <key>Item2</key>
12  <key>Item3</key>
13  </requirement>
14  <requirement name="param3" type="::fwData::Mesh" maxOccurs="*" container="vector" />
15  <requirement name="imageSeries" type="::fwMedData::ImageSeries" minOccurs="0" maxOccurs="2" />
16  <requirement name="modelSeries" type="::fwMedData::ModelSeries" minOccurs="1" maxOccurs="1">
17  <desc>Description of the required data....</desc>
18  <validator>::fwActivities::validator::ImageProperties</validator>
19  </requirement>
20  <requirement name="transformationMatrix" type="::fwData::TransformationMatrix3D" minOccurs="0" maxOccurs="1"
21 create="true" />
22  <!--# ...-->
23  </requirements>
24  <builder>::fwActivities::builder::ActivitySeries</builder>
25  <validators>
26  <validator>::fwActivities::validator::RelatedStudy</validator>
27  </validators>
28  <appConfig id="3DVisualization">
29  <parameters>
30  <parameter replace="registeredImageUid" by="@values.param1" />
31  <parameter replace="orientation" by="frontal" />
32  <!--# ...-->
33  </parameters>
34  </appConfig>
35  </extension>

Definition at line 175 of file Activities.hpp.


The documentation for this struct was generated from the following files: