![]() |
Computer Assited Medical Intervention Tool Kit
|
Action class is an abstract class that enables you to build a action (generally on a component). More...
#include <Action.h>
Inherits QObject.
Inherited by AboutAction, AnisotropicDiffusion, CannyEdgeDetection, CenterMesh, ChangeColor, CleanPolyData, ClearSelectionAction, CloseAction, CloseAllAction, ConnectedComponents, CreateSC, Decimation, Derivative, ExtractSurface, FillWithPoints, GaussianFilter, GenerateModel, GradientMagnitude, GradientMagnitudeRecursiveGaussian, GridTopology, ImageLutAction, ImageReconstructionAction, Laplacian, LaplacianRecursiveGaussian, LaplacianSharpening, ManualThreshold, MeanFilter, MedianFilter, MeshPicking, MeshQuality, MorphologicalOperators, MultiPicking, OpenAction, OtsuFilter, QuitAction, RegionGrowing, RemoveLastInstanciatedAction, RenderingOption, RigidTransform, SaveAction, SaveAllAction, SaveAsAction, SelectLastInstanciatedAction, SetAnglesAction, Show3DViewer, ShowAllViewers, ShowArbitrarySliceIn3D, ShowArbitraryViewer, ShowAxialSliceIn3D, ShowAxialViewer, ShowConsoleAction, ShowCoronalSliceIn3D, ShowCoronalViewer, ShowImageIn3D, ShowSagittalSliceIn3D, ShowSagittalViewer, SobelEdgeDetection, SphereTopology, VolumeRenderingAction, and WarpOut.
Public Types | |
enum | ApplyStatus { SUCCESS, ERROR, WARNING, ABORTED, TRIGGERED } |
describes what happened during the application of an algorithm (i.e. results of the apply method) More... | |
Public Slots | |
virtual ApplyStatus | apply ()=0 |
This method is called when the action has to be applied on the target list (get the target lists using getTargets()) More... | |
ApplyStatus | trigger (QWidget *parent=NULL) |
This method triggers the action. More... | |
Public Member Functions | |
Action (ActionExtension *) | |
Default Constructor: the ActionExtension is needed. More... | |
bool | getAutoUpdateProperties () const |
auto update properties More... | |
void | setAutoUpdateProperties (bool) |
are the properties to be udpated every time the user makes a change in the widget (default is false)? More... | |
virtual | ~Action () |
Destructor. More... | |
Generic action getters | |
These methods can not be redefined in subclasses. | |
QAction * | getQAction () |
Get the corresponding QAction. More... | |
QString | getName () const |
the name of the component class that can be used by this 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... | |
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... | |
ActionExtension * | extension |
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 component class that can be used by this action 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 | |
List of alive component before the application of the action (to be compared withe the list after and deduce outputComponents. | |
ComponentList | aliveBeforeComponents |
ComponentList | outputComponents |
List returned by getOutputComponents() More... | |
virtual ApplyStatus | applyInPipeline () |
This method encapsulates the apply() method. More... | |
virtual 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... | |
virtual void | setInputComponent (Component *input) |
Specify the input Components in case of only one Component. More... | |
virtual ComponentList | getOutputComponents () |
Returns the output Component(s) More... | |
virtual Component * | getOutputComponent () |
Returns the output Components in case of only one Component. More... | |
virtual void | preProcess () |
virtual void | postProcess () |
Set the right output component list so that the method getOutputComponents() can be called TODO: save the Action History. More... | |
bool | wasHereBefore (Component *comp) |
check if a component was here before we apply the action More... | |
Generic action attributes setters | |
These methods can not be redefined in subclasses but have to used to ensure name/description unicity among CamiTK. the name of the component class that can be used by this action | |
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 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
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:
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.
When an action is triggered (e.g., by right clicking in the context menu), the following algorithm applies, see trigger():
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):
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.
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 instanciation pattern to instanciate MyVerySpecialActionWidget the first time it is called, and call the MyVerySpecialActionWidget instance's updateTargets() method for any subsequent calls. Something like:
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 override the getWidget() method in order to return NULL.
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.
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.
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. preProcess() only selects the right components, and postProcess() sets output components and record history (TODO).
For a simple example of an embedded action
describes what happened during the application of an algorithm (i.e. results of the apply method)
Enumerator | |
---|---|
SUCCESS |
everything went according to plan |
ERROR |
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 |
camitk::Action::Action | ( | ActionExtension * | extension | ) |
Default Constructor: the ActionExtension is needed.
References actionWidget, autoUpdateProperties, component, extension, isEmbedded, and qAction.
|
virtual |
Destructor.
|
protected |
add a tag to the tags list of this action
References tags.
Referenced by AboutAction::AboutAction(), AnisotropicDiffusion::AnisotropicDiffusion(), CannyEdgeDetection::CannyEdgeDetection(), CenterMesh::CenterMesh(), ChangeColor::ChangeColor(), CleanPolyData::CleanPolyData(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), ConnectedComponents::ConnectedComponents(), CreateSC::CreateSC(), Decimation::Decimation(), Derivative::Derivative(), ExtractSurface::ExtractSurface(), FillWithPoints::FillWithPoints(), GaussianFilter::GaussianFilter(), GenerateModel::GenerateModel(), GradientMagnitude::GradientMagnitude(), GradientMagnitudeRecursiveGaussian::GradientMagnitudeRecursiveGaussian(), GridTopology::GridTopology(), ImageLutAction::ImageLutAction(), ImageReconstructionAction::ImageReconstructionAction(), Laplacian::Laplacian(), LaplacianRecursiveGaussian::LaplacianRecursiveGaussian(), LaplacianSharpening::LaplacianSharpening(), ManualThreshold::ManualThreshold(), MeanFilter::MeanFilter(), MedianFilter::MedianFilter(), MeshPicking::MeshPicking(), MeshQuality::MeshQuality(), MorphologicalOperators::MorphologicalOperators(), MultiPicking::MultiPicking(), OpenAction::OpenAction(), OtsuFilter::OtsuFilter(), QuitAction::QuitAction(), RegionGrowing::RegionGrowing(), RemoveLastInstanciatedAction::RemoveLastInstanciatedAction(), RenderingOption::RenderingOption(), RigidTransform::RigidTransform(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), SelectLastInstanciatedAction::SelectLastInstanciatedAction(), SetAnglesAction::SetAnglesAction(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitrarySliceIn3D::ShowArbitrarySliceIn3D(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialSliceIn3D::ShowAxialSliceIn3D(), ShowAxialViewer::ShowAxialViewer(), ShowConsoleAction::ShowConsoleAction(), ShowCoronalSliceIn3D::ShowCoronalSliceIn3D(), ShowCoronalViewer::ShowCoronalViewer(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalSliceIn3D::ShowSagittalSliceIn3D(), ShowSagittalViewer::ShowSagittalViewer(), SobelEdgeDetection::SobelEdgeDetection(), SphereTopology::SphereTopology(), VolumeRenderingAction::VolumeRenderingAction(), and WarpOut::WarpOut().
|
pure virtualslot |
This method is called when the action has to be applied on the target list (get the target lists using getTargets())
Implemented in SphereTopology, and GridTopology.
Referenced by applyInPipeline(), and trigger().
|
virtual |
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, preProcess and postProcess methods select the right component(s). As the method apply() is called between preProcess() and postProcess(), the returned value is the returned value of apply().
References ABORTED, apply(), getComponent(), postProcess(), preProcess(), and targetComponents.
Referenced by SaveActionState::applyAction(), and ActionState::applyAction().
bool camitk::Action::getAutoUpdateProperties | ( | ) | const |
auto update properties
References autoUpdateProperties.
|
inline |
the name of the component class that can be used by this action
Referenced by applyInPipeline(), camitk::Application::getActions(), trigger(), and camitk::SettingsDialog::updateActionExtensionList().
|
inline |
the description of the action
References description.
Referenced by camitk::ActionWidget::ActionWidget(), camitk::Core::getConfig(), getQAction(), and camitk::Application::registerAllActions().
|
inline |
argument use to know if the widget is embedded or not
QString camitk::Action::getExtensionName | ( | ) | const |
the name of the extension in the family in which this action is associated
References extension, and camitk::ActionExtension::getName().
Referenced by camitk::Application::registerAllActions().
|
inline |
the name of the family in which this action is associated
Referenced by camitk::ActionViewer::embedActionWidget(), camitk::Component::getActionAndPopupMenu(), camitk::Application::registerAllActions(), and camitk::ActionViewer::updateActionViewer().
|
virtual |
the icon to personalize the action (no icon by default)
References icon.
Referenced by camitk::ActionWidget::ActionWidget(), and getQAction().
|
inline |
the name of the component class that can be used by this action
Referenced by camitk::actionLessThan(), camitk::ActionWidget::ActionWidget(), CleanPolyData::apply(), ExtractSurface::apply(), WarpOut::apply(), CreateSC::apply(), GenerateModel::apply(), SaveActionState::applyAction(), ActionState::applyAction(), camitk::ActionViewer::embedActionWidget(), camitk::Core::getConfig(), getQAction(), camitk::SettingsDialog::on_removeActionExtensionButton_released(), camitk::Application::registerAllActions(), trigger(), camitk::ExtensionManager::unloadActionExtension(), camitk::SettingsDialog::updateActionExtensionList(), and camitk::ActionViewer::updateActionViewer().
|
virtual |
Returns the output Components in case of only one Component.
References outputComponents.
|
virtual |
Returns the output Component(s)
References outputComponents.
Referenced by ActionState::applyAction().
QAction * camitk::Action::getQAction | ( | ) |
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);
References getDescription(), getIcon(), getName(), qAction, and trigger().
Referenced by ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), camitk::Component::getActionAndPopupMenu(), camitk::MedicalImageViewer::getMenu(), camitk::InteractiveViewer::initActions(), OpenAction::OpenAction(), QuitAction::QuitAction(), SaveAction::SaveAction(), SaveAsAction::SaveAsAction(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialViewer::ShowAxialViewer(), ShowCoronalViewer::ShowCoronalViewer(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalViewer::ShowSagittalViewer(), and ImpMainWindow::updateActionStates().
|
inline |
the name of the tag called this action
Referenced by camitk::Application::getActions(), and camitk::ActionViewer::updateActionViewer().
const ComponentList camitk::Action::getTargets | ( | ) | const |
the currently selected and valid (regarding the component property) components, for which this action is called
References targetComponents.
Referenced by CleanPolyData::apply(), ExtractSurface::apply(), FillWithPoints::apply(), CreateSC::apply(), GenerateModel::apply(), ShowImageIn3D::apply(), WarpOut::apply(), ChangeColor::apply(), ShowCoronalSliceIn3D::apply(), ShowArbitrarySliceIn3D::apply(), ShowAxialSliceIn3D::apply(), ShowSagittalSliceIn3D::apply(), SaveAction::apply(), CenterMesh::apply(), Decimation::apply(), CloseAction::apply(), RenderingOption::apply(), GradientMagnitudeRecursiveGaussian::apply(), Laplacian::apply(), LaplacianRecursiveGaussian::apply(), VolumeRenderingAction::apply(), ManualThreshold::apply(), MeanFilter::apply(), Derivative::apply(), MedianFilter::apply(), CannyEdgeDetection::apply(), LaplacianSharpening::apply(), SobelEdgeDetection::apply(), GradientMagnitude::apply(), MeshQuality::apply(), MeshPicking::apply(), OtsuFilter::apply(), RegionGrowing::apply(), ConnectedComponents::apply(), GaussianFilter::apply(), AnisotropicDiffusion::apply(), RigidTransform::apply(), MorphologicalOperators::apply(), RigidTransform::close(), camitk::ActionWidget::getTargetLabel(), CreateSC::getWidget(), RenderingOption::getWidget(), ImageLutAction::getWidget(), RegionGrowing::getWidget(), MultiPicking::getWidget(), RigidTransform::getWidget(), and ImageReconstructionAction::getWidget().
|
virtual |
This method has to be redefined in your Action only if:
In the second case, it is strongly recommanded to have a code similar to this:
The updateTargets 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 an updateTargets of the action's widget fields).
Reimplemented in ImageReconstructionAction, RigidTransform, SetAnglesAction, MultiPicking, MeshPicking, MeshQuality, RegionGrowing, ImageLutAction, RenderingOption, OpenAction, RemoveLastInstanciatedAction, CenterMesh, Decimation, SelectLastInstanciatedAction, CloseAction, CloseAllAction, SaveAction, SaveAllAction, SaveAsAction, ChangeColor, CreateSC, GenerateModel, ClearSelectionAction, QuitAction, Show3DViewer, ShowAllViewers, ShowArbitraryViewer, ShowAxialViewer, ShowCoronalViewer, ShowSagittalViewer, ShowArbitrarySliceIn3D, ShowAxialSliceIn3D, ShowCoronalSliceIn3D, ShowSagittalSliceIn3D, ShowConsoleAction, ShowImageIn3D, and AboutAction.
References actionWidget, and autoUpdateProperties.
Referenced by camitk::ActionViewer::embedActionWidget(), ActionState::setAction(), and trigger().
|
protectedvirtual |
Set the right output component list so that the method getOutputComponents() can be called TODO: save the Action History.
References camitk::Application::getAllComponents(), camitk::Component::getModified(), outputComponents, and wasHereBefore().
Referenced by applyInPipeline().
|
protectedvirtual |
References aliveBeforeComponents, and camitk::Application::getAllComponents().
Referenced by applyInPipeline().
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 actionWidget, and autoUpdateProperties.
Referenced by ActionState::setAction().
|
protected |
the name of the component class that can be used by this action
References component.
Referenced by AboutAction::AboutAction(), AnisotropicDiffusion::AnisotropicDiffusion(), CannyEdgeDetection::CannyEdgeDetection(), CenterMesh::CenterMesh(), ChangeColor::ChangeColor(), CleanPolyData::CleanPolyData(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), ConnectedComponents::ConnectedComponents(), CreateSC::CreateSC(), Decimation::Decimation(), Derivative::Derivative(), ExtractSurface::ExtractSurface(), FillWithPoints::FillWithPoints(), GaussianFilter::GaussianFilter(), GenerateModel::GenerateModel(), GradientMagnitude::GradientMagnitude(), GradientMagnitudeRecursiveGaussian::GradientMagnitudeRecursiveGaussian(), GridTopology::GridTopology(), ImageLutAction::ImageLutAction(), ImageReconstructionAction::ImageReconstructionAction(), Laplacian::Laplacian(), LaplacianRecursiveGaussian::LaplacianRecursiveGaussian(), LaplacianSharpening::LaplacianSharpening(), ManualThreshold::ManualThreshold(), MeanFilter::MeanFilter(), MedianFilter::MedianFilter(), MeshPicking::MeshPicking(), MeshQuality::MeshQuality(), MorphologicalOperators::MorphologicalOperators(), MultiPicking::MultiPicking(), OpenAction::OpenAction(), OtsuFilter::OtsuFilter(), QuitAction::QuitAction(), RegionGrowing::RegionGrowing(), RemoveLastInstanciatedAction::RemoveLastInstanciatedAction(), RenderingOption::RenderingOption(), RigidTransform::RigidTransform(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), SelectLastInstanciatedAction::SelectLastInstanciatedAction(), SetAnglesAction::SetAnglesAction(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitrarySliceIn3D::ShowArbitrarySliceIn3D(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialSliceIn3D::ShowAxialSliceIn3D(), ShowAxialViewer::ShowAxialViewer(), ShowConsoleAction::ShowConsoleAction(), ShowCoronalSliceIn3D::ShowCoronalSliceIn3D(), ShowCoronalViewer::ShowCoronalViewer(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalSliceIn3D::ShowSagittalSliceIn3D(), ShowSagittalViewer::ShowSagittalViewer(), SobelEdgeDetection::SobelEdgeDetection(), SphereTopology::SphereTopology(), VolumeRenderingAction::VolumeRenderingAction(), and WarpOut::WarpOut().
|
protected |
the description of the action
References description.
Referenced by AboutAction::AboutAction(), AnisotropicDiffusion::AnisotropicDiffusion(), CannyEdgeDetection::CannyEdgeDetection(), CenterMesh::CenterMesh(), ChangeColor::ChangeColor(), CleanPolyData::CleanPolyData(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), ConnectedComponents::ConnectedComponents(), CreateSC::CreateSC(), Decimation::Decimation(), Derivative::Derivative(), ExtractSurface::ExtractSurface(), FillWithPoints::FillWithPoints(), GaussianFilter::GaussianFilter(), GenerateModel::GenerateModel(), GradientMagnitude::GradientMagnitude(), GradientMagnitudeRecursiveGaussian::GradientMagnitudeRecursiveGaussian(), GridTopology::GridTopology(), ImageLutAction::ImageLutAction(), ImageReconstructionAction::ImageReconstructionAction(), Laplacian::Laplacian(), LaplacianRecursiveGaussian::LaplacianRecursiveGaussian(), LaplacianSharpening::LaplacianSharpening(), ManualThreshold::ManualThreshold(), MeanFilter::MeanFilter(), MedianFilter::MedianFilter(), MeshPicking::MeshPicking(), MeshQuality::MeshQuality(), MorphologicalOperators::MorphologicalOperators(), MultiPicking::MultiPicking(), OpenAction::OpenAction(), OtsuFilter::OtsuFilter(), QuitAction::QuitAction(), RegionGrowing::RegionGrowing(), RemoveLastInstanciatedAction::RemoveLastInstanciatedAction(), RenderingOption::RenderingOption(), RigidTransform::RigidTransform(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), SelectLastInstanciatedAction::SelectLastInstanciatedAction(), SetAnglesAction::SetAnglesAction(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitrarySliceIn3D::ShowArbitrarySliceIn3D(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialSliceIn3D::ShowAxialSliceIn3D(), ShowAxialViewer::ShowAxialViewer(), ShowConsoleAction::ShowConsoleAction(), ShowCoronalSliceIn3D::ShowCoronalSliceIn3D(), ShowCoronalViewer::ShowCoronalViewer(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalSliceIn3D::ShowSagittalSliceIn3D(), ShowSagittalViewer::ShowSagittalViewer(), SobelEdgeDetection::SobelEdgeDetection(), SphereTopology::SphereTopology(), VolumeRenderingAction::VolumeRenderingAction(), and WarpOut::WarpOut().
|
protected |
set the embedded property (an action is embedded by default, unless specified otherwise by explicitly calling this method with false)
References isEmbedded.
Referenced by AboutAction::AboutAction(), CenterMesh::CenterMesh(), ChangeColor::ChangeColor(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), OpenAction::OpenAction(), QuitAction::QuitAction(), RegionGrowing::RegionGrowing(), RemoveLastInstanciatedAction::RemoveLastInstanciatedAction(), RigidTransform::RigidTransform(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), SelectLastInstanciatedAction::SelectLastInstanciatedAction(), SetAnglesAction::SetAnglesAction(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitrarySliceIn3D::ShowArbitrarySliceIn3D(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialSliceIn3D::ShowAxialSliceIn3D(), ShowAxialViewer::ShowAxialViewer(), ShowConsoleAction::ShowConsoleAction(), ShowCoronalSliceIn3D::ShowCoronalSliceIn3D(), ShowCoronalViewer::ShowCoronalViewer(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalSliceIn3D::ShowSagittalSliceIn3D(), ShowSagittalViewer::ShowSagittalViewer(), SphereTopology::SphereTopology(), and VolumeRenderingAction::VolumeRenderingAction().
|
protected |
the name of the family in which this action is associated
References family.
Referenced by AboutAction::AboutAction(), AnisotropicDiffusion::AnisotropicDiffusion(), CannyEdgeDetection::CannyEdgeDetection(), CenterMesh::CenterMesh(), ChangeColor::ChangeColor(), CleanPolyData::CleanPolyData(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), ConnectedComponents::ConnectedComponents(), CreateSC::CreateSC(), Decimation::Decimation(), Derivative::Derivative(), ExtractSurface::ExtractSurface(), FillWithPoints::FillWithPoints(), GaussianFilter::GaussianFilter(), GenerateModel::GenerateModel(), GradientMagnitude::GradientMagnitude(), GradientMagnitudeRecursiveGaussian::GradientMagnitudeRecursiveGaussian(), GridTopology::GridTopology(), ImageLutAction::ImageLutAction(), ImageReconstructionAction::ImageReconstructionAction(), Laplacian::Laplacian(), LaplacianRecursiveGaussian::LaplacianRecursiveGaussian(), LaplacianSharpening::LaplacianSharpening(), ManualThreshold::ManualThreshold(), MeanFilter::MeanFilter(), MedianFilter::MedianFilter(), MeshPicking::MeshPicking(), MeshQuality::MeshQuality(), MorphologicalOperators::MorphologicalOperators(), MultiPicking::MultiPicking(), OpenAction::OpenAction(), OtsuFilter::OtsuFilter(), QuitAction::QuitAction(), RegionGrowing::RegionGrowing(), RemoveLastInstanciatedAction::RemoveLastInstanciatedAction(), RenderingOption::RenderingOption(), RigidTransform::RigidTransform(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), SelectLastInstanciatedAction::SelectLastInstanciatedAction(), SetAnglesAction::SetAnglesAction(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitrarySliceIn3D::ShowArbitrarySliceIn3D(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialSliceIn3D::ShowAxialSliceIn3D(), ShowAxialViewer::ShowAxialViewer(), ShowConsoleAction::ShowConsoleAction(), ShowCoronalSliceIn3D::ShowCoronalSliceIn3D(), ShowCoronalViewer::ShowCoronalViewer(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalSliceIn3D::ShowSagittalSliceIn3D(), ShowSagittalViewer::ShowSagittalViewer(), SobelEdgeDetection::SobelEdgeDetection(), SphereTopology::SphereTopology(), VolumeRenderingAction::VolumeRenderingAction(), and WarpOut::WarpOut().
|
protected |
set the Pixmap
References icon.
Referenced by AboutAction::AboutAction(), ChangeColor::ChangeColor(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), OpenAction::OpenAction(), QuitAction::QuitAction(), RenderingOption::RenderingOption(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), and ShowConsoleAction::ShowConsoleAction().
|
virtual |
Specify the input Components in case of only one Component.
References camitk::Component::isInstanceOf(), and targetComponents.
|
virtual |
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 camitk::Component::isInstanceOf(), and targetComponents.
Referenced by SaveActionState::applyAction(), and ActionState::applyAction().
|
protected |
References name.
Referenced by AboutAction::AboutAction(), AnisotropicDiffusion::AnisotropicDiffusion(), CannyEdgeDetection::CannyEdgeDetection(), CenterMesh::CenterMesh(), ChangeColor::ChangeColor(), CleanPolyData::CleanPolyData(), ClearSelectionAction::ClearSelectionAction(), CloseAction::CloseAction(), CloseAllAction::CloseAllAction(), ConnectedComponents::ConnectedComponents(), CreateSC::CreateSC(), Decimation::Decimation(), Derivative::Derivative(), ExtractSurface::ExtractSurface(), FillWithPoints::FillWithPoints(), GaussianFilter::GaussianFilter(), GenerateModel::GenerateModel(), GradientMagnitude::GradientMagnitude(), GradientMagnitudeRecursiveGaussian::GradientMagnitudeRecursiveGaussian(), GridTopology::GridTopology(), ImageLutAction::ImageLutAction(), ImageReconstructionAction::ImageReconstructionAction(), Laplacian::Laplacian(), LaplacianRecursiveGaussian::LaplacianRecursiveGaussian(), LaplacianSharpening::LaplacianSharpening(), ManualThreshold::ManualThreshold(), MeanFilter::MeanFilter(), MedianFilter::MedianFilter(), MeshPicking::MeshPicking(), MeshQuality::MeshQuality(), MorphologicalOperators::MorphologicalOperators(), MultiPicking::MultiPicking(), OpenAction::OpenAction(), OtsuFilter::OtsuFilter(), QuitAction::QuitAction(), RegionGrowing::RegionGrowing(), RemoveLastInstanciatedAction::RemoveLastInstanciatedAction(), RenderingOption::RenderingOption(), RigidTransform::RigidTransform(), SaveAction::SaveAction(), SaveAllAction::SaveAllAction(), SaveAsAction::SaveAsAction(), SelectLastInstanciatedAction::SelectLastInstanciatedAction(), SetAnglesAction::SetAnglesAction(), Show3DViewer::Show3DViewer(), ShowAllViewers::ShowAllViewers(), ShowArbitrarySliceIn3D::ShowArbitrarySliceIn3D(), ShowArbitraryViewer::ShowArbitraryViewer(), ShowAxialSliceIn3D::ShowAxialSliceIn3D(), ShowAxialViewer::ShowAxialViewer(), ShowConsoleAction::ShowConsoleAction(), ShowCoronalSliceIn3D::ShowCoronalSliceIn3D(), ShowCoronalViewer::ShowCoronalViewer(), ShowImageIn3D::ShowImageIn3D(), ShowSagittalSliceIn3D::ShowSagittalSliceIn3D(), ShowSagittalViewer::ShowSagittalViewer(), SobelEdgeDetection::SobelEdgeDetection(), SphereTopology::SphereTopology(), VolumeRenderingAction::VolumeRenderingAction(), and WarpOut::WarpOut().
|
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.
References apply(), camitk::ActionViewer::embedActionWidget(), ERROR, camitk::ActionViewer::getActionViewer(), getComponent(), getName(), camitk::Application::getSelectedComponents(), getWidget(), isEmbedded, camitk::Component::isInstanceOf(), targetComponents, and TRIGGERED.
Referenced by getQAction(), camitk::Application::save(), and camitk::ActionViewer::updateActionViewer().
|
private |
check if a component was here before we apply the action
References aliveBeforeComponents.
Referenced by postProcess().
|
protected |
the action widget
Referenced by Action(), ImageLutAction::getWidget(), SetAnglesAction::getWidget(), ImageReconstructionAction::getWidget(), getWidget(), LaplacianSharpening::LaplacianSharpening(), SetAnglesAction::SetAnglesAction(), setAutoUpdateProperties(), and ImageReconstructionAction::~ImageReconstructionAction().
|
private |
Referenced by preProcess(), and wasHereBefore().
|
private |
Should the properties/parameters of this action be automatically updated when the user change something in the GUI.
Referenced by Action(), getAutoUpdateProperties(), getWidget(), and setAutoUpdateProperties().
|
private |
the name of the component class that can be used by this action
Referenced by Action(), and setComponent().
|
private |
the descriptionof the action
Referenced by setDescription().
|
private |
the extension in which this action is declared and registered
Referenced by Action(), SaveAsAction::apply(), and getExtensionName().
|
private |
the name of the family in which this action is associated
Referenced by setFamily().
|
private |
is the widget embedded or not
Referenced by Action(), setEmbedded(), and trigger().
|
private |
the name of the component class that can be used by this action
Referenced by ActionState::applyAction(), and setName().
|
private |
List returned by getOutputComponents()
Referenced by getOutputComponent(), getOutputComponents(), and postProcess().
|
private |
the corresponding QAction
Referenced by Action(), and getQAction().
|
private |
the name of the tag called this action
Referenced by addTag().
|
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 field
Referenced by applyInPipeline(), getTargets(), setInputComponent(), setInputComponents(), and trigger().