# Identify a DICOM Instance file name in 3D DICOM volume

**URL:** <https://discourse.slicer.org/t/identify-a-dicom-instance-file-name-in-3d-dicom-volume/11968>\
**Category:** Support\
**Created:** [June 9, 2020, 7:27pm UTC](https://discourse.slicer.org/t/identify-a-dicom-instance-file-name-in-3d-dicom-volume/11968 "2020-06-09T19:27:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vincent_c/32/5759_2.png) [@Vincent\_C](https://discourse.slicer.org/u/Vincent_C)\
**Post date:** [June 9, 2020, 7:27pm UTC](https://discourse.slicer.org/t/identify-a-dicom-instance-file-name-in-3d-dicom-volume/11968/1 "2020-06-09T19:27:51Z")

</div>

Hi all,

How can I identify a the file name of a single slice in a loaded 3D DICOM volume? I have loaded a DICOM directory with several hundred slices, but after I have identified a single slice of interest, I would like to know which file name it is.

Thanks

---

<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:** [June 9, 2020, 8:31pm UTC](https://discourse.slicer.org/t/identify-a-dicom-instance-file-name-in-3d-dicom-volume/11968/2 "2020-06-09T20:31:00Z")

</div>

You can get the `k` (slice) index in the dataprobe and then look up the instanceUID in the attributes, which allows you to look up the filename in the database. (Use `k` instead of `0` in this example and `filename` will the the one you are looking for.

[https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How\_to\_access\_tag\_of\_a\_volume\_loaded\_from\_DICOM.3F\_For\_example.2C\_get\_the\_patient\_position\_stored\_in\_a\_volume:](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_access_tag_of_a_volume_loaded_from_DICOM.3F_For_example.2C_get_the_patient_position_stored_in_a_volume:)

---

<div class="post-metadata">

**Author:** ![Vincent\_C](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vincent_c/32/5759_2.png) [@Vincent\_C](https://discourse.slicer.org/u/Vincent_C)\
**Post date:** [June 12, 2020, 1:53am UTC](https://discourse.slicer.org/t/identify-a-dicom-instance-file-name-in-3d-dicom-volume/11968/3 "2020-06-12T01:53:39Z")

</div>

Hi Steve,

This is the exact answer I was looking for! Thank you

Vince
