Computer Assited Medical Intervention Tool Kit  version 5.0
camitk::Action Class Referenceabstract

Action class is an abstract class that enables you to build a action (generally on a component). At least two classes have to be reimplemented to enable the action: ActionExtension + Action. More...

#include <Action.h>

Inherits QObject.

Inherited by AboutAction, AnglesAndTranslationAction, AnisotropicDiffusion, AppendMeshes, BoxVOI, CannyEdgeDetection, CenterMesh, ChangeColor, ChangeLanguage, ChangeParent, CleanPolyData, ClearSelectionAction, CloseAction, CloseAllAction, ComputeCurvatures, ComputeNormals, ConnectedComponents, CreateSC, Decimation, Derivative, ExportAsMDL, ExtractEdges, ExtractSelection, ExtractSurface, FillWithPoints, FrameEditor, GaussianFilter, GenerateModel, GradientMagnitude, GradientMagnitudeRecursiveGaussian, GridTopology, ICPRegistration, ImageLutAction, ImageReconstructionAction, InitImagerAction, InvertMesh, Laplacian, LaplacianRecursiveGaussian, LaplacianSharpening, LoadTextureFromBMP, LoadTransformation, LoggerParameters, ManualThreshold, MeanFilter, MedianFilter, MergeMeshs, MeshClipping, MeshPicking, MeshProjection, MeshQuality, MeshToImageStencil, MorphologicalOperators, MultiPicking, OpenAction, OpenFile, OtsuFilter, PixelColorChanger, PMLExplorerAction, QuitAction, RegionGrowing, RemoveLastInstantiatedAction, RenderingOption, ReorientImage, ResampleAction, RigidTransform, SaveAction, SaveAllAction, SaveAsAction, SaveDisplacementFromTransformation, SelectLastInstantiatedAction, SetPathToTestData, Show3DViewer, ShowAllViewers, ShowArbitrarySliceIn3D, ShowArbitraryViewer, ShowAxialSliceIn3D, ShowAxialViewer, ShowCoronalSliceIn3D, ShowCoronalViewer, ShowFrame, ShowImageIn3D, ShowSagittalSliceIn3D, ShowSagittalViewer, SimulationDialog, SingleAcquisition2DAction, SingleAcquisition3DAction, SmoothFilter, SobelEdgeDetection, SphereTopology, StartImaging2DAction, StartImaging3DAction, StopImaging2DAction, StopImaging3DAction, ToggleConsoleAction, VolumeRenderingAction, and WarpOut.

+ Collaboration diagram for camitk::Action:

Public Types

enum  ApplyStatus {
  SUCCESS, ERROR, WARNING, ABORTED,
  TRIGGERED
}
 

Public Slots

virtual camitk::Action::ApplyStatus apply ()=0
 This method is called when the action has to be applied on the target list (get the target lists using getTargets()) It calls the algorithm of your action on the target list of components. More...
 
camitk::Action::ApplyStatus applyAndRegister ()
 This method is called whenever the action has to be applied on the target list (like the apply()) method AND registered within the application history of actions. More...
 
camitk::Action::ApplyStatus trigger (QWidget *parent=nullptr)
 This method triggers the action. More...
 

Public Member Functions

 Action (ActionExtension *)
 Default Constructor: the ActionExtension is needed. More...
 
 ~Action () override
 Destructor. More...
 
Generic action getters

These methods can not be redefined in subclasses.

virtual QAction * getQAction (Component *target=nullptr)
 Get the corresponding QAction. More...
 
QString getName () const
 get the name of the action More...
 
QString getDescription () const
 the description of the action More...
 
QString getComponent () const
 the name of the component class that can be used by this action More...
 
QString getFamily () const
 the name of the family in which this action is associated More...
 
QString getExtensionName () const
 the name of the extension in the family in which this action is associated More...
 
QStringList getTag () const
 the name of the tag called this action More...
 
bool getEmbedded () const
 argument use to know if the widget is embedded or not More...
 
Method specific to an action.
virtual QWidget * getWidget ()
 This method has to be redefined in your Action only if: More...
 
virtual QPixmap getIcon ()
 the icon to personalize the action (no icon by default) More...
 
const ComponentList getTargets () const
 the currently selected and valid (regarding the component property) components, for which this action is called More...
 
void updateTargets ()
 update the target list using the currently selected components More...
 
Property management

auto update properties

bool getAutoUpdateProperties () const
 
void setAutoUpdateProperties (bool)
 are the properties to be udpated every time the user makes a change in the widget (default is false)? More...
 
virtual Q_INVOKABLE camitk::PropertygetProperty (QString name)
 Get a Property given its name. More...
 
virtual bool addParameter (Property *)
 Add a new parameter to the action, using the CamiTK property class. More...
 
Frame management
void applyTargetPosition (Component *input, Component *target)
 Change the target frame according to the default frame policy regarding the input's one. More...
 
void applyTargetPosition (Component *input, Component *target, Application::TargetPositionningPolicy policy)
 Change the target frame according to a given frame policy regarding the input's one. More...
 

Static Public Member Functions

static QString getStatusAsString (ApplyStatus)
 

Private Attributes

bool autoUpdateProperties
 Should the properties/parameters of this action be automatically updated when the user change something in the GUI. More...
 
QString component
 the name of the component class that can be used by this action More...
 
QString description
 the descriptionof the action More...
 
ActionExtensionextension
 the extension in which this action is declared and registered More...
 
QString family
 the name of the family in which this action is associated More...
 
QPixmap icon
 the Action pixmap icon More...
 
bool isEmbedded
 is the widget embedded or not More...
 
QString name
 the name of the action More...
 
QMap< QString, Property * > parameterMap
 list of CamiTK property decorating the dynamic properties (action parameters) More...
 
QAction * qAction
 the corresponding QAction More...
 
QStringList tags
 the name of the tag called this action More...
 
ComponentList targetComponents
 The list of valid (regarding the component property) components for which this action is called. More...
 

Pipeline execuction of the Action

ComponentList aliveBeforeComponents
 In case of a pipeline application of the Action (i.e. More...
 
ComponentList outputComponents
 List returned by getOutputComponents() More...
 
ApplyStatus applyInPipeline ()
 This method encapsulates the apply() method. More...
 
void setInputComponents (ComponentList inputs)
 Specify the input Component(s) Only applyInPipeline() should be called with this method (maybe apply), but not trigger() as its first intruction is to clear the target components list !!! More...
 
void setInputComponent (Component *input)
 Specify the input Components in case of only one Component. More...
 
ComponentList getOutputComponents ()
 Returns the output Component(s) More...
 
ComponentgetOutputComponent ()
 Returns the output Components in case of only one Component. More...
 
void preProcessInPipeline ()
 Selects the right component(s) (the one that has been set by setInputComponents() ), so that the apply method uses the right component(s) through getTargets(). More...
 
void postProcessInPipeline ()
 Set the right output component list so that the method getOutputComponents() can be called. More...
 

Generic action attributes setters

These methods can not be redefined in subclasses but have to used to ensure name/description unicity among CamiTK.

QWidget * actionWidget
 the action widget More...
 
void setName (QString name)
 
void setDescription (QString description)
 the description of the action More...
 
void setComponent (QString component)
 the name of the component class that can be used by this action More...
 
void setFamily (QString family)
 the name of the family in which this action is associated More...
 
void addTag (QString tag)
 add a tag to the tags list of this action More...
 
void setEmbedded (bool isEmbedded)
 set the embedded property (an action is embedded by default, unless specified otherwise by explicitly calling this method with false) More...
 
void setIcon (QPixmap)
 set the Pixmap More...
 

Action history registration

HistoryItemitem
 
ComponentList topLevelSelectedComponents
 The list of top level selected components before running the action This list is used to deduce the number of top level components, modified through applying the action. More...
 
void preProcess ()
 Save the number of top level components loaded in memory before applying the action. More...
 
void postProcess ()
 Register the action in the history. More...
 

Detailed Description

Action class is an abstract class that enables you to build a action (generally on a component). At least two classes have to be reimplemented to enable the action: ActionExtension + Action.

This is the list of attributes you need to consider when creating a new action

  • extension : the ActionExtension class where to register your action;
  • name: name of the action;
  • description: tag used to describe the action (also used for tooltip and whatsThis of the corresponding QAction);
  • component: the name of the component class on which this action can be applied or "" (default) for generic actions;
  • family: families of actions allows one to group different actions of the same kind under one name;
  • tags: tags is a list of words used to define an action. These words can be used to find an action.
  • widget: a default widget (instance of ActionWidget) is build by default (see below if this is not what you need);
  • isEmbedded: this boolean defines if the gui widget is embedded in a given parent widget / action widget container (true by default)
  • icon: the icon used for the visually distinguish the action (used by the corresponding QAction)

An Action has a corresponding QAction, see getQAction(), that makes it easy to trigger an action from any Qt GUI (menus, toolbar, push buttons...)

If the component class is defined (non empty string), an Action is applied on the currently selected components. If there are no component defined (i.e. you specifies setComponent("")), it means that your action does not need any inputs.

Two steps have to be considered when using an action:

  • Step 1, trigger(): the action is either directly applied (if it does not have any GUI) or it's GUI is shown (using getWidget())
  • Step 2, apply(): only the action algorithm is applied, i.e., the data are processed

The targets can have changed between the time the action is first triggered and the time the action is applied. getWidget() is always called when the targets are updated. Therefore whenever getWidget() is called, you should make sure to update the the action GUI consequently. getTargets() is always updated in trigger() and available.

Note
trigger() and apply() are public slots. They can be called either directly (classic C++ method invocation) or by connecting them to a QWidget signal.

When an action is triggered (e.g., by right clicking in the context menu), the following algorithm applies, see trigger():

  • 1. Prepare targetComponents (available with getTargets()): only select the compatible components from the selected components
  • 2. If the action is embedded, get the widget and show it in a parent/container (if parent is not specified, show it in the action viewer)
  • 3. If the action in not embedded, show it as a dialog
  • 4. If the action does not have any widget, directly call apply()

This means that, if there is a widget, the action algorithm is controlled by the action widget, i.e. apply() is not called by trigger() but should be called by one of the action widget's button.

An Action generally is used to wrap an algorithm in CamiTK. If this algorithm has parameters, it is very easy to get these parameters accessible to the user through the ActionWidget. These parameters are in fact defined as Qt dynamic properties.

By default an action has a widget, instance of ActionWidget. If ActionWidget does not correspond to what you need, just create a new class inheriting from QWidget, or even better, inheriting from ActionWidget.

These are the use cases for using the default behaviour (i.e. an instance of ActionWidget):

  • your action has some parameters and you need the user to review the default or modify their values before the action is applied,
  • or your action has no parameters but you still want the user to be applied only if/when the user click on an apply button.

ActionWidget should be good enough in most of the cases. The default widget contains a description, a reminder of the current target component names, and an applyable/revertable ObjectController that allows you to edit/modify properties.

Note
The recommanded architecture is for the action widget to call the action's apply method. The widget should only manage user interaction.

Here are some notes about the rest of the properties:

extensionName is automatically given during the action registration in the ActionExtension.

The component property determines on which type of component your action can be applied. Generic actions are action that have an empty component name. Therefore generic actions can be called to generate/synthetize data or initialize resources.

You can add any number of tags using the method addTag().

If ActionWidget is not what your need, a typical getWidget() method should use the lazy instantiation pattern to instantiate MyVerySpecialActionWidget the first time it is called, and call the MyVerySpecialActionWidget instance's updateTargets() method for any subsequent calls. Something like:

QWidget *MyAction::getWidget() {
// build or update the widget
if (!myWidget)
myWidget = new MyVerySpecialActionWidget(this);
else
// MyVerySpecialActionWidget should have an update() method
myWidget->update();
return myWidget;
}

But of course you can also use any kind of widget you like. ActionWidget is just defining a default widget for an action. If your action does not have any GUI/parameters, just the getWidget() method in order to return nullptr.

By default the properties/parameters are not automatically updated when the user change the default widget, they are updated only when the user click on the apply button of the default widget. Use setAutoUpdateProperties(true) to automatically update the action's properties.

Note
if your action needs to react immediately to a change of value in one of its dynamic properties, you need to the virtual bool event(QEvent* e) method. For instance:
// ---------------------- event ----------------------------
bool MyAction::event(QEvent * e) {
if (e->type() == QEvent::DynamicPropertyChange) {
e->accept();
QDynamicPropertyChangeEvent *changeEvent = dynamic_cast<QDynamicPropertyChangeEvent *>(e);*
if (!changeEvent)
return false;
// do something depending of the property that has changed
CAMITK_INFO(tr("[%1] changed to [%2]").arg(changeEvent->propertyName(),property(changeEvent->propertyName()).toString()))
return true;
}
// this is important to continue the process if the event is a different one
return QObject::event(e);
}
if you use your own MyVerySpecialActionWidget class, make sure it conforms to this behaviour (you can get the desired behaviour by calling getAutoUpdateProperty()

By default the action's widget is embedded. If you do not want to embed your action's widget, use setEmbedded(false) in the constructor. When embedded, the parent widget has to be given at triggered time. If there is no parent given for an embedded action, then the action is embedded in the ActionViewer by default.

The method apply() must be implemented in your Action.

Note
at any moment, the selected components on which the action needs to be applied are available by getTargets(). targetComponents is filtered so that it only contains compatible components (i.e., instances of getComponent()).
About registering your action in the history of the application. Consider registering your action within the application's history once applied. The history of action features a stack of processed action. The application's history of actions allows one to export the saved actions as an XML file for scripting or replaying it. To do so, implement the apply() method in your code, then launch the method applyAndRegister(), which simply wraps the apply() method with the preProcess() and postProcess() methods. You may also connect a SIGNAL to it, as the applyAndRegister() method is a Qt SLOT.
About creating a pipeline of actions A pipeline of actions is a state machine where each state stands for an action with inputs and output components. The transitions between the states are done by processing the state's action (i.e. by calling the corresponding action's apply() method). Interpreting an pipeline of action is simpler than simply executing the action since the user doesn't need to manually set the inputs and outputs of each action (it is done automatically). If you are willing to write such a pipeline, simply implements the apply() method of each of your action and called the applyInPipeline() (instead of simply apply()). The method applyInPipeline() performs some pre- and post-processing around the method apply(). It has to be used within a pipeline (a chain of actions) where setInputComponents() and getOutputComponents() are needed. preProcessInPipeline() only selects the right components, and postProcess() sets output components and record history.
See also
RenderingOption For a simple example of an embedded action
RigidTransform For a simple example of a non-embedded action
ChangeColor For a simple example of an action with no widget (but with a GUI)

Member Enumeration Documentation

◆ ApplyStatus

describes what happened during the application of an algorithm (i.e. results of the apply method)

Enumerator
SUCCESS 

everything went according to plan

ERROR 

apply() failed : an error occured (usually it means that the apply() was interrupted)

WARNING 

some (partial) error occured during the application of the algorithm

ABORTED 

the action was aborted before completion

TRIGGERED 

the action was triggered only, but not applied

Constructor & Destructor Documentation

◆ Action()

camitk::Action::Action ( ActionExtension extension)

Default Constructor: the ActionExtension is needed.

◆ ~Action()

camitk::Action::~Action ( )
override

Destructor.

Member Function Documentation

◆ addParameter()

bool camitk::Action::addParameter ( Property prop)
virtual

Add a new parameter to the action, using the CamiTK property class.

If the parameter already exist, it will just change its value.

Note
The action takes ownership of the Property instance.
Returns
false if the Qt Meta Object property was added by this method (otherwise the property was already defined and true is returned if it was successfully updated)

Referenced by AnglesAndTranslationAction::AnglesAndTranslationAction(), AnisotropicDiffusion::AnisotropicDiffusion(), AppendMeshes::AppendMeshes(), CannyEdgeDetection::CannyEdgeDetection(), ChangeParent::ChangeParent(), CleanPolyData::CleanPolyData(), ComputeCurvatures::ComputeCurvatures(), ConnectedComponents::ConnectedComponents(), Decimation::Decimation(), Derivative::Derivative(), FillWithPoints::FillWithPoints(), GaussianFilter::GaussianFilter(), GenerateModel::GenerateModel(), GradientMagnitudeRecursiveGaussian::GradientMagnitudeRecursiveGaussian(), ICPRegistration::ICPRegistration(), ImageReconstructionAction::ImageReconstructionAction(), Laplacian::Laplacian(), LaplacianRecursiveGaussian::LaplacianRecursiveGaussian(), ManualThreshold::ManualThreshold(), MeanFilter::MeanFilter(), MedianFilter::MedianFilter(), MergeMeshs::MergeMeshs(), MeshProjection::MeshProjection(), MeshToImageStencil::MeshToImageStencil(), MorphologicalOperators::MorphologicalOperators(), OpenFile::OpenFile(), OtsuFilter::OtsuFilter(), PixelColorChanger::PixelColorChanger(), RenderingOption::RenderingOption(), ReorientImage::ReorientImage(), ResampleAction::ResampleAction(), ShowFrame::ShowFrame(), SmoothFilter::SmoothFilter(), SobelEdgeDetection::SobelEdgeDetection(), SphereTopology::SphereTopology(), and WarpOut::WarpOut().

+ Here is the caller graph for this function:

◆ addTag()

void camitk::Action::addTag ( QString  tag)
protected

add a tag to the tags list of this action

References targetComponents.

Referenced by AboutAction::AboutAction(), AnglesAndTranslationAction::AnglesAndTranslationAction(), AnisotropicDiffusion::AnisotropicDiffusion(), BoxVOI::BoxVOI(), CannyEdgeDetection::CannyEdgeDetection(), CenterMesh::CenterMesh(), ChangeColor::ChangeColor(), ChangeLanguage::ChangeLanguage(), ChangeParent::ChangeParent(), CleanPolyData::CleanPolyData(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), ComputeCurvatures::ComputeCurvatures(), ComputeNormals::ComputeNormals(), ConnectedComponents::ConnectedComponents(), CreateSC::CreateSC(), Decimation::Decimation(), Derivative::Derivative(), ExtractEdges::ExtractEdges(), ExtractSelection::ExtractSelection(), ExtractSurface::ExtractSurface(), FillWithPoints::FillWithPoints(), FrameEditor::FrameEditor(), GaussianFilter::GaussianFilter(), GenerateModel::GenerateModel(), GradientMagnitude::GradientMagnitude(), GradientMagnitudeRecursiveGaussian::GradientMagnitudeRecursiveGaussian(), GridTopology::GridTopology(), ICPRegistration::ICPRegistration(), ImageLutAction::ImageLutAction(), ImageReconstructionAction::ImageReconstructionAction(), InvertMesh::InvertMesh(), Laplacian::Laplacian(), LaplacianRecursiveGaussian::LaplacianRecursiveGaussian(), LaplacianSharpening::LaplacianSharpening(), LoggerParameters::LoggerParameters(), ManualThreshold::ManualThreshold(), MeanFilter::MeanFilter(), MedianFilter::MedianFilter(), MergeMeshs::MergeMeshs(), MeshClipping::MeshClipping(), MeshPicking::MeshPicking(), MeshProjection::MeshProjection(), MeshQuality::MeshQuality(), MeshToImageStencil::MeshToImageStencil(), MorphologicalOperators::MorphologicalOperators(), MultiPicking::MultiPicking(), OpenAction::OpenAction(), OpenFile::OpenFile(), OtsuFilter::OtsuFilter(), PixelColorChanger::PixelColorChanger(), PMLExplorerAction::PMLExplorerAction(), QuitAction::QuitAction(), RegionGrowing::RegionGrowing(), RemoveLastInstantiatedAction::RemoveLastInstantiatedAction(), RenderingOption::RenderingOption(), ReorientImage::ReorientImage(), RigidTransform::RigidTransform(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), SelectLastInstantiatedAction::SelectLastInstantiatedAction(), SetPathToTestData::SetPathToTestData(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitrarySliceIn3D::ShowArbitrarySliceIn3D(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialSliceIn3D::ShowAxialSliceIn3D(), ShowAxialViewer::ShowAxialViewer(), ShowCoronalSliceIn3D::ShowCoronalSliceIn3D(), ShowCoronalViewer::ShowCoronalViewer(), ShowFrame::ShowFrame(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalSliceIn3D::ShowSagittalSliceIn3D(), ShowSagittalViewer::ShowSagittalViewer(), SmoothFilter::SmoothFilter(), SobelEdgeDetection::SobelEdgeDetection(), SphereTopology::SphereTopology(), ToggleConsoleAction::ToggleConsoleAction(), and WarpOut::WarpOut().

◆ apply

virtual camitk::Action::ApplyStatus camitk::Action::apply ( )
pure virtualslot

This method is called when the action has to be applied on the target list (get the target lists using getTargets()) It calls the algorithm of your action on the target list of components.

Note
it should never be empty!
if you wish to call your action and register it within the application history, prefer using the
See also
Action::applyAndRegister() method
Returns
The status of the apply method.

Referenced by PlaneWidget::Execute(), and main().

+ Here is the caller graph for this function:

◆ applyAndRegister

Action::ApplyStatus camitk::Action::applyAndRegister ( )
slot

This method is called whenever the action has to be applied on the target list (like the apply()) method AND registered within the application history of actions.

Note
This is the default behaviour of applying and action. The application's history of actions allows one to export the saved actions as an XML file for scripting or replaying it.
Returns
The status of the apply method.

Referenced by ImpMainWindow::openRecentDocuments().

+ Here is the caller graph for this function:

◆ applyInPipeline()

Action::ApplyStatus camitk::Action::applyInPipeline ( )

This method encapsulates the apply() method.

It has to be called within a pipeline (a chain of actions), where a script or another programm calls setInputComponents() and/or getOutputComponents. It is not needed in the case of graphical interface which trigger the Action's widget and applies the action on selected components. When there is no GUI, preProcessInPipeline() and postProcessInPipeline() methods select the right component(s). As the method apply() is called between preProcessInPipeline() and postProcessInPipeline(), the returned value is the returned value of apply().

References camitk::Component::isInstanceOf(), and targetComponents.

Referenced by SaveActionState::applyAction(), and ActionState::applyAction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyTargetPosition() [1/2]

void camitk::Action::applyTargetPosition ( Component input,
Component target 
)

Change the target frame according to the default frame policy regarding the input's one.

Parameters
inputThe component refering to for the computation of the frame.
targetThe component on which we apply the frame policy.

Referenced by setAutoUpdateProperties().

+ Here is the caller graph for this function:

◆ applyTargetPosition() [2/2]

void camitk::Action::applyTargetPosition ( Component input,
Component target,
Application::TargetPositionningPolicy  policy 
)

Change the target frame according to a given frame policy regarding the input's one.

Parameters
inputThe component refering to for the computation of the frame.
targetThe component on which we apply the frame policy.
policyThe frame policy to use on the target.

◆ getAutoUpdateProperties()

bool camitk::Action::getAutoUpdateProperties ( ) const

◆ getComponent()

QString camitk::Action::getComponent ( ) const
inline

the name of the component class that can be used by this action

Referenced by camitk::Application::getActions().

+ Here is the caller graph for this function:

◆ getDescription()

QString camitk::Action::getDescription ( ) const
inline

the description of the action

Referenced by camitk::Application::registerAllActions(), and camitk::Application::saveHistoryAsSXML().

+ Here is the caller graph for this function:

◆ getEmbedded()

bool camitk::Action::getEmbedded ( ) const
inline

argument use to know if the widget is embedded or not

Referenced by main(), and ActionViewer::updateActionWidget().

+ Here is the caller graph for this function:

◆ getExtensionName()

QString camitk::Action::getExtensionName ( ) const

the name of the extension in the family in which this action is associated

Referenced by camitk::Application::registerAllActions().

+ Here is the caller graph for this function:

◆ getFamily()

QString camitk::Action::getFamily ( ) const
inline

the name of the family in which this action is associated

Referenced by camitk::Application::registerAllActions(), ActionViewer::updateActionWidget(), and ActionViewer::updateSearchPanel().

+ Here is the caller graph for this function:

◆ getIcon()

QPixmap camitk::Action::getIcon ( )
virtual

the icon to personalize the action (no icon by default)

References actionWidget.

◆ getName()

◆ getOutputComponent()

Component * camitk::Action::getOutputComponent ( )

Returns the output Components in case of only one Component.

References camitk::Component::isSelected(), and topLevelSelectedComponents.

+ Here is the call graph for this function:

◆ getOutputComponents()

ComponentList camitk::Action::getOutputComponents ( )

Returns the output Component(s)

Referenced by ActionState::applyAction().

+ Here is the caller graph for this function:

◆ getProperty()

Property * camitk::Action::getProperty ( QString  name)
virtual

Get a Property given its name.

Parameters
namethe property name
Returns
nullptr if the name does not match any property name
See also
Property

References camitk::Application::NO_TRANSFORMATION, camitk::policy(), and camitk::Component::setParentFrame().

Referenced by ManualThreshold::getWidget(), ResampleAction::getWidget(), MeshProjection::getWidget(), and ChangeParent::updateComboBox().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQAction()

QAction * camitk::Action::getQAction ( Component target = nullptr)
virtual

Get the corresponding QAction.

The corresponding QAction has its triggered() signal connected to the trigger() slot of the action. It shares the action icon (as the QAction's icon) and name (as the QAction's text). It also use the descriptions of the action for the tooltip/whatsThis text.

To add a shortcut, simply call getQAction()->setShortcut(..) in the action constructor. To make this shortcut available for any windows of the application, call getQAction()->setShortcutContext(Qt::ApplicationShortcut);

Override this method if your action can be toggled on/off (for instance an action that modifies the visibility of a component). This method is called in the Component class to build the component's action menu.

Reimplemented in VolumeRenderingAction, ShowArbitrarySliceIn3D, ShowAxialSliceIn3D, ShowCoronalSliceIn3D, ShowSagittalSliceIn3D, ShowFrame, and ShowImageIn3D.

Referenced by ToggleConsoleAction::apply(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), camitk::Component::getActionMenu(), ToggleConsoleAction::getWidget(), OpenAction::OpenAction(), OpenFile::OpenFile(), QuitAction::QuitAction(), SaveAction::SaveAction(), SaveAsAction::SaveAsAction(), MMLComponent::setSelected(), PMLComponent::setSelected(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialViewer::ShowAxialViewer(), ShowCoronalViewer::ShowCoronalViewer(), ShowSagittalViewer::ShowSagittalViewer(), ToggleConsoleAction::ToggleConsoleAction(), and ImpMainWindow::updateActionStates().

+ Here is the caller graph for this function:

◆ getStatusAsString()

QString camitk::Action::getStatusAsString ( ApplyStatus  status)
static
Returns
the QString equivalement of the given status

◆ getTag()

QStringList camitk::Action::getTag ( ) const
inline

the name of the tag called this action

Referenced by camitk::Application::getActions(), and ActionViewer::updateSearchPanel().

+ Here is the caller graph for this function:

◆ getTargets()

const ComponentList camitk::Action::getTargets ( ) const

the currently selected and valid (regarding the component property) components, for which this action is called

Referenced by SaveDisplacementFromTransformation::apply(), Decimation::apply(), CreateSC::apply(), ReorientImage::apply(), GenerateModel::apply(), OtsuFilter::apply(), RigidTransform::apply(), ComputeNormals::apply(), LoadTransformation::apply(), ExtractSelection::apply(), CleanPolyData::apply(), LoadTextureFromBMP::apply(), ExtractEdges::apply(), FillWithPoints::apply(), PixelColorChanger::apply(), ExportAsMDL::apply(), ExtractSurface::apply(), ComputeCurvatures::apply(), InvertMesh::apply(), SaveAction::apply(), SmoothFilter::apply(), WarpOut::apply(), AppendMeshes::apply(), CloseAction::apply(), SingleAcquisition3DAction::apply(), InitImagerAction::apply(), ImageReconstructionAction::apply(), ShowImageIn3D::apply(), SingleAcquisition2DAction::apply(), StartImaging2DAction::apply(), StartImaging3DAction::apply(), StopImaging2DAction::apply(), MeshToImageStencil::apply(), StopImaging3DAction::apply(), RenderingOption::apply(), RegionGrowing::apply(), ShowAxialSliceIn3D::apply(), ShowCoronalSliceIn3D::apply(), ShowSagittalSliceIn3D::apply(), MeanFilter::apply(), GradientMagnitudeRecursiveGaussian::apply(), LaplacianRecursiveGaussian::apply(), LaplacianSharpening::apply(), ChangeColor::apply(), MeshPicking::apply(), ManualThreshold::apply(), CannyEdgeDetection::apply(), GradientMagnitude::apply(), CenterMesh::apply(), Laplacian::apply(), MedianFilter::apply(), SobelEdgeDetection::apply(), BoxVOI::apply(), ConnectedComponents::apply(), ShowArbitrarySliceIn3D::apply(), GaussianFilter::apply(), AnisotropicDiffusion::apply(), MergeMeshs::apply(), Derivative::apply(), MeshQuality::apply(), ResampleAction::apply(), ICPRegistration::apply(), MorphologicalOperators::apply(), RigidTransform::close(), MeshQuality::computeMeasure(), CreateSC::event(), SimulationDialog::getWidget(), PMLExplorerAction::getWidget(), CreateSC::getWidget(), MultiPicking::getWidget(), RigidTransform::getWidget(), ChangeParent::getWidget(), ShowFrame::getWidget(), ShowImageIn3D::getWidget(), ImageLutAction::getWidget(), RegionGrowing::getWidget(), FrameEditor::getWidget(), ManualThreshold::getWidget(), RenderingOption::getWidget(), BoxVOI::getWidget(), AnglesAndTranslationAction::getWidget(), ResampleAction::getWidget(), MeshProjection::getWidget(), VolumeRenderingAction::getWidget(), and MeshQuality::updateMeshColor().

◆ getWidget()

QWidget * camitk::Action::getWidget ( )
virtual

This method has to be redefined in your Action only if:

  • you do not have any widget to control your action (i.e. getWidget() will have to return nullptr),
  • you do not use the default ActionWidget but another one.

In the second case, it is strongly recommanded to have a code similar to this:

QWidget *MyAction::getWidget() {
// build or update the widget
if (!myWidget)
myWidget = new MyVerySpecialActionWidget(this);
else
// MyVerySpecialActionWidget should have an update() method
myWidget->update();
return myWidget;
}

The update() method in MyVerySpecialActionWidget is used in case the selection has changed since the last time the widget was shown (a change in the selection often means the targets or the parameter values have changed, the UI should be refreshed as well).

Reimplemented in MeshQuality, ShowArbitrarySliceIn3D, CenterMesh, ShowAxialSliceIn3D, ShowCoronalSliceIn3D, ShowSagittalSliceIn3D, ShowImageIn3D, ShowFrame, LoadTransformation, RigidTransform, MeshClipping, MeshProjection, ResampleAction, AnglesAndTranslationAction, MeshPicking, SelectLastInstantiatedAction, BoxVOI, ConnectedComponents, ChangeColor, RenderingOption, RemoveLastInstantiatedAction, ManualThreshold, SetPathToTestData, CloseAction, CloseAllAction, OpenAction, LoggerParameters, FrameEditor, SaveAction, SaveAllAction, SaveAsAction, ToggleConsoleAction, RegionGrowing, ClearSelectionAction, QuitAction, AboutAction, ImageLutAction, Show3DViewer, ShowAllViewers, ShowArbitraryViewer, ShowAxialViewer, ShowCoronalViewer, ShowSagittalViewer, ExportAsMDL, ChangeParent, PixelColorChanger, LoadTextureFromBMP, OtsuFilter, GenerateModel, ReorientImage, MultiPicking, CreateSC, OpenFile, ChangeLanguage, PMLExplorerAction, and SaveDisplacementFromTransformation.

Referenced by ActionState::onEntry(), and ActionViewer::updateActionWidget().

+ Here is the caller graph for this function:

◆ postProcess()

void camitk::Action::postProcess ( )
private

Register the action in the history.

The history item registered features the input and output components, which are deduced with the preProcess() and postProcess() functions.

◆ postProcessInPipeline()

void camitk::Action::postProcessInPipeline ( )
private

Set the right output component list so that the method getOutputComponents() can be called.

Also, register the action in the history.

◆ preProcess()

void camitk::Action::preProcess ( )
private

Save the number of top level components loaded in memory before applying the action.

This allows one to deduce the number of created / deleted components lauching the action.

References aliveBeforeComponents, and camitk::Application::getAllComponents().

+ Here is the call graph for this function:

◆ preProcessInPipeline()

void camitk::Action::preProcessInPipeline ( )
private

Selects the right component(s) (the one that has been set by setInputComponents() ), so that the apply method uses the right component(s) through getTargets().

If setInputComponents where not called, does not select any component.

References camitk::HistoryItem::addProperty(), and item.

+ Here is the call graph for this function:

◆ setAutoUpdateProperties()

void camitk::Action::setAutoUpdateProperties ( bool  autoUpdateProperties)

are the properties to be udpated every time the user makes a change in the widget (default is false)?

References applyTargetPosition(), camitk::Application::getPropertyObject(), camitk::PropertyObject::getPropertyValue(), and camitk::Application::SAME_TRANSFORMATION.

Referenced by AnglesAndTranslationAction::AnglesAndTranslationAction(), CreateSC::CreateSC(), MeshProjection::MeshProjection(), PixelColorChanger::PixelColorChanger(), ActionState::setAction(), and ShowFrame::ShowFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setComponent()

void camitk::Action::setComponent ( QString  component)
protected

the name of the component class that can be used by this action

References extension, and camitk::ActionExtension::getName().

Referenced by AboutAction::AboutAction(), AnglesAndTranslationAction::AnglesAndTranslationAction(), AnisotropicDiffusion::AnisotropicDiffusion(), AppendMeshes::AppendMeshes(), BoxVOI::BoxVOI(), CannyEdgeDetection::CannyEdgeDetection(), CenterMesh::CenterMesh(), ChangeColor::ChangeColor(), ChangeLanguage::ChangeLanguage(), ChangeParent::ChangeParent(), CleanPolyData::CleanPolyData(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), ComputeCurvatures::ComputeCurvatures(), ComputeNormals::ComputeNormals(), ConnectedComponents::ConnectedComponents(), CreateSC::CreateSC(), Decimation::Decimation(), Derivative::Derivative(), ExportAsMDL::ExportAsMDL(), ExtractEdges::ExtractEdges(), ExtractSelection::ExtractSelection(), ExtractSurface::ExtractSurface(), FillWithPoints::FillWithPoints(), FrameEditor::FrameEditor(), GaussianFilter::GaussianFilter(), GenerateModel::GenerateModel(), GradientMagnitude::GradientMagnitude(), GradientMagnitudeRecursiveGaussian::GradientMagnitudeRecursiveGaussian(), GridTopology::GridTopology(), ICPRegistration::ICPRegistration(), ImageLutAction::ImageLutAction(), ImageReconstructionAction::ImageReconstructionAction(), InitImagerAction::InitImagerAction(), InvertMesh::InvertMesh(), Laplacian::Laplacian(), LaplacianRecursiveGaussian::LaplacianRecursiveGaussian(), LaplacianSharpening::LaplacianSharpening(), LoadTextureFromBMP::LoadTextureFromBMP(), LoadTransformation::LoadTransformation(), LoggerParameters::LoggerParameters(), ManualThreshold::ManualThreshold(), MeanFilter::MeanFilter(), MedianFilter::MedianFilter(), MergeMeshs::MergeMeshs(), MeshClipping::MeshClipping(), MeshPicking::MeshPicking(), MeshProjection::MeshProjection(), MeshQuality::MeshQuality(), MeshToImageStencil::MeshToImageStencil(), MorphologicalOperators::MorphologicalOperators(), MultiPicking::MultiPicking(), OpenAction::OpenAction(), OpenFile::OpenFile(), OtsuFilter::OtsuFilter(), PixelColorChanger::PixelColorChanger(), PMLExplorerAction::PMLExplorerAction(), QuitAction::QuitAction(), RegionGrowing::RegionGrowing(), RemoveLastInstantiatedAction::RemoveLastInstantiatedAction(), RenderingOption::RenderingOption(), ReorientImage::ReorientImage(), ResampleAction::ResampleAction(), RigidTransform::RigidTransform(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), SaveDisplacementFromTransformation::SaveDisplacementFromTransformation(), SelectLastInstantiatedAction::SelectLastInstantiatedAction(), SetPathToTestData::SetPathToTestData(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitrarySliceIn3D::ShowArbitrarySliceIn3D(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialSliceIn3D::ShowAxialSliceIn3D(), ShowAxialViewer::ShowAxialViewer(), ShowCoronalSliceIn3D::ShowCoronalSliceIn3D(), ShowCoronalViewer::ShowCoronalViewer(), ShowFrame::ShowFrame(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalSliceIn3D::ShowSagittalSliceIn3D(), ShowSagittalViewer::ShowSagittalViewer(), SimulationDialog::SimulationDialog(), SingleAcquisition2DAction::SingleAcquisition2DAction(), SingleAcquisition3DAction::SingleAcquisition3DAction(), SmoothFilter::SmoothFilter(), SobelEdgeDetection::SobelEdgeDetection(), SphereTopology::SphereTopology(), StartImaging2DAction::StartImaging2DAction(), StartImaging3DAction::StartImaging3DAction(), StopImaging2DAction::StopImaging2DAction(), StopImaging3DAction::StopImaging3DAction(), ToggleConsoleAction::ToggleConsoleAction(), and WarpOut::WarpOut().

+ Here is the call graph for this function:

◆ setDescription()

void camitk::Action::setDescription ( QString  description)
protected

the description of the action

References icon.

Referenced by AboutAction::AboutAction(), AnglesAndTranslationAction::AnglesAndTranslationAction(), AnisotropicDiffusion::AnisotropicDiffusion(), AppendMeshes::AppendMeshes(), BoxVOI::BoxVOI(), CannyEdgeDetection::CannyEdgeDetection(), CenterMesh::CenterMesh(), ChangeColor::ChangeColor(), ChangeLanguage::ChangeLanguage(), ChangeParent::ChangeParent(), CleanPolyData::CleanPolyData(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), ComputeCurvatures::ComputeCurvatures(), ComputeNormals::ComputeNormals(), ConnectedComponents::ConnectedComponents(), CreateSC::CreateSC(), Decimation::Decimation(), Derivative::Derivative(), ExportAsMDL::ExportAsMDL(), ExtractEdges::ExtractEdges(), ExtractSelection::ExtractSelection(), ExtractSurface::ExtractSurface(), FillWithPoints::FillWithPoints(), FrameEditor::FrameEditor(), GaussianFilter::GaussianFilter(), GenerateModel::GenerateModel(), GradientMagnitude::GradientMagnitude(), GradientMagnitudeRecursiveGaussian::GradientMagnitudeRecursiveGaussian(), GridTopology::GridTopology(), ICPRegistration::ICPRegistration(), ImageLutAction::ImageLutAction(), ImageReconstructionAction::ImageReconstructionAction(), InitImagerAction::InitImagerAction(), InvertMesh::InvertMesh(), Laplacian::Laplacian(), LaplacianRecursiveGaussian::LaplacianRecursiveGaussian(), LaplacianSharpening::LaplacianSharpening(), LoadTextureFromBMP::LoadTextureFromBMP(), LoadTransformation::LoadTransformation(), LoggerParameters::LoggerParameters(), ManualThreshold::ManualThreshold(), MeanFilter::MeanFilter(), MedianFilter::MedianFilter(), MergeMeshs::MergeMeshs(), MeshClipping::MeshClipping(), MeshPicking::MeshPicking(), MeshProjection::MeshProjection(), MeshQuality::MeshQuality(), MeshToImageStencil::MeshToImageStencil(), MorphologicalOperators::MorphologicalOperators(), MultiPicking::MultiPicking(), OpenAction::OpenAction(), OpenFile::OpenFile(), OtsuFilter::OtsuFilter(), PixelColorChanger::PixelColorChanger(), PMLExplorerAction::PMLExplorerAction(), QuitAction::QuitAction(), RegionGrowing::RegionGrowing(), RemoveLastInstantiatedAction::RemoveLastInstantiatedAction(), RenderingOption::RenderingOption(), ReorientImage::ReorientImage(), ResampleAction::ResampleAction(), RigidTransform::RigidTransform(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), SaveDisplacementFromTransformation::SaveDisplacementFromTransformation(), SelectLastInstantiatedAction::SelectLastInstantiatedAction(), SetPathToTestData::SetPathToTestData(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitrarySliceIn3D::ShowArbitrarySliceIn3D(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialSliceIn3D::ShowAxialSliceIn3D(), ShowAxialViewer::ShowAxialViewer(), ShowCoronalSliceIn3D::ShowCoronalSliceIn3D(), ShowCoronalViewer::ShowCoronalViewer(), ShowFrame::ShowFrame(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalSliceIn3D::ShowSagittalSliceIn3D(), ShowSagittalViewer::ShowSagittalViewer(), SimulationDialog::SimulationDialog(), SingleAcquisition2DAction::SingleAcquisition2DAction(), SingleAcquisition3DAction::SingleAcquisition3DAction(), SmoothFilter::SmoothFilter(), SobelEdgeDetection::SobelEdgeDetection(), SphereTopology::SphereTopology(), StartImaging2DAction::StartImaging2DAction(), StartImaging3DAction::StartImaging3DAction(), StopImaging2DAction::StopImaging2DAction(), StopImaging3DAction::StopImaging3DAction(), ToggleConsoleAction::ToggleConsoleAction(), and WarpOut::WarpOut().

◆ setEmbedded()

void camitk::Action::setEmbedded ( bool  isEmbedded)
protected

◆ setFamily()

void camitk::Action::setFamily ( QString  family)
protected

the name of the family in which this action is associated

References icon.

Referenced by AboutAction::AboutAction(), AnglesAndTranslationAction::AnglesAndTranslationAction(), AnisotropicDiffusion::AnisotropicDiffusion(), AppendMeshes::AppendMeshes(), BoxVOI::BoxVOI(), CannyEdgeDetection::CannyEdgeDetection(), CenterMesh::CenterMesh(), ChangeColor::ChangeColor(), ChangeLanguage::ChangeLanguage(), ChangeParent::ChangeParent(), CleanPolyData::CleanPolyData(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), ComputeCurvatures::ComputeCurvatures(), ComputeNormals::ComputeNormals(), ConnectedComponents::ConnectedComponents(), CreateSC::CreateSC(), Decimation::Decimation(), Derivative::Derivative(), ExportAsMDL::ExportAsMDL(), ExtractEdges::ExtractEdges(), ExtractSelection::ExtractSelection(), ExtractSurface::ExtractSurface(), FillWithPoints::FillWithPoints(), FrameEditor::FrameEditor(), GaussianFilter::GaussianFilter(), GenerateModel::GenerateModel(), GradientMagnitude::GradientMagnitude(), GradientMagnitudeRecursiveGaussian::GradientMagnitudeRecursiveGaussian(), GridTopology::GridTopology(), ICPRegistration::ICPRegistration(), ImageLutAction::ImageLutAction(), ImageReconstructionAction::ImageReconstructionAction(), InitImagerAction::InitImagerAction(), InvertMesh::InvertMesh(), Laplacian::Laplacian(), LaplacianRecursiveGaussian::LaplacianRecursiveGaussian(), LaplacianSharpening::LaplacianSharpening(), LoadTextureFromBMP::LoadTextureFromBMP(), LoadTransformation::LoadTransformation(), LoggerParameters::LoggerParameters(), ManualThreshold::ManualThreshold(), MeanFilter::MeanFilter(), MedianFilter::MedianFilter(), MergeMeshs::MergeMeshs(), MeshClipping::MeshClipping(), MeshPicking::MeshPicking(), MeshProjection::MeshProjection(), MeshQuality::MeshQuality(), MeshToImageStencil::MeshToImageStencil(), MorphologicalOperators::MorphologicalOperators(), MultiPicking::MultiPicking(), OpenAction::OpenAction(), OpenFile::OpenFile(), OtsuFilter::OtsuFilter(), PixelColorChanger::PixelColorChanger(), PMLExplorerAction::PMLExplorerAction(), QuitAction::QuitAction(), RegionGrowing::RegionGrowing(), RemoveLastInstantiatedAction::RemoveLastInstantiatedAction(), RenderingOption::RenderingOption(), ReorientImage::ReorientImage(), ResampleAction::ResampleAction(), RigidTransform::RigidTransform(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), SaveDisplacementFromTransformation::SaveDisplacementFromTransformation(), SelectLastInstantiatedAction::SelectLastInstantiatedAction(), SetPathToTestData::SetPathToTestData(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitrarySliceIn3D::ShowArbitrarySliceIn3D(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialSliceIn3D::ShowAxialSliceIn3D(), ShowAxialViewer::ShowAxialViewer(), ShowCoronalSliceIn3D::ShowCoronalSliceIn3D(), ShowCoronalViewer::ShowCoronalViewer(), ShowFrame::ShowFrame(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalSliceIn3D::ShowSagittalSliceIn3D(), ShowSagittalViewer::ShowSagittalViewer(), SimulationDialog::SimulationDialog(), SingleAcquisition2DAction::SingleAcquisition2DAction(), SingleAcquisition3DAction::SingleAcquisition3DAction(), SmoothFilter::SmoothFilter(), SobelEdgeDetection::SobelEdgeDetection(), SphereTopology::SphereTopology(), StartImaging2DAction::StartImaging2DAction(), StartImaging3DAction::StartImaging3DAction(), StopImaging2DAction::StopImaging2DAction(), StopImaging3DAction::StopImaging3DAction(), ToggleConsoleAction::ToggleConsoleAction(), and WarpOut::WarpOut().

◆ setIcon()

void camitk::Action::setIcon ( QPixmap  icon)
protected

◆ setInputComponent()

void camitk::Action::setInputComponent ( Component input)

Specify the input Components in case of only one Component.

Referenced by main().

+ Here is the caller graph for this function:

◆ setInputComponents()

void camitk::Action::setInputComponents ( ComponentList  inputs)

Specify the input Component(s) Only applyInPipeline() should be called with this method (maybe apply), but not trigger() as its first intruction is to clear the target components list !!!

References outputComponents.

Referenced by SaveActionState::applyAction(), and ActionState::onEntry().

+ Here is the caller graph for this function:

◆ setName()

void camitk::Action::setName ( QString  name)
protected

set the name of the action class

Referenced by AboutAction::AboutAction(), AnglesAndTranslationAction::AnglesAndTranslationAction(), AnisotropicDiffusion::AnisotropicDiffusion(), AppendMeshes::AppendMeshes(), BoxVOI::BoxVOI(), CannyEdgeDetection::CannyEdgeDetection(), CenterMesh::CenterMesh(), ChangeColor::ChangeColor(), ChangeLanguage::ChangeLanguage(), ChangeParent::ChangeParent(), CleanPolyData::CleanPolyData(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), ComputeCurvatures::ComputeCurvatures(), ComputeNormals::ComputeNormals(), ConnectedComponents::ConnectedComponents(), CreateSC::CreateSC(), Decimation::Decimation(), Derivative::Derivative(), ExportAsMDL::ExportAsMDL(), ExtractEdges::ExtractEdges(), ExtractSelection::ExtractSelection(), ExtractSurface::ExtractSurface(), FillWithPoints::FillWithPoints(), FrameEditor::FrameEditor(), GaussianFilter::GaussianFilter(), GenerateModel::GenerateModel(), GradientMagnitude::GradientMagnitude(), GradientMagnitudeRecursiveGaussian::GradientMagnitudeRecursiveGaussian(), GridTopology::GridTopology(), ICPRegistration::ICPRegistration(), ImageLutAction::ImageLutAction(), ImageReconstructionAction::ImageReconstructionAction(), InitImagerAction::InitImagerAction(), InvertMesh::InvertMesh(), Laplacian::Laplacian(), LaplacianRecursiveGaussian::LaplacianRecursiveGaussian(), LaplacianSharpening::LaplacianSharpening(), LoadTextureFromBMP::LoadTextureFromBMP(), LoadTransformation::LoadTransformation(), LoggerParameters::LoggerParameters(), ManualThreshold::ManualThreshold(), MeanFilter::MeanFilter(), MedianFilter::MedianFilter(), MergeMeshs::MergeMeshs(), MeshClipping::MeshClipping(), MeshPicking::MeshPicking(), MeshProjection::MeshProjection(), MeshQuality::MeshQuality(), MeshToImageStencil::MeshToImageStencil(), MorphologicalOperators::MorphologicalOperators(), MultiPicking::MultiPicking(), OpenAction::OpenAction(), OpenFile::OpenFile(), OtsuFilter::OtsuFilter(), PixelColorChanger::PixelColorChanger(), PMLExplorerAction::PMLExplorerAction(), QuitAction::QuitAction(), RegionGrowing::RegionGrowing(), RemoveLastInstantiatedAction::RemoveLastInstantiatedAction(), RenderingOption::RenderingOption(), ReorientImage::ReorientImage(), ResampleAction::ResampleAction(), RigidTransform::RigidTransform(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), SaveDisplacementFromTransformation::SaveDisplacementFromTransformation(), SelectLastInstantiatedAction::SelectLastInstantiatedAction(), SetPathToTestData::SetPathToTestData(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitrarySliceIn3D::ShowArbitrarySliceIn3D(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialSliceIn3D::ShowAxialSliceIn3D(), ShowAxialViewer::ShowAxialViewer(), ShowCoronalSliceIn3D::ShowCoronalSliceIn3D(), ShowCoronalViewer::ShowCoronalViewer(), ShowFrame::ShowFrame(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalSliceIn3D::ShowSagittalSliceIn3D(), ShowSagittalViewer::ShowSagittalViewer(), SimulationDialog::SimulationDialog(), SingleAcquisition2DAction::SingleAcquisition2DAction(), SingleAcquisition3DAction::SingleAcquisition3DAction(), SmoothFilter::SmoothFilter(), SobelEdgeDetection::SobelEdgeDetection(), SphereTopology::SphereTopology(), StartImaging2DAction::StartImaging2DAction(), StartImaging3DAction::StartImaging3DAction(), StopImaging2DAction::StopImaging2DAction(), StopImaging3DAction::StopImaging3DAction(), ToggleConsoleAction::ToggleConsoleAction(), and WarpOut::WarpOut().

◆ trigger

Action::ApplyStatus camitk::Action::trigger ( QWidget *  parent = nullptr)
slot

This method triggers the action.

The parent widget is used if the action is embedded, see class description for more information about the algorithm. This method cannot be redefined in inherited class.

Referenced by ActionViewer::updateSearchPanel().

+ Here is the caller graph for this function:

◆ updateTargets()

void camitk::Action::updateTargets ( )

update the target list using the currently selected components

Referenced by ActionViewer::updateActionWidget().

+ Here is the caller graph for this function:

Member Data Documentation

◆ actionWidget

◆ aliveBeforeComponents

ComponentList camitk::Action::aliveBeforeComponents
private

In case of a pipeline application of the Action (i.e.

a chain of actions with no gui), the following properties and methods are used: List of alive component before the application of the action (to be compared with the list after and deduce outputComponents).

Referenced by preProcess().

◆ autoUpdateProperties

bool camitk::Action::autoUpdateProperties
private

Should the properties/parameters of this action be automatically updated when the user change something in the GUI.

◆ component

QString camitk::Action::component
private

the name of the component class that can be used by this action

◆ description

QString camitk::Action::description
private

the descriptionof the action

◆ extension

ActionExtension* camitk::Action::extension
private

the extension in which this action is declared and registered

Referenced by SaveAsAction::apply(), and setComponent().

◆ family

QString camitk::Action::family
private

the name of the family in which this action is associated

◆ icon

QPixmap camitk::Action::icon
private

the Action pixmap icon

Referenced by setDescription(), and setFamily().

◆ isEmbedded

bool camitk::Action::isEmbedded
private

is the widget embedded or not

◆ item

HistoryItem* camitk::Action::item
private

Referenced by preProcessInPipeline().

◆ name

QString camitk::Action::name
private

the name of the action

Referenced by ActionState::onEntry().

◆ outputComponents

ComponentList camitk::Action::outputComponents
private

List returned by getOutputComponents()

Referenced by setInputComponents().

◆ parameterMap

QMap<QString, Property*> camitk::Action::parameterMap
private

list of CamiTK property decorating the dynamic properties (action parameters)

◆ qAction

QAction* camitk::Action::qAction
private

the corresponding QAction

◆ tags

QStringList camitk::Action::tags
private

the name of the tag called this action

◆ targetComponents

ComponentList camitk::Action::targetComponents
private

The list of valid (regarding the component property) components for which this action is called.

This list is private (use getTargets() in subclasses). This list may by filled

Referenced by addTag(), applyInPipeline(), and setEmbedded().

◆ topLevelSelectedComponents

ComponentList camitk::Action::topLevelSelectedComponents
private

The list of top level selected components before running the action This list is used to deduce the number of top level components, modified through applying the action.

Referenced by getOutputComponent().


The documentation for this class was generated from the following files:
CAMITK_INFO
#define CAMITK_INFO(MSG)
Log for info verbosity (the second most verbose one) The msg will appear only if the user asked for I...
Definition: Log.h:261