Class ViewJPanelLUT

All Implemented Interfaces:
HistoLUTParent, ActionListener, ItemListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener

public class ViewJPanelLUT extends JPanel implements ItemListener, ActionListener, ChangeListener, KeyListener, HistoLUTParent
Deprecated.
Panel which contains the LUT / HistoLUT components and related GUI components.
Version:
1.0
Author:
Evan McCreedy
See Also:
  • Field Details

    • serialVersionUID

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

      private JDialogCT ctDialogA
      Deprecated.
      DOCUMENT ME!
    • ctDialogB

      private JDialogCT ctDialogB
      Deprecated.
      DOCUMENT ME!
    • cursorIndex

      private int cursorIndex
      Deprecated.
      Active mouse cursor index of the imageA, B and GM image A, B.
    • cursorIndexB

      private int cursorIndexB
      Deprecated.
      Active mouse cursor index of the imageA, B and GM image A, B.
    • entireFlag

      private boolean entireFlag
      Deprecated.
      DOCUMENT ME!
    • histogramA

      private ModelHistogram histogramA
      Deprecated.
      DOCUMENT ME!
    • histogramB

      private ModelHistogram histogramB
      Deprecated.
      DOCUMENT ME!
    • histoPanelA

      private ViewJPanelHistoLUT histoPanelA
      Deprecated.
      DOCUMENT ME!
    • histoPanelB

      private ViewJPanelHistoLUT histoPanelB
      Deprecated.
      DOCUMENT ME!
    • indexColorATextF

      private JTextField indexColorATextF
      Deprecated.
      DOCUMENT ME!
    • indexColorBTextF

      private JTextField indexColorBTextF
      Deprecated.
      DOCUMENT ME!
    • interpCheckBoxA

      private JCheckBox interpCheckBoxA
      Deprecated.
      DOCUMENT ME!
    • interpCheckBoxB

      private JCheckBox interpCheckBoxB
      Deprecated.
      DOCUMENT ME!
    • labelsTable

      private Hashtable<Integer,JLabel> labelsTable
      Deprecated.
      Histogram dialog slider labels of the imageA, B and GM imageA, B.
    • labelsTableB

      private Hashtable<Integer,JLabel> labelsTableB
      Deprecated.
      Histogram dialog slider labels of the imageA, B and GM imageA, B.
    • logCheckBoxA

      private JCheckBox logCheckBoxA
      Deprecated.
      DOCUMENT ME!
    • logCheckBoxB

      private JCheckBox logCheckBoxB
      Deprecated.
      DOCUMENT ME!
    • mouseLabel

      private JLabel mouseLabel
      Deprecated.
      The opacity slider label.
    • mouseLabelB

      private JLabel mouseLabelB
      Deprecated.
      The opacity slider label.
    • mouseSlider

      private JSlider mouseSlider
      Deprecated.
      Opacity X scale sliders.
    • mouseSliderB

      private JSlider mouseSliderB
      Deprecated.
      Opacity X scale sliders.
    • mouseSliderLabels

      private JLabel[] mouseSliderLabels
      Deprecated.
      The labels below the opacity slider.
    • mouseSliderLabelsB

      private JLabel[] mouseSliderLabelsB
      Deprecated.
      The labels below the opacity slider.
    • nColorsATextF

      private JTextField nColorsATextF
      Deprecated.
      DOCUMENT ME!
    • nColorsBTextF

      private JTextField nColorsBTextF
      Deprecated.
      DOCUMENT ME!
    • oneBasedLUTCheckBoxImageB

      private JCheckBox oneBasedLUTCheckBoxImageB
      Deprecated.
      DOCUMENT ME!
    • outputBox

      private JComboBox outputBox
      Deprecated.
      DOCUMENT ME!
    • outputBoxB

      private JComboBox outputBoxB
      Deprecated.
      DOCUMENT ME!
    • panelA

      private JPanel panelA
      Deprecated.
      DOCUMENT ME!
    • panelB

      private JPanel panelB
      Deprecated.
      DOCUMENT ME!
    • panelParent

      private ViewJFrameHistoLUT panelParent
      Deprecated.
      DOCUMENT ME!
    • rangeText

      private JTextField rangeText
      Deprecated.
      X range text field in the imageA, B histogram dialog.
    • rangeTextB

      private JTextField rangeTextB
      Deprecated.
      X range text field in the imageA, B histogram dialog.
    • rangeX

      private float rangeX
      Deprecated.
      X range value of the imageA, B and GM imageA, B.
    • rangeXB

      private float rangeXB
      Deprecated.
      X range value of the imageA, B and GM imageA, B.
    • scaleRangeA

      private int scaleRangeA
      Deprecated.
      Scale range value according to the image min and max.
    • scaleRangeB

      private int scaleRangeB
      Deprecated.
      Scale range value according to the image min and max.
    • tabbedPane

      private JTabbedPane tabbedPane
      Deprecated.
      DOCUMENT ME!
    • threshLowerBF

      private JTextField threshLowerBF
      Deprecated.
      DOCUMENT ME!
    • threshUpperBF

      private JTextField threshUpperBF
      Deprecated.
      DOCUMENT ME!
    • threshFillBF

      private JTextField threshFillBF
      Deprecated.
      DOCUMENT ME!
    • threshLowerF

      private JTextField threshLowerF
      Deprecated.
      threshold related.
    • threshUpperF

      private JTextField threshUpperF
      Deprecated.
      threshold related.
    • threshFillF

      private JTextField threshFillF
      Deprecated.
      threshold related.
    • toolBarBottom

      private JToolBar toolBarBottom
      Deprecated.
      DOCUMENT ME!
    • toolBarCenter

      private JToolBar toolBarCenter
      Deprecated.
      center toolbar
    • toolBarObj

      private ViewToolBarBuilder toolBarObj
      Deprecated.
      DOCUMENT ME!
    • toolBarThreshold

      private JToolBar toolBarThreshold
      Deprecated.
      DOCUMENT ME!
    • toolBarTop

      private JToolBar toolBarTop
      Deprecated.
      DOCUMENT ME!
    • updateCheckBoxA

      private JCheckBox updateCheckBoxA
      Deprecated.
      DOCUMENT ME!
    • updateCheckBoxB

      private JCheckBox updateCheckBoxB
      Deprecated.
      DOCUMENT ME!
    • voxelVolumeLabel

      private JLabel voxelVolumeLabel
      Deprecated.
      Used to display the volume or area of the voxels/pixels between the upper and lower bounds.
    • xRangeTextA

      private JTextField xRangeTextA
      Deprecated.
      X range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view.
    • xRangeTextB

      private JTextField xRangeTextB
      Deprecated.
      X range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view.
    • yRangeTextA

      private JTextField yRangeTextA
      Deprecated.
      Y range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view.
    • yRangeTextB

      private JTextField yRangeTextB
      Deprecated.
      Y range text field in the imageA, B and GM image A, B histogram dialog. Following text fields are used by the tri-planar volume view.
    • customLUTsLocation

      public static final String customLUTsLocation
      Deprecated.
      The location of custom LUT definitions, mostly used for volume rendering purposes. The original set were taken from the Osirix imaging application.
      See Also:
  • Constructor Details

    • ViewJPanelLUT

      public ViewJPanelLUT(ViewJFrameHistoLUT parent)
      Deprecated.
      Set up the LUT panel.
      Parameters:
      parent - DOCUMENT ME!
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Deprecated.
      Calls various methods depending on the action.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      event - event that triggered function
    • clearVoxelLabel

      public void clearVoxelLabel()
      Deprecated.
      DOCUMENT ME!
    • dispose

      public void dispose()
      Deprecated.
      Disposes of components and frame.
    • dragPoint

      public void dragPoint(MouseEvent mouseEvent)
      Deprecated.
      Placeholder.
      Specified by:
      dragPoint in interface HistoLUTParent
      Parameters:
      mouseEvent - drag event
    • getHistoLUTComponentA

      public final ViewJComponentHLUTBase getHistoLUTComponentA()
      Deprecated.
      Get the histogram component for imageA.
      Returns:
      the imageA histogram component
    • getHistoLUTComponentB

      public final ViewJComponentHLUTBase getHistoLUTComponentB()
      Deprecated.
      Get the histogram component for imageB.
      Returns:
      the imageB histogram component
    • getLowerThreshold

      public float getLowerThreshold()
      Deprecated.
      Returns the lower threshold value.
      Returns:
      float lower thresh
    • getLUTa

      public final ModelLUT getLUTa()
      Deprecated.
      Get the imageA histo component lut.
      Returns:
      ModelLUT
    • getLUTb

      public final ModelLUT getLUTb()
      Deprecated.
      Get the imageB histo component lut.
      Returns:
      ModelLUT
    • getLUTComponentA

      public final ViewJComponentLUT getLUTComponentA()
      Deprecated.
      Get the imageA LUT.
      Returns:
      the imageA LUT component
    • getLUTComponentB

      public final ViewJComponentLUT getLUTComponentB()
      Deprecated.
      Get the imageB LUT.
      Returns:
      the imageB LUT component
    • getLUTRecorder

      public JDialogRecordLUT getLUTRecorder()
      Deprecated.
      Get the LUT recorder reference.
      Returns:
      JDialogRecordLUT reference to LUT recorder.
    • getUpperThreshold

      public float getUpperThreshold()
      Deprecated.
      Returns the upper threshold value.
      Returns:
      float upper thresh
    • initGUI

      public void initGUI()
      Deprecated.
      Set up the panel components.
    • buildLUTSelectionList

      public static final JToolBar buildLUTSelectionList(ActionListener listener)
      Deprecated.
      Build the center part of the LUT toolbar.
      Parameters:
      listener - The listener to attach to the created LUT selection combo box.
      Returns:
      the top part of the LUT toolbar
    • getCustomLUTList

      private static final Vector<String> getCustomLUTList()
      Deprecated.
    • isImageASelected

      public boolean isImageASelected()
      Deprecated.
      Returns whether the imageA LUT panel is the one being worked on.
      Returns:
      whether the imageA LUT panel is the one being worked on
    • isImageBSelected

      public boolean isImageBSelected()
      Deprecated.
      Returns whether the imageB LUT panel is the one being worked on.
      Returns:
      whether the imageB LUT panel is the one being worked on
    • isImageUpdate

      public boolean isImageUpdate()
      Deprecated.
      Indicates if real-time update of the image should take place.
      Specified by:
      isImageUpdate in interface HistoLUTParent
      Returns:
      true if real time update should take place
    • itemStateChanged

      public void itemStateChanged(ItemEvent event)
      Deprecated.
      Sets the flags for the checkboxes.
      Specified by:
      itemStateChanged in interface ItemListener
      Parameters:
      event - event that triggered this function
    • keyPressed

      public void keyPressed(KeyEvent e)
      Deprecated.
      Unchanged.
      Specified by:
      keyPressed in interface KeyListener
      Parameters:
      e - DOCUMENT ME!
    • keyReleased

      public void keyReleased(KeyEvent e)
      Deprecated.
      Unchanged.
      Specified by:
      keyReleased in interface KeyListener
      Parameters:
      e - DOCUMENT ME!
    • keyTyped

      public void keyTyped(KeyEvent e)
      Deprecated.
      If the ENTER key is hit while in threshold boxes, update the LUT's threshold (for dual threshold).
      Specified by:
      keyTyped in interface KeyListener
      Parameters:
      e - KeyEvent
    • removeHistoLUTb

      public void removeHistoLUTb()
      Deprecated.
      Removes the tabbed pane for the histogram of image B.
    • setAllOff

      public void setAllOff()
      Deprecated.
      Placeholder.
      Specified by:
      setAllOff in interface HistoLUTParent
    • setLUT

      public void setLUT(ModelLUT newLUT)
      Deprecated.
      Replaces the LUT and builds a new LUT component.
      Specified by:
      setLUT in interface HistoLUTParent
      Parameters:
      newLUT - New LUT
    • setLUTa

      public final void setLUTa(ModelLUT lut)
      Deprecated.
      Change the histogram component LUT.
      Parameters:
      lut - the new lut
    • setLUTb

      public final void setLUTb(ModelLUT lut)
      Deprecated.
      Change the histogram component LUT.
      Parameters:
      lut - the new lut
    • setNColors

      public void setNColors(int value)
      Deprecated.
      Change the text field showing the number of colors.
      Parameters:
      value - the number of colors
    • setRangeText

      public void setRangeText(float x, float y, int _index)
      Deprecated.
      Set the range value of the text field.
      Specified by:
      setRangeText in interface HistoLUTParent
      Parameters:
      x - the x threshold range value
      y - the y threshold range value
      _index - the cursor index
    • stateChanged

      public void stateChanged(ChangeEvent e)
      Deprecated.
      Sets values based on knob along slider.
      Specified by:
      stateChanged in interface ChangeListener
      Parameters:
      e - event that triggered this function
    • updateComponentLUT

      public void updateComponentLUT()
      Deprecated.
      Placeholder.
      Specified by:
      updateComponentLUT in interface HistoLUTParent
    • updateFrames

      public void updateFrames(boolean flag)
      Deprecated.
      Update all of the image frames that display the image this histo lut is for.
      Specified by:
      updateFrames in interface HistoLUTParent
      Parameters:
      flag - this boolean indicates if the frame that displays the image should re-export the image and apply new LUT
      See Also:
    • updateHistoLUT

      public void updateHistoLUT(ModelImage _imageA, ModelLUT _LUTa, ModelImage _imageB, ModelLUT _LUTb, boolean progressFlag)
      Deprecated.
      This method is called to update the histogram(s) displayed in each tabbed pane of the frame.
      Parameters:
      _imageA - image A
      _LUTa - lookup table for image A
      _imageB - image B
      _LUTb - lookup table for image B
      progressFlag - passed to calculateHistogram algorithm. If false progress bar is not displayed
    • updateLUTPositionString

      public void updateLUTPositionString(String str)
      Deprecated.
      Placeholder.
      Specified by:
      updateLUTPositionString in interface HistoLUTParent
      Parameters:
      str - string
    • updateThresholdFields

      public void updateThresholdFields(float lower, float upper)
      Deprecated.
      Method to update the threshold text fields when the lower or upper threshold changes.
      Specified by:
      updateThresholdFields in interface HistoLUTParent
      Parameters:
      lower - the lower threshold value
      upper - the upper threshold value
    • buildPanelA

      private void buildPanelA(ModelImage image, ModelLUT LUT, boolean entireFlag)
      Deprecated.
      Method that displays the histogram and LUT and other controls to manipulate the LUT. Panel for image A.
      Parameters:
      image - Model of image
      LUT - Model of LUT
      entireFlag - Flag indicating if histogram should be made of entire image.
    • buildPanelB

      private void buildPanelB(ModelImage image, ModelLUT LUT, boolean entireFlag)
      Deprecated.
      Method that displays the histogram and LUT and other controls to manipulate the LUT. Panel for image B.
      Parameters:
      image - Model of image
      LUT - Model of LUT
      entireFlag - Flag indicating if histogram should be made of entire image.
    • calcHistogram

      private void calcHistogram(int imageAorB, boolean entireFlag, boolean progressFlag)
      Deprecated.
      Calculates histogram for the image(s).
      Parameters:
      imageAorB - flag to indicate if histogram is to be calculated for imageA or imageB.
      entireFlag - if true calculate histogram for the entire image. if false uses areas defined by VOI regions.
      progressFlag - passed to calculateHistogram algorithm. If false progress bar is not displayed
    • calcThreshold

      private void calcThreshold()
      Deprecated.
      Calculates the thresholded image based on the parameters of the threshold transfer function. Image A is thresholded if the selected panel is for imageA and likewise for image B.
    • calculateThreshold

      private void calculateThreshold()
      Deprecated.
      Calculates the volume (for 3D images) or area (for 2D images) of the image between the two values from the upper and lower bounds text areas.
    • calculateThreshold

      private void calculateThreshold(float lower, float upper)
      Deprecated.
      Calculates the volume or area of the image between the two values from the upper and lower bounds (inclusive).
      Parameters:
      lower - Lower bound of the threshold (inclusive).
      upper - Upper bound of the threshold (inclusive).
    • calculateThresholdArea

      private void calculateThresholdArea(float lower, float upper)
      Deprecated.
      Calculates the area of the image between the two values from the upper and lower bounds (inclusive).
      Parameters:
      lower - Lower bound of the threshold (inclusive).
      upper - Upper bound of the threshold (inclusive).
    • calculateThresholdVolume

      private void calculateThresholdVolume(float lower, float upper)
      Deprecated.
      Calculates the volume of the image between the two values from the upper and lower bounds (inclusive).
      Parameters:
      lower - Lower bound of the threshold (inclusive).
      upper - Upper bound of the threshold (inclusive).
    • isLUT1Based

      private boolean isLUT1Based(ModelLUT LUT)
      Deprecated.
      end HistoLUTParent.
      Parameters:
      LUT - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • openLUTFile

      public static final BufferedReader openLUTFile(String lutName) throws IOException
      Deprecated.
      Opens and returns a buffered reader for a given custom LUT name.
      Parameters:
      lutName - The name of the LUT file (without the extension).
      Returns:
      A LUT file buffered reader.
      Throws:
      IOException
      See Also: