Pixel operations

Resample (spacing, matrix)

Resample pixel data to a target voxel spacing or matrix size.

Problem

You need to standardize a dataset to a uniform matrix size — e.g. all images must be 256×256 for an AI training pipeline that expects consistent input dimensions. The original images have varying matrix sizes (512×512, 320×320, etc.). Resampling with bilinear interpolation produces a consistent grid while preserving anatomical proportions by updating the Pixel Spacing tag.

Steps

  1. Open the file (⌘O) and record the original Pixel Spacing (0028,0030) in Edit mode.

  2. Open Pixel Operations — ⌘K → “Pixel operations…”.

  3. Select Resample.

  4. Set target dimensions:

    • Target width: 256
    • Target height: 256
  5. Click Apply transform.

  6. Verify:

    • Rows (0028,0010) → 256
    • Columns (0028,0011) → 256
    • Pixel Spacing (0028,0030) → updated to reflect the scale change (different from original)

Result

The output is exactly 256×256, with Pixel Spacing recalculated to preserve physical size (1.0 mm on a 512×512 image becomes about 2.0 mm) and bilinear interpolation smoothing the values. It is a derived copy with a new SOP Instance UID.