units of vtkNIFTIheader.GetPixDim()

Hi all,
I am using vtkNIFTIheader.GetPixDim() to get the spacing of NIFTI files. Can I assume that values it returns are in units of millimeters?
thank you in advance,

The NIFTI units are almost always millimeters. However, if you need to be really sure, you can check the value returned by GetXYZTUnits(). It returns values described by UnitsXYZTEnum, using bitfields, e.g.

if (header.GetXYZTUnits() & vtkNIFTIImageHeader.UnitsSpace) == vtkNIFTIImageHeader.UnitsMM):
    # units are definitely millimeters
elif (header.GetXYZTUnits() & vtkNIFTIImageHeader.UnitsSpace) == vtkNIFTIImageHeader.UnitsUnknown):
    # units not defined, but we can assume they are millimeters?
    # units are not millimeters

Thank you for yet more help, @dgobbi. That does the trick!