UCL / UCL/STIR

bed positions and projection/detector/image coordinates

Open
#219 1 comment 0 reactions 2 assignees View on GitHub

@rijobro is already working on this.

Since Jul 31, 2018.

enhancement
Dominant language
C++
Stars
160
Forks
113
Avg merge
12d 15h
Merged PRs (30d)
1

Description

@rijobro and I had a look at incorporating horizontal bed position into STIR. The grand plan is simple:

  • make sure that all projectors (and symmetries) etc find LORs/detectors coordinates using get_m or get_t
  • take bed position into account in get_m/get_t, i.e. specify them to be in a coordinate system w.r.t. the bed) (get_m is currently zero in the centre of the scanner, but this would now only be true for the reference bed-position)
  • image coordinates should use the same coordinate system

Aims:

  • whatever the bed position, a direct LOR at m=0 intersects voxels at z=0, etc.
  • if we know the patient orientation, we can figure out the LPS of each voxel, which should then correspond to what the manufacturer uses (in DICOM).

Complications:

  • projection coordinates are currently returned in 2 coordinate systems, see #105. Pending resolution of #105, we'll have to apply the same bed-position shift in the obsolete functions (this seems a pity but easy)
  • images (with z-offset=0) are currently always centered w.r.t. the scanner, see #12. This is no longer sustainable (z-offset has to use the same coordinate system as get_m, at least up to a constant shift). Example: give a large whole-body image to the projector for a particular bed-position. It would be impossible to know what z-offset/bed-position to apply if this depends on the number of planes in the image.
  • backwards compatibility (only for images with expected z-spacing/number of planes). Currently, images are written with offsets (e.g. in interfile they are specified as coordinates of first voxel) with z=0 for the first voxel the most common case. It'd be quite dramatic if forward projections of previously existing images wouldn't give the same projections anymore. Note however that currently bed position is not written/read, giving us some scope maybe.

Given that current get_m is 0 in the middle of the scanner, and image-z=0 in the centre of the first ring (for standard-sized images), it seems we need a shift:

new_get_m = current_get_m - bed_offset + (num_rings-1)/2*ring_spacing

It seems then that for backwards compatibility, we need a default bed_offset=(num_rings-1)/2*ring_spacing which is slightly weird.

Anyone any better ideas? @NikEfth, @ashgillman ?

Notes:

  • we haven't thought hard yet about the sign of the bed_offset in the above eq. I guess that's pure convention.
  • There's probably going to be a backward incompatibility for zoom_image when used with zoom arguments, as this currently tries to preserve the centre.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.