public class JPEG2000Util
extends java.lang.Object
Constructor and Description |
---|
JPEG2000Util() |
Modifier and Type | Method and Description |
---|---|
static CADIDimension |
calculateFrameSize(int xSize,
int ySize,
int XOsize,
int YOsize,
int discardLevels) |
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 void |
determineFrameSize(int xSize,
int ySize,
int XOsize,
int YOsize,
int discardLevels,
CADIDimension frameSize) |
static int |
determineNumberOfDiscardLevels(int xSize,
int ySize,
int XOsize,
int YOsize,
int[] fsiz,
int roundDirection,
int maxWTLevels) |
static int[] |
InClassIdentifierToTCP(long inClassIdentifier,
int numTiles,
int numComponents)
Converts from the unique inClassIdentifier precinct identifier to
tile-component-precinct identifier.
|
static void |
mapRegionToHighResolutionGrid(int xSize,
int ySize,
int[] roff,
int[] rsiz,
int discardLevels) |
static void |
mapRegionToSuitableResolutionGrid(int xSize,
int ySize,
int XOsize,
int YOsize,
int[] fsiz,
int[] roff,
int[] rsiz,
int discardLevels)
Maps a image region (frame size, region offset and region size) to the
suitable codestream image resolution (frame size) and image region.
|
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.
|
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 modepublic 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 CADIDimension calculateFrameSize(int xSize, int ySize, int XOsize, int YOsize, int discardLevels)
xSize
- ySize
- XOsize
- YOsize
- discardLevels
- public static void determineFrameSize(int xSize, int ySize, int XOsize, int YOsize, int discardLevels, CADIDimension frameSize)
xSize
- ySize
- XOsize
- YOsize
- discardLevels
- frameSize
- public static int determineNumberOfDiscardLevels(int xSize, int ySize, int XOsize, int YOsize, int[] fsiz, int roundDirection, int maxWTLevels)
sizParameters
- fsiz
- roundDirection
- public static void mapRegionToSuitableResolutionGrid(int xSize, int ySize, int XOsize, int YOsize, int[] fsiz, int[] roff, int[] rsiz, int discardLevels)
Further information, see see ISO/IEC 15444-9 section C.4.1
xSize
- ySize
- XOsize
- YOsize
- fsiz
- roff
- rsiz
- discardLevels
- public static void mapRegionToHighResolutionGrid(int xSize, int ySize, int[] roff, int[] rsiz, int discardLevels)
xSize
- ySize
- roff
- rsiz
- discardLevels
- 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
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)