FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
RunLambda.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <FAST/ProcessObject.hpp>
4 
5 namespace fast {
6 
7 class FAST_EXPORT RunLambda : public ProcessObject {
9  public:
10  void setLambda(std::function<void()> lambda);
11  void setLambda(std::function<void(DataObject::pointer)> lambda);
12  void setRunOnLastFrameOnly(bool lastFrameOnly);
13  protected:
14  RunLambda();
15  void execute();
16 
17  std::function<void()> m_lambda;
18  std::function<void(DataObject::pointer)> m_lambdaWithInput;
19  bool m_runOnLastFrameOnly = false;
20 };
21 
22 class FAST_EXPORT RunLambdaOnLastFrame : public RunLambda {
24  void setRunOnLastFrameOnly(bool) = delete;
25  protected:
27 
28 };
29 
30 }
fast::RunLambda::m_lambda
std::function< void()> m_lambda
Definition: RunLambda.hpp:17
fast
Definition: AffineTransformation.hpp:7
fast::RunLambdaOnLastFrame
Definition: RunLambda.hpp:22
FAST_OBJECT
#define FAST_OBJECT(className)
Definition: Object.hpp:9
fast::RunLambda
Definition: RunLambda.hpp:7
fast::RunLambda::m_lambdaWithInput
std::function< void(DataObject::pointer)> m_lambdaWithInput
Definition: RunLambda.hpp:18
ProcessObject.hpp
fast::DataObject::pointer
std::shared_ptr< DataObject > pointer
Definition: DataObject.hpp:16
fast::ProcessObject
Definition: ProcessObject.hpp:22