All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.hdf.jhv.JHVImageCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----ncsa.hdf.jhv.JHVImageCanvas
- public class JHVImageCanvas
- extends Canvas
- implements PaletteEditorAdapter, Runnable, MouseListener, MouseMotionListener
The image will be display on this canvas
-
colorModel
-
-
colorModelPalette
-
-
imageSource
-
-
imageSources
-
-
oldColorModel
-
-
paletteEditorOpen
-
-
JHVImageCanvas(JHVImageFrame)
- new constructor for image canvas
-
JHVImageCanvas(JHVImageFrame, Rectangle)
- new constructor for image canvas
-
checkMousePosition(int, int)
-
-
createRasterImage(byte[], int, int, byte[], int)
- create the raster image by specified image data
-
delay(int)
-
-
dispZoomImage(int, int, Image)
- prepare zoom image & display it
-
dispZoomImage(Rectangle, Image)
- prepare zoom image & display it
-
drawRectangle(Rectangle)
- Draw the rectangle area on the current image
-
getImage()
- get the current image
-
getImage(int)
- get image by specified plane number
-
getImageHeight()
- return the current image height
-
getImagePixelValue(Image, int, int, int, int)
-
-
getImages()
-
-
getImageWidth()
- return the current image width
-
getMinimumSize()
- Set canvas size at SxS
-
getPreferredSize()
- set canvas preferred size
-
getSDSImage(byte[], double, double, int, int, int, byte[], byte[])
-
-
getSDSImage(Object, double, double, int, int, int, byte[], byte[])
-
-
getSliceInfo()
-
-
getSubImage(Rectangle, Image)
- Get subset image
-
initHDF()
- Initialize HDF object based on the selected node.
-
makeSpreadsheet()
- make spreadsheet for draged area of the image
-
mouseClicked(MouseEvent)
-
-
mouseDragged(MouseEvent)
- Called if the mouse is dragged (the mouse button is down)
-
mouseEntered(MouseEvent)
- Called when the mouse enters the component.
-
mouseExited(MouseEvent)
- Called when the mouse exits the component.
-
mouseMoved(MouseEvent)
- Called if the mouse moves (the mouse button is up)
-
mousePressed(MouseEvent)
- Called if the mouse is down.
-
mouseReleased(MouseEvent)
- Called if the mouse is up.
-
openNewPalette()
-
-
paint(Graphics)
- Paints the component.
-
readGR()
- read and display the GR image
-
readRIS24()
- read 24-raster image data from the HDF file
-
readRIS8()
- display the 8 bit raster image
-
readSDS(int)
- read and display SDS image for a given plane
-
readSDSImages()
- read and display SDS images for animation
-
recoverImage()
-
-
run()
- java.lang.Runnable stuff
-
setAction(int)
- which action will be taken
-
setBounds(int, int, int, int)
- Reshapes the Component to the specified bounding box.
-
setCanvasSize(int, int)
- set canvas size
-
setColorModel(ColorModel)
-
-
setHDFObjectNode(HDFObjectNode)
- set HDF Object Node
-
setImage(Image)
- set the current image & repaint it with current image
This saves the current image as the previous image (in
a stack that is depth 1)
-
setImageFilter(ImageFilter)
-
-
setImageFrame(int)
-
-
setImageRGBFilter(ImageFilter)
-
-
setImageSize(int, int)
- set image size
-
setNewPalette()
-
-
setNumberOfImage(int)
- set the number of the image
-
setPaletteEditorOpen(boolean)
- ncsa.hdf.palette.PaletteEditorAdapter flag
-
setScrollbar(Scrollbar, Scrollbar)
- set Scrollbar
-
setShowCoordinate(boolean)
-
-
setSliceInfo(SDSDimInfo)
-
-
setSpeeds(int)
- set up the image anamination speed(delay time between the image display)
-
setSubsetRange(Rectangle)
-
-
start()
- Called to start the applet.
-
stop()
- Called to stop the applet.
-
update(Graphics)
- Updates the component.
-
updateColorModel(ColorModel)
-
-
updateImage(Image)
-
-
updateImage(ImageFilter)
-
-
updateImageFilter(ImageFilter)
-
-
updateImageSource()
- update the current image source
-
updateSDSImage(double, double)
-
-
writeInfo(Graphics, int, int, String[], int)
- Write the information on the top of the image
paletteEditorOpen
public boolean paletteEditorOpen
colorModel
public ColorModel colorModel
oldColorModel
public ColorModel oldColorModel
colorModelPalette
public byte colorModelPalette[]
imageSource
public ImageProducer imageSource
imageSources
public ImageProducer imageSources[]
JHVImageCanvas
public JHVImageCanvas(JHVImageFrame frame)
- new constructor for image canvas
- Parameters:
- frame - the frame of this object
JHVImageCanvas
public JHVImageCanvas(JHVImageFrame frame,
Rectangle subset)
- new constructor for image canvas
- Parameters:
- frame - the frame of this object
initHDF
public boolean initHDF()
- Initialize HDF object based on the selected node.
setNumberOfImage
public void setNumberOfImage(int num)
- set the number of the image
- Parameters:
- num - the number of the image
createRasterImage
public Image createRasterImage(byte imgData[],
int w,
int h,
byte imgPal[],
int index)
- create the raster image by specified image data
- Parameters:
- imgData - the image data(pixel value)
- w - the width of the image
- h - the height of the image
- imgPalette - the palette of the image
- index - the plane number of the image
- Returns:
- the image , otherwise null
setCanvasSize
public void setCanvasSize(int w,
int h)
- set canvas size
- Parameters:
- w - the width
- h - the height
setImageSize
public void setImageSize(int w,
int h)
- set image size
- Parameters:
- w - the image width
- h - the image height
getImageHeight
public int getImageHeight()
- return the current image height
getImageWidth
public int getImageWidth()
- return the current image width
setImage
public void setImage(Image img)
- set the current image & repaint it with current image
This saves the current image as the previous image (in
a stack that is depth 1)
- Parameters:
- img - the image
updateImage
public void updateImage(Image img)
getImage
public Image getImage()
- get the current image
updateImageSource
public void updateImageSource()
- update the current image source
getImagePixelValue
public int[] getImagePixelValue(Image img,
int x,
int y,
int w,
int h)
setImageFilter
public void setImageFilter(ImageFilter imageFilter)
updateImageFilter
public void updateImageFilter(ImageFilter imageFilter)
setImageRGBFilter
public void setImageRGBFilter(ImageFilter imageFilter)
updateColorModel
public synchronized void updateColorModel(ColorModel cm)
setColorModel
public void setColorModel(ColorModel cm)
getImage
public synchronized Image getImage(int planeNumber)
- get image by specified plane number
- Parameters:
- planeNumber - the image plane number
- Returns:
- the image
setAction
public void setAction(int actFlag)
- which action will be taken
- Parameters:
- actFlag - the action flag
setSpeeds
public void setSpeeds(int sp)
- set up the image anamination speed(delay time between the image display)
- Parameters:
- sp - the delay time
setBounds
public synchronized void setBounds(int x,
int y,
int w,
int h)
- Reshapes the Component to the specified bounding box.
- Overrides:
- setBounds in class Component
setScrollbar
public void setScrollbar(Scrollbar h,
Scrollbar v)
- set Scrollbar
- Parameters:
- h - the horizontal scrollbar
- v - the vertical scrollbar
setHDFObjectNode
public void setHDFObjectNode(HDFObjectNode node)
- set HDF Object Node
- Parameters:
- obj - HDF Object Node
start
public void start()
- Called to start the applet. You never need to call this method
directly, it is called when the applet's document is visited.
- See Also:
- start
stop
public void stop()
- Called to stop the applet. It is called when the applet's document is
no longer on the screen. It is guaranteed to be called before destroy()
is called. You never need to call this method directly.
- See Also:
- stop
delay
public void delay(int n)
run
public void run()
- java.lang.Runnable stuff
update
public void update(Graphics g)
- Updates the component. This method is called in
response to a call to repaint. You can assume that
the background is not cleared.
- Parameters:
- g - the specified Graphics window
- Overrides:
- update in class Component
- See Also:
- update
writeInfo
public void writeInfo(Graphics g,
int x,
int y,
String info[],
int lines)
- Write the information on the top of the image
- Parameters:
- g - the graphics
- x - the x coordinate
- y - the y coordinate
- info - the strings array
- lines - the number of informations.
paint
public void paint(Graphics g)
- Paints the component.
- Parameters:
- g - the specified Graphics window
- Overrides:
- paint in class Canvas
- See Also:
- paint
getMinimumSize
public Dimension getMinimumSize()
- Set canvas size at SxS
- Overrides:
- getMinimumSize in class Component
getPreferredSize
public Dimension getPreferredSize()
- set canvas preferred size
- Overrides:
- getPreferredSize in class Component
mouseClicked
public void mouseClicked(MouseEvent e)
mouseReleased
public void mouseReleased(MouseEvent e)
- Called if the mouse is up.
mousePressed
public void mousePressed(MouseEvent e)
- Called if the mouse is down.
mouseDragged
public void mouseDragged(MouseEvent e)
- Called if the mouse is dragged (the mouse button is down)
mouseEntered
public void mouseEntered(MouseEvent e)
- Called when the mouse enters the component.
checkMousePosition
public void checkMousePosition(int x,
int y)
mouseMoved
public void mouseMoved(MouseEvent e)
- Called if the mouse moves (the mouse button is up)
mouseExited
public void mouseExited(MouseEvent e)
- Called when the mouse exits the component.
makeSpreadsheet
public void makeSpreadsheet()
- make spreadsheet for draged area of the image
drawRectangle
public void drawRectangle(Rectangle rect)
- Draw the rectangle area on the current image
setShowCoordinate
public void setShowCoordinate(boolean bvalue)
getSubImage
public Image getSubImage(Rectangle rect,
Image imageSource)
- Get subset image
dispZoomImage
public void dispZoomImage(int x,
int y,
Image img)
- prepare zoom image & display it
dispZoomImage
public void dispZoomImage(Rectangle rect,
Image img)
- prepare zoom image & display it
openNewPalette
public void openNewPalette()
updateImage
public void updateImage(ImageFilter imageFilter)
setNewPalette
public void setNewPalette()
recoverImage
public void recoverImage()
getSDSImage
public Image getSDSImage(byte data[],
double min,
double max,
int datatype,
int w,
int h,
byte imageData[],
byte palette[])
getSDSImage
public Image getSDSImage(Object data,
double min,
double max,
int datatype,
int w,
int h,
byte imageData[],
byte palette[])
updateSDSImage
public void updateSDSImage(double min,
double max)
setPaletteEditorOpen
public void setPaletteEditorOpen(boolean flag)
- ncsa.hdf.palette.PaletteEditorAdapter flag
setSubsetRange
public void setSubsetRange(Rectangle rect)
setSliceInfo
public void setSliceInfo(SDSDimInfo info)
getSliceInfo
public SDSDimInfo getSliceInfo()
getImages
public Image[] getImages()
setImageFrame
public void setImageFrame(int frame)
readSDSImages
public void readSDSImages() throws HDFException
- read and display SDS images for animation
readRIS8
public void readRIS8() throws HDFException
- display the 8 bit raster image
readRIS24
public void readRIS24() throws HDFException
- read 24-raster image data from the HDF file
readGR
public void readGR() throws HDFException
- read and display the GR image
readSDS
public void readSDS(int plane) throws HDFException
- read and display SDS image for a given plane
- Parameters:
- plane - The plane number of the image
All Packages Class Hierarchy This Package Previous Next Index