To see a demo of what the geometry paramterers should look like, do as follows:
In [1]:
import tigre
geo = tigre.geometry_default(high_quality = False)
print(geo)
We recommend using the template below and defining you're class as such:
In [ ]:
from __future__ import division
import numpy as np
class Geometry:
def __init__(self, high_quality=True):
if high_quality:
# VARIABLE DESCRIPTION UNITS
# -------------------------------------------------------------------------------------
self.DSD = 1536 # Distance Source Detector (mm)
self.DSO = 1000 # Distance Source Origin (mm)
# Detector parameters
self.nDetector = np.array((512, 512)) # number of pixels (px)
self.dDetector = np.array((0.8, 0.8)) # size of each pixel (mm)
self.sDetector = self.nDetector * self.dDetector # total size of the detector (mm)
# Image parameters
self.nVoxel = np.array((256, 256, 256)) # number of voxels (vx)
self.sVoxel = np.array((256, 256, 256)) # total size of the image (mm)
self.dVoxel = self.sVoxel/self.nVoxel # size of each voxel (mm)
# Offsets
self.offOrigin = np.array((0, 0, 0)) # Offset of image from origin (mm)
self.offDetector = np.array((0, 0)) # Offset of Detector (mm)
# Auxiliary
self.accuracy = 0.5 # Accuracy of FWD proj (vx/sample)
# Mode
self.mode = 'cone' # parallel, cone ...
else:
# VARIABLE DESCRIPTION UNITS
# -------------------------------------------------------------------------------------
self.DSD = 1536 # Distance Source Detector (mm)
self.DSO = 1000 # Distance Source Origin (mm)
# Detector parameters
self.nDetector = np.array((128, 128)) # number of pixels (px)
self.dDetector = np.array((0.8, 0.8))*4 # size of each pixel (mm)
self.sDetector = self.nDetector * self.dDetector # total size of the detector (mm)
# Image parameters
self.nVoxel = np.array((64, 64 , 64)) # number of voxels (vx)
self.sVoxel = np.array((256, 256, 256)) # total size of the image (mm)
self.dVoxel = self.sVoxel / self.nVoxel # size of each voxel (mm)
# Offsets
self.offOrigin = np.array((0, 0, 0)) # Offset of image from origin (mm)
self.offDetector = np.array((0, 0)) # Offset of Detector (mm)
# Auxiliary
self.accuracy = 0.5 # Accuracy of FWD proj (vx/sample)
# Mode
self.mode=None # parallel, cone ...
self.filter=None