Command Line Interface¶
The SITK-IBEX packages contains a command line executable to running at the command prompt or for batch processing. This command line interface provides sub-commands. It can be invoke directly as an executable:
sitkibex --help
Or the preferred way using the python executable to execute the module entry point:
python -m sitkibex --help
With either method of invoking the command line interface, the following sections descripts the sub-command available and the command line options available.
sitkibex¶
sitkibex [OPTIONS] COMMAND [ARGS]...
Options
- --debug¶
Maximum verbosity with debugging logging enabled.
- -v, --verbose¶
Increased verbosity with information logging enabled.
- -q, --quiet¶
Minimal verbosity with only warning logging enabled.
registration¶
Perform registration to solve for an OUTPUT_TRANSFORM mapping points from the FIXED_IMAGE to the MOVING_IMAGE.
sitkibex registration [OPTIONS] FIXED_IMAGE MOVING_IMAGE OUTPUT_TRANSFORM
Options
- -b, --bin <bin>¶
Reduce the resolution of the input images in X and Y by this factor
- Default:
1
- -s, --sigma <sigma>¶
- Default:
1.0
- --affine, --no-affine¶
Do affine registration in a second step.
- --automask, --no-automask¶
Automatically compute a mask for the non-zero pixels of the input images
- Default:
False
- --ignore-spacing, --no-ignore-spacing¶
Ignore the magnitude of spacing, but preserve relative ratio.
- Default:
True
- --random, --no-random¶
Use wall-clock instead of a fixed seed for random initialization.
- Default:
False
- --samples-per-parameter <samples_per_parameter>¶
- Default:
5000
Arguments
- FIXED_IMAGE¶
Required argument
- MOVING_IMAGE¶
Required argument
- OUTPUT_TRANSFORM¶
Required argument
resample¶
Create new image by transforming the MOVING_IMAGE onto the FIXED_IMAGE.
Apply the TRANSFORM results from registration to resample the MOVING_IMAGE onto the coordinate space defined by the MOVING_IMAGE.
To apply the results of registration:
>>> sitkibex resample -o fixed_onto_moving.nrrd fixed.nrrd moving.nrrd out.txt
Additional options can produce a small 2D RGB image to quickly review registration results. For example:
>>> sitkibex resample --bin 10 --fusion --projection -o preview.png fixed.nrrd moving.nrrd out.txt
If the moving image has more than 3 dimensions each sub-3d volume will be iteratively resampled.
sitkibex resample [OPTIONS] FIXED_IMAGE MOVING_IMAGE [TRANSFORM]
Options
- -b, --bin <bin>¶
Reduce the resolution of the input images in X and Y by this factor
- Default:
1
- --fusion, --no-fusion¶
Blend fixed and moving images into RGB
- Default:
False
- --combine, --no-combine¶
Combine fixed and moving images into multi-component
- Default:
False
- --invert, --no-invert¶
invert the transform
- Default:
False
- --projection, --no-projection¶
project the volume in the z-direction to create 2-d image
- Default:
False
- -o, --output <output>¶
filename for output image, if not provided the SimpleITK Show method is called
Arguments
- FIXED_IMAGE¶
Required argument
- MOVING_IMAGE¶
Required argument
- TRANSFORM¶
Optional argument