Skip to content

image_convertdwi

convertdwi

Small utility module to perform data type conversion on dwi images. The new datatype can be specified using the task.ext.datatype parameter. Using strides parameters, it will convert the dwi as well as the bval and bvec files to ensure they remain consistent with the converted image.

Keywords : image, dwi, convert, datatype


Format : tuple val(meta), path(image), path(bval), path(bvec)

TypeDescriptionMandatoryPattern
metamapGroovy Map containing sample information e.g. [ id:'sample1', single_end:false ]
True
imagefileImage to convert.True*.nii.gz
bvalfileB-values in FSL format [DWI].True*.bval
bvecfileB-values in FSL format [DWI].True*.bvec

Format : tuple val(meta), path(*.nii.gz)

TypeDescriptionMandatoryPattern
metamapGroovy Map containing sample information e.g. [ id:'sample1', single_end:false ]
True
*.nii.gzfileImage converted into the specified datatype.True*.nii.gz

Format : tuple val(meta), path(*.bval)

TypeDescriptionMandatoryPattern
metamapGroovy Map containing sample information e.g. [ id:'test', single_end:false ]
True
*.bvalfileB-values corrected in FSL formatTrue*.bval

Format : tuple val(meta), path(*.bvec)

TypeDescriptionMandatoryPattern
metamapGroovy Map containing sample information e.g. [ id:'test', single_end:false ]
True
*.bvecfileB-vectors corrected in FSL formatTrue*.bvec

Format : path(versions.yml)

TypeDescriptionMandatoryPattern
versions.ymlfileFile containing software versionsTrueversions.yml

TypeDescriptionDefaultChoices
datatypestringData type to convert the image to. This should be a valid data type supported by MRtrix3, such as “float32”, “int16”, etc. If not specified, the module will fail.
suffixstringOptional suffix to add to the output filename before the datatype. If not specified, the output filename will only include the datatype as a suffix.
stridesstringOptional strides to specify the memory layout of the output image. This should be a space-separated string of integers, such as “1 2 3 4”. If not specified, the default memory layout will be used.

DescriptionDOI
MRtrix3MRtrix3 is a software package for various types of diffusion imaging data, including diffusion-weighted, diffusion-tensor, and q-ball imaging.
10.1016/j.neuroimage.2019.116137


Last updated : 2026-05-12