From b49e77382db690ccacde93b7b947753b930f5458 Mon Sep 17 00:00:00 2001 From: Gemma Fardell Date: Mon, 24 Jun 2019 10:50:17 +0100 Subject: bug fix on generating test data --- Wrappers/Python/ccpi/framework/TestData.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Wrappers') diff --git a/Wrappers/Python/ccpi/framework/TestData.py b/Wrappers/Python/ccpi/framework/TestData.py index b512e81..eda14ab 100755 --- a/Wrappers/Python/ccpi/framework/TestData.py +++ b/Wrappers/Python/ccpi/framework/TestData.py @@ -36,9 +36,9 @@ class TestData(object): if which == TestData.SIMPLE_PHANTOM_2D: N = size[0] M = size[1] - sdata = numpy.zeros((N,M)) - sdata[round(N/4):round(3*N/4),round(N/4):round(3*N/4)] = 0.5 - sdata[round(M/8):round(7*M/8),round(3*M/8):round(5*M/8)] = 1 + sdata = numpy.zeros((N, M)) + sdata[int(round(N/4)):int(round(3*N/4)), int(round(N/4)):int(round(3*N/4))] = 0.5 + sdata[int(round(M/8)):int(round(7*M/8)), int(round(3*M/8)):int(round(5*M/8))] = 1 ig = ImageGeometry(voxel_num_x = N, voxel_num_y = M, dimension_labels=[ImageGeometry.HORIZONTAL_X, ImageGeometry.HORIZONTAL_Y]) data = ig.allocate() data.fill(sdata) -- cgit v1.2.3