-
Notifications
You must be signed in to change notification settings - Fork 23
Description
I'm having trouble generating the projection geometry using leapct.set_modularbeam() for m=5 modules positioned roughly in the same orientation as the cartoon model for this toolbox, e.g.
I can't tell from the demo file (d04_modularbeam.py, relevant section copied below) how to arrange the mth dimension of moduleCenters, colVectors and rowVectors for the number of modules, as the demo only seems to have a single detector?
If I have a single source, does the sourcePositions array remain as the default here or do I need to tile it m-times?
Can you provide a quick example of how to set up a modular geometry similar to the figure above?
I also cannot seem to set_normalizedHelicalPitch with the modularbeam geometry - is helical scanning compatible with modular geometries?
numCols = 512
numAngles = 22int(360numCols/1024)
pixelSize = 0.65512/numCols
numRows = numCols
sod = 1100.0
sdd = 1400.0
sourcePositions = np.ascontiguousarray(np.zeros((numAngles,3)).astype(np.float32), dtype=np.float32)
moduleCenters = np.ascontiguousarray(np.zeros((numAngles,3)).astype(np.float32), dtype=np.float32)
colVectors = np.ascontiguousarray(np.zeros((numAngles,3)).astype(np.float32), dtype=np.float32)
rowVectors = np.ascontiguousarray(np.zeros((numAngles,3)).astype(np.float32), dtype=np.float32)
T_phi = 2.0np.pi/float(numAngles)
for n in range(numAngles):
phi = nT_phi-0.5*np.pi
sourcePositions[n,0] = sod*np.cos(phi)
sourcePositions[n,1] = sod*np.sin(phi)
moduleCenters[n,0] = (sod-sdd)*np.cos(phi)
moduleCenters[n,1] = (sod-sdd)*np.sin(phi)
rowVectors[n,2] = 1.0
colVectors[n,0] = -np.sin(phi)
colVectors[n,1] = np.cos(phi)
leapct.set_modularbeam(numAngles, numRows, numCols, pixelSize, pixelSize, sourcePositions, moduleCenters, rowVectors, colVectors)