Magnetization reversal in magnetic half-balls influenced by shape perturbations