@staticmethod<EOL><INDENT>def get_dcm_reader(store_metadata=True, header_fields=None):<DEDENT>
if not store_metadata:<EOL><INDENT>return lambda fpath: fpath<EOL><DEDENT>if header_fields is None:<EOL><INDENT>build_dcm = lambda fpath: DicomFile(fpath)<EOL><DEDENT>else:<EOL><INDENT>dicom_header = namedtuple('<STR_LIT>', header_fields)<EOL>build_dcm = lambda fpath: dicom_header._make(DicomFile(fpath).get_attributes(header_fields))<EOL><DEDENT>return build_dcm<EOL>
Creates a lambda function to read DICOM files.
If store_store_metadata is False, will only return the file path.
Else if you give header_fields, will return only the set of of
header_fields within a DicomFile object or the whole DICOM file if
None.

:return: function
This function has only one parameter: file_path