def from_set(self, fileset, check_if_dicoms=True):
if check_if_dicoms:<EOL><INDENT>self.items = []<EOL>for f in fileset:<EOL><INDENT>if is_dicom_file(f):<EOL><INDENT>self.items.append(f)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>self.items = fileset<EOL><DEDENT>
Overwrites self.items with the given set of files.
        Will filter the fileset and keep only Dicom files.

        Parameters
        ----------
        fileset: iterable of str
        Paths to files

        check_if_dicoms: bool
        Whether to check if the items in fileset are dicom file paths