/**
  * Creates a new JDialogNonlocalMeansFilter object.
  *
  * @param theParentFrame Parent frame.
  * @param im Source image.
  */
 public JDialogNonlocalMeansFilter(Frame theParentFrame, ModelImage im) {
   super(theParentFrame, false);
   image = im;
   userInterface = ViewUserInterface.getReference();
   init();
   setVisible(true);
 }
  /** {@inheritDoc} */
  protected void setGUIFromParams() {
    image = scriptParameters.retrieveInputImage();
    userInterface = ViewUserInterface.getReference();
    parentFrame = image.getParentFrame();

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

    searchWindowSide = scriptParameters.getParams().getInt("search_window_side");
    similarityWindowSide = scriptParameters.getParams().getInt("similarity_window_side");
    noiseStandardDeviation = scriptParameters.getParams().getFloat("noise_standard_deviation");
    degreeOfFiltering = scriptParameters.getParams().getFloat("degree_of_filtering");
    doRician = scriptParameters.getParams().getBoolean("do_rician");
    image25D = scriptParameters.doProcess3DAs25D();
  }
  /** {@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();
 }