Class JDialogCTPreset

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

public class JDialogCTPreset extends JDialogBase implements ItemListener
Simple dialog for CT window presets.
Version:
0.1 Aug 1, 1997
Author:
Matthew J. McAuliffe, Ph.D.
See Also:
  • Field Details

    • serialVersionUID

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

      public static final int IMAGE_A
      DOCUMENT ME!
      See Also:
    • IMAGE_B

      public static final int IMAGE_B
      DOCUMENT ME!
      See Also:
    • dim

      protected Dimension dim
      DOCUMENT ME!
    • abdomenLabel

      private JLabel abdomenLabel
      Preset labels.
    • abdomenMin

      private int abdomenMin
      Preset min, max values. Min presents the min window value. Max presents the max window value.
    • abdomenMax

      private int abdomenMax
      Preset min, max values. Min presents the min window value. Max presents the max window value.
    • dataSlice

      private float[] dataSlice
      Reference to the image data of the slice presently displayed. Needed to calculate the max/min of the slice used to adjust the transfer function.
    • headLabel

      private JLabel headLabel
      DOCUMENT ME!
    • headMin

      private int headMin
      DOCUMENT ME!
    • headMax

      private int headMax
      DOCUMENT ME!
    • image

      private ModelImage image
      Reference to the image that will be affected by the adjust of the window and level.
    • lungLabel

      private JLabel lungLabel
      DOCUMENT ME!
    • lungMin

      private int lungMin
      DOCUMENT ME!
    • lungMax

      private int lungMax
      DOCUMENT ME!
    • LUT

      private ModelLUT LUT
      Reference to the LUT used to display the image.
    • maxImage

      private float maxImage
      Image's maximum intensity.
    • mediastinumLabel

      private JLabel mediastinumLabel
      DOCUMENT ME!
    • mediastinumMin

      private int mediastinumMin
      DOCUMENT ME!
    • mediastinumMax

      private int mediastinumMax
      DOCUMENT ME!
    • minImage

      private float minImage
      Image's minimum intensity.
    • minLabel

      private JLabel minLabel
      DOCUMENT ME!
    • maxLabel

      private JLabel maxLabel
      DOCUMENT ME!
    • minText

      private JTextField minText
      Min, max text fields.
    • maxText

      private JTextField maxText
      Min, max text fields.
    • radioAbdomen

      private JRadioButton radioAbdomen
      Preset radio buttons.
    • radioHead

      private JRadioButton radioHead
      DOCUMENT ME!
    • radioLung

      private JRadioButton radioLung
      DOCUMENT ME!
    • radioMediastinum

      private JRadioButton radioMediastinum
      DOCUMENT ME!
    • radioSpine

      private JRadioButton radioSpine
      DOCUMENT ME!
    • radioVertebrae

      private JRadioButton radioVertebrae
      DOCUMENT ME!
    • resetButton

      private JButton resetButton
      Reset button to reset the default preset values.
    • setButton

      private JButton setButton
      When user change the window, level values, setButton sets the min, max of the window values.
    • spineLabel

      private JLabel spineLabel
      DOCUMENT ME!
    • spineMin

      private int spineMin
      DOCUMENT ME!
    • spineMax

      private int spineMax
      DOCUMENT ME!
    • vertebraeLabel

      private JLabel vertebraeLabel
      DOCUMENT ME!
    • vertebraeMin

      private int vertebraeMin
      DOCUMENT ME!
    • vertebraeMax

      private int vertebraeMax
      DOCUMENT ME!
    • x

      private float[] x
      Three arrays to save the coordinates of the LUT's transfer fucntion. z[] not used.
    • y

      private float[] y
      DOCUMENT ME!
    • z

      private float[] z
      DOCUMENT ME!
  • Constructor Details

    • JDialogCTPreset

      public JDialogCTPreset(Frame theParentFrame, ModelImage image, ModelLUT LUT)
      Creates new dialog and sets up GUI components.
      Parameters:
      theParentFrame - Parent frame.
      image - DOCUMENT ME!
      LUT - DOCUMENT ME!
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Calls various methods depending on the action.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      event - Event that triggered function.
    • ctMode

      public void ctMode(int preset1, int preset2)
      Sets mode to CT and sets range to CT presets.
      Parameters:
      preset1 - first CT preset
      preset2 - second CT preset
    • itemStateChanged

      public void itemStateChanged(ItemEvent event)
      Sets the flags for the checkboxes.
      Specified by:
      itemStateChanged in interface ItemListener
      Overrides:
      itemStateChanged in class JDialogBase
      Parameters:
      event - Event that triggered this function.
    • linearMode

      public void linearMode()
      Sets mode to linear and shows component.
    • buildResetButton

      protected void buildResetButton()
      Builds the reset button.
    • buildSetButton

      protected void buildSetButton()
      Builds the set button.
    • calcMinMax

      private void calcMinMax()
      Calculate the maximum and minimum valuse to setup the window and level sliders.
    • updateHistoLUTFrame

      private void updateHistoLUTFrame()
      Displays histoLUT frame for a gray scale image.