ViewRay, Inc. (NasdaqGM:VRAY) which makes the MRIdian radiation-therapy system for cancer patients, said it has filed for bankruptcy after years of unprofitable operations, and plans to sell some or all of its assets.