Package gov.nih.mipav.view.dialogs
Class DialogDTIColorDisplay
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- gov.nih.mipav.view.ViewJFrameBase
-
- gov.nih.mipav.view.dialogs.DialogDTIColorDisplay
-
- All Implemented Interfaces:
AlgorithmInterface,ViewImageUpdateInterface,java.awt.event.ActionListener,java.awt.event.ComponentListener,java.awt.event.FocusListener,java.awt.event.ItemListener,java.awt.event.KeyListener,java.awt.event.MouseListener,java.awt.event.MouseWheelListener,java.awt.event.WindowListener,java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible,javax.swing.event.ChangeListener,javax.swing.RootPaneContainer,javax.swing.WindowConstants
public class DialogDTIColorDisplay extends ViewJFrameBase implements AlgorithmInterface, javax.swing.event.ChangeListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.MouseWheelListener, java.awt.event.KeyListener, java.awt.event.FocusListener
- Author:
- pandyan This is the main dialog for the DTI Color Display References: Developed in concert with Sinisa Pajevic from the NIH/CIT/DCB/MSCL group, Lin-Ching Chang D.Sc., Carlo Pierpaoli MD Ph.D., and Lindsay Walker MS from the the NIH/NICHD/LIMB/STBB group and Olga Vogt from the NIH/CIT/DCB/ISL/BIRSS group: Mathematical and Statistical Computing Laboratory (MSCL) Biomedical Imaging Research Services Section (BIRSS) Imaging Sciences Laboratory (ISL) Division of Cumputational Bioscience (DCB) Center for Informational Technology (CIT) Section on Tissue Biophysics and Biomimetics (STBB) Laboratory of Integrative and Medical Biophysics (LIMB) National Institute of Child Health & Humann Development National Institutes of Health Publication Reference: S. Pajevic and C. Pierpaoli, "Color Schemes to Represent the Orientation of Anisotropic Tissues from Diffusion Tensor Data: Application to White Matter Fiber Tract Mapping in the Human Brain," Magnetic Resonance in Medicine, vol. 42, no. 3, pp. 526-540, 1999
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private floatadjustExpadjust exp *private javax.swing.JPaneladjustExpPanelpanels *javax.swing.JSlideradjustExpSlidervarious sliders in dialog *private javax.swing.JTextFieldadjustExpTextFieldtextfields *private AlgorithmDTIColorDisplayalghandle to the algorithm *private java.lang.StringanisotropyFilenamenames of eigenvector and anisotropy files*private ModelImageanisotropyImageanisotropy src image *private floatanisotropyMaxanisotropy max *private javax.swing.JPanelanisotropyMaxPanelpanels *javax.swing.JSlideranisotropyMaxSlidervarious sliders in dialog *private javax.swing.JTextFieldanisotropyMaxTextFieldtextfields *private floatanisotropyMinanisotropy min *private javax.swing.JPanelanisotropyMinPanelpanels *javax.swing.JSlideranisotropyMinSlidervarious sliders in dialog *private javax.swing.JTextFieldanisotropyMinTextFieldtextfields *private javax.swing.JPanelbottomPanelpanels *private javax.swing.JButtoncaptureImageButtonbuttons *private javax.swing.JPanelcolorPanelpanels *private javax.swing.JPanelcolorRangePanelpanels *javax.swing.JSlidercolorRangeSlidervarious sliders in dialog *private javax.swing.JTextFieldcolorRangeTextFieldtextfields *private ColorWheelcolorWheelColor Wheels *private javax.swing.JPanelcolorWheelChoicesPanelpanels *private javax.swing.JComboBoxcolorWheelComboBoxcolor wheel choices combo box *private javax.swing.JPanelcolorWheelPanelpanels *private ViewJComponentDTIImagecomponentImageViewJComponentDTIImage *private java.lang.StringcurrentColorWheelTypeString indicating current color wheel type *private java.awt.RectanglecurrentRectanglerectangle for screen capture*private javax.swing.JLabelcurrentResultImageSlicesLabellabels *private javax.swing.JPaneldimGreenPanelpanels *javax.swing.JSliderdimGreenSlidervarious sliders in dialog *private javax.swing.JTextFielddimGreenTextFieldtextfields *private java.lang.StringeigvecFilenamenames of eigenvector and anisotropy files*private ModelImageeigvecSrcImageeigenvector src image *private booleanflagflag needed when performing restore defaults *private floatgammagamma correction *private javax.swing.JPanelgammaPanelpanels *javax.swing.JSlidergammaSlidervarious sliders in dialog *private javax.swing.JTextFieldgammaTextFieldtextfields *private java.awt.GridBagConstraintsgbcGridbagConstraints *private java.awt.GridBagLayoutgblGridBagLayout *protected floatheightResFactorStorage for correction parameters where datasets have non isotropic values.private javax.swing.JPanelheuristicParametersPanelpanels *protected float[]imageBufferABuffer used to store image intensities the presently viewed slice of image A.private java.io.BufferedReaderinBuffered Reader for loading params *private booleanisMultiplyboolean for truncate/multiply *private javax.swing.JButtonloadButtonbuttons *private float[]m_afScreenResolutionsSets the correct resolutions for the image that is created by captureImage.private floatm_fSliceThicknessSets the correct slice thicknessprivate javax.swing.JButtonmagButtonbuttons *private javax.swing.JLabelmagLabellabels *private javax.swing.JPanelmainPanelpanels *private floatmaxAdjustExpmins and maxes for heuristic parameters*private javax.swing.JLabelmaxAdjustExpLabellabels *private floatmaxAnisotropyMaxmins and maxes for heuristic parameters*private javax.swing.JLabelmaxAnisotropyMaxLabellabels *private floatmaxAnisotropyMinmins and maxes for heuristic parameters*private javax.swing.JLabelmaxAnisotropyMinLabellabels *private floatmaxColorRangemins and maxes for heuristic parameters*private javax.swing.JLabelmaxColorRangeLabellabels *private floatmaxDimGreenmins and maxes for heuristic parameters*private javax.swing.JLabelmaxDimGreenLabellabels *private floatmaxGammamins and maxes for heuristic parameters*private javax.swing.JLabelmaxGammaLabellabels *private javax.swing.JLabelmaxResultImageSlicesLabellabels *private floatmaxSatBluemins and maxes for heuristic parameters*private javax.swing.JLabelmaxSatBlueLabellabels *private floatmaxSatVsThetamins and maxes for heuristic parameters*private javax.swing.JLabelmaxSatVsThetaLabellabels *private floatmaxStevensBetamins and maxes for heuristic parameters*private javax.swing.JLabelmaxStevensBetaLabellabels *private floatminAdjustExpmins and maxes for heuristic parameters*private javax.swing.JLabelminAdjustExpLabellabels *private floatminAnisotropyMaxmins and maxes for heuristic parameters*private javax.swing.JLabelminAnisotropyMaxLabellabels *private floatminAnisotropyMinmins and maxes for heuristic parameters*private javax.swing.JLabelminAnisotropyMinLabellabels *private floatminColorRangemins and maxes for heuristic parameters*private javax.swing.JLabelminColorRangeLabellabels *private floatminDimGreenmins and maxes for heuristic parameters*private javax.swing.JLabelminDimGreenLabellabels *private floatminGammamins and maxes for heuristic parameters*private javax.swing.JLabelminGammaLabellabels *private javax.swing.JLabelminResultImageSlicesLabellabels *private floatminSatBluemins and maxes for heuristic parameters*private javax.swing.JLabelminSatBlueLabellabels *private floatminSatVsThetamins and maxes for heuristic parameters*private javax.swing.JLabelminSatVsThetaLabellabels *private floatminStevensBetamins and maxes for heuristic parameters*private javax.swing.JLabelminStevensBetaLabellabels *private javax.swing.JRadioButtonmultRadioradio buttons for truncate/multiply *protected intnImageNumber of slices in a 3D dataset.protected intnTImageNumber of time sequences in a 4D dataset.private intnumSlicesnum slices for result image *private javax.swing.JPaneloptionsPanelpanels *private java.io.BufferedWriteroutBuffered Writer for saving params *private floatpBblue saturation *private floatpCcolor range *private floatpGgreen saturation *protected int[]pixBufferInteger buffer (4 bytes that stores the concatenated Alpha (1 byte), Red (1 byte), Green ( 1 byte ), Blue (1 byte ) data.private floatpSsaturation vs theta *private javax.swing.JLabelrefLabel1labels *private javax.swing.JLabelrefLabel2labels *private javax.swing.JLabelrefLabel3labels *private javax.swing.JPanelrefPanelpanels *protected float[]resolsStorage of the image voxel resolutions.private javax.swing.JButtonrestoreDefaultsButtonbuttons *private javax.swing.JPanelrestoreDefaultsPanelpanels *private ModelImageresultImageresult image *private javax.swing.JPanelresultImagePanelpanels *javax.swing.JSliderresultImageSlidervarious sliders in dialog *private javax.swing.JPanelresultImageSliderPanelpanels *private javax.swing.JPanelresultPanelpanels *private javax.swing.JScrollPaneresultScrollPanelscroll pane for result image *private javax.swing.JPanelsatBluePanelpanels *javax.swing.JSlidersatBlueSlidervarious sliders in dialog *private javax.swing.JTextFieldsatBlueTextFieldtextfields *private javax.swing.JPanelsatVsThetaPanelpanels *javax.swing.JSlidersatVsThetaSlidervarious sliders in dialog *private javax.swing.JTextFieldsatVsThetaTextFieldtextfields *private javax.swing.JButtonsaveButtonbuttons *private javax.swing.JPanelsaveLoadPanelpanels *private static longserialVersionUIDprivate floatstevensBetasteven's beta *private javax.swing.JPanelstevensBetaPanelpanels *javax.swing.JSliderstevensBetaSlidervarious sliders in dialog *private javax.swing.JTextFieldstevensBetaTextFieldtextfields *private javax.swing.JPaneltempPanelpanels *private java.lang.Stringtitledialog title and version *private javax.swing.border.TitledBordertitledBordertitled border for certain components *private ViewToolBarBuildertoolbarBuilderViewToolBarBuilder *private javax.swing.JPaneltoolbarPanelpanels *private javax.swing.JPaneltruncMultPanelpanels *private javax.swing.ButtonGrouptruncMultRadioGroupradio group for truncate/multiply *private javax.swing.JRadioButtontruncRadioradio buttons for truncate/multiply *protected inttSliceImage time sequence number of image that is displayed.private java.lang.Stringtypetype of color wheel ABSVAL, NOSYMM, ROTATIONALSYMM, MIRRORSYMM *protected int[]unitsStorage of the resolution units of measure.private javax.swing.JButtonunMagButtonbuttons *protected floatwidthResFactorStorage for correction parameters where datasets have non isotropic values.private floatzoomcurrent zoom for result image *private javax.swing.JButtonzoomOneButtonbuttons *private intzSlicecurrent z slice *-
Fields inherited from class gov.nih.mipav.view.ViewJFrameBase
absoluteGoToButton, absoluteGoToPanel, absoluteLabel, absoluteLabelVals, absolutePanel, absoluteXLabel, absoluteXTextField, absoluteYLabel, absoluteYTextField, absoluteZLabel, absoluteZTextField, alphaBlend, defaultLUTa, defaultLUTb, displayMode, IMAGE_A, IMAGE_A_B, IMAGE_B, imageA, imageB, isClosing, linkedScrolling, linkFrame, linkTriFrame, LUTa, LUTb, progressBar, scannerLPS_APLabel, scannerLPS_APTextField, scannerLPS_GoToButton, scannerLPS_GoToPanel, scannerLPS_ISLabel, scannerLPS_ISTextField, scannerLPS_RLLabel, scannerLPS_RLTextField, scannerLPSLabel, scannerLPSLabelVals, scannerLPSPanel, scannerRAS_APLabel, scannerRAS_APTextField, scannerRAS_GoToButton, scannerRAS_GoToPanel, scannerRAS_ISLabel, scannerRAS_ISTextField, scannerRAS_RLLabel, scannerRAS_RLTextField, scannerRASLabel, scannerRASLabelVals, scannerRASPanel, scannerTabbedPane, tabbedPane, talGoToButton, talGoToPanel, talXLabel, talXTextField, talYLabel, talYTextField, talZLabel, talZTextField, userInterface, zoomMode
-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description DialogDTIColorDisplay(boolean modal)ConstructorDialogDTIColorDisplay(ModelImage kEigenVector, ModelImage kAnisotropy, ModelLUT kLUT, boolean modal)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)action performedvoidalgorithmPerformed(AlgorithmBase algorithm)algorithm performedprotected voidcallAlgorithm()call algorithmprivate booleancaptureImage()Scrolls through all z slices of a 3d/4d image and captures them into a new ARGB ModelImage, then puts the ModelImage in a ViewJFrameImage.voidfinalize()finalizevoidfocusGained(java.awt.event.FocusEvent event)focus gainedvoidfocusLost(java.awt.event.FocusEvent event)focus lostViewControlsImagegetControls()get controlsModelImagegetImageA()get image aModelImagegetImageB()get image bModelRGBgetRGBTA()Gets the RGB LUT table for ARGB image A.voidinit()initvoidinitExtentsVariables(ModelImage img)Initializes the variables based on the image extents.protected static float[]initImageBuffer(int[] extents, boolean isColor)Create the intensity buffer for an image.protected static int[]initNumSlices(ModelImage img)Get the total number of time slices and volume slices.protected static int[]initPixelBuffer(int[] extents)Create the pixel buffer for an image.protected static float[]initResFactor(float[] imgResols, int[] imgUnits)Get the resolution correction needed for non-isotropic images.protected static float[]initResolutions(ModelImage img)init resolutionsstatic ModelRGBinitRGB(ModelImage img)Creates and initializes the ModelRGB for an image.protected static int[]initSlicePositions(ModelImage img)Get the initial time and volume slice positions.protected static int[]initUnits(ModelImage img)init unitsvoiditemStateChanged(java.awt.event.ItemEvent event)item state changedvoidkeyPressed(java.awt.event.KeyEvent event)key pressedvoidkeyReleased(java.awt.event.KeyEvent event)key releasedvoidkeyTyped(java.awt.event.KeyEvent event)key typedvoidloadParams()loads heuristic parameter valuesvoidmagImage()magnifies imagevoidmouseClicked(java.awt.event.MouseEvent event)mouse clickedvoidmouseEntered(java.awt.event.MouseEvent event)mouse enteredvoidmouseExited(java.awt.event.MouseEvent event)mouse exitedvoidmousePressed(java.awt.event.MouseEvent event)mouse pressedvoidmouseReleased(java.awt.event.MouseEvent e)mouse releasedvoidmouseWheelMoved(java.awt.event.MouseWheelEvent event)mouse wheel movedvoidremoveControls()remove controlsvoidrestoreDefaults()restore default parametersvoidsaveParams()save heuristic parametersvoidsetActiveImage(int active)set active imagevoidsetAlphaBlend(int value)set alpha blendvoidsetControls()set controlsvoidsetEnabled(boolean flag)set enabledvoidsetImageB(ModelImage imageB)set image bvoidsetPaintBitmapSwitch(boolean flag)set paint bitmap switchvoidsetRGBTA(ModelRGB RGBT)Sets the RGB LUT table for ARGB image A.voidsetRGBTB(ModelRGB RGBT)set rgbtbvoidsetScreenImageResolutions(float[] afResolutions, float fSlice)Sets the correct resolutions for the image that is created by captureImage.voidsetSlice(int slice)set slicevoidsetTimeSlice(int tSlice)set time slicevoidsetTitle()set titlevoidstateChanged(javax.swing.event.ChangeEvent e)state changedvoidunMagImage()un-magnifies imagevoidupdateCurrentColorWheel()update current color wheelbooleanupdateImageExtents()update image extentsbooleanupdateImages()update imagesbooleanupdateImages(boolean flag)update imagesbooleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode)update imagesfloatvalidateCurrentNum(java.lang.String numString, float min, float max)validate current numbervoidwindowClosing(java.awt.event.WindowEvent event)window closingvoidzoomOne()sets image zoom to 1-
Methods inherited from class gov.nih.mipav.view.ViewJFrameBase
about, buildLabelPanel, canCloseImageBAfterLoad, close, close, closeImageB, componentHidden, componentMoved, componentResized, componentShown, getAlphaBlend, getDefaultLUTa, getDefaultLUTb, getDisplayMode, getImageNameA, getImageNameB, getLastState, getLUTa, getLUTb, getRGBTB, getTriImg, getUserInterface, handleMaskPopupMenu, handlePaintToMaskPopupMenu, handleZoomPopupMenu, initExtents, initImageBuffer, initLUT, initZoom, loadAllVOIs, loadAllVOIsFrom, loadImage, loadLUT, loadLUTandTransferFunctionFrom, loadLUTandTransferFunctionFrom, makeString, newFrameBeenCreated, openVOI, openVOI, pickImageFile, save, save, save, saveAllVOIs, saveAllVOIsTo, saveLabels, saveLUT, saveLUTandTransferFunction, saveLUTandTransferFunction, saveLUTAs, saveLUTAs, saveVOI, saveVOIAs, saveVOIAs, saveVOIIntensities, saveVOIIntensitiesTo, setAbsPositionLabels, setEnableCloseImageBAfterLoad, setImageA, setLastState, setLinkedFrame, setLinkedTriFrame, setLUTa, setLUTb, setLUTs, setMessageText, setOpacityInfo, setpaintBitmap, setScannerPosition, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
title
private java.lang.String title
dialog title and version *
-
mainPanel
private javax.swing.JPanel mainPanel
panels *
-
bottomPanel
private javax.swing.JPanel bottomPanel
panels *
-
refPanel
private javax.swing.JPanel refPanel
panels *
-
colorPanel
private javax.swing.JPanel colorPanel
panels *
-
colorWheelPanel
private javax.swing.JPanel colorWheelPanel
panels *
-
resultImagePanel
private javax.swing.JPanel resultImagePanel
panels *
-
optionsPanel
private javax.swing.JPanel optionsPanel
panels *
-
colorWheelChoicesPanel
private javax.swing.JPanel colorWheelChoicesPanel
panels *
-
heuristicParametersPanel
private javax.swing.JPanel heuristicParametersPanel
panels *
-
anisotropyMaxPanel
private javax.swing.JPanel anisotropyMaxPanel
panels *
-
anisotropyMinPanel
private javax.swing.JPanel anisotropyMinPanel
panels *
-
gammaPanel
private javax.swing.JPanel gammaPanel
panels *
-
stevensBetaPanel
private javax.swing.JPanel stevensBetaPanel
panels *
-
satBluePanel
private javax.swing.JPanel satBluePanel
panels *
-
dimGreenPanel
private javax.swing.JPanel dimGreenPanel
panels *
-
colorRangePanel
private javax.swing.JPanel colorRangePanel
panels *
-
satVsThetaPanel
private javax.swing.JPanel satVsThetaPanel
panels *
-
resultPanel
private javax.swing.JPanel resultPanel
panels *
-
resultImageSliderPanel
private javax.swing.JPanel resultImageSliderPanel
panels *
-
tempPanel
private javax.swing.JPanel tempPanel
panels *
-
toolbarPanel
private javax.swing.JPanel toolbarPanel
panels *
-
adjustExpPanel
private javax.swing.JPanel adjustExpPanel
panels *
-
truncMultPanel
private javax.swing.JPanel truncMultPanel
panels *
-
restoreDefaultsPanel
private javax.swing.JPanel restoreDefaultsPanel
panels *
-
saveLoadPanel
private javax.swing.JPanel saveLoadPanel
panels *
-
minAnisotropyMaxLabel
private javax.swing.JLabel minAnisotropyMaxLabel
labels *
-
maxAnisotropyMaxLabel
private javax.swing.JLabel maxAnisotropyMaxLabel
labels *
-
minAnisotropyMinLabel
private javax.swing.JLabel minAnisotropyMinLabel
labels *
-
maxAnisotropyMinLabel
private javax.swing.JLabel maxAnisotropyMinLabel
labels *
-
minGammaLabel
private javax.swing.JLabel minGammaLabel
labels *
-
maxGammaLabel
private javax.swing.JLabel maxGammaLabel
labels *
-
minStevensBetaLabel
private javax.swing.JLabel minStevensBetaLabel
labels *
-
maxStevensBetaLabel
private javax.swing.JLabel maxStevensBetaLabel
labels *
-
minSatBlueLabel
private javax.swing.JLabel minSatBlueLabel
labels *
-
maxSatBlueLabel
private javax.swing.JLabel maxSatBlueLabel
labels *
-
minDimGreenLabel
private javax.swing.JLabel minDimGreenLabel
labels *
-
maxDimGreenLabel
private javax.swing.JLabel maxDimGreenLabel
labels *
-
minColorRangeLabel
private javax.swing.JLabel minColorRangeLabel
labels *
-
maxColorRangeLabel
private javax.swing.JLabel maxColorRangeLabel
labels *
-
minSatVsThetaLabel
private javax.swing.JLabel minSatVsThetaLabel
labels *
-
maxSatVsThetaLabel
private javax.swing.JLabel maxSatVsThetaLabel
labels *
-
minResultImageSlicesLabel
private javax.swing.JLabel minResultImageSlicesLabel
labels *
-
maxResultImageSlicesLabel
private javax.swing.JLabel maxResultImageSlicesLabel
labels *
-
currentResultImageSlicesLabel
private javax.swing.JLabel currentResultImageSlicesLabel
labels *
-
magLabel
private javax.swing.JLabel magLabel
labels *
-
refLabel1
private javax.swing.JLabel refLabel1
labels *
-
refLabel2
private javax.swing.JLabel refLabel2
labels *
-
refLabel3
private javax.swing.JLabel refLabel3
labels *
-
minAdjustExpLabel
private javax.swing.JLabel minAdjustExpLabel
labels *
-
maxAdjustExpLabel
private javax.swing.JLabel maxAdjustExpLabel
labels *
-
minAnisotropyMax
private float minAnisotropyMax
mins and maxes for heuristic parameters*
-
maxAnisotropyMax
private float maxAnisotropyMax
mins and maxes for heuristic parameters*
-
minAnisotropyMin
private float minAnisotropyMin
mins and maxes for heuristic parameters*
-
maxAnisotropyMin
private float maxAnisotropyMin
mins and maxes for heuristic parameters*
-
minGamma
private float minGamma
mins and maxes for heuristic parameters*
-
maxGamma
private float maxGamma
mins and maxes for heuristic parameters*
-
minStevensBeta
private float minStevensBeta
mins and maxes for heuristic parameters*
-
maxStevensBeta
private float maxStevensBeta
mins and maxes for heuristic parameters*
-
minSatBlue
private float minSatBlue
mins and maxes for heuristic parameters*
-
maxSatBlue
private float maxSatBlue
mins and maxes for heuristic parameters*
-
minDimGreen
private float minDimGreen
mins and maxes for heuristic parameters*
-
maxDimGreen
private float maxDimGreen
mins and maxes for heuristic parameters*
-
minColorRange
private float minColorRange
mins and maxes for heuristic parameters*
-
maxColorRange
private float maxColorRange
mins and maxes for heuristic parameters*
-
minSatVsTheta
private float minSatVsTheta
mins and maxes for heuristic parameters*
-
maxSatVsTheta
private float maxSatVsTheta
mins and maxes for heuristic parameters*
-
minAdjustExp
private float minAdjustExp
mins and maxes for heuristic parameters*
-
maxAdjustExp
private float maxAdjustExp
mins and maxes for heuristic parameters*
-
resultScrollPanel
private javax.swing.JScrollPane resultScrollPanel
scroll pane for result image *
-
anisotropyMaxTextField
private javax.swing.JTextField anisotropyMaxTextField
textfields *
-
anisotropyMinTextField
private javax.swing.JTextField anisotropyMinTextField
textfields *
-
gammaTextField
private javax.swing.JTextField gammaTextField
textfields *
-
stevensBetaTextField
private javax.swing.JTextField stevensBetaTextField
textfields *
-
satBlueTextField
private javax.swing.JTextField satBlueTextField
textfields *
-
dimGreenTextField
private javax.swing.JTextField dimGreenTextField
textfields *
-
colorRangeTextField
private javax.swing.JTextField colorRangeTextField
textfields *
-
satVsThetaTextField
private javax.swing.JTextField satVsThetaTextField
textfields *
-
adjustExpTextField
private javax.swing.JTextField adjustExpTextField
textfields *
-
magButton
private javax.swing.JButton magButton
buttons *
-
unMagButton
private javax.swing.JButton unMagButton
buttons *
-
zoomOneButton
private javax.swing.JButton zoomOneButton
buttons *
-
captureImageButton
private javax.swing.JButton captureImageButton
buttons *
-
restoreDefaultsButton
private javax.swing.JButton restoreDefaultsButton
buttons *
-
saveButton
private javax.swing.JButton saveButton
buttons *
-
loadButton
private javax.swing.JButton loadButton
buttons *
-
eigvecSrcImage
private ModelImage eigvecSrcImage
eigenvector src image *
-
anisotropyImage
private ModelImage anisotropyImage
anisotropy src image *
-
eigvecFilename
private java.lang.String eigvecFilename
names of eigenvector and anisotropy files*
-
anisotropyFilename
private java.lang.String anisotropyFilename
names of eigenvector and anisotropy files*
-
resultImage
private ModelImage resultImage
result image *
-
colorWheel
private ColorWheel colorWheel
Color Wheels *
-
alg
private AlgorithmDTIColorDisplay alg
handle to the algorithm *
-
gbl
private java.awt.GridBagLayout gbl
GridBagLayout *
-
gbc
private java.awt.GridBagConstraints gbc
GridbagConstraints *
-
anisotropyMaxSlider
public javax.swing.JSlider anisotropyMaxSlider
various sliders in dialog *
-
anisotropyMinSlider
public javax.swing.JSlider anisotropyMinSlider
various sliders in dialog *
-
gammaSlider
public javax.swing.JSlider gammaSlider
various sliders in dialog *
-
stevensBetaSlider
public javax.swing.JSlider stevensBetaSlider
various sliders in dialog *
-
satBlueSlider
public javax.swing.JSlider satBlueSlider
various sliders in dialog *
-
dimGreenSlider
public javax.swing.JSlider dimGreenSlider
various sliders in dialog *
-
colorRangeSlider
public javax.swing.JSlider colorRangeSlider
various sliders in dialog *
-
satVsThetaSlider
public javax.swing.JSlider satVsThetaSlider
various sliders in dialog *
-
resultImageSlider
public javax.swing.JSlider resultImageSlider
various sliders in dialog *
-
adjustExpSlider
public javax.swing.JSlider adjustExpSlider
various sliders in dialog *
-
titledBorder
private javax.swing.border.TitledBorder titledBorder
titled border for certain components *
-
colorWheelComboBox
private javax.swing.JComboBox colorWheelComboBox
color wheel choices combo box *
-
anisotropyMax
private float anisotropyMax
anisotropy max *
-
anisotropyMin
private float anisotropyMin
anisotropy min *
-
adjustExp
private float adjustExp
adjust exp *
-
gamma
private float gamma
gamma correction *
-
stevensBeta
private float stevensBeta
steven's beta *
-
pB
private float pB
blue saturation *
-
pG
private float pG
green saturation *
-
pC
private float pC
color range *
-
pS
private float pS
saturation vs theta *
-
componentImage
private ViewJComponentDTIImage componentImage
ViewJComponentDTIImage *
-
imageBufferA
protected float[] imageBufferA
Buffer used to store image intensities the presently viewed slice of image A.
-
resols
protected float[] resols
Storage of the image voxel resolutions. One resolution value per dimension.
-
pixBuffer
protected int[] pixBuffer
Integer buffer (4 bytes that stores the concatenated Alpha (1 byte), Red (1 byte), Green ( 1 byte ), Blue (1 byte ) data. The ARGB values are generated by using the imageA intensities as a index into a LUT.
-
units
protected int[] units
Storage of the resolution units of measure. For example, mm, cm, inches ...
-
zSlice
private int zSlice
current z slice *
-
widthResFactor
protected float widthResFactor
Storage for correction parameters where datasets have non isotropic values.
-
heightResFactor
protected float heightResFactor
Storage for correction parameters where datasets have non isotropic values.
-
tSlice
protected int tSlice
Image time sequence number of image that is displayed. Zero indexed based.
-
nImage
protected int nImage
Number of slices in a 3D dataset.
-
nTImage
protected int nTImage
Number of time sequences in a 4D dataset.
-
type
private java.lang.String type
type of color wheel ABSVAL, NOSYMM, ROTATIONALSYMM, MIRRORSYMM *
-
toolbarBuilder
private ViewToolBarBuilder toolbarBuilder
ViewToolBarBuilder *
-
zoom
private float zoom
current zoom for result image *
-
numSlices
private int numSlices
num slices for result image *
-
currentRectangle
private java.awt.Rectangle currentRectangle
rectangle for screen capture*
-
truncMultRadioGroup
private javax.swing.ButtonGroup truncMultRadioGroup
radio group for truncate/multiply *
-
truncRadio
private javax.swing.JRadioButton truncRadio
radio buttons for truncate/multiply *
-
multRadio
private javax.swing.JRadioButton multRadio
radio buttons for truncate/multiply *
-
isMultiply
private boolean isMultiply
boolean for truncate/multiply *
-
flag
private boolean flag
flag needed when performing restore defaults *
-
in
private java.io.BufferedReader in
Buffered Reader for loading params *
-
out
private java.io.BufferedWriter out
Buffered Writer for saving params *
-
currentColorWheelType
private java.lang.String currentColorWheelType
String indicating current color wheel type *
-
m_afScreenResolutions
private float[] m_afScreenResolutions
Sets the correct resolutions for the image that is created by captureImage.
-
m_fSliceThickness
private float m_fSliceThickness
Sets the correct slice thickness
-
-
Constructor Detail
-
DialogDTIColorDisplay
public DialogDTIColorDisplay(boolean modal)
Constructor
-
DialogDTIColorDisplay
public DialogDTIColorDisplay(ModelImage kEigenVector, ModelImage kAnisotropy, ModelLUT kLUT, boolean modal)
-
-
Method Detail
-
init
public void init()
init
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
action performed- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Specified by:
actionPerformedin classViewJFrameBase- Parameters:
e- the event from the UI
-
algorithmPerformed
public void algorithmPerformed(AlgorithmBase algorithm)
algorithm performed- Specified by:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
algorithm- the algorithm which has just completed
-
callAlgorithm
protected void callAlgorithm()
call algorithm
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
state changed- Specified by:
stateChangedin interfacejavax.swing.event.ChangeListener- Overrides:
stateChangedin classViewJFrameBase- Parameters:
e- the change event
-
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent event)
item state changed- Specified by:
itemStateChangedin interfacejava.awt.event.ItemListener
-
updateCurrentColorWheel
public void updateCurrentColorWheel()
update current color wheel
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent event)
mouse clicked- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent event)
mouse entered- Specified by:
mouseEnteredin interfacejava.awt.event.MouseListener
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent event)
mouse exited- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent event)
mouse pressed- Specified by:
mousePressedin interfacejava.awt.event.MouseListener
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
mouse released- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener
-
magImage
public void magImage()
magnifies image
-
unMagImage
public void unMagImage()
un-magnifies image
-
zoomOne
public void zoomOne()
sets image zoom to 1
-
restoreDefaults
public void restoreDefaults()
restore default parameters
-
saveParams
public void saveParams()
save heuristic parameters
-
loadParams
public void loadParams()
loads heuristic parameter values
-
captureImage
private boolean captureImage()
Scrolls through all z slices of a 3d/4d image and captures them into a new ARGB ModelImage, then puts the ModelImage in a ViewJFrameImage.- Returns:
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent event)
window closing- Specified by:
windowClosingin interfacejava.awt.event.WindowListener- Overrides:
windowClosingin classViewJFrameBase- Parameters:
event- the window event that triggered this method
-
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent event)
mouse wheel moved- Specified by:
mouseWheelMovedin interfacejava.awt.event.MouseWheelListener- Parameters:
event-
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent event)
key typed- Specified by:
keyTypedin interfacejava.awt.event.KeyListener
-
focusLost
public void focusLost(java.awt.event.FocusEvent event)
focus lost- Specified by:
focusLostin interfacejava.awt.event.FocusListener
-
validateCurrentNum
public float validateCurrentNum(java.lang.String numString, float min, float max)validate current number- Parameters:
numString-min-max-- Returns:
-
initImageBuffer
protected static float[] initImageBuffer(int[] extents, boolean isColor)Create the intensity buffer for an image.- Parameters:
extents- the extents of the imageisColor- whether the image is in color- Returns:
- a buffer which is big enough to contain the image intensity data
-
initPixelBuffer
protected static int[] initPixelBuffer(int[] extents)
Create the pixel buffer for an image.- Parameters:
extents- the extents of the image- Returns:
- a buffer which is big enough to contain the image pixel data
-
initResolutions
protected static float[] initResolutions(ModelImage img)
init resolutions- Parameters:
img-- Returns:
-
initUnits
protected static int[] initUnits(ModelImage img)
init units- Parameters:
img-- Returns:
-
initResFactor
protected static float[] initResFactor(float[] imgResols, int[] imgUnits)Get the resolution correction needed for non-isotropic images.- Parameters:
imgResols- the image resolutionimgUnits- the image units of measure- Returns:
- the resolution correction factor in the x (the first element) and y (the second element) dimensions
-
initRGB
public static ModelRGB initRGB(ModelImage img) throws java.lang.OutOfMemoryError
Creates and initializes the ModelRGB for an image.- Parameters:
img- the image to create a ModelRGB for- Returns:
- a ModelRGB for the image
img(null if NOT a color image) - Throws:
java.lang.OutOfMemoryError- if enough memory cannot be allocated for this method
-
initExtentsVariables
public void initExtentsVariables(ModelImage img)
Initializes the variables based on the image extents. (i.e. number of slices, number of time slices, the initial z-slice, etc.- Parameters:
img- the image to set the extent variables for
-
initSlicePositions
protected static int[] initSlicePositions(ModelImage img)
Get the initial time and volume slice positions.- Parameters:
img- the image to get the slice positions of- Returns:
- an array containing the slice in the volume (in the first element) and the time slice (in the second element)
-
initNumSlices
protected static int[] initNumSlices(ModelImage img)
Get the total number of time slices and volume slices.- Parameters:
img- the image to get the slices of- Returns:
- an array containing the number of volume slices (in the first element) and the number of time slices in the image (in the second element)
-
finalize
public void finalize()
finalize- Overrides:
finalizein classViewJFrameBase
-
getRGBTA
public ModelRGB getRGBTA()
Gets the RGB LUT table for ARGB image A.- Overrides:
getRGBTAin classViewJFrameBase- Returns:
- RGBT the new RGB LUT to be applied to the image
-
setRGBTA
public void setRGBTA(ModelRGB RGBT)
Sets the RGB LUT table for ARGB image A.- Specified by:
setRGBTAin classViewJFrameBase- Parameters:
RGBT- the new RGB LUT to be applied to the image
-
getControls
public ViewControlsImage getControls()
get controls- Specified by:
getControlsin classViewJFrameBase- Returns:
- the frame's image controls
-
getImageA
public ModelImage getImageA()
get image a- Specified by:
getImageAin classViewJFrameBase- Returns:
- imageA
-
getImageB
public ModelImage getImageB()
get image b- Specified by:
getImageBin classViewJFrameBase- Returns:
- imageB
-
removeControls
public void removeControls()
remove controls- Specified by:
removeControlsin classViewJFrameBase
-
setActiveImage
public void setActiveImage(int active)
set active image- Specified by:
setActiveImagein classViewJFrameBase- Parameters:
active- IMAGE_A or IMAGE_B
-
setAlphaBlend
public void setAlphaBlend(int value)
set alpha blend- Specified by:
setAlphaBlendin classViewJFrameBase- Parameters:
value- amount [0,100] that is the percentage of Image A to be displayed and (1-percentage) of Image B to be displayed
-
setControls
public void setControls()
set controls- Specified by:
setControlsin classViewJFrameBase
-
setEnabled
public void setEnabled(boolean flag)
set enabled- Specified by:
setEnabledin classViewJFrameBase- Parameters:
flag- if true the image/VOIs can be modified; if false image/VOIs can NOT be modified
-
setImageB
public void setImageB(ModelImage imageB)
set image b- Specified by:
setImageBin classViewJFrameBase- Parameters:
imageB- The image to make image-B in this frame.
-
setPaintBitmapSwitch
public void setPaintBitmapSwitch(boolean flag)
set paint bitmap switch- Specified by:
setPaintBitmapSwitchin classViewJFrameBase- Parameters:
flag- if true do not getMask on a setActiveImage command
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
set rgbtb- Specified by:
setRGBTBin classViewJFrameBase- Parameters:
RGBT- the RGB table to use for image B
-
setTitle
public void setTitle()
set title- Specified by:
setTitlein classViewJFrameBase
-
updateImageExtents
public boolean updateImageExtents()
update image extents- Specified by:
updateImageExtentsin interfaceViewImageUpdateInterface- Specified by:
updateImageExtentsin classViewJFrameBase- Returns:
- true if the update was successful, false otherwise
- See Also:
ViewImageUpdateInterface
-
setSlice
public void setSlice(int slice)
set slice- Specified by:
setSlicein interfaceViewImageUpdateInterface- Parameters:
slice- Current slice
-
setTimeSlice
public void setTimeSlice(int tSlice)
set time slice- Specified by:
setTimeSlicein interfaceViewImageUpdateInterface- Parameters:
tSlice- Current time volume
-
updateImages
public boolean updateImages()
update images- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(boolean flag)
update images- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
flag- forces show to re import image and calc. java image- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode)
update images- Specified by:
updateImagesin interfaceViewImageUpdateInterface- Parameters:
LUTa- LUT used to update imageALUTb- LUT used to update imageBflag- forces show to re import image and calc. java imageinterpMode- image interpolation method (Nearest or Smooth)- Returns:
- boolean confirming a successful update
-
focusGained
public void focusGained(java.awt.event.FocusEvent event)
focus gained- Specified by:
focusGainedin interfacejava.awt.event.FocusListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent event)
key pressed- Specified by:
keyPressedin interfacejava.awt.event.KeyListener
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent event)
key released- Specified by:
keyReleasedin interfacejava.awt.event.KeyListener
-
setScreenImageResolutions
public void setScreenImageResolutions(float[] afResolutions, float fSlice)Sets the correct resolutions for the image that is created by captureImage.- Parameters:
afResolutions- correct image resolutions.fSlice- slice thickness
-
-