# Dicom image shows just one line of voxels in two views

**URL:** <https://discourse.slicer.org/t/dicom-image-shows-just-one-line-of-voxels-in-two-views/19562>\
**Category:** Development\
**Tags:** dicom\
**Created:** [September 8, 2021, 10:19am UTC](https://discourse.slicer.org/t/dicom-image-shows-just-one-line-of-voxels-in-two-views/19562 "2021-09-08T10:19:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![S\_Arbabi](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@S\_Arbabi](https://discourse.slicer.org/u/S_Arbabi)\
**Post date:** [September 8, 2021, 10:19am UTC](https://discourse.slicer.org/t/dicom-image-shows-just-one-line-of-voxels-in-two-views/19562/1 "2021-09-08T10:19:45Z")

</div>

Hi, I’m opening a DICOM series from a folder on disk, using the following piece of code:

```auto
    from DICOMLib import DICOMUtils
    with DICOMUtils.TemporaryDICOMDatabase() as db:
      DICOMUtils.importDicom(image_dicom_folder, db)
      patientUIDs = db.patients()
      for patientUID in patientUIDs:
        loadedNodeIDs.extend(DICOMUtils.loadPatientByUID(patientUID))

```

but it sometimes shows the image not as it is expected.  
I attach two pictures of it:

 ![slicer_readdcm](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/4/74cf6e459b3fb71605d7ea7e4b9c11cdd3e219f0.jpeg)  
 ![slicer_readdcm2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/d/1dd42d089326157021923823f4d3e6b05738157c.jpeg)

Thanks for your advise in advance

---

<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:** [September 8, 2021, 5:06pm UTC](https://discourse.slicer.org/t/dicom-image-shows-just-one-line-of-voxels-in-two-views/19562/2 "2021-09-08T17:06:05Z")

</div>

How many series are stored in the folder?  
How many series show up in the Data module?  
Which Slicer version are you using?  
Does loading work as expected if you use the DICOM module user interface?

---

<div class="post-metadata">

**Author:** ![S\_Arbabi](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@S\_Arbabi](https://discourse.slicer.org/u/S_Arbabi)\
**Post date:** [September 8, 2021, 5:33pm UTC](https://discourse.slicer.org/t/dicom-image-shows-just-one-line-of-voxels-in-two-views/19562/3 "2021-09-08T17:33:08Z")

</div>

one series was in the folder, that was working well on 4.11.20210226 but when I updated to 4.13, this showed this behavior. I downgraded to 4.11 and that works correctly.  
loading was working correctly when used DICOM module user interface.

---

<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:** [September 8, 2021, 5:44pm UTC](https://discourse.slicer.org/t/dicom-image-shows-just-one-line-of-voxels-in-two-views/19562/4 "2021-09-08T17:44:03Z")

</div>

Does it work well with the very latest Slicer Preview Release?

Is the MRI loaded as a time sequence? (you can see that by going to MultiVolume explorer module or Sequence browser module)

---

<div class="post-metadata">

**Author:** ![S\_Arbabi](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@S\_Arbabi](https://discourse.slicer.org/u/S_Arbabi)\
**Post date:** [September 8, 2021, 6:08pm UTC](https://discourse.slicer.org/t/dicom-image-shows-just-one-line-of-voxels-in-two-views/19562/5 "2021-09-08T18:08:51Z")

</div>

When opened with DICOM module user interface, it shows like this:

 ![1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/e/ae058d02a4da0fe39245f9d5a68e8ae1acce4b8d.jpeg)  
but when opened in code above, the same folder shows as the following:  
 ![2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/9/f9d801cde1fe9a4b87ccedf2c4bc494f9f367e95.jpeg)  
the “sequence” is showing like one line of voxels.

---

<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:** [September 8, 2021, 6:10pm UTC](https://discourse.slicer.org/t/dicom-image-shows-just-one-line-of-voxels-in-two-views/19562/6 "2021-09-08T18:10:09Z")

</div>

Does it work well with the very latest Slicer Preview Release?

---

<div class="post-metadata">

**Author:** ![S\_Arbabi](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@S\_Arbabi](https://discourse.slicer.org/u/S_Arbabi)\
**Post date:** [September 8, 2021, 6:19pm UTC](https://discourse.slicer.org/t/dicom-image-shows-just-one-line-of-voxels-in-two-views/19562/7 "2021-09-08T18:19:54Z")

</div>

perfect, yes. It works with today’s build of preview release.  
Thanks Andras

Best,  
Saeed

---

<div class="post-metadata">

**Author:** ![S\_Arbabi](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@S\_Arbabi](https://discourse.slicer.org/u/S_Arbabi)\
**Post date:** [September 9, 2021, 6:19am UTC](https://discourse.slicer.org/t/dicom-image-shows-just-one-line-of-voxels-in-two-views/19562/8 "2021-09-09T06:19:04Z")

</div>

one other kind of issue with loading DICOMs is like this image:

 ![3](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/e/3ec1006b56112e6964fe9dbd95aeb0bc9148b593.jpeg)  
in which a kind of just one slice of image is showing in one view and nothing in the two other views. the range slicer selectors are freezed and not changeable.

---

<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:** [September 10, 2021, 3:39am UTC](https://discourse.slicer.org/t/dicom-image-shows-just-one-line-of-voxels-in-two-views/19562/9 "2021-09-10T03:39:44Z")

</div>

It seems that each slice in the series contains a different instance number. This indicates that this is a time sequence. If it is not a time sequence then most likely the image got corrupted by incorrect anonymization. You may still be able to load it as a single volume if you enable “Advanced” option in DICOM module and choose an item that is not a sequence.
