public class JP2KClientLogicalTarget
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.awt.image.BufferedImage |
bufferedImage
Definition in
ImageData.bufImage . |
private ClientCacheManagement |
clientCache
Definition in
ClientSessionTarget.cache . |
private ClientJPEG2KCodestream |
codestream |
protected int[] |
components |
private float[] |
fImagePixels |
protected ImageData |
imageData
Definition in
ClientSessionTarget.imageData . |
protected int |
imageDataType |
private float[][][] |
imageSamplesFloat
Definition in
ImageData.imageSamplesFloat . |
private boolean |
isMainHeaderDecoded
Indicates if the main header has been decoded.
|
private JPEG2KDecoder |
jpeg2kDecoder
This object is used to decode a JPEG2000 codestream.
|
protected CADILog |
log
Definition in
Client.log . |
private int |
numThreads
Definition in
JPEG2KDecoder.numThreads . |
private PacketHeadersDecoder |
packetHeadersDecoder
Definition in
PacketHeadersDecoder |
private ClientJPEG2KTile |
tileObj |
private ViewWindowField |
viewWindow
Contains the last view window of the image decompressed.
|
Constructor and Description |
---|
JP2KClientLogicalTarget(ImageData imageData)
Constructor.
|
JP2KClientLogicalTarget(ImageData imageData,
ClientCacheManagement clientCache,
CADILog log)
Constructor.
|
JP2KClientLogicalTarget(ImageData imageData,
ClientCacheManagement clientCache,
CADILog log,
int numThreads) |
Modifier and Type | Method and Description |
---|---|
private ViewWindowField |
calculateWOIToDecode(ViewWindowField requestViewWindow,
ViewWindowField responseViewWindow)
This function calculates the view window which will be decoded taken
into account the requested view window (provided by the user
application) and the response view window (sent by the server).
|
void |
decode(ViewWindowField requestViewWindow,
ImageData dstImageData)
This method must implement the decode engine of the logical target.
|
void |
decode(ViewWindowField requestViewWindow,
ViewWindowField responseViewWindow,
ImageData dstImageData)
This method must implement the decode engine of the logical target.
|
private boolean |
decodeMainHeader()
Decodes the image main header.
|
private void |
decodeMetaData() |
private java.lang.String |
generateCOCDescription(java.util.HashMap<java.lang.Integer,COCParameters> cocParametersList) |
private java.lang.String |
generateCODDescription(CODParameters codParameters) |
private java.lang.String |
generateCSS() |
private java.lang.String |
generateJPKDescription(JPKParameters jpkParameters) |
private java.lang.String |
generateQCCDescription(java.util.HashMap<java.lang.Integer,QCCParameters> qccParametersList) |
private java.lang.String |
generateQCDDescription(QCDParameters qcdParameters) |
private java.lang.String |
generateSIZDescription(SIZParameters sizParameters) |
ClientJPEG2KCodestream |
getCodestream()
Returns the JPC parameters.
|
int |
getHeight()
Return the image height
|
java.lang.String |
getLogicalTargetDescription()
This method gets a description of the logical target.
|
int |
getMaxLayers()
Returns the maximum number of layers.
|
int[][] |
getRelevantComponents(int[][] comps)
Calculates which are the necessary components to invert a multiple
component transformation.
|
int |
getWidth()
Return the image width.
|
private java.awt.image.BufferedImage |
imageSamplesToBufferedImage(float[][][] imageSamplesFloat)
NOTE: this is a temporary method to convert from a three dimensional
array representation to a bufferered image representation.
|
boolean |
isMultiComponentTransform()
Check if the logical target has a multiple component transformation.
|
private void |
readRelevantPrecincts(java.util.ArrayList<java.lang.Long> relevantPrecincts)
Reads the data from the relevant precincts.
|
private ViewWindowField viewWindow
private ClientCacheManagement clientCache
ClientSessionTarget.cache
.protected ImageData imageData
ClientSessionTarget.imageData
.protected CADILog log
Client.log
.private ClientJPEG2KCodestream codestream
private ClientJPEG2KTile tileObj
private PacketHeadersDecoder packetHeadersDecoder
PacketHeadersDecoder
private JPEG2KDecoder jpeg2kDecoder
private float[][][] imageSamplesFloat
ImageData.imageSamplesFloat
.
Temporary structure.
protected int[] components
private int numThreads
JPEG2KDecoder.numThreads
.private boolean isMainHeaderDecoded
protected int imageDataType
private java.awt.image.BufferedImage bufferedImage
ImageData.bufImage
.
Temporal structure.
private float[] fImagePixels
public JP2KClientLogicalTarget(ImageData imageData)
imageData
- public JP2KClientLogicalTarget(ImageData imageData, ClientCacheManagement clientCache, CADILog log)
imageData
- public JP2KClientLogicalTarget(ImageData imageData, ClientCacheManagement clientCache, CADILog log, int numThreads)
public void decode(ViewWindowField requestViewWindow, ImageData dstImageData) throws ErrorException
viewWindow
- the Window Of Interest to decode.dstImageData
- an object where the decode image must be saved.ErrorException
- if the Window Of Interest cannot be decoded.public void decode(ViewWindowField requestViewWindow, ViewWindowField responseViewWindow, ImageData dstImageData) throws ErrorException
decode(ViewWindowField, ImageData)
method.requestViewWindow
- the Window Of Interest which the user is
requesting for.responseViewWindow
- the Window Of Interest which the server has
sent.dstImageData
- an object where the decode image must be saved.ErrorException
- if the Window Of Interest cannot be decoded.public ClientJPEG2KCodestream getCodestream()
public final int getWidth()
public final int getHeight()
public int getMaxLayers()
public java.lang.String getLogicalTargetDescription()
private boolean decodeMainHeader() throws ErrorException
WarningException
ErrorException
private ViewWindowField calculateWOIToDecode(ViewWindowField requestViewWindow, ViewWindowField responseViewWindow)
requestViewWindow
- responseViewWindow
- public boolean isMultiComponentTransform()
true
if the logical target is spectrally
transformed. Otherwise, returns false
.public int[][] getRelevantComponents(int[][] comps) throws ErrorException
compsRanges
input
parameter.ErrorException
private void readRelevantPrecincts(java.util.ArrayList<java.lang.Long> relevantPrecincts) throws ErrorException
ErrorException
private java.awt.image.BufferedImage imageSamplesToBufferedImage(float[][][] imageSamplesFloat)
imageSamplesFloat
- a three-dimensional array with the image
samplesprivate java.lang.String generateCSS()
private java.lang.String generateSIZDescription(SIZParameters sizParameters)
private java.lang.String generateCODDescription(CODParameters codParameters)
private java.lang.String generateCOCDescription(java.util.HashMap<java.lang.Integer,COCParameters> cocParametersList)
private java.lang.String generateQCDDescription(QCDParameters qcdParameters)
private java.lang.String generateQCCDescription(java.util.HashMap<java.lang.Integer,QCCParameters> qccParametersList)
private java.lang.String generateJPKDescription(JPKParameters jpkParameters)
private void decodeMetaData()
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)