True if the fn points to a DICOM image

def isdicom(fn):
    '''True if the fn points to a DICOM image'''
    fn = str(fn)
    if fn.endswith('.dcm'):
        return True
    # Dicom signature from the dicom spec.
    with open(fn,'rb') as fh:
        fh.seek(0x80)
        return fh.read(4)==b'DICM'