|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Server.LogicalTarget.JPEG2000.RateDistortion.CoRDDelivery
public class CoRDDelivery
This class implements the Characterization of Rate Distortion (CoRD) algorithm.
Furthe
Usage example:
construct
runResponseParameters
getResponseViewWindow
getQuality
runResponseData
getJPIPMessageData
getEORReasonCode
| Field Summary | |
|---|---|
private CODParameters |
codParameters
Definition in CODParameters |
private int[][] |
comps
|
private int |
EORReasonCode
Definition in ServerLogicalTargetManager.EORReasonCode. |
private int[] |
fsiz
Some internal attributes for passing values between diferents methods. |
private HTTPResponseSender |
httpResponseSender
Definition in Worker.httpResponseSender |
private int[][][][][][] |
imageStructure
Definition in GenerateImageStructure.imageStructure |
private long[][][] |
inClassIdentifierCorrespondence
Is a multiple-dimensional array which will be a mapping between the component-resolutionlevel-precinct and the unique in-class identifier. |
private JPCParameters |
jpcParameters
Definition in JPCParameters |
private JPIPMessageEncoder |
jpipMessageEncoder
Definition in JP2LogicalTargetManager. |
private java.util.ArrayList<JPIPMessageHeader> |
jpipMessageHeaders
Definition in ServerLogicalTargetManager.jpipMessageHeaders. |
private int |
layers
|
private JP2LogicalTarget |
logicalTarget
Definition in ServerLogicalTargetManager.EORReasonCode. |
private byte[] |
mainHeader
Contains the encoded main header. |
private long |
maximumResponseLength
Definition in DataLimitField.len |
private int |
maxNumLayers
Definition in CODParameters.numLayers |
private int |
MSBPlane
Definition in CADI.Server.LogicalTarget.JPEG2000.JP2LogicalTarget#MSBPlanes. |
private PacketHeadersEncoder |
packetHeading
This object is used to build the packet headers. |
private int[][][] |
precinctsPerRLevel
Is a mutiple-dimensional array which will contain the precincts belonging to the WOI. |
private int |
quality
Definition in ServerLogicalTargetManager.quality. |
private long |
responseLength
It is a temporal attribute to accumulate the response length which is sending to the client. |
private ViewWindowField |
responseViewWindow
Definition in ServerLogicalTargetManager.responseViewWindow. |
private int[] |
roff
|
private int[] |
rsiz
|
private JPCServerCache |
serverCache
This attribute contains the cache data for the client. |
private SIZParameters |
sizParameters
Definition in SIZParameters |
| Constructor Summary | |
|---|---|
CoRDDelivery(JP2LogicalTarget logicalTarget,
JPCServerCache serverCache,
long maximumResponseLength)
Constructor. |
|
| Method Summary | |
|---|---|
private java.util.ArrayList<CodingPassID> |
adjustScanningOrder(java.util.ArrayList<BlockOrder> blockOrders)
|
void |
calculateMaxMinBitPlanes(int[][][] precinctsPerRLevel,
int[][][] maxsBP,
int[][][] minsBP,
long[][][] inClassIdentifierCorrespondence,
int[] components)
Construction of two structures which contain the max and min number of bit-planes of the code-blocks, by subbands Indexes mean: [component][rLevel][subbandBP] |
private void |
calculateSlopeStimations(float[][][][][] slopes,
int[][][] minsBP)
SLOPE ESTIMATIONS |
private void |
encodeMainHeader()
Gets the main header as a byte array. |
private java.util.ArrayList<BlockOrder> |
findSubbandScanningOrder(float[][][][][] slopes,
int[][][][] currSLs,
int[][][] minsBP,
int[] components)
|
private java.util.ArrayList<BlockOrder> |
getDeliveryOrder(java.util.ArrayList relevantPrecincts)
Performs the block building and reads the needed bytestreams using the number of bytes. |
int |
getEORReasonCode()
Returns the EORReasonCode attribute. |
java.util.ArrayList<JPIPMessageHeader> |
getJPIPMessageHeaders()
Returns the jpipMessageHeaders attribute. |
byte[] |
getMainHeader()
Returns the main header. |
private int |
getMaxSubbandWeight()
Calculate which is the maximum subband weight for the whole image. |
void |
getPrecinctsPerRLevel(java.util.ArrayList relevantPrecincts)
Gets the relevant precincts for each subband. |
int |
getQuality()
Returns the quality attribute. |
ViewWindowField |
getResponseViewWindow()
Returns the responseViewWindow attribute. |
private int |
getSubbandWeight(int z,
int rLevel,
int subband)
Returns a rate-distortion adjustment for a component, resolution level, and subband. |
private java.util.ArrayList<CodingPassID> |
includeCP(java.util.ArrayList<CodingPassID> orderOfCodingPasses,
long inClassIdentifier,
int component,
int rLevel,
int precinct,
int subband,
int yBlock,
int xBlock,
int codingLevelGlobal)
|
void |
list(java.io.PrintStream out)
Prints this CoRD delivery out to the specified output stream. |
private static void |
printByteArray(byte[] buffer)
Useful method for printing a byte array. |
private void |
responsePerLength(java.util.ArrayList<CodingPassID> scanningOrder)
This method is used to deliver the requested window of interest when the maximum response length parameter has been set. |
private void |
responsePerQualityLayer(java.util.ArrayList<CodingPassID> scanningOrder)
This method is used to deliver the requested window of interest when the layers parameter of the view window has been set. |
void |
runResponseData(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder,
java.util.ArrayList<JPIPMessageHeader> jpipMessageHeaders)
Gets the data of the response window of interest. |
void |
runResponseParameters(ViewWindowField viewWindow)
|
private int[][][][][][] |
setFirstLayer(java.util.ArrayList<CodingPassID> scanningOrder)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private HTTPResponseSender httpResponseSender
Worker.httpResponseSender
private JPIPMessageEncoder jpipMessageEncoder
JP2LogicalTargetManager.
private java.util.ArrayList<JPIPMessageHeader> jpipMessageHeaders
ServerLogicalTargetManager.jpipMessageHeaders.
private byte[] mainHeader
private ViewWindowField responseViewWindow
ServerLogicalTargetManager.responseViewWindow.
private int quality
ServerLogicalTargetManager.quality.
private int EORReasonCode
ServerLogicalTargetManager.EORReasonCode.
private JP2LogicalTarget logicalTarget
ServerLogicalTargetManager.EORReasonCode.
private JPCServerCache serverCache
This reference is passed from the
private long maximumResponseLength
DataLimitField.len
private JPCParameters jpcParameters
JPCParameters
private SIZParameters sizParameters
SIZParameters
private CODParameters codParameters
CODParameters
private int[][][][][][] imageStructure
GenerateImageStructure.imageStructure
private int MSBPlane
CADI.Server.LogicalTarget.JPEG2000.JP2LogicalTarget#MSBPlanes.
private long responseLength
private int[] fsiz
ViewWindowField
private int[] roff
private int[] rsiz
private int[][] comps
private int layers
private int maxNumLayers
CODParameters.numLayers
private int[][][] precinctsPerRLevel
private long[][][] inClassIdentifierCorrespondence
private PacketHeadersEncoder packetHeading
| Constructor Detail |
|---|
public CoRDDelivery(JP2LogicalTarget logicalTarget,
JPCServerCache serverCache,
long maximumResponseLength)
logicalTarget - definition in logicalTargetserverCache - definition in serverCachemaximumResponseLength - definition in maximumResponseLength| Method Detail |
|---|
public void runResponseParameters(ViewWindowField viewWindow)
viewWindow - the requested Window Of Interest
public void runResponseData(HTTPResponseSender httpResponseSender,
JPIPMessageEncoder jpipMessageEncoder,
java.util.ArrayList<JPIPMessageHeader> jpipMessageHeaders)
throws ErrorException,
java.io.IOException
httpResponseSender - definition in httpResponseSenderjpipMessageEncoder - definition in jpipMessageEncoderjpipMessageHeaders - definition in jpipMessageHeaders
ErrorException
java.io.IOExceptionpublic byte[] getMainHeader()
mainHeader.public int getEORReasonCode()
EORReasonCode attribute.
EORReasonCode attribute.public ViewWindowField getResponseViewWindow()
responseViewWindow attribute.
responseViewWindow attribute.public java.util.ArrayList<JPIPMessageHeader> getJPIPMessageHeaders()
jpipMessageHeaders attribute.
jpipMessageHeaders attribute.public int getQuality()
quality attribute.
quality attribute.public java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.private void encodeMainHeader()
private int getSubbandWeight(int z,
int rLevel,
int subband)
z - image componentrLevel - 0 is the LL subband, and 1, 2, ... represents
next starting with the little onesubband - 0 - HL, 1 - LH, 2 - HH (if resolutionLevel == 0 --> 0 -
LL)
private int getMaxSubbandWeight()
method.
private java.util.ArrayList<BlockOrder> getDeliveryOrder(java.util.ArrayList relevantPrecincts)
throws ErrorException
ErrorException - when some problem reading file occurs
private void calculateSlopeStimations(float[][][][][] slopes,
int[][][] minsBP)
slopes - minsBP -
private java.util.ArrayList<BlockOrder> findSubbandScanningOrder(float[][][][][] slopes,
int[][][][] currSLs,
int[][][] minsBP,
int[] components)
slopes - currSLs - minsBP -
private java.util.ArrayList<CodingPassID> adjustScanningOrder(java.util.ArrayList<BlockOrder> blockOrders)
order -
private java.util.ArrayList<CodingPassID> includeCP(java.util.ArrayList<CodingPassID> orderOfCodingPasses,
long inClassIdentifier,
int component,
int rLevel,
int precinct,
int subband,
int yBlock,
int xBlock,
int codingLevelGlobal)
blockOrder - inClassIdentifier - component - rLevel - precinct - yBlock - xBlock - codingLevel -
private void responsePerLength(java.util.ArrayList<CodingPassID> scanningOrder)
throws ErrorException,
java.io.IOException
scanningOrder - is an ArrayList with the order of precincts
including the subband, yBlock, xBlock and coding passes to be sent.
ErrorException
java.io.IOException
private void responsePerQualityLayer(java.util.ArrayList<CodingPassID> scanningOrder)
throws ErrorException,
java.io.IOException
scanningOrder -
ErrorException
java.io.IOExceptionprivate int[][][][][][] setFirstLayer(java.util.ArrayList<CodingPassID> scanningOrder)
scanningOrder -
public void getPrecinctsPerRLevel(java.util.ArrayList relevantPrecincts)
relevantPrecincts - an array list with the unique precinct identifier of the
relevant precincts.
public void calculateMaxMinBitPlanes(int[][][] precinctsPerRLevel,
int[][][] maxsBP,
int[][][] minsBP,
long[][][] inClassIdentifierCorrespondence,
int[] components)
precinctsPerRLevel - maxsBP - minsBP - private static void printByteArray(byte[] buffer)
buffer - the byte array to be printed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||