pydicom.misc.is_dicom¶
-
pydicom.misc.is_dicom(file_path)¶ Return
Trueif the file at file_path is a DICOM file.This function is a pared down version of
read_preamble()meant for a fast return. The file is read for a conformant preamble (‘DICM’), returningTrueif so, andFalseotherwise. This is a conservative approach.Parameters: file_path (str) – The path to the file. See also
filereader.read_preamble(),filereader.read_partial()