def fixorigin(in_file, out_file=None):
    """
    Fix origin of volume for tract_querier
    """
    import nibabel as nb
    import numpy as np
    import os.path as op
    import subprocess as sp
    if out_file is None:
        fname, ext = op.splitext(op.basename(in_file))
        if ext == '.gz':
            fname, _ = op.splitext(fname)
        out_file = op.abspath('%s_fixed.nii.gz' % fname)
    im = nb.load(in_file)
    aff = im.get_affine()
    aff[:3, (3)] = 0.0
    nb.Nifti1Image(im.get_data(), aff, im.get_header()).to_filename(out_file)
    return out_file
