Deep learning-based brain tumour image segmentation and its extension to stroke lesion segmentation