# DICOM sort method

**URL:** <https://discourse.slicer.org/t/dicom-sort-method/23592>\
**Category:** Support\
**Tags:** dicom\
**Created:** [May 26, 2022, 1:34am UTC](https://discourse.slicer.org/t/dicom-sort-method/23592 "2022-05-26T01:34:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hu-nie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hu-nie/32/13631_2.png) [@Hu-nie](https://discourse.slicer.org/u/Hu-nie)\
**Post date:** [May 26, 2022, 1:34am UTC](https://discourse.slicer.org/t/dicom-sort-method/23592/1 "2022-05-26T01:34:26Z")

</div>

I have a question about DICOM.

I am dealing with MR images. At this time, I try to use the Instance Number when aligning the DICOM. When I look at the Type of Instance Number Tag, it says “Required, Empty if Unknown (2)”, but it sounds like there are cases where it doesn’t exist. What should I do in this case?

---

<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:** [May 27, 2022, 3:21am UTC](https://discourse.slicer.org/t/dicom-sort-method/23592/2 "2022-05-27T03:21:20Z")

</div>

Instance number must not be used for spatial sorting. Only the `image position patient` and `image orientation patient` tags are allowed for spatial positioning of the image slice. Slicer’s DICOM module uses these tags for reconstructing 3D volume from slices.

---

<div class="post-metadata">

**Author:** ![Hu-nie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hu-nie/32/13631_2.png) [@Hu-nie](https://discourse.slicer.org/u/Hu-nie)\
**Post date:** [May 27, 2022, 4:00am UTC](https://discourse.slicer.org/t/dicom-sort-method/23592/3 "2022-05-27T04:00:26Z")

</div>

@lassoan

Thanks for the reply first.

So does this mean that I have to sort using “image position patient and image orientation patient tags” when loading DICOM?

If so, where is the “Instance Number” tag used?

---

<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:** [May 27, 2022, 4:37am UTC](https://discourse.slicer.org/t/dicom-sort-method/23592/4 "2022-05-27T04:37:22Z")

</div>

> [@Hu-nie](#):
>
> So does this mean that I have to sort using “image position patient and image orientation patient tags” when loading DICOM?

You don’t need to, because Slicer does this for you, along with many other checks, corrections of varying spacing, etc.

> [@Hu-nie](#):
>
> where is the “Instance Number” tag used?

It is typically displayed for the user and serves as a human-readable label for a image series or frame.
