Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkModuleActivator.cpp
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 #include <usModuleActivator.h>
17 #include <usModuleContext.h>
18 #include <mitkRandomForestIO.h>
20 #include <mitkDummyLsetReader.h>
21 
22 namespace mitk
23 {
24 
28  class ModuleActivator : public us::ModuleActivator
29  {
30  public:
31 
32  void Load(us::ModuleContext*)
33  {
34 
35  // *-----------------*
36  // * IO
37  // *-----------------*
38 
39  m_DecisionForestIO = new mitk::RandomForestFileIO();
40  m_DummyLsetReader = new mitk::DummyLsetFileReader();
41  }
42 
43  void Unload(us::ModuleContext*)
44  {
45  delete m_DecisionForestIO;
46  delete m_DummyLsetReader;
47  }
48 
49  private:
50  mitk::RandomForestFileIO * m_DecisionForestIO;
51  mitk::DummyLsetFileReader * m_DummyLsetReader;
52  };
53 }
54 
55 US_EXPORT_MODULE_ACTIVATOR(mitk::ModuleActivator)
DataCollection - Class to facilitate loading/accessing structured data.
virtual void Unload(ModuleContext *context)=0
virtual void Load(ModuleContext *context)=0
US_EXPORT_MODULE_ACTIVATOR(mitk::SimulationActivator)