# Error trying to import a 4D volume as a sequence

**URL:** <https://discourse.slicer.org/t/error-trying-to-import-a-4d-volume-as-a-sequence/20317>\
**Category:** Support\
**Tags:** sequences\
**Created:** [October 24, 2021, 8:54am UTC](https://discourse.slicer.org/t/error-trying-to-import-a-4d-volume-as-a-sequence/20317 "2021-10-24T08:54:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kliron](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@kliron](https://discourse.slicer.org/u/kliron)\
**Post date:** [October 24, 2021, 8:54am UTC](https://discourse.slicer.org/t/error-trying-to-import-a-4d-volume-as-a-sequence/20317/1 "2021-10-24T08:54:55Z")

</div>

I have a list of 3D MRI images (70-step time series of 41 slices each) that I combine into a 4D sequence with the JoinSeriesImageFilter by:

`img4d = sitk.JoinSeries(series)`

Everything seems to work, `series[0].GetSize()` as expected returns `(128, 128, 41)` and `img4d.GetSize()` correctly returns `(128, 128, 41, 70)`

I save my image to .nrrd:

`sitk.WriteImage(img4d, 'img4D.nrrd')`

The header looks ok to me:

```auto
NRRD0004
# Complete NRRD file format specification at:
# http://teem.sourceforge.net/nrrd/format.html
type: unsigned short
dimension: 4
space dimension: 4
sizes: 128 128 41 70
space directions: (1.71407600550601,-0.068471672259036137,-0.10656753702048134,0) (0.0059831519064795693,1.4881492724538934,-0.85992878035812514,0) (0.29446403003947097,1.9949830942955855,3.4544656850761313,0) (0,0,0,1)
kinds: domain domain domain domain
endian: little
encoding: raw
space origin: (-104.3200603168,-110.66393947156,-2.9187184148237999,0)

```

Yet when I try to load it to slicer as a Sequence I get the following error:

`Error: Loading H:/Dokument/Data/dsc/Derived/img4D.nrrd - Failed to read node img4D (vtkMRMLSequenceNode4) from filename='H:/Dokument/Data/Derived/img4D.nrrd'`

EDIT: I should also mention that I _can_ load the file as a Volume but then, as expected, only a single 3D volume node is presented.

EDIT2: My Slicer version is 4.11.20210226 and I am on Windows 10 if that is important.

---

<div class="post-metadata">

**Author:** ![kliron](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@kliron](https://discourse.slicer.org/u/kliron)\
**Post date:** [October 25, 2021, 7:13am UTC](https://discourse.slicer.org/t/error-trying-to-import-a-4d-volume-as-a-sequence/20317/2 "2021-10-25T07:13:03Z")

</div>

It seems the problem is that my 4D image is missing ‘MultiVolume.FrameIdentifyingDICOMTagName’ and thus cannot be loaded as a MultiVolume. How do I set this attribute when I construct the 4D series?
