summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python/src
diff options
context:
space:
mode:
authoralgol <dkazanc@hotmail.com>2018-04-10 10:45:41 +0100
committeralgol <dkazanc@hotmail.com>2018-04-10 10:45:41 +0100
commitc409bd46a39357ca14b8ae48f6242700b1576396 (patch)
tree90505f9fce807852a050046acfa5b926ad2399c0 /Wrappers/Python/src
parentf920d9e0373776493adc40e87b11b4f0939c2818 (diff)
downloadregularization-c409bd46a39357ca14b8ae48f6242700b1576396.tar.gz
regularization-c409bd46a39357ca14b8ae48f6242700b1576396.tar.bz2
regularization-c409bd46a39357ca14b8ae48f6242700b1576396.tar.xz
regularization-c409bd46a39357ca14b8ae48f6242700b1576396.zip
#43 all python/matlab 2d/3d DEMOS work OK
Diffstat (limited to 'Wrappers/Python/src')
-rw-r--r--Wrappers/Python/src/cpu_regularisers.pyx6
-rw-r--r--Wrappers/Python/src/gpu_regularisers.pyx4
2 files changed, 5 insertions, 5 deletions
diff --git a/Wrappers/Python/src/cpu_regularisers.pyx b/Wrappers/Python/src/cpu_regularisers.pyx
index 248bad1..0f08f7f 100644
--- a/Wrappers/Python/src/cpu_regularisers.pyx
+++ b/Wrappers/Python/src/cpu_regularisers.pyx
@@ -48,8 +48,8 @@ def TV_ROF_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData,
return outputData
def TV_ROF_3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData,
- int iterationsNumb,
float regularisation_parameter,
+ int iterationsNumb,
float marching_step_parameter):
cdef long dims[3]
dims[0] = inputData.shape[0]
@@ -60,7 +60,7 @@ def TV_ROF_3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData,
np.zeros([dims[0],dims[1],dims[2]], dtype='float32')
# Run ROF iterations for 3D data
- TV_ROF_CPU_main(&inputData[0,0,0], &outputData[0,0,0], regularisation_parameter, iterationsNumb, marching_step_parameter, dims[0], dims[1], dims[2])
+ TV_ROF_CPU_main(&inputData[0,0,0], &outputData[0,0,0], regularisation_parameter, iterationsNumb, marching_step_parameter, dims[2], dims[1], dims[0])
return outputData
@@ -122,5 +122,5 @@ def TV_FGP_3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData,
methodTV,
nonneg,
printM,
- dims[0], dims[1], dims[2])
+ dims[2], dims[1], dims[0])
return outputData
diff --git a/Wrappers/Python/src/gpu_regularisers.pyx b/Wrappers/Python/src/gpu_regularisers.pyx
index 7ebd011..ea746d3 100644
--- a/Wrappers/Python/src/gpu_regularisers.pyx
+++ b/Wrappers/Python/src/gpu_regularisers.pyx
@@ -106,7 +106,7 @@ def ROFTV3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData,
regularisation_parameter,
iterations ,
time_marching_parameter,
- dims[0], dims[1], dims[2]);
+ dims[2], dims[1], dims[0]);
return outputData
#****************************************************************#
@@ -165,6 +165,6 @@ def FGPTV3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData,
methodTV,
nonneg,
printM,
- dims[0], dims[1], dims[2]);
+ dims[2], dims[1], dims[0]);
return outputData