# How to Load anyway option

**URL:** <https://discourse.slicer.org/t/how-to-load-anyway-option/12479>\
**Category:** Development\
**Tags:** dicom\
**Created:** [July 10, 2020, 3:13pm UTC](https://discourse.slicer.org/t/how-to-load-anyway-option/12479 "2020-07-10T15:13:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anand\_Mulay](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anand_mulay/32/6850_2.png) [@Anand\_Mulay](https://discourse.slicer.org/u/Anand_Mulay)\
**Post date:** [July 10, 2020, 3:13pm UTC](https://discourse.slicer.org/t/how-to-load-anyway-option/12479/1 "2020-07-10T15:13:43Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/7/379d46afb1df004a5315b7f4c4b8534b600705cb.png)

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

```python
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.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 10, 2020, 4:43pm UTC](https://discourse.slicer.org/t/how-to-load-anyway-option/12479/2 "2020-07-10T16:43:34Z")

</div>

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](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_load_DICOM_files_into_the_scene_from_a_folder)
