# Import NRRD format

**URL:** <https://discourse.slicer.org/t/import-nrrd-format/26217>\
**Category:** Support\
**Created:** [November 14, 2022, 1:22am UTC](https://discourse.slicer.org/t/import-nrrd-format/26217 "2022-11-14T01:22:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![seyang](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@seyang](https://discourse.slicer.org/u/seyang)\
**Post date:** [November 14, 2022, 1:22am UTC](https://discourse.slicer.org/t/import-nrrd-format/26217/1 "2022-11-14T01:22:27Z")

</div>

Someone can provide sample NRRD format for my case?  
I have raw sequence images as below.  
slice0000.raw , slice0001.raw , slice0002, slice0003.raw…240

I tried to load NRRD with the help of a good person, but an error occurred.

**[Error]**  
^ vtkMRMLStorageNode::ReadData: Failed to read node slice\_1 (vtkMRMLScalarVolumeNode1) from filename=‘D:/2022.09.29 CT/slice.nrrd’  
^ void \_\_cdecl qSlicerIOManager::showLoadNodesResultDialog(bool,class vtkMRMLMessageCollection \*) Errors occurred while loading nodes: “Error: Loading D:/2022.09.29 CT/slice.nrrd - load failed.\n”

**[Used NRRD format]**  
NRRD0004  
type: ushort  
dimension: 3  
sizes: 1000 800 240  
encoding: raw  
data file: ./slice0000  
./slice0001  
./slice0002  
./slice0003  
./slice0004

Could you please let me know what is wrong?  
It will be really helpful for me.

---

<div class="post-metadata">

**Author:** ![seyang](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@seyang](https://discourse.slicer.org/u/seyang)\
**Post date:** [November 14, 2022, 2:53am UTC](https://discourse.slicer.org/t/import-nrrd-format/26217/2 "2022-11-14T02:53:54Z")

</div>

Here is detailed error message.

^ vtkITKArchetypeImageSeriesReader::ExecuteInformation: Cannot open D:/2022.09.29 CT/X-Plane.nhdr. ITK exception info: error in unknown: Could not create IO object for reading file D:/2022.09.29 CT/X-Plane.nhdr  
^ Tried to create one of the following:  
^ BMPImageIO  
^ BioRadImageIO  
^ DCMTKImageIO  
^ GDCMImageIO  
^ GiplImageIO  
^ JPEGImageIO  
^ LSMImageIO  
^ MGHImageIO  
^ MINCImageIO  
^ MRCImageIO  
^ MetaImageIO  
^ NiftiImageIO  
^ NrrdImageIO  
^ PNGImageIO  
^ ScancoImageIO  
^ StimulateImageIO  
^ TIFFImageIO  
^ VTKImageIO  
^ MRMLIDImageIO  
^ You probably failed to set a file suffix, or  
^ set the suffix to an unsupported type.  
^ Algorithm vtkITKArchetypeDiffusionTensorImageReaderFile(00000141540D0BA0) returned failure for request: vtkInformation (00000141587B0120)  
^ Debug: Off  
^ Modified Time: 209976  
^ Reference Count: 1  
^ Registered Events: (none)  
^ Request: REQUEST\_INFORMATION  
^ FORWARD\_DIRECTION: 0  
^ ALGORITHM\_AFTER\_FORWARD: 1  
^ vtkITKArchetypeImageSeriesReader::ExecuteInformation: Cannot open D:/2022.09.29 CT/X-Plane.nhdr. ITK exception info: error in unknown: Could not create IO object for reading file D:/2022.09.29 CT/X-Plane.nhdr  
^ Tried to create one of the following:  
^ BMPImageIO  
^ BioRadImageIO  
^ DCMTKImageIO  
^ GDCMImageIO  
^ GiplImageIO  
^ JPEGImageIO  
^ LSMImageIO  
^ MGHImageIO  
^ MINCImageIO  
^ MRCImageIO  
^ MetaImageIO  
^ NiftiImageIO  
^ NrrdImageIO  
^ PNGImageIO  
^ ScancoImageIO  
^ StimulateImageIO  
^ TIFFImageIO  
^ VTKImageIO  
^ MRMLIDImageIO  
^ You probably failed to set a file suffix, or  
^ set the suffix to an unsupported type.  
^ Algorithm vtkITKArchetypeImageSeriesVectorReaderSeries(00000141540D43E0) returned failure for request: vtkInformation (00000141587BADF0)  
^ Debug: Off  
^ Modified Time: 211490  
^ Reference Count: 1  
^ Registered Events: (none)  
^ Request: REQUEST\_INFORMATION  
^ FORWARD\_DIRECTION: 0  
^ ALGORITHM\_AFTER\_FORWARD: 1  
^ vtkITKArchetypeImageSeriesReader::ExecuteInformation: Cannot open D:/2022.09.29 CT/X-Plane.nhdr. ITK exception info: error in unknown: Could not create IO object for reading file D:/2022.09.29 CT/X-Plane.nhdr  
^ Tried to create one of the following:  
^ BMPImageIO  
^ BioRadImageIO  
^ DCMTKImageIO  
^ GDCMImageIO  
^ GiplImageIO  
^ JPEGImageIO  
^ LSMImageIO  
^ MGHImageIO  
^ MINCImageIO  
^ MRCImageIO  
^ MetaImageIO  
^ NiftiImageIO  
^ NrrdImageIO  
^ PNGImageIO  
^ ScancoImageIO  
^ StimulateImageIO  
^ TIFFImageIO  
^ VTKImageIO  
^ MRMLIDImageIO  
^ You probably failed to set a file suffix, or  
^ set the suffix to an unsupported type.  
^ Algorithm vtkITKArchetypeImageSeriesVectorReaderFile(00000141540D56A0) returned failure for request: vtkInformation (00000141587B00D0)  
^ Debug: Off  
^ Modified Time: 211597  
^ Reference Count: 1  
^ Registered Events: (none)  
^ Request: REQUEST\_INFORMATION  
^ FORWARD\_DIRECTION: 0  
^ ALGORITHM\_AFTER\_FORWARD: 1  
^ vtkITKArchetypeImageSeriesReader::ExecuteInformation: Cannot open D:/2022.09.29 CT/X-Plane.nhdr. ITK exception info: error in unknown: Could not create IO object for reading file D:/2022.09.29 CT/X-Plane.nhdr  
^ Tried to create one of the following:  
^ BMPImageIO  
^ BioRadImageIO  
^ DCMTKImageIO  
^ GDCMImageIO  
^ GiplImageIO  
^ JPEGImageIO  
^ LSMImageIO  
^ MGHImageIO  
^ MINCImageIO  
^ MRCImageIO  
^ MetaImageIO  
^ NiftiImageIO  
^ NrrdImageIO  
^ PNGImageIO  
^ ScancoImageIO  
^ StimulateImageIO  
^ TIFFImageIO  
^ VTKImageIO  
^ MRMLIDImageIO  
^ You probably failed to set a file suffix, or  
^ set the suffix to an unsupported type.  
^ Algorithm vtkITKArchetypeImageSeriesScalarReader(00000141540D0BA0) returned failure for request: vtkInformation (00000141587BF580)  
^ Debug: Off  
^ Modified Time: 212406  
^ Reference Count: 1  
^ Registered Events: (none)  
^ Request: REQUEST\_INFORMATION  
^ FORWARD\_DIRECTION: 0  
^ ALGORITHM\_AFTER\_FORWARD: 1  
^ vtkMRMLStorageNode::ReadData: Failed to read node X-Plane (vtkMRMLMultiVolumeNode1) from filename=‘D:/2022.09.29 CT/X-Plane.nhdr’  
^ ReadData: This is not a nrrd file  
^ vtkMRMLStorageNode::ReadData: Failed to read node X-Plane (vtkMRMLDiffusionWeightedVolumeNode1) from filename=‘D:/2022.09.29 CT/X-Plane.nhdr’  
^ vtkMRMLVolumeArchetypeStorageNode::ReadDataInternal: Cannot read file as a volume of type DiffusionTensorVolume [fullName = D:/2022.09.29 CT/X-Plane.nhdr]: FileFormatError. Number of files listed in the node = 0. File reader says it was able to read 1 files. File reader used the archetype file name of D:/2022.09.29 CT/X-Plane.nhdr [reader 0th file name = D:/2022.09.29 CT/X-Plane.nhdr].  
^ vtkMRMLStorageNode::ReadData: Failed to read node X-Plane (vtkMRMLDiffusionTensorVolumeNode1) from filename=‘D:/2022.09.29 CT/X-Plane.nhdr’  
^ ReadData: This is not a nrrd file  
^ vtkMRMLStorageNode::ReadData: Failed to read node X-Plane (vtkMRMLVectorVolumeNode1) from filename=‘D:/2022.09.29 CT/X-Plane.nhdr’  
^ vtkMRMLVolumeArchetypeStorageNode::ReadDataInternal: Failed to instantiate a file reader  
^ vtkMRMLStorageNode::ReadData: Failed to read node X-Plane (vtkMRMLVectorVolumeNode2) from filename=‘D:/2022.09.29 CT/X-Plane.nhdr’  
^ vtkMRMLVolumeArchetypeStorageNode::ReadDataInternal: Cannot read file as a volume of type Volume [fullName = D:/2022.09.29 CT/X-Plane.nhdr]: FileFormatError. Number of files listed in the node = 0. File reader says it was able to read 1 files. File reader used the archetype file name of D:/2022.09.29 CT/X-Plane.nhdr [reader 0th file name = D:/2022.09.29 CT/X-Plane.nhdr].  
^ vtkMRMLStorageNode::ReadData: Failed to read node X-Plane (vtkMRMLScalarVolumeNode1) from filename=‘D:/2022.09.29 CT/X-Plane.nhdr’  
^ void \_\_cdecl qSlicerIOManager::showLoadNodesResultDialog(bool,class vtkMRMLMessageCollection \*) Errors occurred while loading nodes: “Error: Loading D:/2022.09.29 CT/X-Plane.nhdr - load failed.\n”

---

<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:** [November 14, 2022, 8:37pm UTC](https://discourse.slicer.org/t/import-nrrd-format/26217/3 "2022-11-14T20:37:04Z")

</div>

I’ve just tried this and it works flawlessly.

I’ve used this `MRHead.nhdr` file:

```auto
NRRD0004
# Complete NRRD file format specification at:
# http://teem.sourceforge.net/nrrd/format.html
type: unsigned short
dimension: 3
space: left-posterior-superior
sizes: 256 256 130
space directions: (0,1,0) (0,0,-1) (-1.2999954223632812,0,0)
kinds: domain domain domain
endian: little
encoding: raw
space origin: (86.644897460937486,-133.92860412597656,116.78569793701172)
data file: MRHead%04d.raw 0 129 1

```

with filenames:

- `MRHead0000.raw`
- `MRHead0001.raw`
- `MRHead0002.raw`  
…
- `MRHead0129.raw`

All the files can be downloaded from [here](https://github.com/lassoan/PublicTestingData/releases/download/data/20221114-MultiframeNrrd.zip).

---

<div class="post-metadata">

**Author:** ![seyang](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@seyang](https://discourse.slicer.org/u/seyang)\
**Post date:** [November 15, 2022, 4:21am UTC](https://discourse.slicer.org/t/import-nrrd-format/26217/5 "2022-11-15T04:21:45Z")

</div>

Thanks lassoan.

For your advice, i found solution with someone helping.

---

<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:** [November 15, 2022, 12:16pm UTC](https://discourse.slicer.org/t/import-nrrd-format/26217/6 "2022-11-15T12:16:19Z")

</div>

Could you describe what was the problem and how you solved it (just to help the next person who may run into the same difficulty)? Thank you!

---

<div class="post-metadata">

**Author:** ![seyang](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@seyang](https://discourse.slicer.org/u/seyang)\
**Post date:** [November 18, 2022, 6:36am UTC](https://discourse.slicer.org/t/import-nrrd-format/26217/7 "2022-11-18T06:36:05Z")

</div>

Hi, I edited text to use your attached nhdr file by notpad.  
After editing text, it require “Enter” key one by one.  
If i didn’t it, the error message occurs with [This is not Nhdr file]

NRRD0004 **[Enter]**  
type: unsigned short **[Enter]**  
dimension: 3 **[Enter]**  
space: left-posterior-superior **[Enter]**  
sizes: 1000 800 240 **[Enter]**  
space directions: (0.0277307,0,0) (0,0.0277307,0) (0,0,0.0277307) **[Enter]**  
endian: little **[Enter]**  
encoding: raw **[Enter]**  
datafile: slice%04d.raw 0 239 1 **[Enter]**

In additionally, i made .bat file. It can make NHDR file to refer original text file.

[https://humantek-my.sharepoint.com/:u:/g/personal/sykim\_humantek\_onmicrosoft\_com/Ect3zZ9xFAdLpWdJEB9SlXABAIERAnopIY8j7SYOK9xb9w?e=9DoETe](https://humantek-my.sharepoint.com/:u:/g/personal/sykim_humantek_onmicrosoft_com/Ect3zZ9xFAdLpWdJEB9SlXABAIERAnopIY8j7SYOK9xb9w?e=9DoETe)
