# how to get imagefolder with t1, t1ce, t2 and flair in 3d slicer extended cli python module

**URL:** <https://discourse.slicer.org/t/how-to-get-imagefolder-with-t1-t1ce-t2-and-flair-in-3d-slicer-extended-cli-python-module/27095>\
**Category:** Development\
**Tags:** python\
**Created:** [January 7, 2023, 1:36pm UTC](https://discourse.slicer.org/t/how-to-get-imagefolder-with-t1-t1ce-t2-and-flair-in-3d-slicer-extended-cli-python-module/27095 "2023-01-07T13:36:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![scotwilli](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@scotwilli](https://discourse.slicer.org/u/scotwilli)\
**Post date:** [January 7, 2023, 1:36pm UTC](https://discourse.slicer.org/t/how-to-get-imagefolder-with-t1-t1ce-t2-and-flair-in-3d-slicer-extended-cli-python-module/27095/1 "2023-01-07T13:36:30Z")

</div>

Im trying to create a 3d slicer cli python module which can select a patient folder with .nii files of t1, t1c2, t2 and flair. I have a pytorch inference script which takes all four modalities (t1, t1ce, t2, flair) combined input. Not able to understand how to build widget which can fetch patient folder as input in cli python module. Im new to 3d slicer. Please help me.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [January 7, 2023, 3:52pm UTC](https://discourse.slicer.org/t/how-to-get-imagefolder-with-t1-t1ce-t2-and-flair-in-3d-slicer-extended-cli-python-module/27095/2 "2023-01-07T15:52:11Z")

</div>

The CLI infrastructure is pretty rigid so you would be better off writing a python scripted module to access the files.
