Class JDialogHMRF_EM

All Implemented Interfaces:
AlgorithmInterface, ScriptableActionInterface, DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JDialogHMRF_EM extends JDialogScriptableBase implements AlgorithmInterface
See Also:
  • Field Details

    • EQUAL_WEIGHTS

      private static final int EQUAL_WEIGHTS
      See Also:
    • GRAPHIC_WEIGHTS

      private static final int GRAPHIC_WEIGHTS
      See Also:
    • image

      private ModelImage image
      Source image.
    • resultImage

      private ModelImage resultImage
      result image
    • alg

      private AlgorithmHMRF_EM alg
    • equalButton

      private JRadioButton equalButton
    • graphicsButton

      private JRadioButton graphicsButton
    • colorWeighting

      private int colorWeighting
    • textClusters

      private JTextField textClusters
    • numberClusters

      private int numberClusters
    • textGauss

      private JTextField textGauss
    • gaussianSigma

      private float gaussianSigma
    • textMaxEMIterations

      private JTextField textMaxEMIterations
    • maxEMIterations

      private int maxEMIterations
    • textMaxMAPIterations

      private JTextField textMaxMAPIterations
    • maxMAPIterations

      private int maxMAPIterations
    • showMAPplotCheckBox

      private JCheckBox showMAPplotCheckBox
    • showMAPplot

      private boolean showMAPplot
    • fileNameBase

      String fileNameBase
    • resultsFileNameLabel

      private JLabel resultsFileNameLabel
    • resultsFileNameText

      private JTextField resultsFileNameText
    • resultsFileName

      private String resultsFileName
  • Constructor Details

    • JDialogHMRF_EM

      public JDialogHMRF_EM()
      Empty constructor needed for dynamic instantiation.
    • JDialogHMRF_EM

      public JDialogHMRF_EM(Frame theParentFrame, ModelImage im)
      Creates a new JDialogHMRF_EM object.
      Parameters:
      theParentFrame - Parent frame.
      im - Source image.
  • Method Details

    • init

      private void init()
      init Sets up the GUI (panels, buttons, etc) and displays it on the screen.
    • setVariables

      private boolean setVariables()
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
    • callAlgorithm

      protected void callAlgorithm()
      Description copied from class: JDialogScriptableBase
      Starts the algorithm. Already exists in most algorithm dialogs. Should be called during scripted execution and regular operation.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      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.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - Algorithm that caused the event.
    • setColorWeighting

      public void setColorWeighting(int colorWeighting)
      Parameters:
      colorWeighting -
    • setNumberClusters

      public void setNumberClusters(int numberClusters)
      Parameters:
      numberClusters -
    • setGaussianSigma

      public void setGaussianSigma(float gaussianSigma)
      Parameters:
      gaussianSigma -
    • setMaxEMIterations

      public void setMaxEMIterations(int maxEMIterations)
      Parameters:
      maxEMIterations -
    • setMaxMAPIterations

      public void setMaxMAPIterations(int maxMAPIterations)
      Parameters:
      maxMAPIterations -
    • setShowMAPplot

      public void setShowMAPplot(boolean showMAPplot)
      Parameters:
      showMAPplot -
    • setGUIFromParams

      protected void setGUIFromParams()
      set GUI from params
      Specified by:
      setGUIFromParams in class JDialogScriptableBase
    • storeParamsFromGUI

      protected void storeParamsFromGUI() throws ParserException
      store params from gui
      Specified by:
      storeParamsFromGUI in class JDialogScriptableBase
      Throws:
      ParserException - If there is a problem creating/recording the new parameters.