public class SingleImagePanel
extends javax.swing.JComponent
implements java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener
Implements a component that can display a single or multi-frame image in a single panel with window center/width adjustment, scrolling through frames of a multi-frame image, resizing to the size of the panel, annotation of pre-defined text and shapes, feedback of cursor position status (2D and 3D position, pixel value, window).
Includes a main() method for testing that will display a single image from a file in a JFrame.
About the most minimal code to display a single DICOM image looks like this:
JFrame p = new JFrame(); p.add(new SingleImagePanel(new SourceImage(filename))); p.setBackground(Color.BLACK); p.setSize(512,512); p.setVisible(true);
SourceImage
,
Serialized FormModifier and Type | Class and Description |
---|---|
protected class |
SingleImagePanel.LeftMouseMode |
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<SuperimposedImage.AppliedToUnderlyingImage> |
activeSuperimposedImagesAppliedToUnderlyingImage |
protected double[] |
currentLocationIn3DSpace
This value is outside mouseMoved() only so that it doesn't need to be constantly reallocated - it is not used by any other method
|
protected GeometryOfVolume |
imageGeometry |
protected java.util.Vector<java.awt.Shape> |
interactiveDrawingShapes |
protected SingleImagePanel.LeftMouseMode |
leftMouseMode |
protected java.util.Vector<java.awt.Shape> |
localizerShapes |
protected com.pixelmed.display.OrientationAnnotations |
orientationAnnotations |
protected java.awt.Color |
orientationColor |
protected java.awt.Font |
orientationFont |
protected DisplayedAreaSelection |
originalDisplayedAreaSelection |
protected java.util.Vector<java.awt.Shape>[] |
perFrameDrawingShapes |
protected java.util.Vector<java.awt.Shape> |
persistentDrawingShapes |
protected java.util.Vector<com.pixelmed.display.TextAnnotation> |
persistentDrawingText |
protected double |
pixelSpacingInSourceImage |
protected java.util.Vector<java.awt.Shape> |
preDefinedShapes |
protected java.util.Vector<java.awt.Shape> |
preDefinedText |
protected java.util.Vector<java.awt.Shape> |
selectedDrawingShapes |
protected boolean |
showOrientationsLeftSide |
protected boolean |
showSideAndViewAnnotationLeftSide |
protected boolean |
showZoomFactor |
protected boolean |
showZoomFactorLeftSide |
protected java.awt.Color |
sideAndViewAnnotationColor |
protected java.awt.Font |
sideAndViewAnnotationFont |
protected java.lang.String |
sideAndViewAnnotationString |
protected int |
sideAndViewAnnotationVerticalOffset |
protected java.util.Vector<SuperimposedImage> |
superimposedImages |
protected java.lang.String |
typeOfPixelSpacing |
protected boolean |
useVOILUTNotFunction
whether or not to use the supplied VOI LUT, rather than a linear or sigmoid window function
|
protected int |
voiLUTBitsPerEntry
the currently selected VOI LUT bits per entry
|
protected short[] |
voiLUTData
the currently selected VOI LUT Data
|
protected int |
voiLUTEntryMax
the currently selected VOI LUT maximum entry value
|
protected int |
voiLUTEntryMin
the currently selected VOI LUT minimum entry value
|
protected int |
voiLUTFirstValueMapped
the currently selected VOI LUT first value mapped
|
protected double |
voiLUTIdentityWindowCenter
the currently selected VOI LUT window center value that will result in the application of the VOI LUT rescaling the input (index) values
|
protected double |
voiLUTIdentityWindowWidth
the currently selected VOI LUT window width value that will result in the application of the VOI LUT rescaling the input (index) values
|
protected int |
voiLUTNumberOfEntries
the currently selected VOI LUT number of entries
|
protected int |
voiLUTTopOfEntryRange
the currently selected VOI LUT top of entry range (which may be less than (2^voiLUTNumberOfEntries)-1, e.g., in buggy Agfa images)
|
protected java.util.Vector<java.awt.Shape> |
volumeLocalizationShapes |
protected double |
windowCenter
the currently selected, default or user modified window center
|
protected double |
windowWidth
the currently selected, default or user modified window width
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
SingleImagePanel(SourceImage sImg) |
SingleImagePanel(SourceImage sImg,
EventContext typeOfPanelEventContext) |
SingleImagePanel(SourceImage sImg,
EventContext typeOfPanelEventContext,
GeometryOfVolume imageGeometry) |
SingleImagePanel(SourceImage sImg,
EventContext typeOfPanelEventContext,
int[] sortOrder,
java.util.Vector preDefinedShapes,
java.util.Vector preDefinedText,
GeometryOfVolume imageGeometry) |
Modifier and Type | Method and Description |
---|---|
static java.awt.image.BufferedImage |
applyVOILUT(java.awt.image.BufferedImage src,
double center,
double width,
double identityCenter,
double identityWidth,
boolean signed,
boolean inverted,
double useSlope,
double useIntercept,
boolean hasPad,
int pad,
int padRangeLimit,
int numberOfEntries,
int firstValueMapped,
int bitsPerEntry,
short[] grayTable,
int entryMin,
int entryMax,
int topOfEntryRange) |
static java.awt.image.BufferedImage |
applyWindowCenterAndWidthLinear(java.awt.image.BufferedImage src,
double center,
double width,
boolean signed,
boolean inverted,
double useSlope,
double useIntercept,
boolean hasPad,
int pad,
int padRangeLimit) |
static java.awt.image.BufferedImage |
applyWindowCenterAndWidthLinear(java.awt.image.BufferedImage src,
double center,
double width,
boolean signed,
boolean inverted,
double useSlope,
double useIntercept,
boolean hasPad,
int pad,
int padRangeLimit,
boolean useExactCalculationInsteadOfDICOMStandardMethod) |
static java.awt.image.BufferedImage |
applyWindowCenterAndWidthLinearToColorImage(java.awt.image.BufferedImage src,
double center,
double width) |
static java.awt.image.BufferedImage |
applyWindowCenterAndWidthLogistic(java.awt.image.BufferedImage src,
double center,
double width,
boolean signed,
boolean inverted,
double useSlope,
double useIntercept,
boolean hasPad,
int pad,
int padRangeLimit) |
static java.awt.image.BufferedImage |
applyWindowCenterAndWidthWithPaletteColor(java.awt.image.BufferedImage src,
double center,
double width,
boolean signed,
boolean inverted,
double useSlope,
double useIntercept,
boolean hasPad,
int pad,
int padRangeLimit,
int largestGray,
int bitsPerEntry,
int numberOfEntries,
short[] redTable,
short[] greenTable,
short[] blueTable) |
void |
deconstruct() |
static void |
deconstructAllSingleImagePanelsInContainer(java.awt.Container container) |
void |
dirty() |
void |
dirty(SourceImage sImg) |
void |
dirtyPanned() |
void |
dirtySource() |
void |
dirtySource(SourceImage sImg) |
void |
dirtyWindowing() |
void |
displayReset() |
void |
displaySelectedMagnificationRatio(double ratio) |
protected void |
establishInitialWindowOrVOILUT() |
protected void |
establishStatisticalWindow() |
protected void |
finalize() |
protected java.awt.geom.Point2D |
getImageCoordinateFromWindowCoordinate(double xw,
double yw)
Get location on source image from window relative location.
|
GeometryOfVolume |
getImageGeometry()
Get the geometry of the frames currently loaded in the single image panel.
|
java.util.Vector |
getPersistentDrawingShapes()
Get the unselected region shapes to to be displayed on the currently selected and displayed frame.
|
java.util.Vector |
getSelectedDrawingShapes()
Get the selected region shapes to to be displayed on the currently selected and displayed frame.
|
protected int |
getSourceImageHeight() |
protected int |
getSourceImageWidth() |
java.util.Vector<SuperimposedImage> |
getSuperimposedImages()
Get the superimposed images to to be displayed on the appropriate frames.
|
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyReleased(java.awt.event.KeyEvent e) |
void |
keyTyped(java.awt.event.KeyEvent e) |
static void |
main(java.lang.String[] arg) |
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e) |
void |
paintComponent(java.awt.Graphics g) |
void |
setApplyShutter(boolean applyShutter)
Set whether or not to apply shutter.
|
void |
setDemographicAndTechniqueAnnotations(DemographicAndTechniqueAnnotations demographicAndTechniqueAnnotations,
java.lang.String demographicAndTechniqueFontName,
int demographicAndTechniqueFontStyle,
int demographicAndTechniqueFontSize,
java.awt.Color demographicAndTechniqueColor)
Set annotative attribute values to be displayed on the currently selected and displayed frame at defined positions.
|
void |
setDisplayedAreaSelection(DisplayedAreaSelection displayedAreaSelection)
Select the sub-region of the image to display.
|
void |
setLocalizerShapes(java.util.Vector shapes)
Set the shapes of any localizer postings to be displayed on the currently selected and displayed frame.
|
void |
setOrientationAnnotations(com.pixelmed.display.OrientationAnnotations orientationAnnotations,
java.lang.String orientationFontName,
int orientationFontStyle,
int orientationFontSize,
java.awt.Color orientationColor)
Set orientation values to be displayed on the currently selected and displayed frame.
|
void |
setOrientationAnnotations(com.pixelmed.display.OrientationAnnotations orientationAnnotations,
java.lang.String orientationFontName,
int orientationFontStyle,
int orientationFontSize,
java.awt.Color orientationColor,
boolean leftSide)
Set orientation values to be displayed on the currently selected and displayed frame.
|
void |
setPerFrameDrawingShapes(java.util.Vector<java.awt.Shape>[] arrayOfShapes)
Set the array of per-frame shapes to be displayed on the respective frame when it is selected and displayed.
|
void |
setPersistentDrawingShapes(java.util.Vector shapes)
Set the unselected region shapes to to be displayed on the currently selected and displayed frame.
|
void |
setPixelSpacingInSourceImage(double pixelSpacingInSourceImage)
Set pixel spacing in source image.
|
void |
setPixelSpacingInSourceImage(double pixelSpacingInSourceImage,
java.lang.String typeOfPixelSpacing)
Set pixel spacing in source image.
|
void |
setPreDefinedShapes(java.util.Vector shapes)
Set the predefined shapes to to be displayed on the currently selected and displayed frame.
|
void |
setPreTransformImageRelativeCoordinates(java.awt.geom.AffineTransform transform)
Select the AffineTransform to apply to image-relative coordinates.
|
void |
setSelectedDrawingShapes(java.util.Vector shapes)
Set the selected region shapes to to be displayed on the currently selected and displayed frame.
|
void |
setShowOverlays(boolean showOverlays)
Set whether or not to show graphics such as overlays.
|
void |
setShowSuperimposedImages(boolean showSuperimposedImages)
Set whether or not to show superimposed images.
|
void |
setShowZoomFactor(boolean showZoomFactor,
boolean leftSide,
double pixelSpacingInSourceImage)
Select whether or not to annotate displayed image with zoom factor.
|
void |
setShowZoomFactor(boolean showZoomFactor,
boolean leftSide,
double pixelSpacingInSourceImage,
java.lang.String typeOfPixelSpacing)
Select whether or not to annotate displayed image with zoom factor.
|
void |
setSideAndViewAnnotationString(java.lang.String annotationString,
int verticalOffset,
java.lang.String annotationFontName,
int annotationFontStyle,
int annotationFontSize,
java.awt.Color annotationColor,
boolean leftSide)
Set side and view annotation string.
|
void |
setSuperimposedImages(java.util.Vector<SuperimposedImage> superimposedImages)
Set the superimposed images to to be displayed on the appropriate frames.
|
void |
setVOIFunctionToLinear()
Set the VOI function to the (default) window center/width linear transformation.
|
void |
setVOIFunctionToLogistic()
Set the VOI function to a non-linear transformation using a logistic (sigmoid) curve with window center and width as parameters.
|
void |
setVolumeLocalizationShapes(java.util.Vector shapes)
Set the shapes of any volume localization postings to be displayed on the currently selected and displayed frame.
|
void |
setWindowingAccelerationValue(double value)
Set the windowing acceleration value to use.
|
void |
setWindowLinearCalculationToDicom()
Set the VOI linear function to use the DICOM offset window center/width linear transformation when applying to rescaled pixels.
|
void |
setWindowLinearCalculationToExact()
Set the VOI linear function to use the exact window center/width linear transformation when applying to rescaled pixels.
|
void |
updateStatusBarValues(int x,
int y) |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected java.util.Set<SuperimposedImage.AppliedToUnderlyingImage> activeSuperimposedImagesAppliedToUnderlyingImage
protected double[] currentLocationIn3DSpace
protected GeometryOfVolume imageGeometry
protected java.util.Vector<java.awt.Shape> interactiveDrawingShapes
protected SingleImagePanel.LeftMouseMode leftMouseMode
protected java.util.Vector<java.awt.Shape> localizerShapes
protected com.pixelmed.display.OrientationAnnotations orientationAnnotations
protected java.awt.Color orientationColor
protected java.awt.Font orientationFont
protected DisplayedAreaSelection originalDisplayedAreaSelection
protected java.util.Vector<java.awt.Shape>[] perFrameDrawingShapes
protected java.util.Vector<java.awt.Shape> persistentDrawingShapes
protected java.util.Vector<com.pixelmed.display.TextAnnotation> persistentDrawingText
protected double pixelSpacingInSourceImage
protected java.util.Vector<java.awt.Shape> preDefinedShapes
protected java.util.Vector<java.awt.Shape> preDefinedText
protected java.util.Vector<java.awt.Shape> selectedDrawingShapes
protected boolean showOrientationsLeftSide
protected boolean showSideAndViewAnnotationLeftSide
protected boolean showZoomFactor
protected boolean showZoomFactorLeftSide
protected java.awt.Color sideAndViewAnnotationColor
protected java.awt.Font sideAndViewAnnotationFont
protected java.lang.String sideAndViewAnnotationString
protected int sideAndViewAnnotationVerticalOffset
protected java.util.Vector<SuperimposedImage> superimposedImages
protected java.lang.String typeOfPixelSpacing
protected boolean useVOILUTNotFunction
protected int voiLUTBitsPerEntry
protected short[] voiLUTData
protected int voiLUTEntryMax
protected int voiLUTEntryMin
protected int voiLUTFirstValueMapped
protected double voiLUTIdentityWindowCenter
protected double voiLUTIdentityWindowWidth
protected int voiLUTNumberOfEntries
protected int voiLUTTopOfEntryRange
protected java.util.Vector<java.awt.Shape> volumeLocalizationShapes
protected double windowCenter
protected double windowWidth
public SingleImagePanel(SourceImage sImg)
sImg
- public SingleImagePanel(SourceImage sImg, EventContext typeOfPanelEventContext)
sImg
- typeOfPanelEventContext
- public SingleImagePanel(SourceImage sImg, EventContext typeOfPanelEventContext, GeometryOfVolume imageGeometry)
sImg
- typeOfPanelEventContext
- imageGeometry
- public SingleImagePanel(SourceImage sImg, EventContext typeOfPanelEventContext, int[] sortOrder, java.util.Vector preDefinedShapes, java.util.Vector preDefinedText, GeometryOfVolume imageGeometry)
sImg
- typeOfPanelEventContext
- sortOrder
- preDefinedShapes
- preDefinedText
- imageGeometry
- public static final java.awt.image.BufferedImage applyVOILUT(java.awt.image.BufferedImage src, double center, double width, double identityCenter, double identityWidth, boolean signed, boolean inverted, double useSlope, double useIntercept, boolean hasPad, int pad, int padRangeLimit, int numberOfEntries, int firstValueMapped, int bitsPerEntry, short[] grayTable, int entryMin, int entryMax, int topOfEntryRange)
src
- center
- width
- identityCenter
- identityWidth
- signed
- inverted
- useSlope
- useIntercept
- hasPad
- pad
- padRangeLimit
- numberOfEntries
- bitsPerEntry
- grayTable
- entryMin
- entryMax
- topOfEntryRange
- public static final java.awt.image.BufferedImage applyWindowCenterAndWidthLinear(java.awt.image.BufferedImage src, double center, double width, boolean signed, boolean inverted, double useSlope, double useIntercept, boolean hasPad, int pad, int padRangeLimit)
src
- center
- width
- signed
- inverted
- useSlope
- useIntercept
- hasPad
- pad
- padRangeLimit
- public static final java.awt.image.BufferedImage applyWindowCenterAndWidthLinear(java.awt.image.BufferedImage src, double center, double width, boolean signed, boolean inverted, double useSlope, double useIntercept, boolean hasPad, int pad, int padRangeLimit, boolean useExactCalculationInsteadOfDICOMStandardMethod)
src
- center
- width
- signed
- inverted
- useSlope
- useIntercept
- hasPad
- pad
- padRangeLimit
- useExactCalculationInsteadOfDICOMStandardMethod
- public static final java.awt.image.BufferedImage applyWindowCenterAndWidthLinearToColorImage(java.awt.image.BufferedImage src, double center, double width)
src
- center
- width
- public static final java.awt.image.BufferedImage applyWindowCenterAndWidthLogistic(java.awt.image.BufferedImage src, double center, double width, boolean signed, boolean inverted, double useSlope, double useIntercept, boolean hasPad, int pad, int padRangeLimit)
src
- center
- width
- signed
- inverted
- useSlope
- useIntercept
- hasPad
- pad
- padRangeLimit
- public static final java.awt.image.BufferedImage applyWindowCenterAndWidthWithPaletteColor(java.awt.image.BufferedImage src, double center, double width, boolean signed, boolean inverted, double useSlope, double useIntercept, boolean hasPad, int pad, int padRangeLimit, int largestGray, int bitsPerEntry, int numberOfEntries, short[] redTable, short[] greenTable, short[] blueTable)
src
- center
- width
- signed
- inverted
- useSlope
- useIntercept
- hasPad
- pad
- padRangeLimit
- largestGray
- bitsPerEntry
- numberOfEntries
- redTable
- greenTable
- blueTable
- public void deconstruct()
public static void deconstructAllSingleImagePanelsInContainer(java.awt.Container container)
public void dirty()
public void dirty(SourceImage sImg)
public void dirtyPanned()
public void dirtySource()
public void dirtySource(SourceImage sImg)
public void dirtyWindowing()
public void displayReset()
public void displaySelectedMagnificationRatio(double ratio)
protected void establishInitialWindowOrVOILUT()
protected void establishStatisticalWindow()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
protected java.awt.geom.Point2D getImageCoordinateFromWindowCoordinate(double xw, double yw)
xw
- x coordinate in AWT window as returned by MouseEvent.getX()yw
- y coordinate in AWT window as returned by MouseEvent.getY()public GeometryOfVolume getImageGeometry()
Get the geometry of the frames currently loaded in the single image panel.
public final java.util.Vector getPersistentDrawingShapes()
Get the unselected region shapes to to be displayed on the currently selected and displayed frame.
java.util.Vector
of java.awt.Shape
, may be null or emptypublic final java.util.Vector getSelectedDrawingShapes()
Get the selected region shapes to to be displayed on the currently selected and displayed frame.
java.util.Vector
of java.awt.Shape
, may be null or emptyprotected int getSourceImageHeight()
protected int getSourceImageWidth()
public final java.util.Vector<SuperimposedImage> getSuperimposedImages()
Get the superimposed images to to be displayed on the appropriate frames.
java.util.Vector
of com.pixelmed.display.SuperimposedImage
, may be null or emptypublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
e
- public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
e
- public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
e
- public static void main(java.lang.String[] arg)
arg
- public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
e
- public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
e
- public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
e
- public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
e
- public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
e
- public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
e
- public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
e
- public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
e
- public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
g
- public final void setApplyShutter(boolean applyShutter)
Set whether or not to apply shutter.
public final void setDemographicAndTechniqueAnnotations(DemographicAndTechniqueAnnotations demographicAndTechniqueAnnotations, java.lang.String demographicAndTechniqueFontName, int demographicAndTechniqueFontStyle, int demographicAndTechniqueFontSize, java.awt.Color demographicAndTechniqueColor)
Set annotative attribute values to be displayed on the currently selected and displayed frame at defined positions.
demographicAndTechniqueAnnotations
- the set of annotations, indexed per framedemographicAndTechniqueFontName
- the name of the font, e.g. "SansSerif"demographicAndTechniqueFontStyle
- the style of the font, e.g. Font.PLAINdemographicAndTechniqueFontSize
- the size of the font in points, e.g. 10demographicAndTechniqueColor
- the color to draw, e.g. Color.pinkpublic final void setDisplayedAreaSelection(DisplayedAreaSelection displayedAreaSelection)
Select the sub-region of the image to display.
displayedAreaSelection
- the selection, or null to reset to using the entire imagepublic final void setLocalizerShapes(java.util.Vector shapes)
Set the shapes of any localizer postings to be displayed on the currently selected and displayed frame.
shapes
- a java.util.Vector
of java.awt.Shape
, may be null or emptypublic final void setOrientationAnnotations(com.pixelmed.display.OrientationAnnotations orientationAnnotations, java.lang.String orientationFontName, int orientationFontStyle, int orientationFontSize, java.awt.Color orientationColor)
Set orientation values to be displayed on the currently selected and displayed frame.
orientationAnnotations
- the set of orientations, indexed per frameorientationFontName
- the name of the font, e.g. "SansSerif"orientationFontStyle
- the style of the font, e.g. Font.PLAINorientationFontSize
- the size of the font in points, e.g. 20orientationColor
- the color to draw, e.g. Color.pinkpublic final void setOrientationAnnotations(com.pixelmed.display.OrientationAnnotations orientationAnnotations, java.lang.String orientationFontName, int orientationFontStyle, int orientationFontSize, java.awt.Color orientationColor, boolean leftSide)
Set orientation values to be displayed on the currently selected and displayed frame.
orientationAnnotations
- the set of orientations, indexed per frameorientationFontName
- the name of the font, e.g. "SansSerif"orientationFontStyle
- the style of the font, e.g. Font.PLAINorientationFontSize
- the size of the font in points, e.g. 20orientationColor
- the color to draw, e.g. Color.pinkleftSide
- show row orientation on left (true) or right (false) side of view portpublic final void setPerFrameDrawingShapes(java.util.Vector<java.awt.Shape>[] arrayOfShapes)
Set the array of per-frame shapes to be displayed on the respective frame when it is selected and displayed.
arrayOfShapes
- an array of java.util.Vector
of java.awt.Shape
public final void setPersistentDrawingShapes(java.util.Vector shapes)
Set the unselected region shapes to to be displayed on the currently selected and displayed frame.
shapes
- a java.util.Vector
of java.awt.Shape
, may be null or emptypublic final void setPixelSpacingInSourceImage(double pixelSpacingInSourceImage)
Set pixel spacing in source image.
Used for displaying zoom factor and making measurements, therefore should be appropriate choice of Pixel Spacing or Imager Pixel Spacing (appropriately corrected for radiographic magnification factor, if any), etc.
pixelSpacingInSourceImage
- a single value that is the (square) row and column pixel spacing, or 0 if not knownpublic final void setPixelSpacingInSourceImage(double pixelSpacingInSourceImage, java.lang.String typeOfPixelSpacing)
Set pixel spacing in source image.
Used for displaying zoom factor and making measurements, therefore should be appropriate choice of Pixel Spacing or Imager Pixel Spacing (appropriately corrected for radiographic magnification factor, if any), etc.
pixelSpacingInSourceImage
- a single value that is the (square) row and column pixel spacing, or 0 if not knowntypeOfPixelSpacing
- a String that describes the type of pixel spacing (e.g., detector plane, calibrated, accounting for geometric magnification, etc.), or null if not to be described when making measurementspublic final void setPreDefinedShapes(java.util.Vector shapes)
Set the predefined shapes to to be displayed on the currently selected and displayed frame.
shapes
- a java.util.Vector
of java.awt.Shape
, may be null or emptypublic final void setPreTransformImageRelativeCoordinates(java.awt.geom.AffineTransform transform)
Select the AffineTransform to apply to image-relative coordinates.
Used in cases where the supplied image has already been flipped or rotated but the coordinates relative to the original image have not.
transform
- the transform, or null to reset to no transformpublic final void setSelectedDrawingShapes(java.util.Vector shapes)
Set the selected region shapes to to be displayed on the currently selected and displayed frame.
shapes
- a java.util.Vector
of java.awt.Shape
, may be null or emptypublic final void setShowOverlays(boolean showOverlays)
Set whether or not to show graphics such as overlays.
public final void setShowSuperimposedImages(boolean showSuperimposedImages)
Set whether or not to show superimposed images.
public final void setShowZoomFactor(boolean showZoomFactor, boolean leftSide, double pixelSpacingInSourceImage)
Select whether or not to annotate displayed image with zoom factor.
Uses same font parameters as set for orientation annotations.
Also implicitly effects setPixelSpacingInSourceImage().
showZoomFactor
- true or false to activate annotation of zoom factorleftSide
- show zoom factor on left (true) or right (false) side of view portpixelSpacingInSourceImage
- a single value that is the (square) row and column pixel spacing, or 0 if not knownpublic final void setShowZoomFactor(boolean showZoomFactor, boolean leftSide, double pixelSpacingInSourceImage, java.lang.String typeOfPixelSpacing)
Select whether or not to annotate displayed image with zoom factor.
Uses same font parameters as set for orientation annotations.
Also implicitly effects setPixelSpacingInSourceImage().
showZoomFactor
- true or false to activate annotation of zoom factorleftSide
- show zoom factor on left (true) or right (false) side of view portpixelSpacingInSourceImage
- a single value that is the (square) row and column pixel spacing, or 0 if not knowntypeOfPixelSpacing
- a String that describes the type of pixel spacing (e.g., detector plane, calibrated, accounting for geometric magnification, etc.), or null if not to be described when making measurementspublic final void setSideAndViewAnnotationString(java.lang.String annotationString, int verticalOffset, java.lang.String annotationFontName, int annotationFontStyle, int annotationFontSize, java.awt.Color annotationColor, boolean leftSide)
Set side and view annotation string.
annotationString
- additional side (image laterality) and view (e.g., mammo CC) string to show on same sideverticalOffset
- annotationFontName
- the name of the font, e.g. "SansSerif"annotationFontStyle
- the style of the font, e.g. Font.PLAINannotationFontSize
- the size of the font in points, e.g. 20annotationColor
- the color to draw, e.g. Color.pinkleftSide
- show row orientation on left (true) or right (false) side of view portpublic final void setSuperimposedImages(java.util.Vector<SuperimposedImage> superimposedImages)
Set the superimposed images to to be displayed on the appropriate frames.
superimposedImages
- a java.util.Vector
of com.pixelmed.display.SuperimposedImage
, may be null or emptypublic final void setVOIFunctionToLinear()
Set the VOI function to the (default) window center/width linear transformation.
public final void setVOIFunctionToLogistic()
Set the VOI function to a non-linear transformation using a logistic (sigmoid) curve with window center and width as parameters.
public final void setVolumeLocalizationShapes(java.util.Vector shapes)
Set the shapes of any volume localization postings to be displayed on the currently selected and displayed frame.
shapes
- a java.util.Vector
of java.awt.Shape
, may be null or emptypublic final void setWindowingAccelerationValue(double value)
Set the windowing acceleration value to use.
public final void setWindowLinearCalculationToDicom()
Set the VOI linear function to use the DICOM offset window center/width linear transformation when applying to rescaled pixels.
The DICOM offset subtracts 0.5 from the window center and subtracts 1.0 from the window width before applying to rescaled pixels.
public final void setWindowLinearCalculationToExact()
Set the VOI linear function to use the exact window center/width linear transformation when applying to rescaled pixels.
public void updateStatusBarValues(int x, int y)
x
- y
-