Class JDialogTriImageTransformation

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

public class JDialogTriImageTransformation extends JDialogBase
Dialog to transform an image in the tri planar view based on a bounding box.
See Also:
  • Field Details

    • serialVersionUID

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

      private int boxIndex
      DOCUMENT ME!
    • centerX

      private double centerX
      angles are passed to setRotate.
    • centerY

      private double centerY
      angles are passed to setRotate.
    • centerZ

      private double centerZ
      angles are passed to setRotate.
    • comboBoxInterp

      private JComboBox comboBoxInterp
      DOCUMENT ME!
    • frame

      private ViewJFrameTriImage frame
      Pointer back to frame that called this.
    • imageA

      private ModelImage imageA
      Image to transform.
    • imageB

      private ModelImage imageB
      Image B to transform, can be null.
    • progressBar

      private ViewJProgressBar progressBar
      Progress bar.
    • thetaXY

      private double thetaXY
      DOCUMENT ME!
    • thetaXZ

      private double thetaXZ
      DOCUMENT ME!
    • thetaZY

      private double thetaZY
      DOCUMENT ME!
    • centerGroup

      private ButtonGroup centerGroup
    • crosshairButton

      private JRadioButton crosshairButton
    • protractorCommonVertexButton

      private JRadioButton protractorCommonVertexButton
    • imageCenterButton

      private JRadioButton imageCenterButton
    • originButton

      private JRadioButton originButton
  • Constructor Details

    • JDialogTriImageTransformation

      public JDialogTriImageTransformation(ViewJFrameTriImage theParentFrame, ModelImage im)
      Creates confirmation dialog for transforming triplanar image.
      Parameters:
      theParentFrame - Pointer to the frame that created this dialog.
      im - Image to be transformed.
    • JDialogTriImageTransformation

      public JDialogTriImageTransformation(ViewJFrameTriImage theParentFrame, ModelImage imA, ModelImage imB)
      Creates confirmation dialog for cropping triplanar image.
      Parameters:
      theParentFrame - Pointer to the frame that created this dialog.
      imA - Image A to be transformed.
      imB - Image B to be transformed (can be null).
  • Method Details

    • doTrilinear

      public static ModelImage doTrilinear(ModelImage image, ModelImage resultImage, float[] imgBuffer, TransMatrix xfrm, ViewJProgressBar progressBar)
      Performs trilinear interpolation on black and white image data.
      Parameters:
      image - Image from which the data is derived
      resultImage - Image to put result in; can be null.
      imgBuffer - Buffer containing image data.
      xfrm - Transformation to apply.
      progressBar - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Calls transform methods to transform image if "Apply" is pressed; if "Cancel" is pressed, disposes.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggered function.
    • getMainPanel

      public JPanel getMainPanel()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • init

      private void init()
      Initializes GUI components and displays dialog.
    • transform

      private void transform(ModelImage image)
      Sets the transformation matrix and sends the image data to the appropriate interpolation routine.
      Parameters:
      image - Image on which to perform the transformation.