Segmentation of SOHO/MDI continuum and magnetogram images with the ASAP tool for SSI reconstruction