
  // Erode
  erode->SetMarkerImage ( shiftErode->GetOutput() );
  erode->SetMaskImage ( dilate->GetOutput() );
  erode->FullyConnectedOn();

  writer->SetInput ( erode->GetOutput() );

  itk::SimpleFilterWatcher watchDilate(dilate);
  itk::SimpleFilterWatcher watchErode(erode);

  // Execute the filter
  try