Rigid and flexible multimode fiber endoscopes