Ab initio nonrigid X-ray nanotomography