scil_volume_crop

usage: __main__.py [-h] [--ignore_voxel_size]
                   [-v [{DEBUG,INFO,WARNING,ERROR}]] [-f]
                   [--input_bbox INPUT_BBOX | --output_bbox OUTPUT_BBOX | --use_deprecated_pickle]
                   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.

To:
    - interpolate/reslice to an arbitrary voxel size, use
      scil_volume_resample.
    - pad or crop the volume to match the desired shape, use
      scil_volume_reshape.
    - reshape a volume to match the resolution of another, use
      scil_volume_reslice_to_reference.

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,ERROR}]
                        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 json file from which to take the bounding box to crop input file.
  --output_bbox OUTPUT_BBOX
                        Path of the json file where to write the computed bounding box.
  --use_deprecated_pickle
                        Enable to use .pkl bounding boxes instead of .json.

2.2.2