Detecting cells and cellular activity from two-photon calcium imaging data