NorMIT-nav  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 
cx::XmlOptionFile
Helper class for xml files used to store ssc/cx data.
Definition: cxXmlOptionItem.h:78
cxLogger.h
cx::UsReconstructionGUIExtenderService
Us Reconstruction framework with widgets.
Definition: cxUsReconstructionGUIExtenderService.h:29
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::PatientModelServiceProxy
Always provides a PatientModelService.
Definition: cxPatientModelServiceProxy.h:36
cx::UsReconstructionServicePtr
boost::shared_ptr< class UsReconstructionService > UsReconstructionServicePtr
Definition: cxAcquisitionImplService.h:24
cxXmlOptionItem.h
cx::RegisteredServicePtr
boost::shared_ptr< class RegisteredService > RegisteredServicePtr
Definition: cxAcquisitionServicePluginActivator.h:31
cx::UsReconstructionPluginActivator::~UsReconstructionPluginActivator
~UsReconstructionPluginActivator()
Definition: cxUsReconstructionPluginActivator.cpp:36
cx::FileManagerServiceProxy
Definition: cxFileManagerServiceProxy.h:22
cxUsReconstructionServiceProxy.h
cx::FileManagerServicePtr
boost::shared_ptr< class FileManagerService > FileManagerServicePtr
Definition: cxLogicManager.h:31
cx::UsReconstructionPluginActivator::start
void start(ctkPluginContext *context)
Definition: cxUsReconstructionPluginActivator.cpp:41
cxUsReconstructionPluginActivator.h
cxProfile.h
cxPatientModelServiceProxy.h
UsReconstructionService_iid
#define UsReconstructionService_iid
Definition: cxUsReconstructionService.h:24
cxUsReconstructionGUIExtenderService.h
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::ViewServicePtr
boost::shared_ptr< class ViewService > ViewServicePtr
Definition: cxLogicManager.h:28
cx::UsReconstructionPluginActivator::stop
void stop(ctkPluginContext *context)
Definition: cxUsReconstructionPluginActivator.cpp:59
cx::ViewServiceProxy
Definition: cxViewServiceProxy.h:24
cx::profile
cxResource_EXPORT ProfilePtr profile()
Definition: cxProfile.cpp:160
cxUsReconstructionImplService.h
cx::RegisteredService
Definition: cxRegisteredService.h:35
cx::UsReconstructionServiceProxy
Definition: cxUsReconstructionServiceProxy.h:27
cx::UsReconstructionPluginActivator::UsReconstructionPluginActivator
UsReconstructionPluginActivator()
Definition: cxUsReconstructionPluginActivator.cpp:32
cxViewServiceProxy.h
cxFileManagerServiceProxy.h
cxRegisteredService.h
GUIExtenderService_iid
#define GUIExtenderService_iid
Definition: cxGUIExtenderService.h:23
cx::UsReconstructionImplService
Manager for the us reconstruction process.
Definition: cxUsReconstructionImplService.h:53