dipy_reslice#
Synopsis#
Reslice data to a new voxel resolution with automatic or manual sizing.
This workflow resamples volumetric data to a specified voxel size or automatically determines an isotropic resolution that preserves the original voxel volume, so the resliced image keeps roughly the same number of voxels and the same signal per voxel.
Usage#
dipy_reslice [OPTIONS] input_files
Input Parameters#
input_filesPath to the input volumes. This path may contain wildcards to process multiple inputs at once.
General Options#
--new_vox_sizeNew voxel size as (x, y, z) in mm. If None, an isotropic voxel size is computed from the original voxel volume
V = x * y * z: the geometric meanV ** (1 / 3)is snapped to the grid value whose cubed volume is closest toV. The grid is 0.25mm for voxels between 1 and 10mm and 0.025mm for voxels between 0.1 and 1mm (e.g. 1x1x3mm gives 1.5mm, 0.1x0.1x0.2mm gives 0.125mm, 2x2x2mm is kept as is). (default: None)--orderInterpolation order. Integer values 0–5 select spline order via scipy (0 nearest, 1 trilinear, …). String values
'lanczos'or'lanczos2'select a 2-lobe Lanczos kernel;'lanczos3'selects a 3-lobe Lanczos kernel. Use 0 to avoid smoothing. (default: 1)--modePoints outside the boundaries of the input are filled according to the given mode ‘constant’, ‘nearest’, ‘reflect’ or ‘wrap’. (default: constant)
--cvalFill value for points outside the input boundaries when mode=’constant’. (default: 0)
--num_processesSplit the calculation to a pool of children processes. This only applies to 4D data arrays. Default is 1. If < 0 the maximal number of cores minus
num_processes + 1is used (enter -1 to use as many cores as possible). 0 raises an error. (default: 1)--vox_factorDeprecated since version 1.13.0: This parameter is ignored and will be removed in 1.15.0. The automatic voxel size now preserves the original voxel volume.
Former interpolation factor for automatic voxel size calculation. (default: None)
Output Options#
--out_dirOutput directory for saving results. (default: current directory)
--out_reslicedFilename for the resliced output volume. (default: resliced.nii.gz)
References#
Garyfallidis, E., M. Brett, B. Amirbekian, A. Rokem, S. Van Der Walt, M. Descoteaux, and I. Nimmo-Smith. Dipy, a library for the analysis of diffusion MRI data. Frontiers in Neuroinformatics, 1-18, 2014.