  x = imread ('balloons.tif');

  y = imnoise ( x, 'salt & pepper', 0.30 );

  yd = distributed ( y );

  spmd
    yl = getLocalPart ( yd );
    yl = medfilt2 ( yl, [ 3, 3 ] );
  end

  z(1:480,1:640,1) = yl{1};
  z(1:480,1:640,2) = yl{2};
  z(1:480,1:640,3) = yl{3};

  figure;
  subplot ( 1, 3, 1 );imshow ( x );title ( 'X' );
  subplot ( 1, 3, 2 );imshow ( y );title ( 'Y' );
  subplot ( 1, 3, 3 );imshow ( z );title ( 'Z' );
