public class CoRDDelivery
extends java.lang.Object
Furthe
Usage example:
construct
runResponseParameters
getResponseViewWindow
getQuality
runResponseData
getJPIPMessageData
getEORReasonCode
Modifier and Type | Field and Description |
---|---|
protected ViewWindowField |
actualViewWindow |
private ServerJPEG2KCodestream |
codestream |
private ServerJPEG2KComponent |
compObj |
private int[][] |
comps |
protected int |
discardLevels |
private int |
EORReasonCode
Definition in
CADI.Server.LogicalTarget.ServerLogicalTargetManager#EORReasonCode . |
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 int |
layers |
private JP2KServerLogicalTarget |
logicalTarget
Definition in
CADI.Server.LogicalTarget.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 ServerJPEG2KPrecinct |
precinctObj |
private int[][][] |
precinctsPerRLevel
Is a mutiple-dimensional array which will contain the precincts belonging
to the WOI.
|
private int |
quality
Definition in
CADI.Server.LogicalTarget.ServerLogicalTargetManager#quality . |
private java.util.ArrayList<ResponseData> |
responseDataList |
private long |
responseLength
It is a temporal attribute to accumulate the response length which is
sending to the client.
|
private ViewWindowField |
responseViewWindow
Definition in
CADI.Server.LogicalTarget.ServerLogicalTargetManager#responseViewWindow . |
private ServerJPEG2KResolutionLevel |
rLevelObj |
private ServerCacheModel |
serverCache
This attribute contains the cache data for the client.
|
private ServerJPEG2KTile |
tileObj |
Constructor and Description |
---|
CoRDDelivery(JP2KServerLogicalTarget logicalTarget,
ServerCacheModel serverCache) |
CoRDDelivery(JP2KServerLogicalTarget logicalTarget,
ServerCacheModel serverCache,
boolean align) |
Modifier and Type | Method and Description |
---|---|
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<java.lang.Long> relevantPrecincts)
Performs the block building and reads the needed bytestreams using the
number of bytes.
|
int |
getEORReasonCode()
Returns the
EORReasonCode 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. |
java.util.ArrayList<ResponseData> |
getResponseData()
Returns the
#jpipMessageHeaders attribute. |
ViewWindowField |
getResponseViewWindow()
Returns the
responseViewWindow attribute. |
private int |
getSubbandWeight(int tile,
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 tile,
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(java.util.ArrayList<ResponseData> responseDataList,
long maximumResponseLength)
Gets the data of the response window of interest.
|
void |
runResponseParameters(ViewWindowField viewWindow)
Calculates the WOI which will be sent to the client using a layers-based
rate-distortion method (file is delivery in the same order that is is
saved).
|
private int[][][][][][] |
setFirstLayer(java.util.ArrayList<CodingPassID> scanningOrder) |
java.lang.String |
toString() |
private ServerJPEG2KCodestream codestream
private java.util.ArrayList<ResponseData> responseDataList
private byte[] mainHeader
private ViewWindowField responseViewWindow
CADI.Server.LogicalTarget.ServerLogicalTargetManager#responseViewWindow
.private int quality
CADI.Server.LogicalTarget.ServerLogicalTargetManager#quality
.private int EORReasonCode
CADI.Server.LogicalTarget.ServerLogicalTargetManager#EORReasonCode
.private JP2KServerLogicalTarget logicalTarget
CADI.Server.LogicalTarget.ServerLogicalTargetManager#EORReasonCode
.private ServerCacheModel serverCache
This reference is passed from the
private long maximumResponseLength
DataLimitField.len
private int MSBPlane
CADI.Server.LogicalTarget.JPEG2000.JP2LogicalTarget#MSBPlanes
.private long responseLength
private int[][] comps
private int layers
private int maxNumLayers
CODParameters.numLayers
private int[][][] precinctsPerRLevel
private long[][][] inClassIdentifierCorrespondence
private PacketHeadersEncoder packetHeading
protected ViewWindowField actualViewWindow
protected int discardLevels
private ServerJPEG2KTile tileObj
private ServerJPEG2KComponent compObj
private ServerJPEG2KResolutionLevel rLevelObj
private ServerJPEG2KPrecinct precinctObj
public CoRDDelivery(JP2KServerLogicalTarget logicalTarget, ServerCacheModel serverCache)
logicalTarget
- serverCache
- public CoRDDelivery(JP2KServerLogicalTarget logicalTarget, ServerCacheModel serverCache, boolean align)
logicalTarget
- serverCache
- align
- public void runResponseParameters(ViewWindowField viewWindow) throws ErrorException
viewWindow
- the requested Window Of InterestErrorException
public void runResponseData(java.util.ArrayList<ResponseData> responseDataList, long maximumResponseLength) throws ErrorException
httpResponseSender
- definition in #httpResponseSender
jpipMessageEncoder
- definition in #jpipMessageEncoder
jpipMessageHeaders
- definition in #jpipMessageHeaders
ErrorException
java.io.IOException
public byte[] getMainHeader()
mainHeader
.public int getEORReasonCode()
EORReasonCode
attribute.EORReasonCode
attribute.public ViewWindowField getResponseViewWindow()
responseViewWindow
attribute.responseViewWindow
attribute.public java.util.ArrayList<ResponseData> getResponseData()
#jpipMessageHeaders
attribute.#jpipMessageHeaders
attribute.public java.lang.String toString()
toString
in class java.lang.Object
public void list(java.io.PrintStream out)
out
- an output stream.private void encodeMainHeader()
private int getSubbandWeight(int tile, 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<java.lang.Long> relevantPrecincts) throws ErrorException
ErrorException
- when some problem reading file occursprivate 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 tile, 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
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
scanningOrder
- ErrorException
private 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.
CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Group on Interactive Coding of Images (GICI) (contact)