Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkMultilabelActivator.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 <usGetModuleContext.h>
18 #include <usModule.h>
19 #include <usModuleActivator.h>
20 #include <usModuleContext.h>
21 
22 #include "mitkLabelSetImageIO.h"
23 
24 namespace mitk
25 {
29  class MultilabelModuleActivator : public us::ModuleActivator
30  {
31  std::vector<AbstractFileIO *> m_FileIOs;
32 
33  public:
34  void Load(us::ModuleContext * /*context*/) override { m_FileIOs.push_back(new LabelSetImageIO()); }
35  void Unload(us::ModuleContext *) override
36  {
37  for (auto &elem : m_FileIOs)
38  {
39  delete elem;
40  }
41  }
42  };
43 }
44 
45 US_EXPORT_MODULE_ACTIVATOR(mitk::MultilabelModuleActivator)
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)