checked in reference implementation of nifticlib