Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkContourModelActivator.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 
13 #include "mitkContourModelReader.h"
16 #include "mitkContourModelWriter.h"
17 
18 #include <usModuleActivator.h>
19 #include <usModuleContext.h>
20 
21 namespace mitk
22 {
23  /*
24  * This is the module activator for the "ContourModel" module.
25  */
26  class ContourModelActivator : public us::ModuleActivator
27  {
28  public:
29  void Load(us::ModuleContext * /*context*/) override
30  {
31  m_ContourModelReader = new ContourModelReader();
32  m_ContourModelSetReader = new ContourModelSetReader();
33  m_ContourModelWriter = new ContourModelWriter();
34  m_ContourModelSetWriter = new ContourModelSetWriter();
35  }
36 
37  void Unload(us::ModuleContext *) override
38  {
39  delete m_ContourModelReader;
40  delete m_ContourModelSetReader;
41  delete m_ContourModelWriter;
42  delete m_ContourModelSetWriter;
43  }
44 
45  private:
46  mitk::ContourModelReader *m_ContourModelReader;
47  mitk::ContourModelSetReader *m_ContourModelSetReader;
48  mitk::ContourModelWriter *m_ContourModelWriter;
49  mitk::ContourModelSetWriter *m_ContourModelSetWriter;
50  };
51 }
52 
53 US_EXPORT_MODULE_ACTIVATOR(mitk::ContourModelActivator)
DataCollection - Class to facilitate loading/accessing structured data.
virtual void Unload(ModuleContext *context)=0
XML-based writer for mitk::ContourModelSet.
#define US_EXPORT_MODULE_ACTIVATOR(_activator_type)
Export a module activator class.
virtual void Load(ModuleContext *context)=0