public class JP2KServerLogicalTarget extends JPEG2KLogicalTarget
Modifier and Type | Field and Description |
---|---|
private CodestreamIndex |
codestreamIndex |
private BufferedDataInputStream |
in
Is the input stream used to read the file.
|
private byte[] |
mainHeader |
private int |
MSBPlane
The Most Significant Bit Plane of the whole image.
|
private PredictiveScalingFactors |
scalingFactors
Definition in
PredictiveScalingFactors . |
private java.lang.String |
target
Definition in
TargetField.target . |
codestreams, log, tid, TID_DEFAULT_LENGTH
Constructor and Description |
---|
JP2KServerLogicalTarget(java.lang.String target,
BufferedDataInputStream in,
ServerJPEG2KCodestream codestream)
Constructor.
|
JP2KServerLogicalTarget(java.lang.String target,
BufferedDataInputStream in,
ServerJPEG2KCodestream codestream,
CodestreamIndex codestreamIndex)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private int |
computeMSBPlane(ServerJPEG2KCodestream codestream) |
ServerJPEG2KCodestream |
getCodestream(int identifier)
Returns the
#codestream attribute. |
int |
getDataBinLength(long inClassIdentifier)
Returns the length of the data bin of which unique identifier is
inClassIdentifier.
|
long |
getDataLength(long inClassIdentifier)
Returns the length of the data bin of which unique identifier is
inClassIdentifier.
|
long |
getFilePointerCodingPass(long inClassIdentifier,
int subband,
int yBlock,
int xBlock,
int codingPass) |
BufferedDataInputStream |
getInputDataSource()
Deprecated.
|
int |
getLastCompleteLayer(long inClassIdentifier,
long dataBinLength)
Return the last complete layer that it can be whole recovered with
dataBinLength bytes.
|
int |
getLengthOfCodingPass(long inClassIdentifier,
int subband,
int yBlock,
int xBlock,
int codingPass) |
int[][][][] |
getLengthsOfCodingPasses(long inClassIdentifier)
NOTE: METHOD TO BE DEPRECATED.
|
byte[] |
getMainHeader() |
long |
getMainHeaderInitialPos()
Returns the file pointer to the JPEG2000 main header.
|
int |
getMainHeaderLength()
Returns the length of the JPEG2000 main header.
|
int |
getMSBPlane()
Returns the
MSBPlane attribute. |
int |
getMSBPlane(long inClassIdentifier,
int subband,
int yBlock,
int xBlock)
This methdo returns the Most Significat Bit Plane (MSBP) for each block
belonging to a tile-component-resolutionlevel-precinct-subband.
|
int |
getPacketLength(long inClassIdentifier,
int layer)
Returns the length of a packet.
|
int |
getPacketOffset(long inClassIdentifier,
int layer)
Returns the file pointer offset of a packet.
|
int |
getPacketOffsetWithDataBin(long inClassIdentifier,
int layer)
Returns the offset of a packet in the data bin.
|
PredictiveScalingFactors |
getScalingFactors() |
java.lang.String |
getTarget()
Returns the
target attribute. |
long |
getTileHeaderFilePointer(int tileIndex) |
int |
getTileHeaderLength(int tileIndex) |
int[][][] |
getZeroBitPlanes(long inClassIdentifier)
Returns the
#zeroBitPlanes attribute. |
void |
list(java.io.PrintStream out)
Prints the JPC logical target data out to the specified output stream.
|
void |
readFully(long filePointer,
byte[] b) |
void |
readFully(long filePointer,
byte[] b,
int off,
int len) |
void |
setMainHeader(byte[] mainHeader) |
private static int |
setRateDistortionAdjustment(int zSize,
int QTypes,
int CTType)
674 * Calculates the rate-distortion adjustments for each component.
675
|
void |
setScalingFactors(PredictiveScalingFactors scalingFactors) |
java.lang.String |
toString() |
generateTid, generateTid, getTID
private java.lang.String target
TargetField.target
.private BufferedDataInputStream in
private CodestreamIndex codestreamIndex
private PredictiveScalingFactors scalingFactors
PredictiveScalingFactors
.private int MSBPlane
The least significant bit plane is the 0 and the content of this variable indicates the most significant one.
This attribute is only used whenn the
RATE_DISTORTION_METHOD_CPI
or
RATE_DISTORTION_METHOD_CORD
rate-distortion methods are used.
private byte[] mainHeader
public JP2KServerLogicalTarget(java.lang.String target, BufferedDataInputStream in, ServerJPEG2KCodestream codestream, CodestreamIndex codestreamIndex)
target
- definition in target
.codestream
- definition in JPEG2KLogicalTarget.codestreams
.codestreamIndex
- definition in codestreamIndex
.public JP2KServerLogicalTarget(java.lang.String target, BufferedDataInputStream in, ServerJPEG2KCodestream codestream)
This constructor must be used when the rate-distortion method is either
#RATE_DISTORTION_METHOD_CPI
or #RATE_DISTORTION_METHOD_CoRD
.
dataBins
- definition in #dataBins
.jpcParameters
- definition in #jpcParameters
.imageStructure
- public void setScalingFactors(PredictiveScalingFactors scalingFactors)
public PredictiveScalingFactors getScalingFactors()
public final java.lang.String getTarget()
target
attribute.target
attribute.public ServerJPEG2KCodestream getCodestream(int identifier)
JPEG2KLogicalTarget
#codestream
attribute.getCodestream
in class JPEG2KLogicalTarget
identifier
- @Deprecated public final BufferedDataInputStream getInputDataSource()
in
attribute.in
attribute.public void readFully(long filePointer, byte[] b) throws java.io.IOException
filePointer
- b
- java.io.IOException
public void readFully(long filePointer, byte[] b, int off, int len) throws java.io.IOException
filePointer
- b
- off
- len
- java.io.IOException
public long getMainHeaderInitialPos()
#mainHeaderInitialPos
public int getMainHeaderLength()
#mainHeaderLength
public long getTileHeaderFilePointer(int tileIndex)
public int getTileHeaderLength(int tileIndex)
public int getPacketOffset(long inClassIdentifier, int layer)
inClassIdentifier
- definition in
JPIPMessageHeader.inClassIdentifier
.layer
- the number of layer.public int getPacketOffsetWithDataBin(long inClassIdentifier, int layer)
getPacketOffsetWithDataBin
in class JPEG2KLogicalTarget
inClassIdentifier
- definition in
JPIPMessageHeader.inClassIdentifier
.layer
- the layer which offset is requestedpublic int getPacketLength(long inClassIdentifier, int layer)
getPacketLength
in class JPEG2KLogicalTarget
inClassIdentifier
- definition in
JPIPMessageHeader.inClassIdentifier
.layer
- the number of the layer.public long getDataLength(long inClassIdentifier)
JPEG2KLogicalTarget
getDataLength
in class JPEG2KLogicalTarget
inClassIdentifier
- definition in
JPIPMessageHeader.inClassIdentifier
.public int getDataBinLength(long inClassIdentifier)
inClassIdentifier
- definition in
JPIPMessageHeader.inClassIdentifier
.public int getLastCompleteLayer(long inClassIdentifier, long dataBinLength)
getLastCompleteLayer
in class JPEG2KLogicalTarget
inClassIdentifier
- definition in
JPIPMessageHeader.inClassIdentifier
.dataBinLength
- is the lenth of the data bin.public void setMainHeader(byte[] mainHeader)
public byte[] getMainHeader()
public long getFilePointerCodingPass(long inClassIdentifier, int subband, int yBlock, int xBlock, int codingPass)
inClassIdentifier
- subband
- yBlock
- xBlock
- codingPass
- public int[][][][] getLengthsOfCodingPasses(long inClassIdentifier)
inClassIdentifier
- public int getLengthOfCodingPass(long inClassIdentifier, int subband, int yBlock, int xBlock, int codingPass)
inClassIdentifier
- subband
- yBlock
- xBlock
- codingPass
- public int[][][] getZeroBitPlanes(long inClassIdentifier)
#zeroBitPlanes
attribute.#zeroBitPlanes
attribute.public int getMSBPlane()
MSBPlane
attribute.MSBPlane
attribute.public int getMSBPlane(long inClassIdentifier, int subband, int yBlock, int xBlock)
inClassIdentifier
- subband
- 0 - HL, 1 - LH, 2 - HH (if resolutionLevel == 0 --> 0 - LL)yBlock
- block row in the subbandxBlock
- block column in the subbandpublic java.lang.String toString()
toString
in class JPEG2KLogicalTarget
public void list(java.io.PrintStream out)
list
in class JPEG2KLogicalTarget
out
- an output stream.private int computeMSBPlane(ServerJPEG2KCodestream codestream)
codestream
- private static int setRateDistortionAdjustment(int zSize, int QTypes, int CTType)
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)