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 float
adjustExp
adjust exp *private javax.swing.JPanel
adjustExpPanel
panels *javax.swing.JSlider
adjustExpSlider
various sliders in dialog *private javax.swing.JTextField
adjustExpTextField
textfields *private AlgorithmDTIColorDisplay
alg
handle to the algorithm *private java.lang.String
anisotropyFilename
names of eigenvector and anisotropy files*private ModelImage
anisotropyImage
anisotropy src image *private float
anisotropyMax
anisotropy max *private javax.swing.JPanel
anisotropyMaxPanel
panels *javax.swing.JSlider
anisotropyMaxSlider
various sliders in dialog *private javax.swing.JTextField
anisotropyMaxTextField
textfields *private float
anisotropyMin
anisotropy min *private javax.swing.JPanel
anisotropyMinPanel
panels *javax.swing.JSlider
anisotropyMinSlider
various sliders in dialog *private javax.swing.JTextField
anisotropyMinTextField
textfields *private javax.swing.JPanel
bottomPanel
panels *private javax.swing.JButton
captureImageButton
buttons *private javax.swing.JPanel
colorPanel
panels *private javax.swing.JPanel
colorRangePanel
panels *javax.swing.JSlider
colorRangeSlider
various sliders in dialog *private javax.swing.JTextField
colorRangeTextField
textfields *private ColorWheel
colorWheel
Color Wheels *private javax.swing.JPanel
colorWheelChoicesPanel
panels *private javax.swing.JComboBox
colorWheelComboBox
color wheel choices combo box *private javax.swing.JPanel
colorWheelPanel
panels *private ViewJComponentDTIImage
componentImage
ViewJComponentDTIImage *private java.lang.String
currentColorWheelType
String indicating current color wheel type *private java.awt.Rectangle
currentRectangle
rectangle for screen capture*private javax.swing.JLabel
currentResultImageSlicesLabel
labels *private javax.swing.JPanel
dimGreenPanel
panels *javax.swing.JSlider
dimGreenSlider
various sliders in dialog *private javax.swing.JTextField
dimGreenTextField
textfields *private java.lang.String
eigvecFilename
names of eigenvector and anisotropy files*private ModelImage
eigvecSrcImage
eigenvector src image *private boolean
flag
flag needed when performing restore defaults *private float
gamma
gamma correction *private javax.swing.JPanel
gammaPanel
panels *javax.swing.JSlider
gammaSlider
various sliders in dialog *private javax.swing.JTextField
gammaTextField
textfields *private java.awt.GridBagConstraints
gbc
GridbagConstraints *private java.awt.GridBagLayout
gbl
GridBagLayout *protected float
heightResFactor
Storage for correction parameters where datasets have non isotropic values.private javax.swing.JPanel
heuristicParametersPanel
panels *protected float[]
imageBufferA
Buffer used to store image intensities the presently viewed slice of image A.private java.io.BufferedReader
in
Buffered Reader for loading params *private boolean
isMultiply
boolean for truncate/multiply *private javax.swing.JButton
loadButton
buttons *private float[]
m_afScreenResolutions
Sets the correct resolutions for the image that is created by captureImage.private float
m_fSliceThickness
Sets the correct slice thicknessprivate javax.swing.JButton
magButton
buttons *private javax.swing.JLabel
magLabel
labels *private javax.swing.JPanel
mainPanel
panels *private float
maxAdjustExp
mins and maxes for heuristic parameters*private javax.swing.JLabel
maxAdjustExpLabel
labels *private float
maxAnisotropyMax
mins and maxes for heuristic parameters*private javax.swing.JLabel
maxAnisotropyMaxLabel
labels *private float
maxAnisotropyMin
mins and maxes for heuristic parameters*private javax.swing.JLabel
maxAnisotropyMinLabel
labels *private float
maxColorRange
mins and maxes for heuristic parameters*private javax.swing.JLabel
maxColorRangeLabel
labels *private float
maxDimGreen
mins and maxes for heuristic parameters*private javax.swing.JLabel
maxDimGreenLabel
labels *private float
maxGamma
mins and maxes for heuristic parameters*private javax.swing.JLabel
maxGammaLabel
labels *private javax.swing.JLabel
maxResultImageSlicesLabel
labels *private float
maxSatBlue
mins and maxes for heuristic parameters*private javax.swing.JLabel
maxSatBlueLabel
labels *private float
maxSatVsTheta
mins and maxes for heuristic parameters*private javax.swing.JLabel
maxSatVsThetaLabel
labels *private float
maxStevensBeta
mins and maxes for heuristic parameters*private javax.swing.JLabel
maxStevensBetaLabel
labels *private float
minAdjustExp
mins and maxes for heuristic parameters*private javax.swing.JLabel
minAdjustExpLabel
labels *private float
minAnisotropyMax
mins and maxes for heuristic parameters*private javax.swing.JLabel
minAnisotropyMaxLabel
labels *private float
minAnisotropyMin
mins and maxes for heuristic parameters*private javax.swing.JLabel
minAnisotropyMinLabel
labels *private float
minColorRange
mins and maxes for heuristic parameters*private javax.swing.JLabel
minColorRangeLabel
labels *private float
minDimGreen
mins and maxes for heuristic parameters*private javax.swing.JLabel
minDimGreenLabel
labels *private float
minGamma
mins and maxes for heuristic parameters*private javax.swing.JLabel
minGammaLabel
labels *private javax.swing.JLabel
minResultImageSlicesLabel
labels *private float
minSatBlue
mins and maxes for heuristic parameters*private javax.swing.JLabel
minSatBlueLabel
labels *private float
minSatVsTheta
mins and maxes for heuristic parameters*private javax.swing.JLabel
minSatVsThetaLabel
labels *private float
minStevensBeta
mins and maxes for heuristic parameters*private javax.swing.JLabel
minStevensBetaLabel
labels *private javax.swing.JRadioButton
multRadio
radio buttons for truncate/multiply *protected int
nImage
Number of slices in a 3D dataset.protected int
nTImage
Number of time sequences in a 4D dataset.private int
numSlices
num slices for result image *private javax.swing.JPanel
optionsPanel
panels *private java.io.BufferedWriter
out
Buffered Writer for saving params *private float
pB
blue saturation *private float
pC
color range *private float
pG
green saturation *protected int[]
pixBuffer
Integer buffer (4 bytes that stores the concatenated Alpha (1 byte), Red (1 byte), Green ( 1 byte ), Blue (1 byte ) data.private float
pS
saturation vs theta *private javax.swing.JLabel
refLabel1
labels *private javax.swing.JLabel
refLabel2
labels *private javax.swing.JLabel
refLabel3
labels *private javax.swing.JPanel
refPanel
panels *protected float[]
resols
Storage of the image voxel resolutions.private javax.swing.JButton
restoreDefaultsButton
buttons *private javax.swing.JPanel
restoreDefaultsPanel
panels *private ModelImage
resultImage
result image *private javax.swing.JPanel
resultImagePanel
panels *javax.swing.JSlider
resultImageSlider
various sliders in dialog *private javax.swing.JPanel
resultImageSliderPanel
panels *private javax.swing.JPanel
resultPanel
panels *private javax.swing.JScrollPane
resultScrollPanel
scroll pane for result image *private javax.swing.JPanel
satBluePanel
panels *javax.swing.JSlider
satBlueSlider
various sliders in dialog *private javax.swing.JTextField
satBlueTextField
textfields *private javax.swing.JPanel
satVsThetaPanel
panels *javax.swing.JSlider
satVsThetaSlider
various sliders in dialog *private javax.swing.JTextField
satVsThetaTextField
textfields *private javax.swing.JButton
saveButton
buttons *private javax.swing.JPanel
saveLoadPanel
panels *private static long
serialVersionUID
private float
stevensBeta
steven's beta *private javax.swing.JPanel
stevensBetaPanel
panels *javax.swing.JSlider
stevensBetaSlider
various sliders in dialog *private javax.swing.JTextField
stevensBetaTextField
textfields *private javax.swing.JPanel
tempPanel
panels *private java.lang.String
title
dialog title and version *private javax.swing.border.TitledBorder
titledBorder
titled border for certain components *private ViewToolBarBuilder
toolbarBuilder
ViewToolBarBuilder *private javax.swing.JPanel
toolbarPanel
panels *private javax.swing.JPanel
truncMultPanel
panels *private javax.swing.ButtonGroup
truncMultRadioGroup
radio group for truncate/multiply *private javax.swing.JRadioButton
truncRadio
radio buttons for truncate/multiply *protected int
tSlice
Image time sequence number of image that is displayed.private java.lang.String
type
type of color wheel ABSVAL, NOSYMM, ROTATIONALSYMM, MIRRORSYMM *protected int[]
units
Storage of the resolution units of measure.private javax.swing.JButton
unMagButton
buttons *protected float
widthResFactor
Storage for correction parameters where datasets have non isotropic values.private float
zoom
current zoom for result image *private javax.swing.JButton
zoomOneButton
buttons *private int
zSlice
current 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 void
actionPerformed(java.awt.event.ActionEvent e)
action performedvoid
algorithmPerformed(AlgorithmBase algorithm)
algorithm performedprotected void
callAlgorithm()
call algorithmprivate 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.void
finalize()
finalizevoid
focusGained(java.awt.event.FocusEvent event)
focus gainedvoid
focusLost(java.awt.event.FocusEvent event)
focus lostViewControlsImage
getControls()
get controlsModelImage
getImageA()
get image aModelImage
getImageB()
get image bModelRGB
getRGBTA()
Gets the RGB LUT table for ARGB image A.void
init()
initvoid
initExtentsVariables(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 ModelRGB
initRGB(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 unitsvoid
itemStateChanged(java.awt.event.ItemEvent event)
item state changedvoid
keyPressed(java.awt.event.KeyEvent event)
key pressedvoid
keyReleased(java.awt.event.KeyEvent event)
key releasedvoid
keyTyped(java.awt.event.KeyEvent event)
key typedvoid
loadParams()
loads heuristic parameter valuesvoid
magImage()
magnifies imagevoid
mouseClicked(java.awt.event.MouseEvent event)
mouse clickedvoid
mouseEntered(java.awt.event.MouseEvent event)
mouse enteredvoid
mouseExited(java.awt.event.MouseEvent event)
mouse exitedvoid
mousePressed(java.awt.event.MouseEvent event)
mouse pressedvoid
mouseReleased(java.awt.event.MouseEvent e)
mouse releasedvoid
mouseWheelMoved(java.awt.event.MouseWheelEvent event)
mouse wheel movedvoid
removeControls()
remove controlsvoid
restoreDefaults()
restore default parametersvoid
saveParams()
save heuristic parametersvoid
setActiveImage(int active)
set active imagevoid
setAlphaBlend(int value)
set alpha blendvoid
setControls()
set controlsvoid
setEnabled(boolean flag)
set enabledvoid
setImageB(ModelImage imageB)
set image bvoid
setPaintBitmapSwitch(boolean flag)
set paint bitmap switchvoid
setRGBTA(ModelRGB RGBT)
Sets the RGB LUT table for ARGB image A.void
setRGBTB(ModelRGB RGBT)
set rgbtbvoid
setScreenImageResolutions(float[] afResolutions, float fSlice)
Sets the correct resolutions for the image that is created by captureImage.void
setSlice(int slice)
set slicevoid
setTimeSlice(int tSlice)
set time slicevoid
setTitle()
set titlevoid
stateChanged(javax.swing.event.ChangeEvent e)
state changedvoid
unMagImage()
un-magnifies imagevoid
updateCurrentColorWheel()
update current color wheelboolean
updateImageExtents()
update image extentsboolean
updateImages()
update imagesboolean
updateImages(boolean flag)
update imagesboolean
updateImages(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode)
update imagesfloat
validateCurrentNum(java.lang.String numString, float min, float max)
validate current numbervoid
windowClosing(java.awt.event.WindowEvent event)
window closingvoid
zoomOne()
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:
actionPerformed
in interfacejava.awt.event.ActionListener
- Specified by:
actionPerformed
in classViewJFrameBase
- Parameters:
e
- the event from the UI
-
algorithmPerformed
public void algorithmPerformed(AlgorithmBase algorithm)
algorithm performed- Specified by:
algorithmPerformed
in 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:
stateChanged
in interfacejavax.swing.event.ChangeListener
- Overrides:
stateChanged
in classViewJFrameBase
- Parameters:
e
- the change event
-
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent event)
item state changed- Specified by:
itemStateChanged
in 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:
mouseClicked
in interfacejava.awt.event.MouseListener
-
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent event)
mouse entered- Specified by:
mouseEntered
in interfacejava.awt.event.MouseListener
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent event)
mouse exited- Specified by:
mouseExited
in interfacejava.awt.event.MouseListener
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent event)
mouse pressed- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
mouse released- Specified by:
mouseReleased
in 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:
windowClosing
in interfacejava.awt.event.WindowListener
- Overrides:
windowClosing
in classViewJFrameBase
- Parameters:
event
- the window event that triggered this method
-
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent event)
mouse wheel moved- Specified by:
mouseWheelMoved
in interfacejava.awt.event.MouseWheelListener
- Parameters:
event
-
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent event)
key typed- Specified by:
keyTyped
in interfacejava.awt.event.KeyListener
-
focusLost
public void focusLost(java.awt.event.FocusEvent event)
focus lost- Specified by:
focusLost
in 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:
finalize
in classViewJFrameBase
-
getRGBTA
public ModelRGB getRGBTA()
Gets the RGB LUT table for ARGB image A.- Overrides:
getRGBTA
in 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:
setRGBTA
in classViewJFrameBase
- Parameters:
RGBT
- the new RGB LUT to be applied to the image
-
getControls
public ViewControlsImage getControls()
get controls- Specified by:
getControls
in classViewJFrameBase
- Returns:
- the frame's image controls
-
getImageA
public ModelImage getImageA()
get image a- Specified by:
getImageA
in classViewJFrameBase
- Returns:
- imageA
-
getImageB
public ModelImage getImageB()
get image b- Specified by:
getImageB
in classViewJFrameBase
- Returns:
- imageB
-
removeControls
public void removeControls()
remove controls- Specified by:
removeControls
in classViewJFrameBase
-
setActiveImage
public void setActiveImage(int active)
set active image- Specified by:
setActiveImage
in classViewJFrameBase
- Parameters:
active
- IMAGE_A or IMAGE_B
-
setAlphaBlend
public void setAlphaBlend(int value)
set alpha blend- Specified by:
setAlphaBlend
in 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:
setControls
in classViewJFrameBase
-
setEnabled
public void setEnabled(boolean flag)
set enabled- Specified by:
setEnabled
in 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:
setImageB
in classViewJFrameBase
- Parameters:
imageB
- The image to make image-B in this frame.
-
setPaintBitmapSwitch
public void setPaintBitmapSwitch(boolean flag)
set paint bitmap switch- Specified by:
setPaintBitmapSwitch
in classViewJFrameBase
- Parameters:
flag
- if true do not getMask on a setActiveImage command
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
set rgbtb- Specified by:
setRGBTB
in classViewJFrameBase
- Parameters:
RGBT
- the RGB table to use for image B
-
setTitle
public void setTitle()
set title- Specified by:
setTitle
in classViewJFrameBase
-
updateImageExtents
public boolean updateImageExtents()
update image extents- Specified by:
updateImageExtents
in interfaceViewImageUpdateInterface
- Specified by:
updateImageExtents
in classViewJFrameBase
- Returns:
- true if the update was successful, false otherwise
- See Also:
ViewImageUpdateInterface
-
setSlice
public void setSlice(int slice)
set slice- Specified by:
setSlice
in interfaceViewImageUpdateInterface
- Parameters:
slice
- Current slice
-
setTimeSlice
public void setTimeSlice(int tSlice)
set time slice- Specified by:
setTimeSlice
in interfaceViewImageUpdateInterface
- Parameters:
tSlice
- Current time volume
-
updateImages
public boolean updateImages()
update images- Specified by:
updateImages
in interfaceViewImageUpdateInterface
- Returns:
- boolean confirming successful update
-
updateImages
public boolean updateImages(boolean flag)
update images- Specified by:
updateImages
in 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:
updateImages
in 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:
focusGained
in interfacejava.awt.event.FocusListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent event)
key pressed- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent event)
key released- Specified by:
keyReleased
in 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
-
-