Commit a038e62e authored by Emmanuel Promayon's avatar Emmanuel Promayon

NEW integration test for this action

parent 154adde2
......@@ -2,7 +2,6 @@
camitk_extension(ACTION_EXTENSION
# Auto test will not work as this action needs two other action
# and auto test are isolating the action it takes.
# But integration test can do the trick!
# But integration test will perform all the required tests.
ENABLE_INTEGRATION_TEST
)
......@@ -39,7 +39,7 @@ using namespace camitk;
HardCodedPipelineAction::HardCodedPipelineAction(ActionExtension* extension) : Action(extension) {
// Setting name, description and input component
setName(tr("Hard-Coded Action Pipeline"));
setDescription("Demonstrate how to call one or more actions from another action (that is, implement a hard-coded action pipeline.");
setDescription("Demonstrate how to call one or more actions from another action (that is, implement a hard-coded action pipeline without modifying anything of the called actions).");
setComponent("ImageComponent");
// Setting classification family and tags
......@@ -47,7 +47,7 @@ HardCodedPipelineAction::HardCodedPipelineAction(ActionExtension* extension) : A
addTag(tr("Pipeline"));
// Setting the action's parameters
addParameter(new Property(tr("Resample Factor"), QVariant(0.5), tr("The resample factor to use when applying the ResampleAction"), tr("factor")));
addParameter(new Property(tr("Resample Factor"), QVariant(0.5), tr("The resample factor to use when applying the Resample action"), tr("factor")));
}
......
<scxml initial="Initialize" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camitk="http://camitk.imag.fr/3/asm" xsi:schemaLocation="http://camitk.imag.fr/3/smallScxml/../resources/smallScxml.xsd" xmlns="http://camitk.imag.fr/3/smallScxml">
<state id="Initialize">
<onentry>
<camitk:onState>
<camitk:description><![CDATA[This pipeline will only check the "Hard-Coded Action Pipeline" action. This specific action ir running a hard-coded pipeline that resize an image and apply an Otsu filter on the result.<br/>This pipeline therefore just do:<br/> <ul><li>Open</li><li></li><li>Hard-Coded Action Pipeline</li><li>Save As</li></ul>]]></camitk:description>
</camitk:onState>
</onentry>
<transition target="Open Input Image" event="Next"/>
</state>
<state id="Open Input Image">
<onentry>
<camitk:onState>
<camitk:description>Open data (component) from a file</camitk:description>
<camitk:action>
<camitk:name>Open File</camitk:name>
<camitk:parameters>
<camitk:parameter name="File Name" value="input-1.mha" type="QString"/>
</camitk:parameters>
<camitk:outputs>
<camitk:component name="input-1.mha" type="ImageComponent"/>
</camitk:outputs>
</camitk:action>
</camitk:onState>
</onentry>
<transition target="Initialize" event="Back"/>
<transition target="Apply Hard-Coded Pipeline" event="Next"/>
</state>
<state id="Apply Hard-Coded Pipeline">
<onentry>
<camitk:onState>
<camitk:description>&lt;p> Demonstrate how to call one or more actions from another action (that is, implement a hard-coded action pipeline without modifying anything of the called actions).&lt;/p></camitk:description>
<camitk:action>
<camitk:name>Hard-Coded Action Pipeline</camitk:name>
<camitk:parameters>
<camitk:parameter name="Resample Factor" value="0.5" type="double"/>
</camitk:parameters>
<camitk:inputs>
<camitk:component name="input-1.mha" type="ImageComponent"/>
</camitk:inputs>
<camitk:outputs>
<camitk:component name="output-1.mha" type="ImageComponent"/>
</camitk:outputs>
</camitk:action>
</camitk:onState>
</onentry>
<transition target="Open Input Image" event="Back">
<onTransition>
<camitk:close>
<camitk:component name="input-1.mha" type="ImageComponent"/>
</camitk:close>
</onTransition>
</transition>
<transition target="Save Pipeline Result as output-1.mha" event="Next"/>
</state>
<state id="Save Pipeline Result as output-1.mha">
<onentry>
<camitk:onState>
<camitk:description>Save the currently selected data under a different filename or format</camitk:description>
<camitk:action>
<camitk:name>Save</camitk:name>
<camitk:parameters/>
<camitk:inputs>
<camitk:component name="output-1.mha" type="ImageComponent"/>
</camitk:inputs>
</camitk:action>
</camitk:onState>
</onentry>
<transition target="Apply Hard-Coded Pipeline" event="Back">
<onTransition>
<camitk:close>
<camitk:component name="output-1.mha" type="ImageComponent"/>
</camitk:close>
</onTransition>
</transition>
<transition target="Close input-1.mha" event="Next"/>
</state>
<state id="Close input-1.mha">
<onentry>
<camitk:onState>
<camitk:description>Close the currently selected components</camitk:description>
<camitk:action>
<camitk:name>Close</camitk:name>
<camitk:parameters/>
<camitk:inputs>
<camitk:component name="input-1.mha" type="ImageComponent"/>
</camitk:inputs>
</camitk:action>
</camitk:onState>
</onentry>
<transition target="Save Pipeline Result as output-1.mha" event="Back"/>
<transition target="Close output-1.mha" event="Next"/>
</state>
<state id="Close output-1.mha">
<onentry>
<camitk:onState>
<camitk:description>Close the currently selected components</camitk:description>
<camitk:action>
<camitk:name>Close</camitk:name>
<camitk:parameters/>
<camitk:inputs>
<camitk:component name="output-1.mha" type="ImageComponent"/>
</camitk:inputs>
</camitk:action>
</camitk:onState>
</onentry>
<transition target="Close input-1.mha" event="Back"/>
<transition target="Bye" event="Next"/>
</state>
<state id="Bye" final="true">
<onentry>
<camitk:onState>
<camitk:description><![CDATA[Thanks you for using the CamiTK Action State Machine !]]></camitk:description>
</camitk:onState>
</onentry>
<transition target="Initialize" event="Back to the beginning">
<onTransition>
<camitk:close/>
</onTransition>
</transition>
</state>
</scxml>
Markdown is supported
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