Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkSimulation.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkSimulation_h
18 #define mitkSimulation_h
19 
20 #include <mitkBaseData.h>
21 #include <mitkSchedulableProcess.h>
22 #include <sofa/core/visual/DrawToolGL.h>
23 #include <sofa/simulation/common/Simulation.h>
24 #include <MitkSimulationExports.h>
25 
26 namespace mitk
27 {
28  class MITKSIMULATION_EXPORT Simulation : public BaseData, public SchedulableProcess
29  {
30  public:
32  itkFactorylessNewMacro(Self)
33  itkCloneMacro(Self)
34 
35  void Animate();
36  sofa::core::visual::DrawTool* GetDrawTool();
37  sofa::simulation::Node::SPtr GetRootNode() const;
38  sofa::simulation::Simulation::SPtr GetSOFASimulation() const;
39  void Reset();
40  bool GetAnimationFlag() const;
41  void SetAnimationFlag(bool animate);
42  void SetDt(double dt);
43  void SetRootNode(sofa::simulation::Node::SPtr rootNode);
44 
45  bool RequestedRegionIsOutsideOfTheBufferedRegion() override;
46  void SetRequestedRegion(const itk::DataObject*) override;
47  void SetRequestedRegionToLargestPossibleRegion() override;
48  void UpdateOutputInformation() override;
49  bool VerifyRequestedRegion() override;
50 
51  private:
52  Simulation();
53  ~Simulation();
54 
55  sofa::simulation::Simulation::SPtr m_SOFASimulation;
56  sofa::simulation::Node::SPtr m_RootNode;
57  sofa::core::visual::DrawToolGL m_DrawTool;
58  };
59 }
60 
61 #endif
Base of all data objects.
Definition: mitkBaseData.h:39
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44