public class ThresholdsAndColorMaps
extends javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
private javax.swing.JButton |
acceptButton |
private java.text.NumberFormat |
amountFormat |
private javax.swing.JButton |
applyButton |
private javax.swing.JPanel |
buttonsPane |
private javax.swing.JButton |
cancelButton |
private javax.swing.JCheckBox[] |
checkBoxHistogramOperations |
private static int |
DIALOG_HEIGHT
Peferences frame height
|
private static int |
DIALOG_WIDTH
Peferences frame width
|
private javax.swing.JPanel |
formPane |
(package private) int[][] |
histogram |
private javax.swing.JPanel |
histogramPane |
(package private) float[][][] |
image |
private ImageData |
imageData
Reference to the container of the displayed image.
|
private java.awt.Container |
jFramePane |
private javax.swing.JPanel |
mainPane |
private javax.swing.Box |
maxThresholdAbsoluteBox |
private javax.swing.JFormattedTextField |
maxThresholdAbsoluteField |
private javax.swing.Box |
maxThresholdBox |
private javax.swing.Box |
maxThresholdPercentBox |
private javax.swing.JTextField |
maxThresholdPercentField |
(package private) int |
maxvalue |
private javax.swing.Box |
minThresholdAbsoluteBox |
private javax.swing.JTextField |
minThresholdAbsoluteField |
private javax.swing.Box |
minThresholdBox |
private javax.swing.Box |
minThresholdPercentBox |
private javax.swing.JFormattedTextField |
minThresholdPercentField |
(package private) int |
minvalue |
private java.lang.Object |
obj
Class where the invocated method is.
|
private javax.swing.JFrame |
owner
Reference to the parent object.
|
private java.lang.reflect.Method |
rePaintImage
Method to invoke a repaint of the displayed image.
|
private static long |
serialVersionUID |
private javax.swing.JSlider |
sl1 |
private javax.swing.JSlider |
sl2 |
private javax.swing.JPanel |
sliderPane |
private javax.swing.JPanel |
thresholdsPane |
private static java.lang.String |
TITLE
Peferences frame title
|
private javax.swing.JCheckBox |
xMaxCheck |
private javax.swing.JTextField |
xMaxField |
private javax.swing.JCheckBox |
xMinCheck |
private javax.swing.JTextField |
xMinField |
private javax.swing.JCheckBox |
yMaxCheck |
private javax.swing.JTextField |
yMaxField |
private javax.swing.JCheckBox |
yMinCheck |
private javax.swing.JTextField |
yMinField |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
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
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
ThresholdsAndColorMaps()
Constructor.
|
ThresholdsAndColorMaps(javax.swing.JFrame owner,
ImageData imageData,
java.lang.Object obj,
java.lang.reflect.Method rePaintImage)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private int[][] |
calculateCumulativeHistogram(float[][][] image)
Computes the cumulative histogram of an image.
|
private int[][] |
calculateHistogram(float[][][] image)
This method computes the historgram of an image.
|
private void |
contrastStretching(float[][][] image,
int minOutputRange,
int maxOutputRange)
Adjust an image to its available dynamic range.
|
private javax.swing.JPanel |
createFormPane() |
private javax.swing.JPanel |
createHistogramOperations(int width,
int height) |
private javax.swing.JPanel |
createPane() |
private javax.swing.JPanel |
createSliderPane() |
private javax.swing.JPanel |
createThresholdsPane(int width,
int height) |
private void |
equalizeImage(float[][][] image)
Equalizes the image.
|
private void |
paintGradient(java.awt.Graphics2D g2,
int x1,
int y1,
int x2,
int y2) |
void |
printHistogram(int[][] hist,
java.awt.Graphics g) |
void |
streching(int max,
int min,
float[][][] image) |
private void |
testLino() |
private void |
thresholdImage(float[][][] image,
int xMin,
int yMin,
int xMax,
int yMax) |
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
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
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
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
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, getPeer, 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, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private static final long serialVersionUID
private static final int DIALOG_WIDTH
private static final int DIALOG_HEIGHT
private static final java.lang.String TITLE
private javax.swing.JFrame owner
private java.lang.Object obj
private ImageData imageData
private java.lang.reflect.Method rePaintImage
private java.awt.Container jFramePane
private javax.swing.JPanel mainPane
private javax.swing.JPanel formPane
private javax.swing.JPanel histogramPane
private javax.swing.JPanel thresholdsPane
private javax.swing.Box maxThresholdBox
private javax.swing.Box minThresholdBox
private javax.swing.Box maxThresholdPercentBox
private javax.swing.Box minThresholdPercentBox
private javax.swing.Box maxThresholdAbsoluteBox
private javax.swing.Box minThresholdAbsoluteBox
private javax.swing.JTextField maxThresholdPercentField
private javax.swing.JFormattedTextField minThresholdPercentField
private javax.swing.JFormattedTextField maxThresholdAbsoluteField
private javax.swing.JTextField minThresholdAbsoluteField
private javax.swing.JPanel buttonsPane
private javax.swing.JButton acceptButton
private javax.swing.JButton cancelButton
private javax.swing.JButton applyButton
private javax.swing.JPanel sliderPane
private javax.swing.JSlider sl1
private javax.swing.JSlider sl2
private javax.swing.JTextField xMinField
private javax.swing.JTextField yMinField
private javax.swing.JTextField xMaxField
private javax.swing.JTextField yMaxField
private javax.swing.JCheckBox xMinCheck
private javax.swing.JCheckBox xMaxCheck
private javax.swing.JCheckBox yMinCheck
private javax.swing.JCheckBox yMaxCheck
float[][][] image
int[][] histogram
private java.text.NumberFormat amountFormat
int maxvalue
int minvalue
private javax.swing.JCheckBox[] checkBoxHistogramOperations
public ThresholdsAndColorMaps()
This constructor is not allowed.
public ThresholdsAndColorMaps(javax.swing.JFrame owner, ImageData imageData, java.lang.Object obj, java.lang.reflect.Method rePaintImage)
owner
- rePaintImage
- private javax.swing.JPanel createPane()
private javax.swing.JPanel createHistogramOperations(int width, int height)
width
- height
- private javax.swing.JPanel createThresholdsPane(int width, int height)
width
- height
- private int[][] calculateHistogram(float[][][] image)
image
- a three-dimension array with the image samples.private int[][] calculateCumulativeHistogram(float[][][] image)
image
- private void contrastStretching(float[][][] image, int minOutputRange, int maxOutputRange)
image
- minOutputRange
- maxOutputRange
- private void equalizeImage(float[][][] image)
image
- private void thresholdImage(float[][][] image, int xMin, int yMin, int xMax, int yMax)
image
- xMin
- yMin
- xMax
- yMax
- private javax.swing.JPanel createFormPane()
private javax.swing.JPanel createSliderPane()
private void paintGradient(java.awt.Graphics2D g2, int x1, int y1, int x2, int y2)
g2
- x1
- y1
- x2
- y2
- public void printHistogram(int[][] hist, java.awt.Graphics g)
public void streching(int max, int min, float[][][] image)
private void testLino()
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)