def slice_dimensions(self): dim = numpy.ndarray((3,), dtype = numpy.int32) pygadgetron.cGT_getAcquisitionsDimensions(self.handle, dim.ctypes.data) ns = dim[0] ny = dim[1] nc = dim[2] return ns, ny, nc
def slice_as_array(self, num): dim = numpy.ndarray((3,), dtype = numpy.int32) pygadgetron.cGT_getAcquisitionsDimensions(self.handle, dim.ctypes.data) ns = dim[0] ny = dim[1] nc = dim[2] #print( ns, ny, nc ) re = numpy.ndarray((nc, ny, ns), dtype = numpy.float64) im = numpy.ndarray((nc, ny, ns), dtype = numpy.float64) pygadgetron.cGT_getAcquisitionsData\ (self.handle, num, re.ctypes.data, im.ctypes.data) return re + 1j*im