本文整理汇总了C++中AffineTransform::Compose方法的典型用法代码示例。如果您正苦于以下问题:C++ AffineTransform::Compose方法的具体用法?C++ AffineTransform::Compose怎么用?C++ AffineTransform::Compose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AffineTransform
的用法示例。
在下文中一共展示了AffineTransform::Compose方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
}
else {
std::cerr << "The aren't any images to perform subtraction" << std::endl;
return EXIT_FAILURE;
}
}
std::cout << "\t/-- Image resampling" << std::endl;
std::cout << "\t -- WM mask" << std::endl;
MaskImage baselineWMMaskMoved = BrainRegistration::ResampleImage<AffineTransformType>(followupWMMask, baselineWMMask, affine);
ProbabilityImage pdMoved;
if ((pdFollowup != (ProbabilityImage)NULL) && (pdBaseline != (ProbabilityImage)NULL)) {
pdMoved = BrainRegistration::ResampleImage<AffineTransformType>(pdFollowup, pdBaseline, affine);
brainio->WriteProbabilityImage(
followupImagesFolderName + "pd_moved.nii.gz",
pdMoved
);
}
std::cout << "\t -- T2" << std::endl;
ProbabilityImage t2Moved;
if (t2Baseline != (ProbabilityImage)NULL) {
t2Moved = BrainRegistration::ResampleImage<AffineTransformType>(pdFollowup, t2Baseline, affine);
brainio->WriteProbabilityImage(
followupImagesFolderName + "t2_moved.nii.gz",
t2Moved
);
}
std::cout << "\t -- FLAIR" << std::endl;
ProbabilityImage flairMoved;
if (flairBaseline != (ProbabilityImage)NULL) {
if ((pdBaseline != (ProbabilityImage)NULL) && (pdFollowup != (ProbabilityImage)NULL)) {
std::cout << "\t /-- PD in baseline and followup" << std::endl;
AffineTransform flairAffine = AffineTransformType::New();
affine->Compose(flairBaselineAffine, true);
flairMoved = BrainRegistration::ResampleImage<AffineTransformType>(pdFollowup, flairBaseline, affine);
brainio->WriteProbabilityImage(
followupImagesFolderName + "flair_moved.nii.gz",
flairMoved
);
}
else if (pdFollowup != (ProbabilityImage)NULL) {
std::cout << "\t /-- PD only in followup" << std::endl;
flairMoved = BrainRegistration::ResampleImage<AffineTransformType>(pdFollowup, flairBaseline, affine);
brainio->WriteProbabilityImage(
followupImagesFolderName + "flair_moved.nii.gz",
flairMoved
);
}
else {
std::cout << "\t /-- No PD" << std::endl;
flairMoved = BrainRegistration::ResampleImage<AffineTransformType>(flairFollowup, flairBaseline, affine);
brainio->WriteProbabilityImage(
followupImagesFolderName + "flair_moved.nii.gz",
flairMoved
);
}
}
// Final ROI
MaskImage wmMask = BrainSegmentation::Union(baselineWMMaskMoved, followupWMMask);
brainio->WriteMaskImage(
followupSegmentationFolderName + "union_wm_mask.nii.gz",
wmMask
);
// The last step is to apply the subtraction