dicomifier.dicom_to_nifti.convert

class dicomifier.dicom_to_nifti.convert.SeriesContext(data_set)

Add series context to logger.

filter(record)

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

dicomifier.dicom_to_nifti.convert.convert_paths(paths, destination, zip, dtype=None, extra_splitters=None)

Convert the DICOM files found in a collection of paths (files, directories, or DICOMDIR) and save the result in the given destination.

Parameters:
  • paths – Collection of paths to scan for DICOM files

  • destination – Destination directory

  • zip – whether to zip the NIfTI files

  • dtype – if not None, force the dtype of the result image

  • extra_splitters – additional splitters to be used when building stacks

dicomifier.dicom_to_nifti.convert.convert_series(series_files, dtype=None, finder=None, extra_splitters=None)

Return the NIfTI image and meta-data from the files containing a single series.

Parameters:
  • dtype – if not None, force the dtype of the result image

  • finder – if not None, series finder object to overwrite the Series Instance UID

  • extra_splitters – additional splitters to be used when building stacks

dicomifier.dicom_to_nifti.convert.convert_series_data_sets(data_sets, dtype=None, extra_splitters=None)

Convert a list of dicom data sets into Nfiti

Parameters:
  • data_sets – list of dicom data sets to convert

  • dtype – if not None, force the dtype of the result image

  • extra_splitters – additional splitters to be used when building stacks

dicomifier.dicom_to_nifti.convert.merge_images_and_meta_data(images_and_meta_data)

Merge the pixel and meta-data of geometrically coherent images.