|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Common.LogicalTarget.JPEG2000.JPEG2000Util
public class JPEG2000Util
This class contains several useful functions to handle JPEG2000 images or its parameters.
| Field Summary | |
|---|---|
private static int |
X
|
private static int |
Y
|
| Constructor Summary | |
|---|---|
JPEG2000Util()
|
|
| Method Summary | |
|---|---|
static void |
adjustViewWindowToPrecinctSizes(int[] fsiz,
int[] roff,
int[] rsiz,
int components,
int ySize,
int xSize,
int XOsize,
int YOsize,
int[] WTLevels,
int[][] BDResolutionPrecinctWidths,
int[][] BDResolutionPrecinctHeights)
Adjusts the view window ajusting their boundaries to the precinct boundaries. |
static void |
adjustViewWindowToPrecinctSizes(ViewWindowField viewWindow,
SIZParameters sizParameters,
CODParameters codParameters)
Adjusts the view window ajusting their boundaries to the precinct boundaries. |
private static int[][] |
availableFrameSizes(int xSize,
int ySize,
int XOsize,
int YOsize,
int WTLevels)
Calculates the frame sizes for each resolution level according to the image parameters that are passed to the function. |
static int[][][] |
availableFrameSizes(int xSize,
int ySize,
int XOsize,
int YOsize,
int[] WTLevels)
Calculates the frame sizes for each image components and resolution level according to the image parameters that are passed to the function. |
static int[][][] |
availableFrameSizes(SIZParameters sizParameters,
CODParameters codParameters)
Calculates the frame sizes for each image components and resolution level according to the image parameters that are passed to the function. |
static int[][][] |
calculateFirstPrecinctPerResolutionLevel(int numTiles,
int numComponents,
int[] WTLevels,
int[][][] frameSizes,
int[][] resolutionPrecinctWidths,
int[][] resolutionPrecinctHeights)
|
static int[][][] |
calculateFirstPrecinctPerResolutionLevel(SIZParameters sizParameters,
CODParameters codParameters,
int[][][] frameSizes)
|
static int |
calculateRateDistortionAdjustment(int[] BCLCRateDistortionAdjustment,
int z,
int totalRLevels,
int rLevel,
int subband)
Calculate the rate disortion adjustment (depending on BCRateDistortionAdjustment) for a resolution level and subband. |
static ViewWindowField |
calculateResponseViewWindow(int xSize,
int ySize,
int zSize,
int XOsize,
int YOsize,
int[] WTLevels,
int[] fsiz,
int[] roff,
int[] rsiz,
int layers,
int LCAchievedNumLayers,
int[][] BDResolutionPrecinctWidths,
int[][] BDResolutionPrecinctHeights)
Find the best view window according to the client request view window and the logical target structure |
static ViewWindowField |
calculateResponseViewWindow(ViewWindowField viewWindow,
SIZParameters sizParameters,
CODParameters codParameters)
Find the best view window according to the client request view window and the logical target structure |
static int[][] |
calculateSubbandSizes(int WTLevels,
int xSize,
int ySize)
Deprecated. |
static int[][][] |
calculateSubbandSizesBak(int[] components,
int[] WTLevels,
int xSize,
int ySize)
Deprecated. |
static java.util.ArrayList<java.lang.Long> |
findRelevantPrecincts(int[] fsiz,
int[] roff,
int[] rsiz,
int[][] comps,
int maxComponents,
int ySize,
int xSize,
int XOsize,
int YOsize,
int[] WTLevels,
int[][] resolutionPrecinctWidths,
int[][] resolutionPrecinctHeights)
Calculates which are the relevants precincts which belong to the WOI (fsiz, roff, rsiz). |
static java.util.ArrayList<java.lang.Long> |
findRelevantPrecincts(ViewWindowField viewWindow,
SIZParameters sizParameters,
CODParameters codParameters)
Calculates which are the relevants precincts belonging to the WOI viewWindow. |
static int[] |
InClassIdentifierToTCP(long inClassIdentifier,
int numTiles,
int numComponents)
Converts from the unique inClassIdentifier precinct identifier to tile-component-precinct identifier. |
static int[] |
InClassIdentifierToTCRP(long inClassIdentifier,
int maxTiles,
int zSize,
int xSize,
int ySize,
int XOsize,
int YOsize,
int[] WTLevels,
int[][] BDResolutionPrecinctWidths,
int[][] BDResolutionPrecinctHeights)
Converts the unique precinct identifier (inClassIdentifier) to a tile-component-resolution level-precinct identifiers. |
static int[] |
InClassIdentifierToTCRP(long inClassIdentifier,
SIZParameters sizParameters,
CODParameters codParameters)
Converts from the unique precinct identifier (inClassIdentifier) to a tile-component-resolutionlevel-precinct identifiers. |
static int[][][] |
numberOfPrecinctsPerComponent(int XOsize,
int YOsize,
int xSize,
int ySize,
int[] WTLevels,
int[][] precinctWidths,
int[][] precinctHeights)
Calculates the number of precincts for each image component. |
static int[][][] |
numberOfPrecinctsPerComponent(SIZParameters sizParameters,
CODParameters codParameters)
Calculates the number of precincts for each image component. |
static int[][] |
numberOfPrecinctsWithinComponent(int XOsize,
int YOsize,
int xSize,
int ySize,
int WTLevels,
int[] precinctWidths,
int[] precinctHeights)
Calculates the number of precincts within a fixed image component. |
static int[][] |
numberOfPrecinctsWithinComponent(SIZParameters sizParameters,
int WTLevels,
int[] precinctWidths,
int[] precinctHeights)
Calculates the number of precincts within a fixed image component for each resolution level. |
static int |
suitableResolutionLevel(int[] fsiz,
int xSize,
int ySize,
int XOsize,
int YOsize,
int WTLevels)
Calculates which of the resolution levels best fit to the frame size fsiz. |
static int[] |
suitableResolutionLevel(int[] fsiz,
SIZParameters sizParameters,
CODParameters codParameters)
|
static int[] |
suitableResolutionLevel(int xSize,
int ySize,
int XOsize,
int YOsize,
int[] fsiz,
int[] WTLevels)
Calculates the resolution level which is more suitable for a frame size |
static long |
TCPToInClassIdentifier(int tile,
int numTiles,
int component,
int numComponents,
int precinct)
Converts from the tile-component-precinct identifier to the unique inClassIdentifier precinct identifier. |
static long |
TCRPToInClassIdentifier(int tile,
int maxTiles,
int component,
int maxComponents,
int resolutionLevel,
int maxWTLevels,
int precinct,
int xSize,
int ySize,
int XOsize,
int YOsize,
int[] ResolutionPrecinctWidths,
int[] ResolutionPrecinctHeights)
Converts from the tile-component-resolution-precinct to an unique in class identifier. |
static long |
TCRPToInClassIdentifier(int tile,
int component,
int resolutionLevel,
int precinct,
SIZParameters sizParameters,
CODParameters codParameters)
Converts from the tile-component-resolutionlevel-precinct to an unique in class identifier. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int X
private static final int Y
| Constructor Detail |
|---|
public JPEG2000Util()
| Method Detail |
|---|
public static long TCPToInClassIdentifier(int tile,
int numTiles,
int component,
int numComponents,
int precinct)
tile - the tile which the precinct belongs.numTiles - the maximum number of image tilescomponent - the component which the precinct belongsnumComponents - the maximum number of image componentsprecinct - the number of precinct within the tile-component
following a raster mode
public static int[] InClassIdentifierToTCP(long inClassIdentifier,
int numTiles,
int numComponents)
inClassIdentifier - definition in JPIPMessageHeader.inClassIdentifier.numTiles - the maximum number of image tilesnumComponents - the maximum number of image components.
public static java.util.ArrayList<java.lang.Long> findRelevantPrecincts(int[] fsiz,
int[] roff,
int[] rsiz,
int[][] comps,
int maxComponents,
int ySize,
int xSize,
int XOsize,
int YOsize,
int[] WTLevels,
int[][] resolutionPrecinctWidths,
int[][] resolutionPrecinctHeights)
fsiz - definition in ViewWindowField.fsiz.roff - definition in ViewWindowField.roff.rsiz - definition in ViewWindowField.rsiz.ySize - definition in SIZParameters.ySize.xSize - definition in SIZParameters.xSize.XOsize - definition in SIZParameters.XOsize.YOsize - definition in SIZParameters.YOsize.resolutionPrecinctWidths - definition in CODParameters.precinctWidths.resolutionPrecinctHeights - definition in CODParameters.precinctHeights.
public static java.util.ArrayList<java.lang.Long> findRelevantPrecincts(ViewWindowField viewWindow,
SIZParameters sizParameters,
CODParameters codParameters)
viewWindow - definition in ViewWindowField.sizParameters - definition in SIZParameters.codParameters - definition in CODParameters.
public static int[] suitableResolutionLevel(int xSize,
int ySize,
int XOsize,
int YOsize,
int[] fsiz,
int[] WTLevels)
xSize - definition in SIZParameters.xSize.ySize - definition in SIZParameters.ySize.XOsize - definition in SIZParameters.XOsize.YOsize - definition in SIZParameters.YOsize.fsiz - definition in ViewWindowField.fsiz.WTLevels - definition in CODParameters.WTLevels.
public static int[] suitableResolutionLevel(int[] fsiz,
SIZParameters sizParameters,
CODParameters codParameters)
fsiz - definition in ViewWindowField.fsiz.sizParameters - definition in SIZParameters.codParameters - definition in CODParameters.
public static int suitableResolutionLevel(int[] fsiz,
int xSize,
int ySize,
int XOsize,
int YOsize,
int WTLevels)
fsiz - definition in ViewWindowField.fsiz.xSize - definition in SIZParameters.xSize.ySize - definition in SIZParameters.ySize.XOsize - definition in SIZParameters.XOsize.YOsize - definition in SIZParameters.YOsize.WTLevels - is the number of resolution levels for this tile-component.
public static int[][][] availableFrameSizes(int xSize,
int ySize,
int XOsize,
int YOsize,
int[] WTLevels)
xSize - definition in SIZParameters.xSize.ySize - definition in SIZParameters.ySize.XOsize - definition in SIZParameters.XOsize.YOsize - definition in SIZParameters.YOsize.WTLevels - definition in CODParameters.WTLevels.
public static int[][][] availableFrameSizes(SIZParameters sizParameters,
CODParameters codParameters)
sizParameters - definition in SIZParameters.codParameters - definition in CODParameters.
private static int[][] availableFrameSizes(int xSize,
int ySize,
int XOsize,
int YOsize,
int WTLevels)
xSize - definition in SIZParameters.xSize.ySize - definition in SIZParameters.ySize.XOsize - definition in SIZParameters.XOsize.YOsize - definition in SIZParameters.YOsize.WTLevels - number of wavelet decompositions.
public static int[] InClassIdentifierToTCRP(long inClassIdentifier,
int maxTiles,
int zSize,
int xSize,
int ySize,
int XOsize,
int YOsize,
int[] WTLevels,
int[][] BDResolutionPrecinctWidths,
int[][] BDResolutionPrecinctHeights)
Returns a integer array where the indexes are: tile component resolution level precinct
inClassIdentifier - definition in JPIPMessageHeader.inClassIdentifier.maxTiles - maximum number of image tiles.zSize - definition in SIZParameters.zSize.xSize - definition in SIZParameters.xSize.ySize - definition in SIZParameters.ySize.XOsize - definition in SIZParameters.XOsize.YOsize - definition in SIZParameters.YOsize.WTLevels - definition in CODParameters.WTLevels.BDResolutionPrecinctWidths - definition in CODParameters.precinctWidths.BDResolutionPrecinctHeights - definition in CODParameters.precinctHeights.
public static int[] InClassIdentifierToTCRP(long inClassIdentifier,
SIZParameters sizParameters,
CODParameters codParameters)
inClassIdentifier - definition in JPIPMessageHeader.inClassIdentifier.sizParameters - definition in SIZParameters.codParameters - definition in CODParameters.
public static long TCRPToInClassIdentifier(int tile,
int maxTiles,
int component,
int maxComponents,
int resolutionLevel,
int maxWTLevels,
int precinct,
int xSize,
int ySize,
int XOsize,
int YOsize,
int[] ResolutionPrecinctWidths,
int[] ResolutionPrecinctHeights)
tile - the tile which the precinct belongs.maxTiles - the maximum number of image tilescomponent - the component which the resolution level belongsmaxComponents - the maximum number of image componentsresolutionLevel - the resolution level which the precinct belongsmaxWTLevels - the maximum number of resolution levels.precinct - the number precinct within the tile-component following
a raster modexSize - definition in SIZParameters.xSize.ySize - definition in SIZParameters.ySize.XOsize - definition in SIZParameters.XOsize.YOsize - definition in SIZParameters.YOsize.ResolutionPrecinctWidths - definition in CODParameters.precinctWidths.ResolutionPrecinctHeights - definition in CODParameters.precinctHeights.
JPIPMessageHeader.inClassIdentifier.
public static long TCRPToInClassIdentifier(int tile,
int component,
int resolutionLevel,
int precinct,
SIZParameters sizParameters,
CODParameters codParameters)
tile - the tile which the precinct belongs to.component - the component which the resolution level belongs to.resolutionLevel - the resolution level which the precinct belongs toprecinct - the number precinct within the tile-component-resolutionlevel
following a raster mode.sizParameters - definition in SIZParameters.codParameters - definition in CODParameters.
JPIPMessageHeader.inClassIdentifier.
public static ViewWindowField calculateResponseViewWindow(int xSize,
int ySize,
int zSize,
int XOsize,
int YOsize,
int[] WTLevels,
int[] fsiz,
int[] roff,
int[] rsiz,
int layers,
int LCAchievedNumLayers,
int[][] BDResolutionPrecinctWidths,
int[][] BDResolutionPrecinctHeights)
throws java.lang.IllegalArgumentException
xSize - definition in SIZParameters.xSize.ySize - definition in SIZParameters.ySize.zSize - definition in SIZParameters.zSize.XOsize - definition in SIZParameters.XOsize.YOsize - definition in SIZParameters.YOsize.WTLevels - definition in CODParameters.WTLevels.fsiz - definition in ViewWindowField.fsiz.roff - definition in ViewWindowField.roff.rsiz - definition in ViewWindowField.rsiz.layers - LCAchievedNumLayers - definition in CODParameters.numLayers.BDResolutionPrecinctWidths - definition in CODParameters.precinctWidths.BDResolutionPrecinctHeights - definition in CODParameters.precinctHeights.
ViewWindowField object with
view window that best ajust to the requested parameters.
java.lang.IllegalArgumentException
public static ViewWindowField calculateResponseViewWindow(ViewWindowField viewWindow,
SIZParameters sizParameters,
CODParameters codParameters)
throws java.lang.IllegalArgumentException
viewWindow - definition in ViewWindowField.sizParameters - definition in SIZParameters.codParameters - definition in CODParameters.
ViewWindowField object with
view window that best ajust to the requested parameters.
java.lang.IllegalArgumentException
public static int[][] numberOfPrecinctsWithinComponent(int XOsize,
int YOsize,
int xSize,
int ySize,
int WTLevels,
int[] precinctWidths,
int[] precinctHeights)
XOsize - definition in SIZParameters.XOsize.YOsize - definition in SIZParameters.YOsize.xSize - definition in SIZParameters.xSize.ySize - definition in SIZParameters.ySize.WTLevels - definition in CODParameters.WTLevels.precinctWidths - precinctHeights -
public static int[][] numberOfPrecinctsWithinComponent(SIZParameters sizParameters,
int WTLevels,
int[] precinctWidths,
int[] precinctHeights)
sizParameters - definition in SIZParameters.WTLevels - definition in CODParameters.WTLevels.precinctWidths - precinctHeights -
public static int[][][] numberOfPrecinctsPerComponent(int XOsize,
int YOsize,
int xSize,
int ySize,
int[] WTLevels,
int[][] precinctWidths,
int[][] precinctHeights)
XOsize - definition in SIZParameters.XOsize.YOsize - definition in SIZParameters.YOsize.xSize - definition in SIZParameters.xSize.ySize - definition in SIZParameters.ySize.WTLevels - definition in CODParameters.WTLevels.precinctWidths - precinctHeights -
public static int[][][] numberOfPrecinctsPerComponent(SIZParameters sizParameters,
CODParameters codParameters)
sizParameters - definition in SIZParameters.codParameters - definition in CODParameters.
public static void adjustViewWindowToPrecinctSizes(int[] fsiz,
int[] roff,
int[] rsiz,
int components,
int ySize,
int xSize,
int XOsize,
int YOsize,
int[] WTLevels,
int[][] BDResolutionPrecinctWidths,
int[][] BDResolutionPrecinctHeights)
fsiz - definition in ViewWindowField.fsiz.roff - definition in ViewWindowField.roff.rsiz - definition in ViewWindowField.rsiz.components - ySize - definition in SIZParameters.ySize.xSize - definition in SIZParameters.xSize.XOsize - definition in SIZParameters.XOsize.YOsize - definition in SIZParameters.YOsize.WTLevels - definition in SIZParameters.xSize.BDResolutionPrecinctWidths - definition in CODParameters.precinctWidths.BDResolutionPrecinctHeights - definition in CODParameters.precinctHeights.
public static void adjustViewWindowToPrecinctSizes(ViewWindowField viewWindow,
SIZParameters sizParameters,
CODParameters codParameters)
viewWindow - definition in ViewWindowField.sizParameters - definition in SIZParameters.codParameters - definition in CODParameters.
public static int calculateRateDistortionAdjustment(int[] BCLCRateDistortionAdjustment,
int z,
int totalRLevels,
int rLevel,
int subband)
throws WarningException
BCLCRateDistortionAdjustment - rate distortion adjustment to be used for each componentz - image componenttotalRLevels - the total number of resolution levelsrLevel - 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)
WarningException - when rateDistortion adjustment type is unrecognized
@Deprecated
public static int[][][] calculateSubbandSizesBak(int[] components,
int[] WTLevels,
int xSize,
int ySize)
components - WTLevels - xSize - ySize -
@Deprecated
public static int[][] calculateSubbandSizes(int WTLevels,
int xSize,
int ySize)
WTLevels - the number of decomposition levels.xSize - image withySize - image height
public static int[][][] calculateFirstPrecinctPerResolutionLevel(int numTiles,
int numComponents,
int[] WTLevels,
int[][][] frameSizes,
int[][] resolutionPrecinctWidths,
int[][] resolutionPrecinctHeights)
numTiles - numComponents - WTLevels - resolutionPrecinctWidths - resolutionPrecinctHeights -
public static int[][][] calculateFirstPrecinctPerResolutionLevel(SIZParameters sizParameters,
CODParameters codParameters,
int[][][] frameSizes)
sizParameters - definition in SIZParameters.codParameters - definition in CODParameters.frameSizes -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||