Interfaces¶
Module contents¶
Interface classes for various MRI data processing tools.
Submodules¶
django_mri.analysis.interfaces.dcm2niix module¶
Definition of the Dcm2niix
class.
-
django_mri.analysis.interfaces.dcm2niix.
BASE_DIR
= PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/django-mri/checkouts/latest/django_mri')¶ Project’s base directory.
-
class
django_mri.analysis.interfaces.dcm2niix.
Dcm2niix
(path: pathlib.Path = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/django-mri/checkouts/latest/django_mri/utils/dcm2niix'))¶ Bases:
object
An interface for dcm2niix.
See also
-
BOOLEAN
= {False: 'n', True: 'y'}¶ Convert boolean configurations to “y” or “n”.
-
FLAGS
= {'BIDS': '-b', 'compressed': '-z', 'directory': '-o', 'name': '-f'}¶ Arguemnts dictionary. Keys are the interface’s verbose names and values are the actual CLI’s arguments.
-
convert
(path: pathlib.Path, destination: pathlib.Path, compressed: bool = True, generate_json: bool = True) → pathlib.Path¶ Coverts the series in the provided path from DICOM to NIfTI.
Parameters: - path (Path) – Input DICOM directory
- destination (Path) – Output destination directory
- compressed (bool, optional) – Whether to create compressed (.nii.gz) files or not, by default True
- generate_json (bool, optional) – Whether to generate a “BIDS sidecar” JSON file with supplementary information, by default True
Returns: Output file path
Return type: Path
Raises: RuntimeError
– dcm2niix run failureNotImplementedError
– dcm2niix executable could not be found
-
extract_output_path
(stdout: str, compressed: bool) → pathlib.Path¶ Returns the path of the output file.
Parameters: Returns: Output file path
Return type: Path
-
generate_command
(path: pathlib.Path, destination: pathlib.Path, compressed: bool = True, generate_json: bool = True) → list¶ Generate the command to execute to run dcm2niix.
Parameters: Returns: Command to run, split at spaces
Return type:
-
django_mri.analysis.interfaces.messages module¶
A module storing strings used to display messages.