|
||||||||||
| 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
jview.JExitFrame
jview.JConfirmExitFrame
jview.JBorderFrame
jview.JOpenFrame
jview.JFitsFrame
public class JFitsFrame
A class that allows displays fits files.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jview.JOpenFrame |
|---|
JOpenFrame.Show |
| 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private List<ShapeListener> |
adumeasure
The list of ShapeListeners |
private List<FitsShapeProviding> |
apertures
The list of FitsShapeProviders. |
private JButton |
bias
Apply bias button, disabled after subtraction. |
static String |
BIASACTION
The action-event command for bias subtract button. |
private boolean |
color
Colorize the image if true. |
static String |
COLORACTION
The action-event command for colorize check box. |
private JCheckBox |
colorbox
The colorize check box. |
private Kernel |
convolve
If we have a kernel, we apply it. |
private JButton |
dark
Apply dark button, disabled after subtraction. |
static String |
DARKACTION
The action-event command for dark subtract button. |
private static String |
DEFBINDNAME
The name to bind my services. |
private static boolean |
DEFCOLORIZE
Default negative display. |
private static String |
DEFFALSEPALETTE
Default false-color palette as a binary LUT. |
private static String |
DEFFILEACTIONS
The action commands used for identfiying file menu actions. |
private static Dimension |
DEFFITSBINNING
Default binning. |
private static Point |
DEFFITSOFFSET
Default offset. |
private static double |
DEFGAUSSFWHM
The default gauss fwhm at start. |
private static double |
DEFGAUSSMAXFWHM
The default gauss fwhm at start. |
private static double |
DEFGAUSSMAXTRUNC
The default gauss fwhm at start. |
private static double |
DEFGAUSSTRUNC
The default gauss fwhm at start. |
private static boolean |
DEFINCLUDESTATUS
Default without status. |
private static String |
DEFLOCALDIR
The name of the local directory. |
private static boolean |
DEFNEGATIVE
Default negative display. |
private static String |
DEFRESOURCEBUNDLES
The resource bundles for localized labels and text. |
private static String |
DEFSCPCOMMAND
The scp command to copy to local directory. |
private static long |
DEFSCPTIMEOUT
The scp command to copy to local directory timeout. |
private static boolean |
DEFSHOWGAUSS
And we show gauss. |
private static boolean |
DEFSHOWTABLE
|
private static String |
DEFTIMEDLOAD
The name of the local directory. |
private static String |
DEFTMPDIR
The name of the tmp directory. |
private static String |
DEFTMPFITS
The name of the tmp file for decompressing. |
private static String |
DEFURLRESOURCES
The default resources. |
private static boolean |
DEFWORKBACKGROUND
The fits is a background not a viewport image. |
private static boolean |
DEFZOOMDISPLAYED
And we zoom this. |
private JFitsComponent |
fits
Central panel is the fits canvas plus the brightness/contrast adjust. |
private List<String> |
fitskeys
The list of keys. |
private JTable |
fitstable
The fits header table. |
private JButton |
flat
Apply flat button, disabled after subtraction. |
static String |
FLATACTION
The action-event command for flat-fileding button. |
static String |
GAUSSACTION
The action-event command for gauss-filtering button. |
private JFractionalSlider |
gaussfwhm
The slider for the Gauss fwhm value in pixel. |
private JFractionalSlider |
gausstrunc
The slider for the Gauss truncation value in pixel. |
private JFormattedTextField |
histmax
If the user enters min/max values rather than a keep level. |
private JFormattedTextField |
histmin
If the user enters min/max values rather than a keep level. |
static String |
HISTOGRAMACTION
The action-event command for histogram button. |
static String |
HORIZONTALCUTACTION
The action-event command for horizontal cut button. |
private JSpinner |
horsize
The spinner that defines the pixel size of the horizontal cut. |
private JCheckBox |
invert
The invert check box. |
static String |
INVERTACTION
The action-event command for invert check box. |
private JRationalSlider |
keep
The slider for percentage of counts kept. |
static String |
KEY_BIASFITS
The key pointing to the bias fits file. |
static String |
KEY_BINDNAME
The name to bind my services. |
static String |
KEY_COLORIZE
The default color value. |
static String |
KEY_DARKFITS
The key pointing to the debiased dark fits, scaled to 1 sec exposure. |
static String |
KEY_FALSEPALETTE
The name of the false-color palette to use. |
static String |
KEY_FITSBINNING
The default fits binning, override with header entries. |
static String |
KEY_FITSOFFSET
The default offset of the fits image, override with header entries. |
static String |
KEY_FLATTABLE
The key pointing to the filter-to-flat fits lookup table. |
static String |
KEY_GAUSSFWHM
The key to the start gauss fwhm. |
static String |
KEY_GAUSSMAXFWHM
The key to the maximum gauss fwhm. |
static String |
KEY_GAUSSMAXTRUNC
The key to the maximum gauss truncation. |
static String |
KEY_GAUSSTRUNC
The key to the start gauss truncation. |
static String |
KEY_HEADERKEYS
The list of header keyword to display. |
static String |
KEY_INCLUDESTATUS
If true, we include a status panel. |
static String |
KEY_LOCALDIR
The name of the local directory. |
static String |
KEY_NEGATIVE
The default negative value. |
static String |
KEY_SCPCOMMAND
The scp command to copy to local directory. |
static String |
KEY_SCPTIMEOUT
The scp command to copy to local directory timeout. |
static String |
KEY_SHOWGAUSS
The key to the maximum gauss fwhm. |
static String |
KEY_SHOWTABLE
If true, we include a table of fits keys panel. |
static String |
KEY_TELESCOPECHAR
The telescope ID char for pick listening. |
static String |
KEY_TIMEDLOAD
The name of the local directory. |
static String |
KEY_TMPDIR
The name of the tmp directory. |
static String |
KEY_TMPFITS
The name of the tmp file for decompressing. |
private int |
lastcut
Last cut button that was pressed. |
private boolean |
negative
Invert colors if true. |
static String |
NEXTXTENSIONACTION
The action-event command for next extension button. |
private JFormattedTextField |
precise
The text field bound to the percentage slider. |
static String |
PREVXTENSIONACTION
The action-event command for next extension button. |
private Map<String,FitsShapeProviding> |
providers
Lookup table linking shape provider ids to the provider. |
private JLabel |
ra1de
If a WCS was found, we also display right ascension and dec. |
private JLabel |
rade1
If a WCS was found, we also display right ascension and dec. |
static String |
REDRAWACTION
The action-event command for redraw button. |
static String |
RESETACTION
The action-event command for reset button. |
static String |
RESETPROPERTY
The reset property change event string. |
private JComboBox |
scaling
The scaling combo box. |
private JLabel |
value
The value in the fits file at the mouse position. |
private NumberFormat |
valuef
And the decimal formatter to it. |
static String |
VERTICALCUTACTION
The action-event command for vertical cut button. |
private JSpinner |
vertsize
The spinner that defines the pixel size of the vertical cut. |
private List<List<nom.tam.fits.HeaderCard>> |
xcards
All the header keys reader, for all HDU's. |
private JButton |
xnext
For cycling multiple extensions. |
private JButton |
xprev
For cycling multiple extensions. |
private JLabel |
xtend
If multiple extension, this show the current. |
static String |
XTENSION
XTENSION counter. |
| Fields inherited from class jview.JOpenFrame |
|---|
EMPTYACTION, EXITACTION, EXPORTACTION, KEY_FILEACTIONS, KEY_FILEHOME, OPENACTION, PRINTACTION, SAVEACTION |
| Fields inherited from class jview.JBorderFrame |
|---|
DATACLEANSE, KEY_ABOUTURL, KEY_ACTIONCLASS, KEY_AIPLOGO, KEY_BIGGERSTRUT, KEY_DATAANALYSER, KEY_EASTALIGNMENT, KEY_FITTERS, KEY_FITTERTIPS, KEY_HELPSIZE, KEY_LESSERSTRUT, KEY_NOLOGO, KEY_NORTHALIGNMENT, KEY_SOUTHALIGNMENT, KEY_WESTALIGNMENT, MODELFITTER |
| 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 jview.FitsFrameLabels |
|---|
KEY_BIASFRAME, KEY_BIASFRAMETIP, KEY_DARKFRAME, KEY_DARKFRAMETIP, KEY_FITSERROR, KEY_FITSTITLE, KEY_FLATFRAME, KEY_FLATFRAMETIP, KEY_HISTOGRAM, KEY_HISTOGRAMTIP, KEY_HORIZONTALCUT, KEY_HORIZONTALCUTTIP, KEY_NEXTFRAME, KEY_NEXTFRAMETIP, KEY_PREVFRAME, KEY_PREVFRAMETIP, KEY_VERTICALCUT, KEY_VERTICALCUTTIP, KEY_VIEWPORTTIP |
| Fields inherited from interface jview.FitsLabels |
|---|
KEY_COLORLABEL, KEY_COLORTIP, KEY_GAUSSLABEL, KEY_GAUSSTIP, KEY_INVERTLABEL, KEY_INVERTTIP, KEY_KEEPTIP, KEY_REDRAWLABEL, KEY_REDRAWTIP, KEY_RESETLABEL, KEY_RESETTIP, KEY_SCALELABEL, KEY_SCALETIP |
| Fields inherited from interface jview.BorderLabels |
|---|
KEY_ABOUT, KEY_ABOUTACC, KEY_FILEACCS, KEY_FILEITEMS, KEY_FILEMENU, KEY_FILEMNEMONIC, KEY_HELPMENU, KEY_HELPMNEMONIC, KEY_HELPTITLE, KEY_NOHELP, KEY_NOURLACCESS, KEY_TITLE |
| 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, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JFitsFrame(LocalizedSupplying prop)
Constructs a new camera from properties. |
|
JFitsFrame(Map<String,String> prop)
Constructs a generic peripheral from a property container. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent ae)
Action events are issued by the scaling list and the buttons. |
private BufferedImage |
colorize(BufferedImage show)
Colorizes the image by looking up the properties for a LUT. |
protected JFitsCanvas |
createFitsCanvas(ResourceSupplying info)
Subclasses that may need a special canvas can intervene here. |
private void |
cursorShape(Shape clear)
|
void |
doFits(nom.tam.fits.Fits readed,
int xoff,
int yoff,
int xbin,
int ybin)
|
private nom.tam.fits.Fits |
getBiasFor(nom.tam.fits.Fits src)
Uses the fits file and scans for an appropriate bias file. |
protected List<Object> |
getBottomItems()
No status display, if status=false |
private nom.tam.fits.Fits |
getDarkFor(nom.tam.fits.Fits src)
Uses the fits file and scans for an appropriate dark file. |
Map<String,Object> |
getDisplayMap()
|
protected JFitsCanvas |
getFitsCanvas()
Returns direct acces to the fits canvas for daughters. |
private nom.tam.fits.Fits |
getFlatFor(nom.tam.fits.Fits src)
Uses the fits file and tries to return an appropriate flat field. |
protected List<Object> |
getLeftItems()
Returns the list of items to add to the west box. |
FileFilter |
getOpenFilter()
Returns a file filter allowing only fits files. |
Component |
getRepresentation()
The representation is a JFitsComponent that allows adjustment of
the contrast and the brightness. |
protected List<Object> |
getRightItems()
Returns the list of components to be placed below the aip logo. |
BufferedImage |
getSaveBuffer()
Returns the buffered image from the fits canvas. |
protected Component |
getSaveRepresentation()
For saving, we return the central component. |
void |
init()
Initializes the jcamera. |
private void |
initFitsCanvas(ResourceSupplying info)
Initializes the central fits canvas. |
boolean |
isColorized()
Returns true if the current image is false-colorized. |
boolean |
isNegative()
Returns the current status of the negative image flag. |
void |
itemStateChanged(ItemEvent ie)
Called when the state of the checkboxes changes. |
static void |
main(String[] arg)
The command line argument is the fits file, followed by the xtension to display. |
protected boolean |
openFile(File fitsfile)
Opens a pre-recorded file for display. |
BufferedImage |
prepareToDisplay(BufferedImage src)
Rescales the image to display the new brightness and contrast. |
boolean |
processPick(HistoryAware.Pick pick)
Processes a pick, displaying the raw file. |
void |
reset()
Resets values of scaling, brightness, contrast, negative, colorize and percentage of points to keep to the values stored in the properties. |
private void |
resetShapeCursor()
Resets the shape cursor. |
void |
setComposedProperties(LocalizedSupplying prop)
Sets a LocalizedSupplying object as a composite of the canvas. |
private void |
showHistogram()
Shows the count histogram. |
void |
stateChanged(ChangeEvent ce)
Called when the state of the percentage level slider changes. |
private Thread |
threadLoad(String unique)
Tries to load a fitz file from a unique identifier. |
boolean |
toggleColorize()
Toggles the colorization of the image. |
boolean |
toggleNegative()
Toggles the image to be its negative. |
| Methods inherited from class jview.JConfirmExitFrame |
|---|
disposeAndExit, disposeImmediately |
| Methods inherited from class jview.JExitFrame |
|---|
setVisible |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.LocalizedComposed |
|---|
getComposedProperties |
| Methods inherited from interface jview.Displayable |
|---|
getIcon |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public static final String RESETPROPERTY
public static final String BIASACTION
public static final String DARKACTION
public static final String FLATACTION
public static final String GAUSSACTION
public static final String NEXTXTENSIONACTION
public static final String PREVXTENSIONACTION
public static final String HISTOGRAMACTION
public static final String VERTICALCUTACTION
public static final String HORIZONTALCUTACTION
public static final String INVERTACTION
public static final String COLORACTION
public static final String RESETACTION
public static final String REDRAWACTION
public static final String XTENSION
public static final String KEY_BIASFITS
public static final String KEY_DARKFITS
public static final String KEY_FLATTABLE
public static final String KEY_HEADERKEYS
public static final String KEY_NEGATIVE
public static final String KEY_COLORIZE
public static final String KEY_FALSEPALETTE
public static final String KEY_SHOWGAUSS
public static final String KEY_GAUSSMAXFWHM
public static final String KEY_GAUSSFWHM
public static final String KEY_GAUSSMAXTRUNC
public static final String KEY_GAUSSTRUNC
public static final String KEY_FITSOFFSET
public static final String KEY_FITSBINNING
public static final String KEY_BINDNAME
public static final String KEY_LOCALDIR
public static final String KEY_TMPDIR
public static final String KEY_TMPFITS
public static final String KEY_TIMEDLOAD
public static final String KEY_SCPCOMMAND
public static final String KEY_SCPTIMEOUT
public static final String KEY_TELESCOPECHAR
public static final String KEY_INCLUDESTATUS
public static final String KEY_SHOWTABLE
private static final String DEFRESOURCEBUNDLES
private static final String DEFURLRESOURCES
private static final boolean DEFWORKBACKGROUND
private static final boolean DEFZOOMDISPLAYED
private static final boolean DEFSHOWGAUSS
private static final double DEFGAUSSMAXFWHM
private static final double DEFGAUSSFWHM
private static final double DEFGAUSSMAXTRUNC
private static final double DEFGAUSSTRUNC
private static final boolean DEFNEGATIVE
private static final boolean DEFCOLORIZE
private static final boolean DEFINCLUDESTATUS
private static final Dimension DEFFITSBINNING
private static final Point DEFFITSOFFSET
private static final String DEFFALSEPALETTE
private static final String DEFFILEACTIONS
private static final String DEFBINDNAME
private static final String DEFLOCALDIR
private static final String DEFTMPDIR
private static final String DEFTMPFITS
private static final String DEFTIMEDLOAD
private static final String DEFSCPCOMMAND
private static final long DEFSCPTIMEOUT
private static final boolean DEFSHOWTABLE
private JFitsComponent fits
private List<List<nom.tam.fits.HeaderCard>> xcards
private JLabel value
private NumberFormat valuef
private JLabel ra1de
private JLabel rade1
private JRationalSlider keep
private JFormattedTextField precise
private JFormattedTextField histmin
private JFormattedTextField histmax
private JComboBox scaling
private JCheckBox colorbox
private JCheckBox invert
private boolean negative
private boolean color
private Kernel convolve
private JFractionalSlider gaussfwhm
private JFractionalSlider gausstrunc
private JLabel xtend
private JButton xnext
private JButton xprev
private JButton bias
private JButton dark
private JButton flat
private JSpinner vertsize
private JSpinner horsize
private JTable fitstable
private List<String> fitskeys
private List<FitsShapeProviding> apertures
private List<ShapeListener> adumeasure
private Map<String,FitsShapeProviding> providers
private int lastcut
| Constructor Detail |
|---|
public JFitsFrame(LocalizedSupplying prop)
init() section
public JFitsFrame(Map<String,String> prop)
| Method Detail |
|---|
public void reset()
PropertyChangeEvent to registered listeners.
public Map<String,Object> getDisplayMap()
public void setComposedProperties(LocalizedSupplying prop)
LocalizedSupplying object as a composite of the canvas.
Defaults the necessary parameter.
setComposedProperties in interface LocalizedAwaresetComposedProperties in class JOpenFramepublic void init()
init in interface Initializableinit in class JOpenFramepublic boolean isNegative()
toggleNegative() if control over negative
colors is desired.
public boolean toggleNegative()
isNegative().
public boolean isColorized()
toggleColorize() if total control is needed.
public boolean toggleColorize()
KEY_FALSEPALETTE key to grab a look-up table to convert
the gary to color. Otherwise we revert from fits.
public BufferedImage prepareToDisplay(BufferedImage src)
prepareToDisplay in interface ImageOperationprivate void initFitsCanvas(ResourceSupplying info)
protected JFitsCanvas createFitsCanvas(ResourceSupplying info)
public BufferedImage getSaveBuffer()
getSaveBuffer in interface Savablepublic Component getRepresentation()
JFitsComponent that allows adjustment of
the contrast and the brightness.
getRepresentation in interface DisplayablegetRepresentation in class JBorderFrameprotected Component getSaveRepresentation()
getSaveRepresentation in class JOpenFramepublic void stateChanged(ChangeEvent ce)
stateChanged in interface ChangeListenerpublic void itemStateChanged(ItemEvent ie)
itemStateChanged in interface ItemListenerpublic void actionPerformed(ActionEvent ae)
actionPerformed in interface ActionListeneractionPerformed in class JOpenFrameprivate void resetShapeCursor()
private void cursorShape(Shape clear)
protected List<Object> getRightItems()
JViewportButton to allow resetting of the ccd frame, a button
that pops up the histogramm, cut graph pop-up buttons and a field where
the cursor can put its coordinates for proper reading.
getRightItems in class JBorderFrameprotected List<Object> getLeftItems()
getLeftItems in class JBorderFrameprotected List<Object> getBottomItems()
getBottomItems in class JBorderFramepublic FileFilter getOpenFilter()
getOpenFilter in class JOpenFrame
public boolean processPick(HistoryAware.Pick pick)
throws RemoteException
processPick in interface PickListenerRemoteExceptionprivate Thread threadLoad(String unique)
protected JFitsCanvas getFitsCanvas()
public void doFits(nom.tam.fits.Fits readed,
int xoff,
int yoff,
int xbin,
int ybin)
protected boolean openFile(File fitsfile)
openFile in class JOpenFrameprivate nom.tam.fits.Fits getBiasFor(nom.tam.fits.Fits src)
private BufferedImage colorize(BufferedImage show)
private nom.tam.fits.Fits getDarkFor(nom.tam.fits.Fits src)
private nom.tam.fits.Fits getFlatFor(nom.tam.fits.Fits src)
private void showHistogram()
public static void main(String[] arg)
throws ParseException,
IOException
ParseException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||