35 #include <boost/bind.hpp>
36 #include <ctkPluginContext.h>
45 mPluginContext(context),
48 this->initServiceListener();
51 void RegistrationServiceProxy::initServiceListener()
55 boost::bind(&RegistrationServiceProxy::onServiceAdded,
this, _1),
57 boost::bind(&RegistrationServiceProxy::onServiceRemoved,
this, _1)
59 mServiceListener->open();
61 void RegistrationServiceProxy::onServiceAdded(RegistrationService* service)
63 mRegistrationService.reset(service, null_deleter());
66 if(mRegistrationService->isNull())
67 reportWarning(
"RegistrationServiceProxy::onServiceAdded mRegistrationService->isNull()");
73 void RegistrationServiceProxy::onServiceRemoved(RegistrationService *service)
85 mRegistrationService->setMovingData(data);
91 mRegistrationService->setFixedData(data);
96 return mRegistrationService->getMovingData();
101 return mRegistrationService->getFixedData();
106 return mRegistrationService->doPatientRegistration();
111 return mRegistrationService->doFastRegistration_Translation();
116 return mRegistrationService->doFastRegistration_Orientation(tMtm, prMt);
121 return mRegistrationService->doImageRegistration(translationOnly);
126 mRegistrationService->applyImage2ImageRegistration(delta_pre_rMd, description);
131 mRegistrationService->applyContinuousImage2ImageRegistration(delta_pre_rMd, description);
136 mRegistrationService->applyPatientRegistration( rMpr_new, description);
141 mRegistrationService->applyContinuousPatientRegistration( rMpr_new, description);
146 mRegistrationService->applyPatientOrientation(tMtm, prMt);
151 return mRegistrationService->getLastRegistrationTime();
156 mRegistrationService->setLastRegistrationTime(time);
161 return mRegistrationService->isNull();
virtual void applyContinuousPatientRegistration(Transform3D rMpr_new, QString description)
virtual void setMovingData(DataPtr data)
RegistrationServiceProxy(ctkPluginContext *context)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
virtual void setLastRegistrationTime(QDateTime time)
virtual void doPatientRegistration()
registrates the fixed image to the patient
virtual void applyPatientOrientation(const Transform3D &tMtm, const Transform3D &prMt)
void fixedDataChanged(QString uid)
virtual void doImageRegistration(bool translationOnly)
virtual void doFastRegistration_Translation()
use the landmarks in master image and patient to perform a translation-only landmark registration ...
virtual QDateTime getLastRegistrationTime()
boost::shared_ptr< class Data > DataPtr
virtual DataPtr getMovingData()
void reportWarning(QString msg)
virtual void applyContinuousImage2ImageRegistration(Transform3D delta_pre_rMd, QString description)
Helper class for listening to services being added, modified and removed.
void movingDataChanged(QString uid)
virtual void applyPatientRegistration(Transform3D rMpr_new, QString description)
static RegistrationServicePtr getNullObject()
virtual void doFastRegistration_Orientation(const Transform3D &tMtm, const Transform3D &prMt)
virtual DataPtr getFixedData()
virtual void setFixedData(DataPtr data)
virtual void applyImage2ImageRegistration(Transform3D delta_pre_rMd, QString description)