本文整理汇总了C++中DataPtr::get_rMd_History方法的典型用法代码示例。如果您正苦于以下问题:C++ DataPtr::get_rMd_History方法的具体用法?C++ DataPtr::get_rMd_History怎么用?C++ DataPtr::get_rMd_History使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataPtr
的用法示例。
在下文中一共展示了DataPtr::get_rMd_History方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: applyPatientOrientation
/**\brief Identical to doFastRegistration_Orientation(), except data does not move.
*
* When applying a new transform to the patient orientation, all data is moved
* the the inverse of that value, thus giving a net zero change along the path
* pr...d_i.
*
*/
void RegistrationImplService::applyPatientOrientation(const Transform3D& tMtm, const Transform3D& prMt)
{
Transform3D rMpr = mPatientModelService->get_rMpr();
//create a marked(m) space tm, which is related to tool space (t) as follows:
//the tool is defined in DICOM space such that
//the tool points toward the patients feet and the spheres faces the same
//direction as the nose
Transform3D tMpr = prMt.inv();
// this is the new patient registration:
Transform3D tmMpr = tMtm * tMpr;
// the change in pat reg becomes:
Transform3D F = tmMpr * rMpr.inv();
QString description("Patient Orientation");
QDateTime oldTime = this->getLastRegistrationTime(); // time of previous reg
this->applyPatientRegistration(tmMpr, description);
// now apply the inverse of F to all data,
// thus ensuring the total path from pr to d_i is unchanged:
Transform3D delta_pre_rMd = F;
// use the same registration time as generated in the applyPatientRegistration() above:
RegistrationTransform regTrans(delta_pre_rMd, this->getLastRegistrationTime(), description);
std::map<QString,DataPtr> data = mPatientModelService->getData();
// update the transform on all target data:
for (std::map<QString,DataPtr>::iterator iter = data.begin(); iter!=data.end(); ++iter)
{
DataPtr current = iter->second;
RegistrationTransform newTransform = regTrans;
newTransform.mValue = regTrans.mValue * current->get_rMd();
current->get_rMd_History()->updateRegistration(oldTime, newTransform);
report("Updated registration of data " + current->getName());
std::cout << "rMd_new\n" << newTransform.mValue << std::endl;
}
this->setLastRegistrationTime(regTrans.mTimestamp);
reportSuccess("Patient Orientation has been performed");
}