Conversion

heudiconv.convert.convert(items, converter, scaninfo_suffix, custom_callable, with_prov, bids, outdir, min_meta, overwrite, symlink=True, prov_file=None, dcmconfig=None)

Perform actual conversion (calls to converter etc) given info from heuristic’s infotodict

items symlink converter scaninfo_suffix custom_callable with_prov is_bids sourcedir outdir min_meta

None

heudiconv.convert.convert_dicom(item_dicoms, bids, prefix, outdir, tempdirs, symlink, overwrite)

Save DICOMs as output (default is by symbolic link)

item_dicoms : list of filenames
DICOMs to save
bids : bool
Save to BIDS format
prefix : string
Conversion outname
outdir : string
Output directory
tempdirs : TempDirs instance
Object to handle temporary directories created TODO: remove
symlink : bool
Create softlink to DICOMs - if False, create hardlink instead.
overwrite : bool
If True, allows overwriting of previous conversion

None

heudiconv.convert.nipype_convert(item_dicoms, prefix, with_prov, bids, tmpdir, dcmconfig=None)

Converts DICOMs grouped from heuristic using Nipype’s Dcm2niix interface.

item_dicoms : List
DICOM files to convert
prefix : String
Heuristic output path
with_prov : Bool
Store provenance information
bids : Bool
Output BIDS sidecar JSONs
tmpdir : Directory
Conversion working directory
dcmconfig : File (optional)
JSON file used for additional Dcm2niix configuration
heudiconv.convert.save_converted_files(res, item_dicoms, bids, outtype, prefix, outname_bids, overwrite)

Copy converted files from tempdir to output directory. Will rename files if necessary.

res : Node
Nipype conversion Node with results
item_dicoms: list of filenames
DICOMs converted
bids : bool
Option to save to BIDS

prefix : string

bids_outfiles
Converted BIDS files