From 41be8fe9c514e813ef77ead036c7c2eacb00fc6e Mon Sep 17 00:00:00 2001 From: sunwen Date: Mon, 12 Jun 2023 11:34:23 +0800 Subject: [PATCH] Add imageExtrapolation. --- .../preprocessData/imageExtrapolation.cpp | 55 +++++++++++++++++++ .../preprocessData/imageExtrapolation.h | 12 ++++ 2 files changed, 67 insertions(+) create mode 100644 src/reflectionReconstruction/preprocessData/imageExtrapolation.cpp create mode 100644 src/reflectionReconstruction/preprocessData/imageExtrapolation.h diff --git a/src/reflectionReconstruction/preprocessData/imageExtrapolation.cpp b/src/reflectionReconstruction/preprocessData/imageExtrapolation.cpp new file mode 100644 index 0000000..39812f9 --- /dev/null +++ b/src/reflectionReconstruction/preprocessData/imageExtrapolation.cpp @@ -0,0 +1,55 @@ +#include "imageExtrapolation.h" +#include "Function1D.h" +#include "Function2D.h" +#include +#include + +using namespace Recon; +using namespace Aurora; + +Matrix Recon::imageExtrapolation(const Matrix& aImg, int aDim) +{ + if(aDim == 3) + { + size_t zSize = aImg.getDimSize(2); + Matrix zIndexZero = Matrix::fromRawData(new double[zSize], zSize); + std::vector indexe; + for(int i=0; i lowerZIndexe; + for(int i=0; i<=indexe[0] - 1; ++i) + { + lowerZIndexe.push_back(i); + } + for(int i=0; i