Commit 154adde2 authored by Emmanuel Promayon's avatar Emmanuel Promayon

NEW renamed action

parent de88e144
# Call CamiTK CMake Macro to define the action
camitk_extension(ACTION_EXTENSION
ENABLE_AUTO_TEST
TEST_FILES brain.mha sinus.mhd
)
# Call CamiTK CMake Macro to define the action
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!
ENABLE_INTEGRATION_TEST
)
......@@ -22,7 +22,7 @@
*
* $CAMITK_LICENCE_END$
****************************************************************************/
#include "ActionsInActionAction.h"
#include "HardCodedPipelineAction.h"
// CamiTK
#include <Application.h>
......@@ -36,10 +36,10 @@ using namespace camitk;
// --------------- Constructor -------------------
ActionsInActionAction::ActionsInActionAction(ActionExtension* extension) : Action(extension) {
HardCodedPipelineAction::HardCodedPipelineAction(ActionExtension* extension) : Action(extension) {
// Setting name, description and input component
setName(tr("Apply two actions from an action"));
setDescription("Demonstrate how to call one or more actions from another action.");
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.");
setComponent("ImageComponent");
// Setting classification family and tags
......@@ -52,14 +52,14 @@ ActionsInActionAction::ActionsInActionAction(ActionExtension* extension) : Actio
}
// --------------- destructor -------------------
ActionsInActionAction::~ActionsInActionAction() {
HardCodedPipelineAction::~HardCodedPipelineAction() {
// Do not do anything yet.
// Delete stuff if you create stuff
// (except if you use smart pointers of course !!)
}
// --------------- apply -------------------
Action::ApplyStatus ActionsInActionAction::apply() {
Action::ApplyStatus HardCodedPipelineAction::apply() {
PipelineActionStatus pipelineStatus = PipelineActionStatus::OK;
......@@ -108,7 +108,7 @@ Action::ApplyStatus ActionsInActionAction::apply() {
}
// --------------- getLastTopLevelOutputComponents -------------------
Component* ActionsInActionAction::getLastTopLevelOutputComponents(const QString& actionName) {
Component* HardCodedPipelineAction::getLastTopLevelOutputComponents(const QString& actionName) {
Component* lastOutputComponent = nullptr;
......@@ -145,7 +145,7 @@ Component* ActionsInActionAction::getLastTopLevelOutputComponents(const QString&
}
// --------------- applyResample -------------------
ActionsInActionAction::PipelineActionStatus ActionsInActionAction::applyResample(Component* input) {
HardCodedPipelineAction::PipelineActionStatus HardCodedPipelineAction::applyResample(Component* input) {
Action* resampleAction = Application::getAction("Resample");
if (resampleAction == nullptr) {
......@@ -179,7 +179,7 @@ ActionsInActionAction::PipelineActionStatus ActionsInActionAction::applyResample
// --------------- applyOtsu -------------------
ActionsInActionAction::PipelineActionStatus ActionsInActionAction::applyOtsu(Component* input) {
HardCodedPipelineAction::PipelineActionStatus HardCodedPipelineAction::applyOtsu(Component* input) {
Action* otsuThreshold = Application::getAction("Otsu Threshold Filter");
if (otsuThreshold == nullptr) {
return OTSU_NOT_FOUND;
......
......@@ -29,15 +29,15 @@
#include <ImageComponent.h>
class ActionsInActionAction : public camitk::Action {
class HardCodedPipelineAction : public camitk::Action {
Q_OBJECT
public:
/// Default Constructor
ActionsInActionAction(camitk::ActionExtension*);
HardCodedPipelineAction(camitk::ActionExtension*);
/// Default Destructor
virtual ~ActionsInActionAction();
virtual ~HardCodedPipelineAction();
public slots:
/** this method is automatically called when the action is triggered.
......
......@@ -22,14 +22,14 @@
*
* $CAMITK_LICENCE_END$
****************************************************************************/
#include "ActionsInActionExtension.h"
#include "HardCodedPipelineExtension.h"
// include generated actions headers
#include "ActionsInActionAction.h"
#include "HardCodedPipelineAction.h"
// --------------- getActions -------------------
void ActionsInActionExtension::init() {
void HardCodedPipelineExtension::init() {
// Creating and registering the instance of ActionsInActionAction
registerNewAction(ActionsInActionAction);
registerNewAction(HardCodedPipelineAction);
}
......@@ -27,26 +27,26 @@
#include <ActionExtension.h>
class ActionsInActionExtension : public camitk::ActionExtension {
class HardCodedPipelineExtension : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension);
Q_PLUGIN_METADATA(IID "fr.imag.camitk.tutorials.action.actionsinaction")
Q_PLUGIN_METADATA(IID "fr.imag.camitk.tutorials.action.hardcodedpipeline")
public:
/// Constructor
ActionsInActionExtension() : ActionExtension() {};
HardCodedPipelineExtension() : ActionExtension() {};
/// Destructor
virtual ~ActionsInActionExtension() = default;
virtual ~HardCodedPipelineExtension() = default;
/// Method returning the action extension name
virtual QString getName() {
return "ActionsInActionExtension";
return "HardCodedPipelineExtension";
};
/// Method returning the action extension descrption
virtual QString getDescription() {
return "Demo of applying actions from another action";
return "Demo that apply two actions from another action";
};
/// initialize all the actions
......
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