DicomToBidsProcedure Class API
- class src.yalab_procedures.procedures.dicom_to_bids.dicom_to_bids.DicomToBidsInputSpec(**kwargs)[source]
Bases:
ProcedureInputSpec,CommandLineInputSpecInput specification for the DicomToBidsProcedure
- class src.yalab_procedures.procedures.dicom_to_bids.dicom_to_bids.DicomToBidsOutputSpec(**kwargs)[source]
Bases:
ProcedureOutputSpecOutput specification for the DicomToBidsProcedure
- class src.yalab_procedures.procedures.dicom_to_bids.dicom_to_bids.DicomToBidsProcedure(**inputs)[source]
Bases:
Procedure,CommandLineConvert DICOM files to BIDS format using HeuDiConv.
Examples
>>> from yalab_procedures.procedures.dicom_to_bids import DicomToBidsProcedure >>> dcm2bids = DicomToBidsProcedure() >>> dcm2bids.inputs.subject_id = '01' >>> dcm2bids.inputs.input_directory = '/path/to/dicom' >>> dcm2bids.inputs.output_directory = '/path/to/bids' >>> dcm2bids.inputs.session_id = '01' >>> dcm2bids.inputs.heuristic_file = '/path/to/heuristic.py' >>> dcm2bids.inputs.cmdline 'heudiconv -s 01 -ss 01 -f /path/to/heuristic.py --files /path/to/dicom/*/*.dcm -o /path/to/bids -c dcm2niix --overwrite --bids' >>> res = dcmtobids.run()
- input_spec
alias of
DicomToBidsInputSpec
- output_spec
alias of
DicomToBidsOutputSpec
- run_procedure(**kwargs)[source]
Run the DicomToBidsProcedure
- Raises:
CalledProcessError – If the command fails to run. The error message will be logged.