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,ActionListener,ComponentListener,FocusListener,ItemListener,KeyListener,MouseListener,MouseWheelListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,RootPaneContainer,WindowConstants
public class DialogDTIColorDisplay
extends ViewJFrameBase
implements AlgorithmInterface, ChangeListener, ItemListener, MouseListener, MouseWheelListener, KeyListener, 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 invalid input: '&' 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:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatadjust exp *private JPanelpanels *various sliders in dialog *private JTextFieldtextfields *private AlgorithmDTIColorDisplayhandle to the algorithm *private Stringnames of eigenvector and anisotropy files*private ModelImageanisotropy src image *private floatanisotropy max *private JPanelpanels *various sliders in dialog *private JTextFieldtextfields *private floatanisotropy min *private JPanelpanels *various sliders in dialog *private JTextFieldtextfields *private JPanelpanels *private JButtonbuttons *private JPanelpanels *private JPanelpanels *various sliders in dialog *private JTextFieldtextfields *private ColorWheelColor Wheels *private JPanelpanels *private JComboBoxcolor wheel choices combo box *private JPanelpanels *private ViewJComponentDTIImageViewJComponentDTIImage *private StringString indicating current color wheel type *private Rectanglerectangle for screen capture*private JLabellabels *private JPanelpanels *various sliders in dialog *private JTextFieldtextfields *private Stringnames of eigenvector and anisotropy files*private ModelImageeigenvector src image *private booleanflag needed when performing restore defaults *private floatgamma correction *private JPanelpanels *various sliders in dialog *private JTextFieldtextfields *private GridBagConstraintsGridbagConstraints *private GridBagLayoutGridBagLayout *protected floatStorage for correction parameters where datasets have non isotropic values.private JPanelpanels *protected float[]Buffer used to store image intensities the presently viewed slice of image A.private BufferedReaderBuffered Reader for loading params *private booleanboolean for truncate/multiply *private JButtonbuttons *private float[]Sets the correct resolutions for the image that is created by captureImage.private floatSets the correct slice thicknessprivate JButtonbuttons *private JLabellabels *private JPanelpanels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private floatmins and maxes for heuristic parameters*private JLabellabels *private JRadioButtonradio buttons for truncate/multiply *protected intNumber of slices in a 3D dataset.protected intNumber of time sequences in a 4D dataset.private intnum slices for result image *private JPanelpanels *private BufferedWriterBuffered Writer for saving params *private floatblue saturation *private floatcolor range *private floatgreen saturation *protected int[]Integer buffer (4 bytes that stores the concatenated Alpha (1 byte), Red (1 byte), Green ( 1 byte ), Blue (1 byte ) data.private floatsaturation vs theta *private JLabellabels *private JLabellabels *private JLabellabels *private JPanelpanels *protected float[]Storage of the image voxel resolutions.private JButtonbuttons *private JPanelpanels *private ModelImageresult image *private JPanelpanels *various sliders in dialog *private JPanelpanels *private JPanelpanels *private JScrollPanescroll pane for result image *private JPanelpanels *various sliders in dialog *private JTextFieldtextfields *private JPanelpanels *various sliders in dialog *private JTextFieldtextfields *private JButtonbuttons *private JPanelpanels *private static final longprivate floatsteven's beta *private JPanelpanels *various sliders in dialog *private JTextFieldtextfields *private JPanelpanels *private Stringdialog title and version *private TitledBordertitled border for certain components *private ViewToolBarBuilderViewToolBarBuilder *private JPanelpanels *private JPanelpanels *private ButtonGroupradio group for truncate/multiply *private JRadioButtonradio buttons for truncate/multiply *protected intImage time sequence number of image that is displayed.private Stringtype of color wheel ABSVAL, NOSYMM, ROTATIONALSYMM, MIRRORSYMM *protected int[]Storage of the resolution units of measure.private JButtonbuttons *protected floatStorage for correction parameters where datasets have non isotropic values.private floatcurrent zoom for result image *private JButtonbuttons *private intcurrent 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, zoomModeFields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields 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_CURSORFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionDialogDTIColorDisplay(boolean modal) ConstructorDialogDTIColorDisplay(ModelImage kEigenVector, ModelImage kAnisotropy, ModelLUT kLUT, boolean modal) -
Method Summary
Modifier and TypeMethodDescriptionvoidaction performedvoidalgorithmPerformed(AlgorithmBase algorithm) algorithm performedprotected voidcall algorithmprivate booleanScrolls 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(FocusEvent event) focus gainedvoidfocusLost(FocusEvent event) focus lostget controlsget image aget image bgetRGBTA()Gets the RGB LUT table for ARGB image A.voidinit()initvoidInitializes 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[]init resolutionsstatic ModelRGBinitRGB(ModelImage img) Creates and initializes the ModelRGB for an image.protected static int[]Get the initial time and volume slice positions.protected static int[]initUnits(ModelImage img) init unitsvoiditemStateChanged(ItemEvent event) item state changedvoidkeyPressed(KeyEvent event) key pressedvoidkeyReleased(KeyEvent event) key releasedvoidkey typedvoidloads heuristic parameter valuesvoidmagImage()magnifies imagevoidmouseClicked(MouseEvent event) mouse clickedvoidmouseEntered(MouseEvent event) mouse enteredvoidmouseExited(MouseEvent event) mouse exitedvoidmousePressed(MouseEvent event) mouse pressedvoidmouse releasedvoidmouseWheelMoved(MouseWheelEvent event) mouse wheel movedvoidremove controlsvoidrestore default parametersvoidsave heuristic parametersvoidsetActiveImage(int active) set active imagevoidsetAlphaBlend(int value) set alpha blendvoidset controlsvoidsetEnabled(boolean flag) set enabledvoidsetImageB(ModelImage imageB) set image bvoidsetPaintBitmapSwitch(boolean flag) set paint bitmap switchvoidSets the RGB LUT table for ARGB image A.voidset 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 titlevoidstate changedvoidun-magnifies imagevoidupdate current color wheelbooleanupdate image extentsbooleanupdate imagesbooleanupdateImages(boolean flag) update imagesbooleanupdateImages(ModelLUT LUTa, ModelLUT LUTb, boolean flag, int interpMode) update imagesfloatvalidateCurrentNum(String numString, float min, float max) validate current numbervoidwindowClosing(WindowEvent event) window closingvoidzoomOne()sets image zoom to 1Methods 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, windowOpenedMethods 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, updateMethods 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, setUndecoratedMethods 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, toFrontMethods 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, validateTreeMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
title
dialog title and version * -
mainPanel
panels * -
bottomPanel
panels * -
refPanel
panels * -
colorPanel
panels * -
colorWheelPanel
panels * -
resultImagePanel
panels * -
optionsPanel
panels * -
colorWheelChoicesPanel
panels * -
heuristicParametersPanel
panels * -
anisotropyMaxPanel
panels * -
anisotropyMinPanel
panels * -
gammaPanel
panels * -
stevensBetaPanel
panels * -
satBluePanel
panels * -
dimGreenPanel
panels * -
colorRangePanel
panels * -
satVsThetaPanel
panels * -
resultPanel
panels * -
resultImageSliderPanel
panels * -
tempPanel
panels * -
toolbarPanel
panels * -
adjustExpPanel
panels * -
truncMultPanel
panels * -
restoreDefaultsPanel
panels * -
saveLoadPanel
panels * -
minAnisotropyMaxLabel
labels * -
maxAnisotropyMaxLabel
labels * -
minAnisotropyMinLabel
labels * -
maxAnisotropyMinLabel
labels * -
minGammaLabel
labels * -
maxGammaLabel
labels * -
minStevensBetaLabel
labels * -
maxStevensBetaLabel
labels * -
minSatBlueLabel
labels * -
maxSatBlueLabel
labels * -
minDimGreenLabel
labels * -
maxDimGreenLabel
labels * -
minColorRangeLabel
labels * -
maxColorRangeLabel
labels * -
minSatVsThetaLabel
labels * -
maxSatVsThetaLabel
labels * -
minResultImageSlicesLabel
labels * -
maxResultImageSlicesLabel
labels * -
currentResultImageSlicesLabel
labels * -
magLabel
labels * -
refLabel1
labels * -
refLabel2
labels * -
refLabel3
labels * -
minAdjustExpLabel
labels * -
maxAdjustExpLabel
labels * -
minAnisotropyMax
private float minAnisotropyMaxmins and maxes for heuristic parameters* -
maxAnisotropyMax
private float maxAnisotropyMaxmins and maxes for heuristic parameters* -
minAnisotropyMin
private float minAnisotropyMinmins and maxes for heuristic parameters* -
maxAnisotropyMin
private float maxAnisotropyMinmins and maxes for heuristic parameters* -
minGamma
private float minGammamins and maxes for heuristic parameters* -
maxGamma
private float maxGammamins and maxes for heuristic parameters* -
minStevensBeta
private float minStevensBetamins and maxes for heuristic parameters* -
maxStevensBeta
private float maxStevensBetamins and maxes for heuristic parameters* -
minSatBlue
private float minSatBluemins and maxes for heuristic parameters* -
maxSatBlue
private float maxSatBluemins and maxes for heuristic parameters* -
minDimGreen
private float minDimGreenmins and maxes for heuristic parameters* -
maxDimGreen
private float maxDimGreenmins and maxes for heuristic parameters* -
minColorRange
private float minColorRangemins and maxes for heuristic parameters* -
maxColorRange
private float maxColorRangemins and maxes for heuristic parameters* -
minSatVsTheta
private float minSatVsThetamins and maxes for heuristic parameters* -
maxSatVsTheta
private float maxSatVsThetamins and maxes for heuristic parameters* -
minAdjustExp
private float minAdjustExpmins and maxes for heuristic parameters* -
maxAdjustExp
private float maxAdjustExpmins and maxes for heuristic parameters* -
resultScrollPanel
scroll pane for result image * -
anisotropyMaxTextField
textfields * -
anisotropyMinTextField
textfields * -
gammaTextField
textfields * -
stevensBetaTextField
textfields * -
satBlueTextField
textfields * -
dimGreenTextField
textfields * -
colorRangeTextField
textfields * -
satVsThetaTextField
textfields * -
adjustExpTextField
textfields * -
magButton
buttons * -
unMagButton
buttons * -
zoomOneButton
buttons * -
captureImageButton
buttons * -
restoreDefaultsButton
buttons * -
saveButton
buttons * -
loadButton
buttons * -
eigvecSrcImage
eigenvector src image * -
anisotropyImage
anisotropy src image * -
eigvecFilename
names of eigenvector and anisotropy files* -
anisotropyFilename
names of eigenvector and anisotropy files* -
resultImage
result image * -
colorWheel
Color Wheels * -
alg
handle to the algorithm * -
gbl
GridBagLayout * -
gbc
GridbagConstraints * -
anisotropyMaxSlider
various sliders in dialog * -
anisotropyMinSlider
various sliders in dialog * -
gammaSlider
various sliders in dialog * -
stevensBetaSlider
various sliders in dialog * -
satBlueSlider
various sliders in dialog * -
dimGreenSlider
various sliders in dialog * -
colorRangeSlider
various sliders in dialog * -
satVsThetaSlider
various sliders in dialog * -
resultImageSlider
various sliders in dialog * -
adjustExpSlider
various sliders in dialog * -
titledBorder
titled border for certain components * -
colorWheelComboBox
color wheel choices combo box * -
anisotropyMax
private float anisotropyMaxanisotropy max * -
anisotropyMin
private float anisotropyMinanisotropy min * -
adjustExp
private float adjustExpadjust exp * -
gamma
private float gammagamma correction * -
stevensBeta
private float stevensBetasteven's beta * -
pB
private float pBblue saturation * -
pG
private float pGgreen saturation * -
pC
private float pCcolor range * -
pS
private float pSsaturation vs theta * -
componentImage
ViewJComponentDTIImage * -
imageBufferA
protected float[] imageBufferABuffer used to store image intensities the presently viewed slice of image A. -
resols
protected float[] resolsStorage of the image voxel resolutions. One resolution value per dimension. -
pixBuffer
protected int[] pixBufferInteger 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[] unitsStorage of the resolution units of measure. For example, mm, cm, inches ... -
zSlice
private int zSlicecurrent z slice * -
widthResFactor
protected float widthResFactorStorage for correction parameters where datasets have non isotropic values. -
heightResFactor
protected float heightResFactorStorage for correction parameters where datasets have non isotropic values. -
tSlice
protected int tSliceImage time sequence number of image that is displayed. Zero indexed based. -
nImage
protected int nImageNumber of slices in a 3D dataset. -
nTImage
protected int nTImageNumber of time sequences in a 4D dataset. -
type
type of color wheel ABSVAL, NOSYMM, ROTATIONALSYMM, MIRRORSYMM * -
toolbarBuilder
ViewToolBarBuilder * -
zoom
private float zoomcurrent zoom for result image * -
numSlices
private int numSlicesnum slices for result image * -
currentRectangle
rectangle for screen capture* -
truncMultRadioGroup
radio group for truncate/multiply * -
truncRadio
radio buttons for truncate/multiply * -
multRadio
radio buttons for truncate/multiply * -
isMultiply
private boolean isMultiplyboolean for truncate/multiply * -
flag
private boolean flagflag needed when performing restore defaults * -
in
Buffered Reader for loading params * -
out
Buffered Writer for saving params * -
currentColorWheelType
String indicating current color wheel type * -
m_afScreenResolutions
private float[] m_afScreenResolutionsSets the correct resolutions for the image that is created by captureImage. -
m_fSliceThickness
private float m_fSliceThicknessSets the correct slice thickness
-
-
Constructor Details
-
DialogDTIColorDisplay
public DialogDTIColorDisplay(boolean modal) Constructor -
DialogDTIColorDisplay
public DialogDTIColorDisplay(ModelImage kEigenVector, ModelImage kAnisotropy, ModelLUT kLUT, boolean modal)
-
-
Method Details
-
init
public void init()init -
actionPerformed
action performed- Specified by:
actionPerformedin interfaceActionListener- Specified by:
actionPerformedin classViewJFrameBase- Parameters:
e- the event from the UI
-
algorithmPerformed
algorithm performed- Specified by:
algorithmPerformedin interfaceAlgorithmInterface- Parameters:
algorithm- the algorithm which has just completed
-
callAlgorithm
protected void callAlgorithm()call algorithm -
stateChanged
state changed- Specified by:
stateChangedin interfaceChangeListener- Overrides:
stateChangedin classViewJFrameBase- Parameters:
e- the change event
-
itemStateChanged
item state changed- Specified by:
itemStateChangedin interfaceItemListener
-
updateCurrentColorWheel
public void updateCurrentColorWheel()update current color wheel -
mouseClicked
mouse clicked- Specified by:
mouseClickedin interfaceMouseListener
-
mouseEntered
mouse entered- Specified by:
mouseEnteredin interfaceMouseListener
-
mouseExited
mouse exited- Specified by:
mouseExitedin interfaceMouseListener
-
mousePressed
mouse pressed- Specified by:
mousePressedin interfaceMouseListener
-
mouseReleased
mouse released- Specified by:
mouseReleasedin interfaceMouseListener
-
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
window closing- Specified by:
windowClosingin interfaceWindowListener- Overrides:
windowClosingin classViewJFrameBase- Parameters:
event- the window event that triggered this method
-
mouseWheelMoved
mouse wheel moved- Specified by:
mouseWheelMovedin interfaceMouseWheelListener- Parameters:
event-
-
keyTyped
key typed- Specified by:
keyTypedin interfaceKeyListener
-
focusLost
focus lost- Specified by:
focusLostin interfaceFocusListener
-
validateCurrentNum
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
init resolutions- Parameters:
img-- Returns:
-
initUnits
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
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:
OutOfMemoryError- if enough memory cannot be allocated for this method
-
initExtentsVariables
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
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
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
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
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
get controls- Specified by:
getControlsin classViewJFrameBase- Returns:
- the frame's image controls
-
getImageA
get image a- Specified by:
getImageAin classViewJFrameBase- Returns:
- imageA
-
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
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
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:
-
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
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
focus gained- Specified by:
focusGainedin interfaceFocusListener
-
keyPressed
key pressed- Specified by:
keyPressedin interfaceKeyListener
-
keyReleased
key released- Specified by:
keyReleasedin interfaceKeyListener
-
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
-