Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
Classification/CLVigraRandomForest/src/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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 #include <usModuleActivator.h>
13 #include <usModuleContext.h>
14 #include <mitkRandomForestIO.h>
16 #include <mitkDummyLsetReader.h>
17 
18 namespace mitk
19 {
20 
24  class ModuleActivator : public us::ModuleActivator
25  {
26  public:
27 
28  void Load(us::ModuleContext*) override
29  {
30 
31  // *-----------------*
32  // * IO
33  // *-----------------*
34 
35  m_DecisionForestIO = new mitk::RandomForestFileIO();
36  m_DummyLsetReader = new mitk::DummyLsetFileReader();
37  }
38 
39  void Unload(us::ModuleContext*) override
40  {
41  delete m_DecisionForestIO;
42  delete m_DummyLsetReader;
43  }
44 
45  private:
46  mitk::RandomForestFileIO * m_DecisionForestIO;
47  mitk::DummyLsetFileReader * m_DummyLsetReader;
48  };
49 }
50 
51 US_EXPORT_MODULE_ACTIVATOR(mitk::ModuleActivator)
DataCollection - Class to facilitate loading/accessing structured data.
virtual void Unload(ModuleContext *context)=0
#define US_EXPORT_MODULE_ACTIVATOR(_activator_type)
Export a module activator class.
virtual void Load(ModuleContext *context)=0