Class JDialogDirectResample

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

public class JDialogDirectResample extends JDialogScriptableBase implements AlgorithmInterface
Dialog to ask user to resample the images or not.
Author:
Ruida Cheng
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • algoTransform

      AlgorithmTransform algoTransform
      The algorithm.
    • dim

      int dim
      Number of available dimension.
    • enableVolRender

      boolean enableVolRender
      Boolean flag to enable volume render button.
    • extents

      int[] extents
      Original dimensions extents value array.
    • extXInput

      JTextField extXInput
      Original X, Y, Z dimension extents values.
    • extYInput

      JTextField extYInput
      Original X, Y, Z dimension extents values.
    • extZInput

      JTextField extZInput
      Original X, Y, Z dimension extents values.
    • extXOutput

      JTextField extXOutput
      Power of 2 X, Y, Z dimension extents values.
    • extYOutput

      JTextField extYOutput
      Power of 2 X, Y, Z dimension extents values.
    • extZOutput

      JTextField extZOutput
      Power of 2 X, Y, Z dimension extents values.
    • forceResample

      boolean forceResample
      Boolean flag to do resample images.
    • image

      ModelImage image
      Model images A and B.
    • imageB

      ModelImage imageB
      Model images A and B.
    • leftPanel

      JPanel leftPanel
      Left panel and right panels corresponding to original and expected extents.
    • rightPanel

      JPanel rightPanel
      Left panel and right panels corresponding to original and expected extents.
    • newRes

      float[] newRes
      Resample resolutioin corresponding to Power of 2.
    • originalVolPowerOfTwo

      boolean originalVolPowerOfTwo
      Boolean flag to indicate the original image is in Power of 2.
    • res

      float[] res
      Original resolutioin arrray.
    • resampledImageFrame

      ViewJFrameImage resampledImageFrame
      DOCUMENT ME!
    • resultImage

      ModelImage resultImage
      Temp Model image.
    • resultImageB

      ModelImage resultImageB
      DOCUMENT ME!
    • userInterface

      ViewUserInterface userInterface
      Parent ui.
    • volExtents

      int[] volExtents
      Resampled dimension value in Power of 2.
    • volSize

      int volSize
      Volume size X*Y*Z.
    • comboBoxInterp

      private JComboBox comboBoxInterp
      DOCUMENT ME!
    • interp

      private int interp
      DOCUMENT ME!
  • Constructor Details

    • JDialogDirectResample

      public JDialogDirectResample()
      Empty Contructor for script running.
    • JDialogDirectResample

      public JDialogDirectResample(ModelImage _imageA, ModelImage _imageB)
      Creates the dialog, using the input parameters to place it on the screen.
      Parameters:
      _imageA - Model image A.
      _imageB - Model image B.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      On "OK", sets the name variable to the text entered. On "Cancel" disposes of this dialog and sets cancel flag.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggered this method.
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algo)
      Algorithm notifies dialog of status.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algo - DOCUMENT ME!
    • callAlgorithm

      public void callAlgorithm()
      Resample images to power of 2.
      Specified by:
      callAlgorithm in class JDialogScriptableBase
    • dispose

      public void dispose(boolean flag)
      Dispose memory.
      Parameters:
      flag - DOCUMENT ME!
    • init

      public void init()
      Build the resample dialog.
    • doPostAlgorithmActions

      protected void doPostAlgorithmActions()
      Perform any actions required after the running of the algorithm is complete.
      Overrides:
      doPostAlgorithmActions in class JDialogScriptableBase
    • finalize

      protected void finalize() throws Throwable
      DOCUMENT ME!
      Overrides:
      finalize in class Object
      Throws:
      Throwable - DOCUMENT ME!
    • setGUIFromParams

      protected void setGUIFromParams()
      Set up the dialog GUI based on the parameters before running the algorithm as part of a script.
      Specified by:
      setGUIFromParams in class JDialogScriptableBase
    • storeParamsFromGUI

      protected void storeParamsFromGUI() throws ParserException
      Store the parameters from the dialog to record the execution of this algorithm.
      Specified by:
      storeParamsFromGUI in class JDialogScriptableBase
      Throws:
      ParserException - If there is a problem creating one of the new parameters.
    • setInterp

      private void setInterp()
      Document ME.