Getting Started with the NRRD Format

From KitwarePublic
Revision as of 15:41, 2 December 2005 by Vmagnotta (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The NRRD format is a little bit different from other image formats. This format has spatial dimensions and other dimensions. The number of spatial dimensions in the image determ,ines the number of dimensions in the image. Other dimensions are loaded into a itk::Vector and used as the pixel type for the image. The user must know apriori the size of the vector upon instantiation of the Reader type since Vectors have a static size.


Using NRRD to Load Diffusion Weighted Images

Diffusion weighted image are used to generate the diffusion tensor. This subsequently can be used to generate scalar measures as well as fiber tracts. The use of the NRRD format to describe DTI data is described in greater detail on the NA-MIC Wiki Pages. Here is an example of how to read and write the diffusion weighted images in NRRD format using ITK. Since it was not clear upon looking at only the Doxygen pages for the IO factory method. Here is a basic example of the image format:

  • testNrrd.nhdr
NRRD0005
content: SomeIDNumber42
type: short
dimension: 4
space: right-anterior-superior
sizes: 2 2 2 2
thicknesses:  NaN  NaN 2.5  NaN
space directions: (2,0,0) (0,2.5,0) (0,0,2) none
centerings: cell cell cell none
kinds: space space space list
endian: little
encoding: ascii
space units: "mm" "mm" "mm"
space origin: (0,0,0)
data file: testNrrd.ascii
measurement frame: (1,0,0) (0,0,1) (0,1,0)
modality:=DWMRI
DWMRI_b-value:=1000
DWMRI_gradient_0000:= 0  0  0
DWMRI_gradient_0001:= 1  0  1
  • testNrrd.ascii
2 2
2 2
2 2
2 2
1 1
1 1
1 1
1 1