This invention is a method which uses 3D medical imaging to estimate the optimal amount of embolic material: to be inserted into a flexible net, mesh, bag, liner, or stent within a cerebral aneurysm sac in order to optimally occlude the aneurysm; or to be inserted directly into the sac in order to optimally occlude the aneurysm.