/** {@inheritDoc} */
  protected void setGUIFromParams() {
    image = scriptParameters.retrieveInputImage(1);

    userInterface = ViewUserInterface.getReference();
    parentFrame = image.getParentFrame();

    if (scriptParameters.doOutputNewImage()) {
      setDisplayLocNew();
    } else {

      // replace processing not supported..
      // setDisplayLocReplace();
      setDisplayLocNew();
    }

    subXDim = scriptParameters.getParams().getInt("sub_x_dim");
    subYDim = scriptParameters.getParams().getInt("sub_y_dim");
    numberOfImagesInMosaic = scriptParameters.getParams().getInt("number_of_images_in_mosaic");
  }
 /**
  * Creates new Mosaic To Slices dialog.
  *
  * @param theParentFrame Parent frame.
  * @param im Source image.
  */
 public JDialogMosaicToSlices(Frame theParentFrame, ModelImage im) {
   super(theParentFrame, false);
   image = im;
   userInterface = ViewUserInterface.getReference();
   init();
 }