SCM

Discussion Forums: help

Monitor Forum | Start New Thread Start New Thread

 

RE: ActionStateMachine & CEP [ reply ]
By: Baptiste Veron on 2017-03-08 14:26
[forum:3977]

CMakeLists.txt (2) downloads
Thanks Mahnu for your answer.

As I don't create a camitk-application per say but use the ActionStateMachine instead, I cannot use the macro camitk_extenstion (because there is no source file).

Thus, in my CEP I created the following directories
./applications/appname/testdata
and I placed the joined cmake file under appname to ensure that the testing data will be copied while building and installing the CEP.

About the last question, here is an example of what is currently possible within a transition to automatically close a component :

<transition target="Installation" event="Next" applyAction="true">
<camitk:onTransition>
<camitk:close>
<camitk:component type="ClinicalData" name="Clinical Data"/>
</camitk:close>
</camitk:onTransition>
</transition>

I was wondering if something similar was possible to automatically open a component instead of using the "Open" or "Open File" actions.
Unfortunately, looking at the camitkAsm.xsd file showed me that it is not possible yet.

Thanks again.
--
Baptiste

RE: ActionStateMachine & CEP [ reply ]
By: Emmanuel Promayon on 2017-03-07 22:57
[forum:3976]
Hello,

Thanks for your interesting questions... ActionStateMachine is probably not as much documented as it should be, but it is way underestimated tool (and is where CamiTK is taking all its sense)!

> - Where to put the input xml file ?

I am not sure there is only one answer to this. The "--file" option can take any path. So that is just a question of convenience for your daily work.

> - Where to put data to test the application ?
From your question, it seems that you developed your own application based on camitk::MainWindow. In this case, the best would be to add a testdata subdirectory in your application directory (e.g.mycep/applications/myapp/testdata).

Note that camitk_extension(..) macro automatically install the content testdata directory in the repository share/camitk-x.x subdirectory.
You can do something similar by adding your own installation cmake commands at the end of any cmake, if you think this is a good thing to do, using the install(..) macro
Something like:

set (TESTDATA_DEST_DIR share/${CAMITK_SHORT_VERSION_STRING}/testdata)
install(DIRECTORY testdata/ DESTINATION ${TESTDATA_DEST_DIR})

Note that you will have to do extra work if you want the same thing to happen at build time (see the CamiTKExtension.cmake file line 709 onward).

Considering the last question, I am not sure to understand : do you mean that you want to open a file automatically (e.g., instanciate a component from a given filename without asking the user)?
It yes, then I think that the "Open File" action has the "File name" property made for that.

Let me know if my answer makes sense.
Mahnu

ActionStateMachine & CEP [ reply ]
By: Baptiste Veron on 2017-03-06 15:49
[forum:3972]
Hi,

I am developing a CEP with which I intend to use the ActionStateMachine.

I have several questions about how to integrate the developments specific to the final application (using the ActionStateMachine) in the CEP.
- Where to put the input xml file ?
- Where to put data to test the application ?
Indeed, I noticed that, contrary to actions and components, the elements in a testdata directory under an applications directory are not duplicated in build\share\camitk-3.6\testdata while building the CEP.

Finally, I also wonder if it is possible to automatically load a component within a transition, as it is possible for closing a component.

Thanks.
--
Baptiste

   
Powered By FusionForge