# Loading patient DICOM files containing multiple Volume Sequences

**URL:** https://discourse.slicer.org/t/loading-patient-dicom-files-containing-multiple-volume-sequences/29711
**Category:** Support
**Created:** [May 29, 2023, 3:10pm UTC](https://discourse.slicer.org/t/loading-patient-dicom-files-containing-multiple-volume-sequences/29711 "2023-05-29T15:10:11Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![EvanMcNabb](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evanmcnabb/32/66159_2.png) [@EvanMcNabb](https://discourse.slicer.org/u/EvanMcNabb)
#### Post date: [May 29, 2023, 3:10pm UTC](https://discourse.slicer.org/t/loading-patient-dicom-files-containing-multiple-volume-sequences/29711/1 "2023-05-29T15:10:11Z")

</div>

Hi I am having an issue loading a patient dicom list (i.e., the entire patient) that contains multiple Volume Sequences. I am ultimately trying to open these data on the python CLI but I can replicate the behaviour in the UI as well.

In this example I have two multi volume MRI series (a dual echo and DWI with 2 b-values). If I examine each series individually, I see there is a `MultiVolume` Reader available and can select to open it as a Volume Sequence. Works great. If you examine the patient (which auto selects all the series), then only the Dual Echo has a `MultiVolume` Reader available and the DWI only has a `Scalar Volume` importer now. It’s not a case where Scalar Volume is selected by default and I can manually click a MultiVolume importer, it simply doesn’t exist any longer.

This can be seen using the python CLI as well. I am using the strategy from a previous post where you iterate over a file list with user-defined `pluginClassNames`. If I choose `pluginClassNames=["MultiVolumeImporterPlugin", "DICOMScalarVolumePlugin"]` I can see this same behaviour shown below.

**Dual Echo folder alone finds a `MultiVolumeImporterPlugin `**

```auto
<MultiVolumeImporterPlugin.MultiVolumeImporterPluginClass object at 0x000001C5E5872670>
Ax Dualecho FSPGR BH - as a 2 frames Volume Sequence by EchoTime

<MultiVolumeImporterPlugin.MultiVolumeImporterPluginClass object at 0x000001C5E5872670>
Ax Dualecho FSPGR BH - as a 2 frames Volume Sequence by ImagePositionPatient+InstanceNumber
 
<MultiVolumeImporterPlugin.MultiVolumeImporterPluginClass object at 0x000001C5E5872670>
Ax Dualecho FSPGR BH - as a 2 frames MultiVolume by EchoTime
 
<MultiVolumeImporterPlugin.MultiVolumeImporterPluginClass object at 0x000001C5E5872670>
Ax Dualecho FSPGR BH - as a 2 frames MultiVolume by ImagePositionPatient+InstanceNumber
 
<DICOMScalarVolumePlugin.DICOMScalarVolumePluginClass object at 0x000001C5E5872190>
5: Ax Dualecho FSPGR BH

```

**DWI folder alone finds a `MultiVolumeImporterPlugin`**

```auto
<MultiVolumeImporterPlugin.MultiVolumeImporterPluginClass object at 0x000001C5E2C6F280>
Ax DWI BH b-500 Free Breathing - as a 2 frames Volume Sequence by ImagePositionPatient+InstanceNumber
 
<MultiVolumeImporterPlugin.MultiVolumeImporterPluginClass object at 0x000001C5E2C6F280>
Ax DWI BH b-500 Free Breathing - as a 2 frames MultiVolume by ImagePositionPatient+InstanceNumber
 
<DICOMScalarVolumePlugin.DICOMScalarVolumePluginClass object at 0x000001C5E2C6F310>
13: Ax DWI BH b-500 Free Breathing

```

**Patient folder containing both series cannot find `MultiVolumeImporterPlugin` for both**

```auto
<MultiVolumeImporterPlugin.MultiVolumeImporterPluginClass object at 0x000001C5E58729D0>
Ax Dualecho FSPGR BH - as a 2 frames Volume Sequence by EchoTime
 
<MultiVolumeImporterPlugin.MultiVolumeImporterPluginClass object at 0x000001C5E58729D0>
Ax DWI BH b-500 Free Breathing - as a 2 frames Volume Sequence by ImagePositionPatient+InstanceNumber
 
<MultiVolumeImporterPlugin.MultiVolumeImporterPluginClass object at 0x000001C5E58729D0>
Ax Dualecho FSPGR BH - as a 2 frames MultiVolume by EchoTime
 
<MultiVolumeImporterPlugin.MultiVolumeImporterPluginClass object at 0x000001C5E58729D0>
Ax DWI BH b-500 Free Breathing - as a 2 frames MultiVolume by ImagePositionPatient+InstanceNumber
 
<DICOMScalarVolumePlugin.DICOMScalarVolumePluginClass object at 0x000001C5E5872460>
5: Ax Dualecho FSPGR BH
 
<DICOMScalarVolumePlugin.DICOMScalarVolumePluginClass object at 0x000001C5E5872460>
13: Ax DWI BH b-500 Free Breathing

```

Any possible way to add both as Volume Sequences?

Thanks!

---

<div class="post-metadata">

### Author: ![ATAKAN\_Isik](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/atakan_isik/32/65977_2.png) [@ATAKAN\_Isik](https://discourse.slicer.org/u/ATAKAN_Isik)
#### Post date: [May 29, 2023, 4:44pm UTC](https://discourse.slicer.org/t/loading-patient-dicom-files-containing-multiple-volume-sequences/29711/2 "2023-05-29T16:44:08Z")

</div>

Open Slicer Gui and Select Preferences. In DICOM menu you can see loading setting set as volume sequences not multi-volume and try.  
Keep us informed.  
Good Luck

---

<div class="post-metadata">

### Author: ![EvanMcNabb](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evanmcnabb/32/66159_2.png) [@EvanMcNabb](https://discourse.slicer.org/u/EvanMcNabb)
#### Post date: [May 29, 2023, 6:09pm UTC](https://discourse.slicer.org/t/loading-patient-dicom-files-containing-multiple-volume-sequences/29711/3 "2023-05-29T18:09:38Z")

</div>

It’s already set to prefer volume sequences. That’s not the question I’m asking.

I have no issues loading dicom series as volume sequence one at a time. The problem lies in loading _multiple_ volume sequences in a list of series.

---

<div class="post-metadata">

### Author: ![ATAKAN\_Isik](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/atakan_isik/32/65977_2.png) [@ATAKAN\_Isik](https://discourse.slicer.org/u/ATAKAN_Isik)
#### Post date: [May 29, 2023, 6:49pm UTC](https://discourse.slicer.org/t/loading-patient-dicom-files-containing-multiple-volume-sequences/29711/4 "2023-05-29T18:49:35Z")

</div>

had u tried load each series and examine with multiVolume Explorer ? maybe your DWI data has a scalar tensor then u need to decompose series and merge into one dicom. Also i can see just one b value on your DWI series .is b0 omitting or default value of b0 is 0 ?

---

<div class="post-metadata">

### Author: ![EvanMcNabb](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evanmcnabb/32/66159_2.png) [@EvanMcNabb](https://discourse.slicer.org/u/EvanMcNabb)
#### Post date: [May 29, 2023, 8:07pm UTC](https://discourse.slicer.org/t/loading-patient-dicom-files-containing-multiple-volume-sequences/29711/5 "2023-05-29T20:07:56Z")

</div>

Thanks for the reply. No I haven’t used MultiVolume explorer yet. As for the b0, I think that’s just the name of the sequence. There is a T2/b0 series in the same folder.

The DWI (and dual echo) both load as volume sequences which is what I want. You just have to load them one at a time. What I would like to do is load an entire patient that contains both of these series, and have them both load as volume sequences. (I would like to get this functionality implemented so that I can do this on the CLI)

I have janky CLI solution now which is to iterate over the subdirectories and use each of them as a temporary dicom database. While it works, I feel like I’m missing something and should be able to load multiple sequences in one load call on the top level directory.

---

<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 29, 2023, 8:22pm UTC](https://discourse.slicer.org/t/loading-patient-dicom-files-containing-multiple-volume-sequences/29711/6 "2023-05-29T20:22:36Z")

</div>

Thanks for reporting this. Since DICOM does not specify how applications should sort and group slices in a series or study to make up volumes (and manufacturers very often implement the DICOM standard incorrectly anyway), we had to complement complex heuristics that try to guess what interpretation a user may want for the selection in the DICOM browser.

If you select an entire study then Slicer will attempt to reconstruct volumes from multiple series in the study. If this reconstruction seems more appropriate than the reconstruction from each series then it may change how the data is loaded by default.

The loadable that you miss when you select an entire study is `Ax Dualecho FSPGR BH - as a 2 frames ... by ImagePositionPatient+InstanceNumber`. This is because this is a very special case of loading by ImagePositionPatient+InstanceNumber, which was added for reading some incorreclty stored GE DSC MRI scans, which required lumping together multiple series before splitting them by ImagePositionPatient+InstanceNumber.

Unfortunately, this series detection/grouping mechanism becomes much more complicated (and more time consuming) if we also need to figure out which series should be lumped together.

I would recommend to have a look at `MultiVolumeImporterPlugin.py` (around the code that handles the `ImagePositionPatient+InstanceNumber` case) and see if you can improve the detection mechanism.

---

<div class="post-metadata">

### Author: ![EvanMcNabb](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/evanmcnabb/32/66159_2.png) [@EvanMcNabb](https://discourse.slicer.org/u/EvanMcNabb)
#### Post date: [May 29, 2023, 9:18pm UTC](https://discourse.slicer.org/t/loading-patient-dicom-files-containing-multiple-volume-sequences/29711/7 "2023-05-29T21:18:56Z")

</div>

Thank you for the explanation, appreciate it.

I managed to somewhat get this working using slicer’s dicom tools. I added a second pass with a new `loadableSuffix`. Then a second set of `loadableNodeIDs` can be generated where you find `Volume Sequence as EchoTime` or `Volume Sequence as ImagePatientPosition+InstanceNumber`. I swear I tried this idea earlier but I couldn’t get it working.

Fair to say the issue is solved. It works for the CLI now which is what I was after.

The UI still doesn’t handle this though, but I guess that’s because of the reasons you listed.

I can look at that code, thanks for pointing out the file.

---

<div class="post-metadata">

### Author: ![ATAKAN\_Isik](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/atakan_isik/32/65977_2.png) [@ATAKAN\_Isik](https://discourse.slicer.org/u/ATAKAN_Isik)
#### Post date: [May 30, 2023, 10:11am UTC](https://discourse.slicer.org/t/loading-patient-dicom-files-containing-multiple-volume-sequences/29711/8 "2023-05-30T10:11:03Z")

</div>

I think your dwi data has one b value so it is not actually mutlivolume for diffusion weight could you find any example set with multiple b value and try it with multi echo
