Nifti tool

From VrlWiki
Jump to navigation Jump to search

nifti_tool is a command-line tool for interacting with NIfTI medical image metadata. It is a very useful way to interactively view the metadata; it's also powerful for editing metadata interactively, but we don't tend to do that in the diffusion MRI project. nifti_tool is part of the reference NIfTI library implementation and its source code is in the public domain.

Here are a couple common commands:

  • nifti_tool -disp_hdr -infiles foo.nii --- display the entire header. Check the NIfTI header field documentation to understand what you see.
  • nifti_tool -disp_hdr -field bar -infiles foo.nii --- display just header field bar.
  • nifti_tool -check_hdr -infiles foo.nii --- check the header for problems
  • nifti_tool -check_nim -infiles foo.nii --- check the image structure for problems
  • nifti_tool -help --- dump the entire user doc for the tool. Pipe to less if you want an easy way to browse this.