View source: R/pipeline_convert.R
dicom2nii | R Documentation |
Function to convert DCM to nii, including the BIDS sidecar. This is a wrapper for dcm2niix by Chris Rorden.
dicom2nii(
dcm_folder,
inpath = NULL,
out_filename = "%f_%p_%t_%s",
outpath = getwd(),
checkLines = F,
compressFile = "y",
bids_sidecar = "y",
anon = "y"
)
dcm_folder |
The folder of the DICOM file which should be converted. This can either be the whole path, or it can be the specific foldername (with the path in inpath). |
inpath |
Optional: this is the path of the folder which contains the folder with the DICOM files. If the full path is specified as dcm_folder, then this argument should be left. |
out_filename |
Filename of the output file. Preferably without file extension. Defaults to same as the input filename. Should only be the filename. Path goes into outpath. Can also be specified in terms of the dcm2niix guidelines. |
outpath |
Path where the output file should be placed. Defaults to the working directory. |
checkLines |
hould the system commands be checked (and not run)? Default FALSE. |
compressFile |
Should the output be compressed as a .nii.gz file? Default TRUE. |
bids_sidecar |
Should the BIDS sidecar json file be produced. Options are 'y', 'n' or 'o' (only). |
anon |
Should the BIDS sidecar be anonymised? Options are 'y' or 'n' |
Creates the nii and json files as desired and returns the success message.
https://github.com/rordenlab/dcm2niix
dicom2nii(dcm_folder, checkLines = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.