scil_volume_crop.py

usage: __main__.py [-h] [--ignore_voxel_size] [-v [{DEBUG,INFO,WARNING}]] [-f]
                   [--input_bbox INPUT_BBOX | --output_bbox OUTPUT_BBOX]
                   in_image out_image

Crop a volume using a given or an automatically computed bounding box. If a
previously computed bounding box file is given, the cropping will be applied
and the affine fixed accordingly.

Warning: This works well on masked images (like with FSL-Bet) volumes since
it's looking for non-zero data. Therefore, you should validate the results on
other types of images that haven't been masked.

Formerly: scil_crop_volume.py

positional arguments:
  in_image              Path of the nifti file to crop.
  out_image             Path of the cropped nifti file to write.

options:
  -h, --help            show this help message and exit
  --ignore_voxel_size   Ignore voxel size compatibility test between input bounding box and data. Warning, use only if you know what you are doing.
  -v [{DEBUG,INFO,WARNING}]
                        Produces verbose output depending on the provided level.
                        Default level is warning, default when using -v is info.
  -f                    Force overwriting of the output files.
  --input_bbox INPUT_BBOX
                        Path of the pickle file from which to take the bounding box to crop input file.
  --output_bbox OUTPUT_BBOX
                        Path of the pickle file where to write the computed bounding box. (.pickle extension)