From 979f6cc0326fece2df944402f34c5bb871af092a Mon Sep 17 00:00:00 2001 From: Daniil Kazantsev Date: Sun, 29 Sep 2019 19:29:22 +0100 Subject: bilinear interpolation rescaling --- src/Core/regularisers_CPU/utils.c | 143 ++++++++++++++--------- src/Core/regularisers_CPU/utils.h | 2 + src/Matlab/mex_compile/supp_routines/Imscale2D.c | 50 ++++++++ 3 files changed, 138 insertions(+), 57 deletions(-) create mode 100644 src/Matlab/mex_compile/supp_routines/Imscale2D.c diff --git a/src/Core/regularisers_CPU/utils.c b/src/Core/regularisers_CPU/utils.c index 7a4e80b..3a7ed25 100644 --- a/src/Core/regularisers_CPU/utils.c +++ b/src/Core/regularisers_CPU/utils.c @@ -1,21 +1,21 @@ /* -This work is part of the Core Imaging Library developed by -Visual Analytics and Imaging System Group of the Science Technology -Facilities Council, STFC - -Copyright 2017 Daniil Kazanteev -Copyright 2017 Srikanth Nagella, Edoardo Pasca - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ + * This work is part of the Core Imaging Library developed by + * Visual Analytics and Imaging System Group of the Science Technology + * Facilities Council, STFC + * + * Copyright 2017 Daniil Kazanteev + * Copyright 2017 Srikanth Nagella, Edoardo Pasca + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #include "utils.h" #include @@ -23,19 +23,19 @@ limitations under the License. /* Copy Image (float) */ float copyIm(float *A, float *U, long dimX, long dimY, long dimZ) { - long j; + long j; #pragma omp parallel for shared(A, U) private(j) - for (j = 0; j