Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxUsReconstructionPluginActivator.cpp
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
13 
14 #include <QtPlugin>
15 #include <iostream>
16 
18 #include "cxRegisteredService.h"
20 #include "cxViewServiceProxy.h"
22 #include "cxXmlOptionItem.h"
24 #include "cxProfile.h"
25 #include "cxLogger.h"
27 
28 
29 namespace cx
30 {
31 
33 {
34 }
35 
37 {
38 }
39 
40 
41 void UsReconstructionPluginActivator::start(ctkPluginContext* context)
42 {
44  ViewServicePtr viewService = ViewServicePtr(new ViewServiceProxy(context));
45  FileManagerServicePtr filemanagerservice = FileManagerServicePtr(new FileManagerServiceProxy(context));
46 
47  XmlOptionFile xmlFile = profile()->getXmlSettings().descend("usReconstruction");
48  UsReconstructionImplService *usReconstructionService = new UsReconstructionImplService(context, patientModelService, viewService, filemanagerservice, xmlFile);
49 
50  mUsReconstruction = RegisteredServicePtr(new RegisteredService(context, usReconstructionService, UsReconstructionService_iid));
51 
52  UsReconstructionServicePtr usReconstructionServiceProxy = UsReconstructionServicePtr(new UsReconstructionServiceProxy(context));
53 
54  UsReconstructionGUIExtenderService *guiService = new UsReconstructionGUIExtenderService(usReconstructionServiceProxy, patientModelService);
55  mRegisteredGui = RegisteredServicePtr(new RegisteredService(context, guiService, GUIExtenderService_iid));
56 
57 }
58 
59 void UsReconstructionPluginActivator::stop(ctkPluginContext* context)
60 {
61  mRegisteredGui.reset();
62  mUsReconstruction.reset();
63  Q_UNUSED(context);
64 }
65 
66 } // namespace cx
67 
68 
boost::shared_ptr< class UsReconstructionService > UsReconstructionServicePtr
cxResource_EXPORT ProfilePtr profile()
Definition: cxProfile.cpp:160
boost::shared_ptr< class FileManagerService > FileManagerServicePtr
boost::shared_ptr< class ViewService > ViewServicePtr
#define UsReconstructionService_iid
boost::shared_ptr< class RegisteredService > RegisteredServicePtr
Us Reconstruction framework with widgets.
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Manager for the us reconstruction process.
Always provides a PatientModelService.
#define GUIExtenderService_iid
Helper class for xml files used to store ssc/cx data.
Namespace for all CustusX production code.