Image registrations

CIRRUS supports interpreting two types of registration data for mapping image spaces to each other:

  1. Affine transformation matrix. This type of registration takes the form of a json structure, which contains a 4d matrix describing how one image spaces maps to another:

    ```
    {
      "3d_affine_transform": [
        [0.707, 0.707, 0.0, 0.0],
        [0.707, -0.707, 0.0, 0.0],
        [0.0, 0.0, 1.0, 0.0],
        [0.0, 0.0, 0.0, 1.0]
      ]
    }
    ```
    
  2. Displacement fields

    A displacement field is a 4d image (like `mha`) with a shape `[x, y, z, 3]` (including a voxel to world transformation matrix) which contains a 3d offset (the 4th component) that describes how a given world coordinate is _displaced_ when mapping to another image space. Coordinates that fall in-between voxels are linearly interpolated. Coordinates that fall outside the displacement field are extrapolated using an affine transform approximation of the displacement field.
    

Use in CIRRUS display sets/archive items

These registration can be uploaded to a reader study display set, archive item, or algorithm. CIRRUS will interpret these values in a special manner. To use registrations in your workstation, you must define the view-content of your application first. For example, let us assume that you have computed a displacement field to register a fixed-image with a moving-image:

This view content will associate the first image moving-image with an affine transform registration, and the fixed-image with two displacement-field registrations. The first mapped registration is applied as the "standard" registration for the image, the second as the inverse registration for the image. If the inverse registration is omitted, CIRRUS will try to compute an approximated inverse registration based on the "standard" registration.

How CIRRUS uses registration data

When registration data is assigned to an image in CIRRUS, the registration will be interpreted to describe the registration to a third, hidden, "standard space" (Z).

Only images that have registration data attached to them will participate in the registration pool. If there was, for example, an image 3 that did not have any registration data attached to in the view content section, it would use the default registration settings, which means that the current view will be synced with all other views, but no mapping is applied.

This scheme of using a common space Z has the advantage that it simplifies the configuration of registrations in CIRRUS but it does not allow for more advanced pair-wise registrations of multiple images because every registration gets mapped to a single space Z. However, pair-wise registrations with two images can be mapped to this scheme by using an identity affine transformation.

Pathology sqreg registrations

For pathology images, CIRRUS supports sqreg registrations. To use sqreg registrations, upload the original image and an sqreg file, and CIRRUS will deform the original image using the sqreg data.