CADI.Client.ClientLogicalTarget
Class ClientLogicalTarget

java.lang.Object
  extended by CADI.Client.ClientLogicalTarget.ClientLogicalTarget
Direct Known Subclasses:
JPEG2KLogicalTarget

public abstract class ClientLogicalTarget
extends java.lang.Object

This class is an interface which must implemented by all supported logical targets in the JPIP Client.

Version:
beta 0.2.2 2007/12/29
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
protected  int[] components
           
protected  ImageData imageData
          This object is the container where the decoder saves the recovered image and it will read by the client application (tipically, a graphical user interface).
protected  int imageDataType
           
protected  boolean initialized
          It indicates whether the object has been initialized or no.
protected  CADILog log
          Definition in Client.log.
protected  int logicalTargetType
          Identifies the logical target type.
protected  int maxComponents
           
protected  java.lang.String target
          Definition in TargetField.target
protected  java.lang.String tid
          Definition in TargetField.tid
protected  int xSize
          Definition in SIZParameters.xSize
protected  int ySize
          Definition in SIZParameters.ySize
protected  int zSize
          Definition in SIZParameters.zSize
 
Constructor Summary
ClientLogicalTarget()
           
 
Method Summary
abstract  void decode(ViewWindowField viewWindow, ImageData dstImageData)
          This method must implement the decode engine of the logical target.
abstract  void decode(ViewWindowField requestViewWindow, ViewWindowField responseViewWindow, ImageData dstImageData)
          This method must implement the decode engine of the logical target.
abstract  int[] getFrameSize(int resolutionLevel)
          Returns the frame size of the resolution level specified.
abstract  int[][] getFrameSizes()
          Returns all available frame sizes.
 int getHeight()
          Return the image height
 ImageData getImageData()
          Returns the imageData attribute.
abstract  java.lang.String getLogicalTargetDescription()
          This method gets a description of the logical target.
 int getLogicalTargetType()
          Returns the type of the logical target.
 int getMaxComponents()
          Returns the maximum number of components (zSize attribute).
abstract  int getMaxLayers()
          Returns the maximum number of layers.
abstract  int getMaxResolutionLevels()
          Returns the maximum number of resolution levels.
 java.lang.String getTarget()
          Returns the target attribute.
 java.lang.String getTID()
          Returns the tid attribute.
 int getWidth()
          Return the image width.
 boolean isInitialized()
          Indicates whether the object has been initialized.
 void list(java.io.PrintStream out)
          Prints this Client Logical Target fields out to the specified output stream.
abstract  void setCache(ClientCacheManagement clientCache)
          Sets the client cache for this logical target.
 void setLog(CADILog log)
          Sets the log object.
 void setLogicalTargetType(int logicalTargetType)
          Sets the logical target type.
 void setTarget(java.lang.String target)
          Sets the target attribute.
 void setTID(java.lang.String tid)
          Sets the tid attribue.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logicalTargetType

protected int logicalTargetType
Identifies the logical target type.

See Also:
LogicalTargetTypes

tid

protected java.lang.String tid
Definition in TargetField.tid


target

protected java.lang.String target
Definition in TargetField.target


imageData

protected ImageData imageData
This object is the container where the decoder saves the recovered image and it will read by the client application (tipically, a graphical user interface).


imageDataType

protected int imageDataType

zSize

protected int zSize
Definition in SIZParameters.zSize


maxComponents

protected int maxComponents

components

protected int[] components

ySize

protected int ySize
Definition in SIZParameters.ySize


xSize

protected int xSize
Definition in SIZParameters.xSize


initialized

protected boolean initialized
It indicates whether the object has been initialized or no. The inherited objects are created and they will be initialized when all methods can be called. Otherwise, only the super class methods can be called, so the initialized attribute will be false.


log

protected CADILog log
Definition in Client.log.

Constructor Detail

ClientLogicalTarget

public ClientLogicalTarget()
Method Detail

getLogicalTargetType

public final int getLogicalTargetType()
Returns the type of the logical target.

Returns:
the logicalTargetType attribute.

setCache

public abstract void setCache(ClientCacheManagement clientCache)
Sets the client cache for this logical target.

Parameters:
clientCache - the client cache.

getTarget

public final java.lang.String getTarget()
Returns the target attribute.

Returns:
the target attribute.

getImageData

public final ImageData getImageData()
Returns the imageData attribute.

Returns:
the imageData attribute.

getTID

public final java.lang.String getTID()
Returns the tid attribute.

Returns:
the tid attribute

setLogicalTargetType

public final void setLogicalTargetType(int logicalTargetType)
Sets the logical target type.

Parameters:
logicalTargetType - the logical target type.

setTarget

public final void setTarget(java.lang.String target)
Sets the target attribute.

Parameters:
target - the target attribute.

setTID

public final void setTID(java.lang.String tid)
Sets the tid attribue.

Parameters:
tid - the tid attribute.

decode

public abstract void decode(ViewWindowField viewWindow,
                            ImageData dstImageData)
                     throws ErrorException
This method must implement the decode engine of the logical target.

Parameters:
viewWindow - the Window Of Interest to decode.
dstImageData - an object where the decode image must be saved.
Throws:
ErrorException - if the Window Of Interest cannot be decoded.

decode

public abstract void decode(ViewWindowField requestViewWindow,
                            ViewWindowField responseViewWindow,
                            ImageData dstImageData)
                     throws ErrorException
This method must implement the decode engine of the logical target. If the second argument (responseViewWindow) is null, this method is equal to the decode(ViewWindowField, ImageData) method.

Parameters:
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.
Throws:
ErrorException - if the Window Of Interest cannot be decoded.

isInitialized

public final boolean isInitialized()
Indicates whether the object has been initialized. See initialized attribute.

Returns:
if the object has been initialized.

getFrameSize

public abstract int[] getFrameSize(int resolutionLevel)
Returns the frame size of the resolution level specified.

Parameters:
resolutionLevel - the resolution level.
Returns:
the frame size for the resolution level-

getFrameSizes

public abstract int[][] getFrameSizes()
Returns all available frame sizes. The frame sizes are ordered from the smallest to the biggest one.

Returns:
a multidimensional array with the available frame sizes. The first index is the frame size index, and the second one is, 0 for width and 1 for the height.

getMaxComponents

public final int getMaxComponents()
Returns the maximum number of components (zSize attribute).

Returns:
the maximum number of components.

getMaxResolutionLevels

public abstract int getMaxResolutionLevels()
Returns the maximum number of resolution levels.

Returns:
the maximum number of resolution levels.

getMaxLayers

public abstract int getMaxLayers()
Returns the maximum number of layers.

Returns:
the maximum number of layers

getLogicalTargetDescription

public abstract java.lang.String getLogicalTargetDescription()
This method gets a description of the logical target. It is recomended the description was done as HTML table (for instance, an HTML table with a description of th logical target parameters).

Returns:
a string with the logical target description.

getWidth

public final int getWidth()
Return the image width.

Returns:
the image with.

getHeight

public final int getHeight()
Return the image height

Returns:
the image height

setLog

public final void setLog(CADILog log)
Sets the log object.

Parameters:
log - log object.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

list

public void list(java.io.PrintStream out)
Prints this Client Logical Target fields out to the specified output stream. This method is useful for debugging.

Parameters:
out - an output stream.


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)