# How to load an entire entire dicom directory using the widget button on a python code?

**URL:** <https://discourse.slicer.org/t/how-to-load-an-entire-entire-dicom-directory-using-the-widget-button-on-a-python-code/3088>\
**Category:** Support\
**Tags:** build\
**Created:** [June 6, 2018, 1:42pm UTC](https://discourse.slicer.org/t/how-to-load-an-entire-entire-dicom-directory-using-the-widget-button-on-a-python-code/3088 "2018-06-06T13:42:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [June 6, 2018, 8:41pm UTC](https://discourse.slicer.org/t/how-to-load-an-entire-entire-dicom-directory-using-the-widget-button-on-a-python-code/3088/2 "2018-06-06T20:41:04Z")

</div>

You can use DICOMLib.DICOMUtils.LoadDICOMFilesToDatabase See complete example here:

> <https://github.com/Slicer/Slicer/blob/5ec342768faff961fd3b236935dfe95d7198b117/Applications/SlicerApp/Testing/Python/SubjectHierarchyGenericSelfTest.py#L165-L184>

See also this post: [Imported dicom files do not show in the dicomDatabase](https://discourse.slicer.org/t/imported-dicom-files-do-not-show-in-the-dicomdatabase/2651)

---

_[View the full topic](https://discourse.slicer.org/t/how-to-load-an-entire-entire-dicom-directory-using-the-widget-button-on-a-python-code/3088)._
