CustusX  22.04-rc5
An IGT application
cxManualImageTransformRegistrationWidget.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 #include "cxRegistrationService.h"
14 #include "cxData.h"
15 
19 
20 namespace cx
21 {
22 
24  ManualImageRegistrationWidget(services, parent, objectName, "Manual Image Transform Registration")
25 {
26  StringPropertyBasePtr movingImage(new StringPropertyRegistrationMovingImage(services->registration(), services->patient()));
27 
28  LabeledComboBoxWidget* moving = new LabeledComboBoxWidget(this, movingImage);
29 
30  mVerticalLayout->insertWidget(1, moving);
31 }
32 
34 {
36  return QString("<b>Position Matrix rMd for data %1</b>").arg(mConnectedMovingImage->getName());
37  else
38  return "<Invalid matrix>";
39 }
40 
42 {
43  return mConnectedMovingImage->get_rMd();
44 }
45 
47 {
48  Transform3D rMd = mConnectedMovingImage->get_rMd();
49  Transform3D rMMd = M;
50 
51  Transform3D delta_pre_rMd = rMMd * rMd.inv(); // gives delta on the r (left) side.
52  mServices->registration()->addImage2ImageRegistration(delta_pre_rMd, "Manual Image rMd");
53 }
54 
55 } //cx
ManualImageTransformRegistrationWidget(RegServicesPtr services, QWidget *parent, QString objectName)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Composite widget for string selection.
boost::shared_ptr< class StringPropertyBase > StringPropertyBasePtr
boost::shared_ptr< class RegServices > RegServicesPtr
Definition: cxRegServices.h:20
Namespace for all CustusX production code.