Print

Print


Dear David,

there are a number of functions that read header and data from NIfTI image files:
- spm_vol (reads header)
- spm_read_vols (reads entire 3D/4D datasets)
- spm_sample_vol (sample at specific coordinates)
- spm_slice_vol (sample slices)
While spm_read_vols is a "brute force" solution, spm_sample_vol and spm_slice_vol are much more elegant if you don't need entire volumes or if your data comes in different voxel sizes or orientations. A good example for spm_slice_vol usage is the code of spm_imcalc, the "Image Calculator".

Best,

Volkmar