@LICENCE@

#ifndef @HEADDEF@_H
#define @HEADDEF@_H

#include <Action.h>

@ELSEIF_NOCOMP@
#include <@COMPONENTNAME@.h>
@END_NOCOMP@

class @ACTIONCLASSNAME@ : public camitk::Action {

public: 

    /// Default Constructor 
    @ACTIONCLASSNAME@(camitk::ActionExtension *);

    /// Default Destructor
    virtual ~@ACTIONCLASSNAME@() = default;

public slots:
    /** this method is automatically called when the action is triggered.
      * Call getTargets() method to get the list of components to use.
      * \note getTargets() is automatically filtered so that it only contains compatible components, 
      * i.e., instances of @ACTIONCLASSNAME@ (or a subclass).
      */
    virtual camitk::Action::ApplyStatus apply() override;

@IF_DEFCOMPONENT@
private: 
    /// helper method to simplify the target component processing
    virtual void process(@COMPONENTNAMESPACE@@COMPONENTNAME@ *);

    @IF_ITKFILTER@
    vtkSmartPointer<vtkImageData> implementProcess(vtkSmartPointer<vtkImageData> img); 

    /** Where the ITK Pipeline is implemented */
    template <class InputPixelType, class OutputPixelType, const int dim> 
    vtkSmartPointer<vtkImageData> itkProcess(vtkSmartPointer<vtkImageData> img); 	
    @ENDIF_ITKFILTER@

@ENDIF_DEFCOMPONENT@
}; 

#endif // @HEADDEF@_H
