How to Load anyway option

image

How can i pass this option when i’m loading the scalarVolume thought a script.
this is my code in script

DSVPC = DICOMScalarVolumePluginClass()
        db = slicer.dicomDatabase

        if(db.patients()):
            for patient in db.patients():
                for study in db.studiesForPatient(patient):
                    for series in db.seriesForStudy(study):
                        print('looking at series ' + str(series) + ' for patient ' + str(patient))
                        files = db.filesForSeries(series)
                        if len(files) >= 1:
                            try:
                                self.importedVolume = DSVPC.load(DSVPC.examineForImport([files])[0])
                            except Exception as e:
                                logging.exception('Error at DSVPC.Load, Exception: '+ str(e))

cause its loading in editor with Regularization transform option turned on but it doesnt when i try load it through the script, i think because of the load anyway option we have in the editor.

DICOM GUI is clearly separated from logic in recent Slicer-4.11 versions, so there should be no problems like this.

For example, see how you can load DICOM files using Slicer-4.11: https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_load_DICOM_files_into_the_scene_from_a_folder