diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2017-10-30 11:09:53 +0000 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2017-10-30 11:09:53 +0000 |
commit | ec373635a4b3e095cfcc87ae03bd52b05389e5d1 (patch) | |
tree | 16c2821b2274cacf0cd1ba2eead77add2880e86c /src/Python/test | |
parent | f5243c6307cfc37072b04e39536b1134717a418b (diff) | |
download | regularization-ec373635a4b3e095cfcc87ae03bd52b05389e5d1.tar.gz regularization-ec373635a4b3e095cfcc87ae03bd52b05389e5d1.tar.bz2 regularization-ec373635a4b3e095cfcc87ae03bd52b05389e5d1.tar.xz regularization-ec373635a4b3e095cfcc87ae03bd52b05389e5d1.zip |
bugfixes for AstraDevice use
Diffstat (limited to 'src/Python/test')
-rw-r--r-- | src/Python/test/test_reconstructor.py | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/src/Python/test/test_reconstructor.py b/src/Python/test/test_reconstructor.py index 343b9bb..f4627d7 100644 --- a/src/Python/test/test_reconstructor.py +++ b/src/Python/test/test_reconstructor.py @@ -30,10 +30,10 @@ def createAstraDevice(projector_geometry, output_geometry): '''TODO remove''' device = AstraDevice(DeviceModel.DeviceType.PARALLEL3D.value, - [projector_geometry['DetectorSpacingX'] , - projector_geometry['DetectorSpacingY'] , + [projector_geometry['DetectorRowCount'] , projector_geometry['DetectorColCount'] , - projector_geometry['DetectorRowCount'] , + projector_geometry['DetectorSpacingX'] , + projector_geometry['DetectorSpacingY'] , projector_geometry['ProjectionAngles'] ], [ @@ -332,5 +332,34 @@ else: fistaRecon.prepareForIteration() - X = fistaRecon.iterate(numpy.load("X.npy")) - numpy.save("X_out.npy", X) + X = numpy.load("X.npy") +## rd = astradevice.createReducedDevice() +## print ("rd proj_geom" , rd.proj_geom) +## +## +## rd.doForwardProject(X[0:1]) +## proj_geomT = proj_geom.copy() +## for ekey in rd.proj_geom.keys(): +## if ekey == 'ProjectionAngles': +## valrd = numpy.shape(rd.proj_geom[ekey]) +## valg = numpy.shape(proj_geomT[ekey]) +## else: +## valrd = rd.proj_geom[ekey] +## valg = proj_geomT[ekey] +## +## print ("key {0}: RD {1} geomT {2}".format(ekey, valrd, valg)) +## +## +## proj_geomT['DetectorRowCount'] = 1 +## vol_geomT = vol_geom.copy() +## vol_geomT['GridSliceCount'] = 1; +## rd.proj_geom = proj_geomT.copy() +## rd.vol_geom = vol_geomT.copy() +## +## +## +## sino_id, y = astra.creators.create_sino3d_gpu( +## X[0:1], rd.proj_geom, rd.vol_geom) + + X = fistaRecon.iterate(X) + #numpy.save("X_out.npy", X) |