public class HistogramAll
extends javax.swing.JComponent
implements java.awt.print.Printable
javax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected double |
binToFreq
The scale for the levels to fit into the freq array (16-bit levels index).
|
protected RangeDouble[] |
channelRanges
The extremes of the image from which this histogram was calculated,
by channel.
|
protected int[][] |
fbin
Also created by the constructor, frequencies binned into 256 levels for
plotting.
|
protected int[][] |
freq
Raw frequencies, [band][level * this.scaleTo16] has 256 bins for Image8
but 65536 bins for all other images.
|
protected int |
nBands
Number of bands (channels) in the image (and in the freq array).
|
protected int |
nLevels
Number of levels in freq array, not in the image.
|
protected RangeDouble |
range
Actual range in the image
|
protected Statistics[] |
statistics
Created by the constructor: accurate (non-binned) values for mean and
std dev but the mode is set by rescanning freq[][] after the main
calculation.
|
protected java.lang.String[] |
xLabels
6 labels for the x-axis of the plot.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Modifier | Constructor and Description |
|---|---|
protected |
HistogramAll()
Only for sub-class: must have an image to build the data from.
|
|
HistogramAll(Image image)
Histogram of a whole Image.
|
|
HistogramAll(Image image,
RangeDouble range)
Histogram of a whole Image, but only in the specified range of levels.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildData(Image image,
RangeDouble extremes)
Analyse the whole image - new version, 12.8.10
|
void |
draw(java.awt.Graphics2D g2,
int xOffset,
int yOffset)
Draw a graph of the histogram in the given graphics context (screen or
printer) at the given offset position.
|
void |
equalise(Image image) |
Statistics[] |
getStatistics()
Get all statistics, returning as an array indexed by channel (band).
|
Statistics[] |
getStatistics(int start,
int end)
Calculate all statistics, returning as an array index by channel (band).
|
protected void |
makeXLabels(Image image,
RangeDouble extremes) |
void |
paintComponent(java.awt.Graphics g) |
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pageNo)
Print the histogram.
|
void |
saveCSV()
Save the histogram as a comma-separated-value file, suitable for
loading into spreadsheets.
|
void |
saveXML()
Save the histogram as an XML file.
|
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, updateUIadd, 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, validateTreeaction, 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, transferFocusUpCycleprotected int nLevels
protected int nBands
protected RangeDouble range
protected int[][] freq
protected double binToFreq
protected RangeDouble[] channelRanges
protected int[][] fbin
protected Statistics[] statistics
protected java.lang.String[] xLabels
protected HistogramAll()
public HistogramAll(Image image)
public HistogramAll(Image image, RangeDouble range)
protected void buildData(Image image, RangeDouble extremes)
protected void makeXLabels(Image image, RangeDouble extremes)
public void equalise(Image image)
public Statistics[] getStatistics(int start, int end)
public Statistics[] getStatistics()
public void draw(java.awt.Graphics2D g2,
int xOffset,
int yOffset)
public void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic int print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pageNo)
throws java.awt.print.PrinterException
print in interface java.awt.print.Printablejava.awt.print.PrinterExceptionpublic void saveCSV()
public void saveXML()