|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
ui.recognizer.PlotRecognizer
public class PlotRecognizer
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static String |
DATA
|
static String |
DATA_FLATEN
|
static String |
DATA_MODIFY
|
static String |
DATA_OUTPUT_FORMAT_FITS
|
static String |
DATA_OUTPUT_FORMAT_TEXT
|
static String |
DATA_OUTPUT_FORMAT_XML
|
static String |
DATA_OVERLAY
|
static String |
DATA_SMOOTH
|
static String |
EDIT
|
static String |
EDIT_CALIBRATE
|
static String |
EDIT_CLEAN
|
static String |
EDIT_RECOGNIZE
|
static String |
EDIT_REMOVE_GRID
|
static String |
EDIT_WINDOW
|
static String |
FILE
|
static String |
FILE_LOAD
|
static String |
FILE_QUIT
|
static String |
FILE_SAVE
|
static int |
HEIGHT
|
static String |
VIEW
|
static String |
VIEW_ZOOM_IN
|
static String |
VIEW_ZOOM_NORMAL
|
static String |
VIEW_ZOOM_OUT
|
static int |
WIDTH
|
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields 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_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS |
Constructor Summary | |
---|---|
PlotRecognizer(String aTitle)
|
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
|
void |
calibrate()
Calibrate the image by asking for the user to click on the axes and to define a numerical value for the coordinates of those points. |
JMenuBar |
createMenu()
|
void |
dragEnter(DropTargetDragEvent e)
|
void |
dragExit(DropTargetEvent e)
|
void |
dragOver(DropTargetDragEvent e)
|
void |
dragScroll(DropTargetDragEvent e)
|
void |
drop(DropTargetDropEvent e)
|
void |
dropActionChanged(DropTargetDragEvent e)
|
int |
getBlackThreshold()
Get the gray color intensity below which a pixel is considered 'black' |
String |
getDataFileName()
Get the file name for the plot data. |
String |
getDataFileType()
Get the data file type. |
String |
getDataOutputFormat()
Get the data output format such as text or xml. |
String |
getImageFileName()
Get the file name for the image. |
int |
getSamples()
Get the number of data samples in the plot |
String |
getXTextOutputFormat()
Get the text output format string for the x data values, which determines the precision or number of significant digits when exporting the x value as text |
String |
getYTextOutputFormat()
Get the text output format string for the y data values, which determines the precision or number of significant digits when exporting the y value as text |
void |
init()
|
boolean |
isAxesCalibrated()
Get the status of the axes calibration procedure. |
boolean |
isDataAvailable()
Get the status of the available processed data. |
boolean |
isImageLoaded()
Get the status of the image loading process. |
boolean |
isOverlay()
Get the overlay option. |
void |
itemStateChanged(ItemEvent e)
|
void |
loadImage()
|
void |
loadImage(File aFile)
|
static void |
main(String[] argv)
|
void |
overlay()
|
void |
processFiles(List aListOfFiles)
Process a list of image files. |
void |
recognize()
Recognize the image by iterating over the pixexl columns of the calibrated image window and by searching for the plot 'trace' or 'pen' which represents the function y=f(x). |
void |
reDraw()
|
void |
saveData()
Bring up a file requestor and save the current data into that file. |
void |
saveData(File aFile)
Save the current data as file, the file will be saved in the current export format |
void |
setAxesCalibrated(boolean aAxesCalibrated)
Set the status of the axis calibration procedure. |
void |
setBlackThreshold(int aBlackThreshold)
Set the gray color intensity below which a pixel is considered 'black' |
void |
setDataAvailable(boolean aDataAvailable)
Set the status of the available processed data. |
void |
setDataFileName(String aDataFileName)
Set the file name for the plot data. |
void |
setDataFileType(String aDataFileType)
Set the file name for the plot data. |
void |
setDataOutputFormat(String aDataOutputFormat)
Set the data output format such as text or xml. |
void |
setImageFileName(String anImageFileName)
|
void |
setImageLoaded(boolean anImageLoaded)
Set the status of the image loading process. |
void |
setOverlay(boolean anOverlay)
Set the overlay option. |
void |
setSamples(int aSamples)
Set the number of data samples in the plot |
void |
setXTextOutputFormat(String aXTextOutputFormat)
Set the text output format string for the x data values. |
void |
setYTextOutputFormat(String aYTextOutputFormat)
Set the text output format string for the y data values. |
Methods inherited from class java.awt.Frame |
---|
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
public static final String FILE
public static final String FILE_LOAD
public static final String FILE_SAVE
public static final String FILE_QUIT
public static final String EDIT
public static final String EDIT_CLEAN
public static final String EDIT_REMOVE_GRID
public static final String EDIT_CALIBRATE
public static final String EDIT_WINDOW
public static final String EDIT_RECOGNIZE
public static final String VIEW
public static final String VIEW_ZOOM_IN
public static final String VIEW_ZOOM_OUT
public static final String VIEW_ZOOM_NORMAL
public static final String DATA
public static final String DATA_MODIFY
public static final String DATA_SMOOTH
public static final String DATA_FLATEN
public static final String DATA_OVERLAY
public static int WIDTH
public static int HEIGHT
public static String DATA_OUTPUT_FORMAT_TEXT
public static String DATA_OUTPUT_FORMAT_XML
public static String DATA_OUTPUT_FORMAT_FITS
Constructor Detail |
---|
public PlotRecognizer(String aTitle)
Method Detail |
---|
public void init()
public JMenuBar createMenu()
public void itemStateChanged(ItemEvent e)
itemStateChanged
in interface ItemListener
public void reDraw()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void loadImage()
public void loadImage(File aFile)
public void saveData()
public void saveData(File aFile)
aFile
- a file in which to save the datapublic void processFiles(List aListOfFiles)
aListOfFiles
- a collection of File objects to be processed.public void calibrate()
public void recognize()
public void overlay()
public static void main(String[] argv)
public void setDataOutputFormat(String aDataOutputFormat)
aDataOutputFormat
- the data output formatpublic String getDataOutputFormat()
public String getXTextOutputFormat()
public void setXTextOutputFormat(String aXTextOutputFormat)
aXTextOutputFormat
- a string representing the decimal text output format for the x valuespublic String getYTextOutputFormat()
public void setYTextOutputFormat(String aYTextOutputFormat)
aYTextOutputFormat
- a string representing the decimal text output format for the y valuespublic int getBlackThreshold()
public void setBlackThreshold(int aBlackThreshold)
aBlackThreshold
- the threshold intensity for black, an integer between 0 and 255public int getSamples()
public void setSamples(int aSamples)
aSamples
- the number of data samples in the plotpublic String getDataFileType()
public void setDataFileType(String aDataFileType)
aDataFileType
- a string representing the data file namepublic String getDataFileName()
public void setDataFileName(String aDataFileName)
aDataFileName
- a string representing the data file namepublic String getImageFileName()
public void setImageFileName(String anImageFileName)
public boolean isAxesCalibrated()
public void setAxesCalibrated(boolean aAxesCalibrated)
aAxesCalibrated
- boolean flag indicating if axes have been calibratedpublic boolean isDataAvailable()
public void setDataAvailable(boolean aDataAvailable)
aDataAvailable
- a boolean flag indicating if the data is availablepublic boolean isImageLoaded()
public void setImageLoaded(boolean anImageLoaded)
public boolean isOverlay()
public void setOverlay(boolean anOverlay)
anOverlay
- a boolean flag representing the choice to plot data over the imagepublic void dragEnter(DropTargetDragEvent e)
dragEnter
in interface DropTargetListener
public void dragOver(DropTargetDragEvent e)
dragOver
in interface DropTargetListener
public void dragExit(DropTargetEvent e)
dragExit
in interface DropTargetListener
public void drop(DropTargetDropEvent e)
drop
in interface DropTargetListener
public void dragScroll(DropTargetDragEvent e)
public void dropActionChanged(DropTargetDragEvent e)
dropActionChanged
in interface DropTargetListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |