/usr/bin/nib-nifti-dx is in python-nibabel 1.2.2-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #!/usr/bin/python
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
#   See COPYING file distributed along with the NiBabel package for the
#   copyright and license terms.
#
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
''' Print nifti diagnostics for header files '''
import sys
from optparse import OptionParser
import nibabel as nib
def main():
    """ Go go team """
    parser = OptionParser(
        usage="%s [FILE ...]\n\n" % sys.argv[0] + __doc__,
        version="%prog " + nib.__version__)
    (opts, files) = parser.parse_args()
    for fname in files:
        fobj = nib.volumeutils.allopen(fname)
        hdr =  fobj.read(nib.nifti1.header_dtype.itemsize)
        result = nib.Nifti1Header.diagnose_binaryblock(hdr)
        if len(result):
            print 'Picky header check output for "%s"\n' % fname
            print result
            print
        else:
            print 'Header for "%s" is clean' % fname
if __name__ == '__main__':
    main()
 |