Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
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 #include "mitkContourModelReader.h"
20 #include "mitkContourModelWriter.h"
21 
22 #include <usModuleActivator.h>
23 #include <usModuleContext.h>
24 
25 namespace mitk
26 {
27  /*
28  * This is the module activator for the "ContourModel" module.
29  */
30  class ContourModelActivator : public us::ModuleActivator
31  {
32  public:
33  void Load(us::ModuleContext * /*context*/) override
34  {
35  m_ContourModelReader = new ContourModelReader();
36  m_ContourModelSetReader = new ContourModelSetReader();
37  m_ContourModelWriter = new ContourModelWriter();
38  m_ContourModelSetWriter = new ContourModelSetWriter();
39  }
40 
41  void Unload(us::ModuleContext *) override
42  {
43  delete m_ContourModelReader;
44  delete m_ContourModelSetReader;
45  delete m_ContourModelWriter;
46  delete m_ContourModelSetWriter;
47  }
48 
49  private:
50  mitk::ContourModelReader *m_ContourModelReader;
51  mitk::ContourModelSetReader *m_ContourModelSetReader;
52  mitk::ContourModelWriter *m_ContourModelWriter;
53  mitk::ContourModelSetWriter *m_ContourModelSetWriter;
54  };
55 }
56 
57 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.
virtual void Load(ModuleContext *context)=0
US_EXPORT_MODULE_ACTIVATOR(mitk::SimulationActivator)