|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.c3d.image.hips.HipsImage | +--com.c3d.image.hips.HipsByteImage
Read a HIPS byte-coded image into memory. The (unsigned) chars are stored as bytes, which is almost certainly wrong.
Field Summary | |
protected byte[][] |
frames_
|
Fields inherited from class com.c3d.image.hips.HipsImage |
BUFSIZ,
cols_,
fcol_,
frow_,
isDataLoaded_,
num_frame_,
numcolor_,
ocols_,
orig_date_,
orig_name_,
orows_,
params_,
PFAHC,
PFAHC3,
PFASCII,
PFBQ,
PFBT,
PFBYTE,
PFCHAIN,
PFCOLVEC,
PFCOMPLEX,
PFDBLCOM,
PFDOUBLE,
PFDVFFT2D,
PFDVFFT3D,
PFDVVFFT3D,
PFFLOAT,
PFFLOATPYR,
PFGEN,
PFGRLE,
PFHIST,
PFINT,
PFINTPYR,
PFLSBF,
PFLUT,
PFMIXED,
PFMSBF,
PFOCT,
PFPOLAR,
PFPOLYLINE,
PFQUAD,
PFQUAD1,
PFRGB,
PFRGBZ,
PFRGISPLINE,
PFRGPLINE,
PFRLEB,
PFRLED,
PFRLEW,
PFSBYTE,
PFSHORT,
PFSPAN,
PFSRLE,
PFSTEREO,
PFUINT,
PFUKOOA,
PFUSHORT,
PFVFFT2D,
PFVFFT3D,
PFVVFFT3D,
pixel_format_,
PLOT3D,
rows_,
seq_desc_,
seq_history_,
seq_name_,
sizedesc_,
sizehist_ |
Constructor Summary | |
|
HipsByteImage(java.awt.Image image)
Create a BufferedImage from a HIPS byte image. |
|
HipsByteImage(java.io.InputStream in)
Load a byte image from a InputStream. |
protected |
HipsByteImage(java.io.InputStream in,
HipsImage hdr)
|
|
HipsByteImage(int w,
int h,
int nImages,
int nFramesPerImage)
|
|
HipsByteImage(int w,
int h,
int nImages,
int nFramesPerImage,
byte[][] frames)
|
|
HipsByteImage(java.lang.String fileName)
Load a byte image from a InputStream. |
Method Summary | |
protected static double |
b2d(byte b)
Ugh... |
byte[] |
getFrame(int i)
Return the i'th frame. |
byte[][] |
getFrames()
Return all frames |
float[] |
getPixel(float x,
float y,
int imageIndex)
Return the pixel at the specified location and in the specified image in the sequence. |
float[] |
getPixel(int xi,
int yi,
int imageIndex)
Return the pixel at the specified location and in the specified image in the sequence. |
int[] |
rgbPixels(int imageIndex)
Converts the plane information into a pixel in the direct colour model of java. |
HipsImage |
scale(double xScale,
double yScale)
|
HipsByteImage |
selectComponent(int index)
Select an individual component color from a color image |
HipsByteImage |
selectFrame(int index)
Select an individual component color from a color image |
void |
setFrame(int i,
byte[] data)
Set the i'th frame. |
HipsImage |
subImage(int srcX,
int srcY,
int width,
int height)
|
HipsByteImage |
toGray()
Convert an image to gray |
protected void |
writeData(java.io.OutputStream out)
|
Methods inherited from class com.c3d.image.hips.HipsImage |
b2i,
bilinearInterp,
byte2pixels,
byte2pixels,
cols,
copyFrom,
fcol,
finishLine,
frow,
getHeight,
getParam,
getWidth,
i2b,
int2pixels,
int2pixels,
isDataLoaded,
isMSB,
main,
num_frame,
numcolor,
numImage,
numparam,
numpix,
orig_date,
orig_name,
params,
pixel_format,
readFrame,
readFromStream,
readLine,
rows,
seq_desc,
seq_history,
seq_name,
setMSB,
setParam,
sizedesc,
sizehist,
sizeimage,
sizepix,
swab,
swab2,
writeBytes,
writeFrame,
writeLine,
writeToFile,
writeToStream |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected byte[][] frames_
Constructor Detail |
public HipsByteImage(java.io.InputStream in) throws HipsException, java.io.IOException
in
- The input streampublic HipsByteImage(java.lang.String fileName) throws HipsException, java.io.FileNotFoundException, java.io.IOException
in
- The input filenameprotected HipsByteImage(java.io.InputStream in, HipsImage hdr) throws HipsException, java.io.IOException
public HipsByteImage(java.awt.Image image) throws HipsException
public HipsByteImage(int w, int h, int nImages, int nFramesPerImage)
public HipsByteImage(int w, int h, int nImages, int nFramesPerImage, byte[][] frames) throws HipsException
Method Detail |
public HipsByteImage selectComponent(int index)
public HipsByteImage selectFrame(int index)
public HipsByteImage toGray()
protected void writeData(java.io.OutputStream out) throws java.io.IOException
public HipsImage subImage(int srcX, int srcY, int width, int height)
public float[] getPixel(int xi, int yi, int imageIndex)
xi
- The x-location (column) of the pixelyi
- The y-location (row) of the pixelimageIndex
- The index of the image in the sequence
(starting at 0) for which the pixel value is required.public float[] getPixel(float x, float y, int imageIndex)
Floating point numbers are returned in case a a non-integral pixel location is chosen. Bilinear interpolation is used to obtain the value of pixels at non-integral locations.
x
- The x-location (column) of the pixely
- The y-location (row) of the pixelimageIndex
- The index of the image in the sequence
(starting at 0) for which the pixel value is required.public byte[] getFrame(int i)
i
- The frame of data you want, returned as a linear array of bytes.HipsImage
public byte[][] getFrames()
public void setFrame(int i, byte[] data)
i
- The frame of data you want to setdata
- The data.HipsImage
public int[] rgbPixels(int imageIndex) throws HipsException
x
- the x-location (column) of the pixely
- the y-location (row) of the pixelimageIndex
- The image being indexexpublic HipsImage scale(double xScale, double yScale)
protected static final double b2d(byte b)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |