Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Assigning module centers for 5 modules #176

@danspencehalo

Description

@danspencehalo

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.

Image

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.65
512/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 = n
T_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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions