|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTER.TERcoder.WriteFile.WriteSegments
public class WriteSegments
This class writes the encoded segments into a file.
Usage example:
construct
setParameters
run
Field Summary | |
---|---|
(package private) int[] |
adjustHeaderParameters
Indicates if parameters in the header must be re-definied in order to improve compression performance. |
(package private) int[] |
bitDepthAC
Defintion in SegmentCode2D.bitDepthAC |
(package private) int[] |
bitDepthDC
Defintion in SegmentCode2D.bitDepthDC |
(package private) int[] |
bitPlaneStop
Defintion in SegmentCode2D.bitPlaneStop |
(package private) int[] |
blocksPerSegment
Defintion in SegmentCode2D.blocksPerSegment |
(package private) BitStream[][] |
codedBitDepthACBlock
This array stores for each segment and gaggle the encoded bit depth of AC components of each block |
(package private) int[] |
codeWordLength
Indicates the coded word length for each segment |
(package private) float[][] |
customWeight
Defintion in ForwardWeighting.customWeight |
(package private) int[] |
customWtFlag
Defintion in ForwardWeighting.customWtFlag |
(package private) int[] |
DCStop
Defintion in SegmentCode2D.DCStop |
(package private) java.io.RandomAccessFile |
fOut
|
(package private) BitStream[][] |
initialCodedDC
This array stores for each segment and gaggle the initial coding of DC quantized components |
(package private) int[] |
optACSelect
Definition in SegmentCode2D.optACSelect |
(package private) int[] |
optDCSelect
Definition in SegmentCode2D.optDCSelect |
protected java.lang.String |
outFile
Definition in Coder.outFile |
(package private) int[] |
padRows
Defintion in ImageExtension.padRows |
(package private) boolean |
parametersSet
To know if parameters are set. |
(package private) int[] |
part2Flag
Indicates for each segment the presence of Part 2 header |
(package private) int[] |
part3Flag
Indicates for each segment the presence of Part 3 header |
(package private) int[] |
part4Flag
Indicates for each segment the presence of Part 4 header |
(package private) int[] |
pixelBitDepth
Defintion in Coder.pixelBitDepth |
(package private) int[] |
progressionOrder
This integer indicates the progression order for each encoded segment. |
(package private) BitStream[][][][][] |
refinementAC
This array stores for each segment, gaggle, bitplane, block and resolution level the refinement of AC components refinementAC[segment][gaggle][bitPlane][block][resolutionLevel] |
(package private) BitStream[][][] |
refinementDC
This array stores for each segment, gaggle and bitplane the refinement of DC components |
(package private) int[] |
resolutionLevels
Definition in SegmentCode2D.resolutionLevels |
(package private) int[] |
segByteLimit
Defintion in SegmentCode2D.segByteLimit |
(package private) int[] |
signedPixels
Defintion in Coder.signedPixels |
(package private) BitStream[][][][] |
sortingAC
This array stores for each segment, gaggle, bitplane and resolution level the encoded significance of AC components of the segment sortingAC[segment][gaggle][bitPlane][resolutionLevel] |
(package private) int[] |
stageStop
Defintion in SegmentCode2D.stageStop |
(package private) int[] |
transposeImg
Defintion in TransposeImage.transposeImg |
(package private) int[] |
truncationPoints
Defintion in InterleaveSegment.truncationPoints |
(package private) int[] |
useFill
Indicates for each segment whether fill bits will be used to produce segByteLimit bytes in a segment |
(package private) int[] |
WTType
Defintion in ForwardWaveletTransform.WTTypes |
(package private) int |
xOriginalSize
Image width. |
Constructor Summary | |
---|---|
WriteSegments()
Constructor of WriteSegments |
Method Summary | |
---|---|
private void |
adjustHeaderFlags(int segmentId)
In case that some parameters must be redefined, here we asure that the parts of the header containing such parameters will be included. |
void |
run()
Creates the encoded file according with the progression given by the user |
void |
setParameters(java.lang.String outFile,
BitStream[][] initialCodedDC,
BitStream[][] codedBitDepthACBlock,
BitStream[][][] refinementDC,
BitStream[][][][] sortingAC,
BitStream[][][][][] refinementAC,
int[] resolutionLevels,
int[] progressionOrder,
int[] truncationPoints,
int[] adjustHeaderParameters,
int[] bitDepthDC,
int[] bitDepthAC,
int[] part2Flag,
int[] part3Flag,
int[] part4Flag,
int[] padRows,
int[] segByteLimit,
int[] DCStop,
int[] bitPlaneStop,
int[] stageStop,
int[] useFill,
int[] blocksPerSegment,
int[] optDCSelect,
int[] optACSelect,
int[] WTType,
int[] signedPixels,
int[] pixelBitDepth,
int xOriginalSize,
int[] transposeImg,
int[] codeWordLength,
int[] customWtFlag,
float[][] customWeight)
Set the parameters required to create the encoded file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
BitStream[][] initialCodedDC
BitStream[][] codedBitDepthACBlock
BitStream[][][] refinementDC
BitStream[][][][] sortingAC
BitStream[][][][][] refinementAC
int[] resolutionLevels
SegmentCode2D.resolutionLevels
int[] progressionOrder
Valid values are:
boolean parametersSet
True indicates that they are set otherwise false.
protected java.lang.String outFile
Coder.outFile
int[] truncationPoints
InterleaveSegment.truncationPoints
int[] adjustHeaderParameters
Valid values are:
int[] bitDepthDC
SegmentCode2D.bitDepthDC
int[] bitDepthAC
SegmentCode2D.bitDepthAC
int[] part2Flag
Valid values are:
int[] part3Flag
Valid values are:
int[] part4Flag
Valid values are:
int[] padRows
ImageExtension.padRows
int[] segByteLimit
SegmentCode2D.segByteLimit
int[] DCStop
SegmentCode2D.DCStop
int[] bitPlaneStop
SegmentCode2D.bitPlaneStop
int[] stageStop
SegmentCode2D.stageStop
int[] useFill
Valid values for wl DWT levels are:
int[] blocksPerSegment
SegmentCode2D.blocksPerSegment
int[] optDCSelect
SegmentCode2D.optDCSelect
int[] optACSelect
SegmentCode2D.optACSelect
int[] WTType
ForwardWaveletTransform.WTTypes
int[] signedPixels
Coder.signedPixels
int[] pixelBitDepth
Coder.pixelBitDepth
int xOriginalSize
Negative values are not allowed for this field.
int[] transposeImg
TransposeImage.transposeImg
int[] codeWordLength
Valid values are:
int[] customWtFlag
ForwardWeighting.customWtFlag
float[][] customWeight
ForwardWeighting.customWeight
java.io.RandomAccessFile fOut
Constructor Detail |
---|
public WriteSegments()
Method Detail |
---|
public void setParameters(java.lang.String outFile, BitStream[][] initialCodedDC, BitStream[][] codedBitDepthACBlock, BitStream[][][] refinementDC, BitStream[][][][] sortingAC, BitStream[][][][][] refinementAC, int[] resolutionLevels, int[] progressionOrder, int[] truncationPoints, int[] adjustHeaderParameters, int[] bitDepthDC, int[] bitDepthAC, int[] part2Flag, int[] part3Flag, int[] part4Flag, int[] padRows, int[] segByteLimit, int[] DCStop, int[] bitPlaneStop, int[] stageStop, int[] useFill, int[] blocksPerSegment, int[] optDCSelect, int[] optACSelect, int[] WTType, int[] signedPixels, int[] pixelBitDepth, int xOriginalSize, int[] transposeImg, int[] codeWordLength, int[] customWtFlag, float[][] customWeight)
outFile
- definition in Coder.outFile
initialCodedDC
- definition in initialCodedDC
codedBitDepthACBlock
- definition in codedBitDepthACBlock
refinementDC
- definition in refinementDC
sortingAC
- definition in sortingAC
refinementAC
- definition in refinementAC
resolutionLevels
- definition in SegmentCode2D.resolutionLevels
progressionOrder
- definition in progressionOrder
truncationPoints
- definition in truncationPoints
adjustHeaderParameters
- definition in adjustHeaderParameters
bitDepthDC
- definition in SegmentCode2D.bitDepthDC
bitDepthAC
- definition in SegmentCode2D.bitDepthAC
part2Flag
- definition in part2Flag
part3Flag
- definition in part3Flag
part4Flag
- definition in part4Flag
padRows
- definition in ImageExtension.padRows
segByteLimit
- definition in Defintion in SegmentCode2D.segByteLimit
DCStop
- definition in SegmentCode2D.DCStop
bitPlaneStop
- definition in SegmentCode2D.bitPlaneStop
stageStop
- definition in SegmentCode2D.stageStop
useFill
- definition in useFill
blocksPerSegment
- definition in SegmentCode2D.blocksPerSegment
optDCSelect
- definition in SegmentCode2D.optDCSelect
optACSelect
- definition in SegmentCode2D.optACSelect
WTType
- definition in ForwardWaveletTransform.WTTypes
signedPixels
- definition in Coder.signedPixels
pixelBitDepth
- definition in Coder.pixelBitDepth
xOriginalSize
- definition in xOriginalSize
transposeImg
- definition in TransposeImage.transposeImg
codeWordLength
- definition in codeWordLength
customWtFlag
- definition in ForwardWeighting.customWtFlag
customWeight
- definition in ForwardWeighting.customWeight
public void run() throws java.lang.Exception
java.lang.Exception
- when something goes wrong and segments cannot be writtenprivate void adjustHeaderFlags(int segmentId)
segmentId
- this integer indicates the number of the segment that is being written
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |