Fraxinus  18.10
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"
26 
27 
28 namespace cx
29 {
30 
32 {
33 }
34 
36 {
37 }
38 
39 
40 void UsReconstructionPluginActivator::start(ctkPluginContext* context)
41 {
43  ViewServicePtr viewService = ViewServicePtr(new ViewServiceProxy(context));
44 
45  XmlOptionFile xmlFile = profile()->getXmlSettings().descend("usReconstruction");
46  UsReconstructionImplService *usReconstructionService = new UsReconstructionImplService(context, patientModelService, viewService, xmlFile);
47 
48  mUsReconstruction = RegisteredServicePtr(new RegisteredService(context, usReconstructionService, UsReconstructionService_iid));
49 
50  UsReconstructionServicePtr usReconstructionServiceProxy = UsReconstructionServicePtr(new UsReconstructionServiceProxy(context));
51 
52  UsReconstructionGUIExtenderService *guiService = new UsReconstructionGUIExtenderService(usReconstructionServiceProxy, patientModelService);
53  mRegisteredGui = RegisteredServicePtr(new RegisteredService(context, guiService, GUIExtenderService_iid));
54 
55 }
56 
57 void UsReconstructionPluginActivator::stop(ctkPluginContext* context)
58 {
59  mRegisteredGui.reset();
60  mUsReconstruction.reset();
61  Q_UNUSED(context);
62 }
63 
64 } // namespace cx
65 
66 
boost::shared_ptr< class UsReconstructionService > UsReconstructionServicePtr
cxResource_EXPORT ProfilePtr profile()
Definition: cxProfile.cpp:160
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.