Optimization of the performance of segmented scintillators for radiotherapy imaging through novel binning techniques