<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-text-flowed" style="font-family: -moz-fixed;
      font-size: 12px;" lang="x-unicode">I have noticed some
      inconsistencies in how NIFTI images are handled in VTK, ITK, and
      NiBabel. ITK and NiBabel are in agreement with each other and
      differ with VTK on the position of the volume. The VTK output for
      a file is below.
      <br>
      <br>
      vtkNIFTIImageReader (0x1de67d0)
      <br>
        Debug: Off
      <br>
        Modified Time: 91
      <br>
        Reference Count: 2
      <br>
        Registered Events: (none)
      <br>
        Executive: 0x1de7720
      <br>
        ErrorCode: Success
      <br>
        Information: 0x1de6ad0
      <br>
        AbortExecute: Off
      <br>
        Progress: 1
      <br>
        Progress Text: (None)
      <br>
        FileName:
      /home/padraig/Desktop/59674/Seeding/I0000003_59674_sn.nii
      <br>
        FileNames: 0
      <br>
        FilePrefix: (none)
      <br>
        FilePattern: %s.%d
      <br>
        FileNameSliceOffset: 0
      <br>
        FileNameSliceSpacing: 1
      <br>
        DataScalarType: unsigned char
      <br>
        NumberOfScalarComponents: 1
      <br>
        File Dimensionality: 3
      <br>
        File Lower Left: On
      <br>
        Swap Bytes: Off
      <br>
        DataIncrements: (1, 1)
      <br>
        DataExtent: (0, 223, 0, 152, 0, 51)
      <br>
        DataSpacing: (0.9195, 1.40018, 2.89048)
      <br>
        DataOrigin: (0, 0, 0)
      <br>
        HeaderSize: 352
      <br>
        Internal File Name: (none)
      <br>
        TimeAsVector: Off
      <br>
        TimeDimension: 1
      <br>
        TimeSpacing: 1
      <br>
        RescaleSlope: 1
      <br>
        RescaleIntercept: 0
      <br>
        QFac: -1
      <br>
        QFormMatrix: -1 0 0 102.536 0 -1 0 106.413 0 0 1 -117.265 0 0 0
      1
      <br>
        SFormMatrix: -1 0 -0 102.536 0 -1 -0 106.413 0 0 1 -117.265 0 0
      0 1
      <br>
        NIFTIHeader:
      <br>
        PlanarRGB: Off
      <br>
      <br>
      the qform given by nibabel is
      <br>
      <br>
      >>> ni_ob.get_qform()
      <br>
      array([[  -0.91949999,    0.        ,    0.        , 
      102.53600311],
      <br>
             [   0.        ,   -1.40017998,    0.        , 
      106.41300201],
      <br>
             [   0.        ,    0.        ,    2.89048004,  
      30.14909935],
      <br>
             [   0.        ,    0.        ,    0.        ,    1. ]])
      <br>
      <br>
      <br>
      ITK has the origin at
      <br>
      <br>
      [-102.536, -106.413, 30.1491]
      <br>
      <br>
      <br>
    </div>
  </body>
</html>