edit-image

Synopsis

edit-image <input> <output> [options]

Description

Modifies the attributes of an image stored in the header.

Arguments

input

Input image.

output

Output image.

Command options

-spacing, -voxel-size, -size <dx> [<dy> [<dz> [<dt>]]]

Voxel size (dx, dy, dz in mm, dt in ms)

-dx <dx>

Spatial voxel size in x dimension.

-dy <dy>

Spatial voxel size in y dimension.

-dz <dz>

Spatial voxel size in z dimension.

-dt, tsize <dt>

Temporal voxel size (in ms)

-origin <x> <y> [<z> [<t>]]

Image spatial origin (in mm)

-torigin <t>

Temporal image origin (in ms)

-orientation <x1> <x2> <x3> <y1> <y2> <y3> <z1> <z2> <z3>

Image orientation. The axes direction vectors are normalized to unit length.

-copy-spacing, -copy-voxel-size, -copy-size <image>

Copy voxel size.

-copy-origin <image>

Copy origin.

-copy-orientation <image>

Copy orientation.

-copy-origin-orientation <image>

Alias for -copy-origin -copy-orientation.

-copy-origin-orientation-spacing, -copy-origin-orientation-voxel-size, -copy-origin-orientation-size <image>

Alias for -copy-origin -copy-orientation -copy-spacing.

-reset

Set orientation, origin, and affine transformation matrix to default.

-reset-dof

Set affine transformation matrix to default.

-dofin <file>

Apply transformation to axis, spacing and origin information in the header. Note that any shearing that is present is stored as additional affine transformation (c.f. -putdof).

-dofin_i <fil>

Same as -dofin but using the inverse transformation.

-putdof <file>

Store affine transformation in image header (NIfTI only).

-putdof_i <fil>

Same as -putdof but using the inverse transformation.

-dofout <file>

Save transformation which maps the world coordinates of the output image to the world coordinates of the input image. Applying this output transformation to the output image using the -dofin option restores the previous image origin, orientation, and voxel size.

-swapxy

Swap the x and y axis vectors.

-swapxz

Swap the x and z axis vectors.

-swapyz

Swap the y and z axis vectors.

Standard options

-v, -verbose [n]

Increase/Set verbosity of output messages. (default: 0)

-debug [level]

Increase/Set debug level for output of intermediate results. (default: 0)

-version [major.minor]

Print version and exit or set version to emulate.

-revision

Print revision (or version) number only and exit.

-h, -help

Print help and exit.