|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.DefaultProperty
cz.cuni.jagrlib.Piece
cz.cuni.jagrlib.DefaultFileFormat
cz.cuni.jagrlib.DefaultRasterFileFormat
cz.cuni.jagrlib.piece.HDRFileFormat
public class HDRFileFormat
HDR file format used in Radiance (RGBe RLE-encoded format).
Field Summary | |
---|---|
protected static byte[] |
HEADER
Binary file header. |
protected static int |
MAX_ELEN
Maximum scanline length for encoding. |
protected static int |
MIN_ELEN
Minimum scanline length for encoding. |
protected static int |
MIN_RUN
Minimum run length. |
static RegPiece |
reg
Static registration instance for this class. |
protected static byte[] |
scanline
RGBe scanline, byte order: [ Red, Green, Blue, Exp ]. |
Fields inherited from class cz.cuni.jagrlib.DefaultRasterFileFormat |
---|
CATEGORY, TEMPLATE_NAME |
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.DataFileFormat |
---|
DOUBLE_STREAM |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
HDRFileFormat()
|
Method Summary | |
---|---|
protected static void |
assertScanline(int width)
Asserts minimum length of the scanline array (in pixels). |
protected void |
commonLoad(BitStream stream,
RasterGraphics g)
Common load code. |
protected void |
commonSave(BitStream stream,
RasterGraphics g)
Common save code. |
java.lang.String[] |
fileNameMasks()
Returns file-name masks associated with the file-format type. |
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
int |
headerLength()
Length of file-format header (number of bytes which is necessary for file-format matching). |
double |
match(byte[] header,
java.lang.String fileName)
File-format match test. |
protected static void |
oldReadScanline(int start,
int len,
java.io.InputStream is,
int unget)
Reads data from the old binary format into the scanline array. |
protected static void |
readScanline(int len,
java.io.InputStream is)
Reads data in new RLE format (band-ordered) into the scanline array. |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
protected static void |
writeScanline(int len,
java.io.OutputStream os)
|
Methods inherited from class cz.cuni.jagrlib.DefaultRasterFileFormat |
---|
loadFile, loadFile, saveFile, saveFile |
Methods inherited from class cz.cuni.jagrlib.DefaultFileFormat |
---|
closeFile, init, readFloat, readLine, readParameters, readToken, readUnsigned16, readUnsigned16, readUnsigned32, writeFloat, writeLine, writeParameters, writeUnsigned16, writeUnsigned16, writeUnsigned32 |
Methods inherited from class cz.cuni.jagrlib.Piece |
---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, isCompatible, isCompatible, isConnected, logError, logWarning, myInterface, newInputPlug, newOptOutputPlug, newOutputPlug, newPlug, noTemplates, propBegin, propBounds, propDefault, propEnd, propEnum, propManipulator, propManipulator, setProgressListener, setRegStrings, setTemplateDynamic, stop |
Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, commit, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, stringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cz.cuni.jagrlib.iface.Property |
---|
commit |
Methods inherited from interface cz.cuni.jagrlib.Breakable |
---|
setProgressListener, stop |
Field Detail |
---|
protected static final byte[] HEADER
protected static byte[] scanline
protected static final int MIN_ELEN
protected static final int MAX_ELEN
protected static final int MIN_RUN
public static final RegPiece reg
Constructor Detail |
---|
public HDRFileFormat()
Method Detail |
---|
protected static void assertScanline(int width)
scanline
array (in pixels).
protected static void oldReadScanline(int start, int len, java.io.InputStream is, int unget) throws java.io.IOException
scanline
array.
start
- Starting index into the scanline
array (not pixel index!).len
- Length to read (in pixels).is
- Binary stream to read from.unget
- First byte read before calling this method (or -1 if none was).
java.io.IOException
protected static void readScanline(int len, java.io.InputStream is) throws java.io.IOException
scanline
array.
java.io.IOException
protected static void writeScanline(int len, java.io.OutputStream os) throws java.io.IOException
java.io.IOException
protected void commonLoad(BitStream stream, RasterGraphics g) throws java.io.IOException
commonLoad
in class DefaultRasterFileFormat
stream
- Opened input bit-stream.g
- Checked raster-graphics object.
java.io.IOException
protected void commonSave(BitStream stream, RasterGraphics g) throws java.io.IOException
commonSave
in class DefaultRasterFileFormat
stream
- Opened output bit-stream.g
- Checked raster-graphics object.
java.io.IOException
public void set(java.lang.String key, java.lang.Object value)
set
in interface Property
set
in class DefaultProperty
key
- Key string.value
- The new value.Property.commit()
public java.lang.Object get(java.lang.String key)
get
in interface Property
get
in class DefaultProperty
key
- Key string.
public int headerLength()
headerLength
in interface DataFileFormat
headerLength
in class DefaultFileFormat
match(byte[], java.lang.String)
public double match(byte[] header, java.lang.String fileName)
match
in interface DataFileFormat
match
in class DefaultFileFormat
header
- Bytes from beginning of the file.fileName
- Optional file-name string.
headerLength()
,
fileNameMasks()
public java.lang.String[] fileNameMasks()
fileNameMasks
in interface DataFileFormat
fileNameMasks
in class DefaultFileFormat
match(byte[], java.lang.String)
public static int setTemplate(Template t, int ord)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |