Package gov.nih.mipav.view
Class ColorWheel
java.lang.Object
java.awt.Component
java.awt.Canvas
gov.nih.mipav.view.ColorWheel
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible
- Author:
- pandyan This is the Color Wheel class for the DTI Color Display Plugin 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 java.awt.Canvas
Canvas.AccessibleAWTCanvasNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate float[]array of r,g,b values after blue shiftingprivate floatgamma correctionprivate float[]array of r,g,b values after green adjprivate Graphicsoffscreen graphics handleprivate Imageoffscreen imageprivate floatblue saturationprivate floatcolor rangeprivate floatgreen adjprivate floatsat vs thetaprivate intradii of all the circles...r6 is the outermost radiusprivate intradii of all the circles...r6 is the outermost radiusprivate intradii of all the circles...r6 is the outermost radiusprivate intradii of all the circles...r6 is the outermost radiusprivate intradii of all the circles...r6 is the outermost radiusprivate intradii of all the circles...r6 is the outermost radiusprivate float[]array of r,g,b values after red shiftingprivate floatStevens Betaprivate Stringtype of color wheel ABSVAL, NOSYMM, ROTATIONALSYMM, MIRRORSYMMFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]adjustGreen(float r1, float g1, float b1) adjust green intensityvoidcalculates radii of the interior circles using Lambertian equal areas equation used: r = 2 |sin(theta/2)|getType()voidpaint methodvoidPaints the Absolute Value Color WheelvoidPaints the Mirror Symmetry Color WheelvoidPaints the No Symmetry Color WheelvoidPaints the Rotational Symmetry Color WheelvoidsetGamma(float gamma) voidsetPB(float pb) voidsetPC(float pc) voidsetPG(float pg) voidsetPS(float ps) voidsetStevensBeta(float stevensBeta) voidfloat[]shiftBlue(float r1, float g1, float b1) blue shiftfloat[]shiftRed(float r1, float g1, float b1) red shiftvoidCalls paint without erasing background - this reduces flicker!Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategyMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
-
Field Details
-
offImage
offscreen image -
offGraphics
offscreen graphics handle -
r1
private int r1radii of all the circles...r6 is the outermost radius -
r2
private int r2radii of all the circles...r6 is the outermost radius -
r3
private int r3radii of all the circles...r6 is the outermost radius -
r4
private int r4radii of all the circles...r6 is the outermost radius -
r5
private int r5radii of all the circles...r6 is the outermost radius -
r6
private int r6radii of all the circles...r6 is the outermost radius -
type
type of color wheel ABSVAL, NOSYMM, ROTATIONALSYMM, MIRRORSYMM -
pS
private float pSsat vs theta -
pC
private float pCcolor range -
pB
private float pBblue saturation -
gamma
private float gammagamma correction -
pG
private float pGgreen adj -
stevensBeta
private float stevensBetaStevens Beta -
blueShiftColors
private float[] blueShiftColorsarray of r,g,b values after blue shifting -
redShiftColors
private float[] redShiftColorsarray of r,g,b values after red shifting -
greenAdjColors
private float[] greenAdjColorsarray of r,g,b values after green adj
-
-
Constructor Details
-
ColorWheel
constructor- Parameters:
radius-type-
-
-
Method Details
-
paint
paint method -
calculateRadii
public void calculateRadii()calculates radii of the interior circles using Lambertian equal areas equation used: r = 2 |sin(theta/2)| -
paintAbsValColorWheel
public void paintAbsValColorWheel()Paints the Absolute Value Color Wheel -
paintNoSymmColorWheel
public void paintNoSymmColorWheel()Paints the No Symmetry Color Wheel -
paintRotationalSymmColorWheel
public void paintRotationalSymmColorWheel()Paints the Rotational Symmetry Color Wheel -
paintMirrorSymmColorWheel
public void paintMirrorSymmColorWheel()Paints the Mirror Symmetry Color Wheel -
shiftBlue
public float[] shiftBlue(float r1, float g1, float b1) blue shift- Parameters:
r1-g1-b1-- Returns:
-
shiftRed
public float[] shiftRed(float r1, float g1, float b1) red shift- Parameters:
r1-g1-b1-- Returns:
-
adjustGreen
public float[] adjustGreen(float r1, float g1, float b1) adjust green intensity- Parameters:
r1-g1-b1-- Returns:
-
update
Calls paint without erasing background - this reduces flicker! -
setGamma
public void setGamma(float gamma) -
setPB
public void setPB(float pb) -
setPC
public void setPC(float pc) -
setPG
public void setPG(float pg) -
setPS
public void setPS(float ps) -
setStevensBeta
public void setStevensBeta(float stevensBeta) -
setType
-
getType
-