def getTimeUnit(self, as_string = False): """Return unit of temporal (4th) axis. By default NIfTI unit codes are returned, but if `as_string` is set to true a string representation ala 's' is returned instead. .. seealso:: :meth:`~nifti.format.NiftiFormat.setTimeUnit`, :attr:`~nifti.format.NiftiFormat.time_unit` """ code = self.__nimg.time_units if as_string: code = ncl.nifti_units_string(code) return code
def getXYZUnit(self, as_string = False): """Return 3D-space unit. By default NIfTI unit codes are returned, but if `as_string` is set to true a string representation ala 'mm' is returned instead. .. seealso:: :meth:`~nifti.format.NiftiFormat.setXYZUnit`, :attr:`~nifti.format.NiftiFormat.xyz_unit` """ code = self.__nimg.xyz_units if as_string: code = ncl.nifti_units_string(code) return code