|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object O2Plib.image.TiffPixelLoader
public class TiffPixelLoader
Field Summary | |
---|---|
boolean |
blackIsZeroFlag
Black is Zero flag |
java.awt.image.ColorModel |
cm
|
static int |
count
instance # of TiffPixelLoader |
int |
dataType
data type from sampleModel.getDataType() The types are defined as DataBuffer.TYPE_xxxx where xxxx is (BYTE, DOUBLE, FLOAT, INT, SHORT, UNDEFINED, USHORT) |
private static boolean |
dbugFlag
debugging flag |
com.sun.media.jai.codec.ImageDecoder |
decoder
Tiff Image Decoder |
java.lang.String |
fatalMsg
Msg why failed if not null |
java.lang.String |
fileName
filename path of image file |
java.awt.Image |
img
Image structure. |
boolean |
isComponentCMflag
set if has ComponentColorModel |
boolean |
isComponentSMflag
set if has ComponentSampleModel |
boolean |
isMultiplePixelPackedSMflag
set if has a MultiplePixelPackedSampleModel |
boolean |
isPackedCMflag
set if PackedColorModel |
boolean |
isPackedFlag
set if pixel can be packed into a byte array |
boolean |
isRGBcolorImageFlag
set if this is a RGB color image |
boolean |
isSinglePixelPackedSMflag
set if has a SinglePixelPackedSampleModel |
private static boolean |
justPixelsFlag
|
int |
minX
X upper left hand corner of image origin |
int |
minY
Y upper left hand corner of image origin |
int |
nBands
# of samples/pixel |
int |
nBitsPerPixel
# bits/pixel is sampleModel.sampleSize[0] |
int |
nCols
# of columns in the image |
int |
nPixels
# of pixels/image (is nRows*nCols) |
int |
nRows
# of rows in the image |
int |
numDataElements
# raster DataBuffer data elements/pixel |
int |
numPages
# of TIFF pages |
javax.media.jai.PixelAccessor[] |
pi
List of PixelAccessors from the RenderedImages' |
private int[] |
pixels
image of size nRows of nCols pixels. |
java.awt.image.Raster |
ras
Raster image read |
java.awt.image.RenderedImage[] |
ri
List of Rendered images that was read in the tiff file |
java.awt.image.SampleModel |
sampleModel
Tiff sample model name |
int[] |
sampleSizes
bits/pixel is sample sizes [0:nBands-1] from sampleModel.getSampleSize() |
boolean |
useLogInputFlag
"Use log of pixels if > 8-bits grayscale image" |
static java.lang.String |
VERSION
Version for this module |
Constructor Summary | |
---|---|
TiffPixelLoader()
TiffPixelLoader() - constructor |
|
TiffPixelLoader(boolean flag)
TiffPixelLoader() - constructor where set the debug flag |
Method Summary | |
---|---|
java.lang.String |
doTiffLoad(java.lang.String path,
boolean checkCacheFlag,
boolean justPixelsFlag)
doTiffLoad() - load the image and array grab of TIFF files |
java.awt.Image |
getImage()
getImage() - get AWT Image from the raster. |
int |
getNbrRGBpixels(int[] pixels,
int nPixels)
getNbrRGBpixels() - test if red==green==blue for all pixels |
int[] |
getPixels()
getPixels() - get unpacked pixels array from the raster. |
int[] |
getTiffPixels(java.awt.image.Raster r,
boolean checkCacheFlag)
getTiffPixels() - get pixels from the raster |
void |
getTiffProperties(java.awt.image.Raster r)
getTiffProperties() - get properties of the Tiff image |
java.awt.image.RenderedImage[] |
readTiff(java.lang.String fileName)
readTiff() - read a tiff image file |
void |
setDbugFlag(boolean flag)
setDbugFlag() - flag |
void |
setUseLogFlag(boolean flag)
setUseLogFlag() - flag to set the log flag This is used if the data has more than 8-bits of grayscale so the data is transformed by the log over the range of 255*log(10**nBits-1) to 0 |
java.lang.String |
toString()
toString() - return string representation of this instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION
private static boolean dbugFlag
private static boolean justPixelsFlag
public static int count
public java.lang.String fileName
public java.awt.image.SampleModel sampleModel
public java.awt.image.RenderedImage[] ri
public javax.media.jai.PixelAccessor[] pi
public java.awt.image.Raster ras
public com.sun.media.jai.codec.ImageDecoder decoder
public java.awt.image.ColorModel cm
public int nRows
public int nCols
public int minX
public int minY
public int nBands
public int numPages
public int numDataElements
private int[] pixels
public java.awt.Image img
public int dataType
public int[] sampleSizes
public boolean isPackedFlag
public boolean isPackedCMflag
public boolean isComponentCMflag
public boolean isComponentSMflag
public boolean isSinglePixelPackedSMflag
public boolean isMultiplePixelPackedSMflag
public int nBitsPerPixel
public int nPixels
public boolean blackIsZeroFlag
public boolean isRGBcolorImageFlag
public boolean useLogInputFlag
public java.lang.String fatalMsg
Constructor Detail |
---|
public TiffPixelLoader()
public TiffPixelLoader(boolean flag)
Method Detail |
---|
public void setDbugFlag(boolean flag)
public void setUseLogFlag(boolean flag)
public java.awt.image.RenderedImage[] readTiff(java.lang.String fileName) throws java.io.IOException
fileName
- is the file to be read
java.io.IOException
public int[] getTiffPixels(java.awt.image.Raster r, boolean checkCacheFlag)
r
- is the image raster instancecheckCacheFlag
- to see if pixels data exists, then return it
public void getTiffProperties(java.awt.image.Raster r)
r
- is the image raster instancepublic java.awt.Image getImage()
r
- is the image raster instance
public int[] getPixels()
r
- is the image raster instance
public java.lang.String doTiffLoad(java.lang.String path, boolean checkCacheFlag, boolean justPixelsFlag)
path
- of the imagecheckCacheFlag
- to see if pixels data exists, then return itjustPixelsFlag
- if just want to get the pixels[] not img.
public int getNbrRGBpixels(int[] pixels, int nPixels)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |