If you can get it to work and you just need to display the contoured image, you can use the Active Contour Toolbox by By Eric Debreuve. The function you should look for is ac_plot. Example:
% Mr x Nr = image size
figure(13); hold on;
imagesc(im(end:-1:1, :)); colormap gray; axis ([0 Mr-1 0 Nr-1]);
ac_plot(segm_context_in.acontour, Nr, 'ey--1.5');
hold off;