Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkCoreActivator.h
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 #ifndef MITKCOREACTIVATOR_H_
18 #define MITKCOREACTIVATOR_H_
19 
20 // File IO
21 #include <mitkAbstractFileIO.h>
22 #include <mitkIFileReader.h>
23 #include <mitkIFileWriter.h>
24 
25 #include <mitkIShaderRepository.h>
26 
27 #include <mitkMimeTypeProvider.h>
29 #include <mitkPropertyAliases.h>
31 #include <mitkPropertyExtensions.h>
32 #include <mitkPropertyFilters.h>
34 
35 // Micro Services
36 #include <usModuleActivator.h>
37 #include <usModuleEvent.h>
38 #include <usServiceRegistration.h>
39 #include <usServiceTracker.h>
40 
41 #include <memory>
42 
43 /*
44  * This is the module activator for the "Mitk" module. It registers core services
45  * like ...
46  */
48 {
49 public:
50  void Load(us::ModuleContext *context) override;
51  void Unload(us::ModuleContext *) override;
52 
53 private:
54  void HandleModuleEvent(const us::ModuleEvent moduleEvent);
55 
56  void RegisterDefaultMimeTypes();
57  void RegisterItkReaderWriter();
58  void RegisterVtkReaderWriter();
59 
60  void RegisterLegacyWriter();
61 
62  std::unique_ptr<us::ServiceTracker<mitk::IShaderRepository>> m_ShaderRepositoryTracker;
63 
64  // mitk::RenderingManager::Pointer m_RenderingManager;
65  std::unique_ptr<mitk::PlanePositionManagerService> m_PlanePositionManager;
66  std::unique_ptr<mitk::PropertyAliases> m_PropertyAliases;
67  std::unique_ptr<mitk::PropertyDescriptions> m_PropertyDescriptions;
68  std::unique_ptr<mitk::PropertyExtensions> m_PropertyExtensions;
69  std::unique_ptr<mitk::PropertyFilters> m_PropertyFilters;
70  std::unique_ptr<mitk::PropertyPersistence> m_PropertyPersistence;
71  std::unique_ptr<mitk::MimeTypeProvider> m_MimeTypeProvider;
72 
73  // File IO
74  std::vector<mitk::IFileReader *> m_FileReaders;
75  std::vector<mitk::IFileWriter *> m_FileWriters;
76  std::vector<mitk::AbstractFileIO *> m_FileIOs;
77  std::vector<mitk::IFileWriter *> m_LegacyWriters;
78 
79  std::vector<mitk::CustomMimeType *> m_DefaultMimeTypes;
80 
82 
83  us::ModuleContext *m_Context;
84 };
85 
86 #endif // MITKCOREACTIVATOR_H_
void Load(us::ModuleContext *context) override
void Unload(us::ModuleContext *) override