# DICOM sort method

**URL:** https://discourse.itk.org/t/dicom-sort-method/5014
**Category:** Beginner Questions
**Created:** [May 27, 2022, 5:43pm UTC](https://discourse.itk.org/t/dicom-sort-method/5014 "2022-05-27T17:43:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Hu-nie](https://discourse.itk.org/user_avatar/discourse.itk.org/hu-nie/32/2676_2.png) [@Hu-nie](https://discourse.itk.org/u/Hu-nie)
#### Post date: [May 27, 2022, 5:43pm UTC](https://discourse.itk.org/t/dicom-sort-method/5014/1 "2022-05-27T17:43:21Z")

</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: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [May 27, 2022, 7:50pm UTC](https://discourse.itk.org/t/dicom-sort-method/5014/2 "2022-05-27T19:50:33Z")

</div>

Hello @Hu-nie,

This is a DICOM specific question and not a ITK/SimpleITK one. A more appropriate forum is the [comp.protocols.dicom google group](https://groups.google.com/g/comp.protocols.dicom).

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)
#### Post date: [May 29, 2022, 12:33pm UTC](https://discourse.itk.org/t/dicom-sort-method/5014/3 "2022-05-29T12:33:57Z")

</div>

The question was also asked and answered on the Slicer forum:

> **[DICOM sort method](https://discourse.slicer.org/t/dicom-sort-method/23592)**
>
> 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...

The role of instance number has been discussed there a few times, for example:

> **[Getting slice index from background layer](https://discourse.slicer.org/t/getting-slice-index-from-background-layer/19197/2?u=lassoan)**
>
> DICOM does not allow any kind of indexing based on slice position, so no geometric conversion exists between physical coordinates to “slice index”. The number that you see in 2D DICOM viewers when you browse the images is the Instance number, which...

In short: instance number is not intended for spatial sorting.

---

<div class="post-metadata">

### Author: ![Hu-nie](https://discourse.itk.org/user_avatar/discourse.itk.org/hu-nie/32/2676_2.png) [@Hu-nie](https://discourse.itk.org/u/Hu-nie)
#### Post date: [May 30, 2022, 2:05am UTC](https://discourse.itk.org/t/dicom-sort-method/5014/4 "2022-05-30T02:05:51Z")

</div>

I didn’t know, thanks for the good info

---

<div class="post-metadata">

### Author: ![Hu-nie](https://discourse.itk.org/user_avatar/discourse.itk.org/hu-nie/32/2676_2.png) [@Hu-nie](https://discourse.itk.org/u/Hu-nie)
#### Post date: [May 30, 2022, 2:06am UTC](https://discourse.itk.org/t/dicom-sort-method/5014/5 "2022-05-30T02:06:44Z")

</div>

Thanks for the info, I’ll read it
