Exemplo n.º 1
0
  /**
   * This method is required if the AlgorithmPerformed interface is implemented. It is called by the
   * algorithms when it has completed or failed to to complete, so that the dialog can be display
   * the result image and/or clean up.
   *
   * @param algorithm Algorithm that caused the event.
   */
  public void algorithmPerformed(AlgorithmBase algorithm) {
    imageA.clearMask();

    if (algorithm instanceof PlugInAlgorithmISN) {

      if (isnAlgo.isCompleted() == true) {

        // The algorithm has completed and produced a new image to be displayed.
        updateFileInfo(imageA, resultImage);
        new ViewJFrameImage(resultImage, (ModelLUT) null);
      }
    }
  }
  /**
   * This method is required if the AlgorithmPerformed interface is implemented. It is called by the
   * algorithm when it has completed or failed to to complete, so that the dialog can be display the
   * result image and/or clean up.
   *
   * @param algorithm Algorithm that caused the event.
   */
  public void algorithmPerformed(AlgorithmBase algorithm) {

    if (algorithm instanceof PlugInAlgorithmCenterDistance2) {
      image.clearMask();

      if (algorithm.isCompleted()) {
        insertScriptLine();
      }

      if (algorithm != null) {
        algorithm.finalize();
        algorithm = null;
      }

      dispose();
    }
  } // end AlgorithmPerformed()