Skip to main content

Transform

The Transform tool provides geometric transformation operations for modifying the spatial properties of volume and mask data. Use this tool to reorient images, adjust physical dimensions, translate the origin, or center data at the scene origin.

Accessing the Tool​

  1. Navigate to the Image tab in the ribbon.
  2. Click Transform in the Transform section.

Tabs​

The Transform tool organizes its operations into four tabs:

TabPurpose
ReorientRotate the data about the principal axes, or by an explicit rotation matrix
RescaleChange the physical size of the data, either by target dimensions or by voxel spacing
TranslateMove the data by shifting its origin
Center volumeMove the data so it is centred on the scene origin

Reorient Tab​

Rotate volume and mask datasets around a specified axis.

Parameters​

Target objects​

The Target objects list decides what is reoriented. Unlike most tools, it spans both object types, because a mask only stays aligned with its volume if both are transformed together:

  • Active volume object, Selected volume object(s), All volume objects
  • Active mask object, Selected mask object(s), Visible mask object(s), All mask objects
  • All volume and mask objects
caution

Reorienting a volume without its masks, or the other way round, leaves the two no longer aligned. Choose All volume and mask objects unless you have a specific reason not to.

Interpolation method​

Separate methods for volumes and masks, each offering Nearest, Linear, and Cubic. Keep Nearest for masks so label values are not blended into values that belong to no label.

Reorientation Methods​

MethodDescription
Using axis and angleRotate about the X, Y, and Z axes by a given angle. Tick the axes to rotate about and set the angle
Using matrixSupply a 3x3 rotation matrix directly. Invert applies the inverse of the matrix you typed

Use Using axis and angle for ordinary reorientation. Using matrix is there for reproducing a rotation computed elsewhere, such as one taken from a registration result or a scanner report.

tip

Use Nearest interpolation for masks to preserve label values without introducing interpolation artifacts.


Rescale Tab​

Modify the physical dimensions or pixel spacing of the datasets.

Physical Dimensions Mode​

Specify the desired physical size in millimeters:

ParameterDescription
X (mm)Target physical width
Y (mm)Target physical height
Z (mm)Target physical depth
Maintain aspect ratioLock proportional scaling

Pixel Spacing Mode​

Directly set the voxel spacing values:

ParameterDescription
XDistance between voxel centres along X, in mm
YDistance between voxel centres along Y, in mm
ZDistance between voxel centres along Z, in mm

The Information group shows the physical dimensions and pixel spacing before and after, so the effect of a value is visible before it is applied.

info

Rescaling only modifies the spacing metadata. The voxel data itself is not resampled. To change the number of voxels, use the Resample tool.


Translate Tab​

Move the origin of the datasets.

Parameters​

ParameterDescription
Translation X (mm)Shift along X axis
Translation Y (mm)Shift along Y axis
Translation Z (mm)Shift along Z axis

Options​

OptionDescription
Set originSet absolute origin coordinates
Translate originMove origin by specified offset

Center volume Tab​

Move datasets so their geometric centre sits at the scene origin (0, 0, 0).

This is useful for:

  • Aligning data that came from different sources
  • Preparing data for symmetric operations
  • Simplifying coordinate calculations

Click Apply to centre the selected target objects.

note

One Apply button sits below the tabs and serves all four of them: it performs whatever the tab you are currently on describes. Switching tabs therefore changes what Apply does.


Workflow​

Reorienting a Volume​

  1. Open the Transform tool.
  2. Select the Reorient tab.
  3. Choose All volume and mask objects from Target objects, so masks stay aligned with their volume.
  4. Leave Reorientation method on Using axis and angle.
  5. Tick the axis to rotate about, for example Z, and set the angle.
  6. Set Interpolation method to Linear for volumes and Nearest for masks.
  7. Click Apply.

Adjusting Spacing​

  1. Open the Transform tool.
  2. Select the Rescale tab.
  3. Enter new spacing values or physical dimensions.
  4. Enable Maintain aspect ratio if proportional scaling is needed.
  5. Click Apply.

Apply Transformation Matrix​

For advanced use cases, you can apply transformations via the Python scripting API.

See the VolumeOperations API Reference for available transformation methods including reorient(), transform(), transform_to_image_grid(), change_spacing(), translate_origin(), change_origin(), and center_at_origin().

transform() moves and resizes the image grid so that the whole transformed image fits, as the Reorient tab does. Set its keepImageGrid argument to True to keep the origin, spacing and dimensions instead; anything moved outside them is cut off. transform_to_image_grid() transforms volumes and resamples them onto a grid you give by origin, spacing and dimensions, such as the grid of another volume.

warning

Geometric transformations may cause DICOM metadata to become desynchronized with the image data. Verify coordinate alignment after transformations if metadata accuracy is required.