CADI.Common.LogicalTarget.JPEG2000.Codestream
Class GenerateImageStructure

java.lang.Object
  extended by CADI.Common.LogicalTarget.JPEG2000.Codestream.GenerateImageStructure

public class GenerateImageStructure
extends java.lang.Object

This class constructs the needed structures to index the JPEG2000 file. Usage example:
  construct
  run
  [get functions]

Version:
1.0.3 2008/12/12
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
private  int[] blockHeights
          Definition in CODParameters.blockHeights
private  int[][] blocksPerPrecinctHeights
          Same as blocksPerPrecinctWidths but for precinct heights.
private  int[][] blocksPerPrecinctWidths
          Number of blocks in each precinct for resolution level and component (width dimension).
private  int[] blockWidths
          Definition in CODParameters.blockWidths
private  int[][][][][][] imageStructure
          Is a multi-dimensional array with the image structure.
private  int[][] precinctHeights
          Definition in CODParameters.precinctHeights
private  int[][] precinctWidths
          Definition in CODParameters.precinctWidths
private  int[] WTLevels
          Definition in CODParameters.WTLevels
private  int xSize
          Definition in SIZParameters.xSize
private  int ySize
          Definition in SIZParameters.ySize
private  int zSize
          Definition in SIZParameters.zSize.
 
Constructor Summary
GenerateImageStructure(SIZParameters sizParameters, CODParameters codParameters)
          Constructor.
 
Method Summary
 int[][] getBlocksPerPrecinctHeights()
          Returns the blocksPerPrecinctHeights attribute.
 int[][] getBlocksPerPrecinctWidths()
          Returns the blocksPerPrecinctWidths attribute.
 int[][][][][][] getImageStructure()
          Returns the imageStructure attribute.
 void list(java.io.PrintStream out)
          Prints this Generate Image Structure fields out to the specified output stream.
 void run()
          Builds the imageStructure, blocksPerPrecinctHeights, and blocksPerPrecinctWidths.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

zSize

private int zSize
Definition in SIZParameters.zSize.


ySize

private int ySize
Definition in SIZParameters.ySize


xSize

private int xSize
Definition in SIZParameters.xSize


WTLevels

private int[] WTLevels
Definition in CODParameters.WTLevels


blockWidths

private int[] blockWidths
Definition in CODParameters.blockWidths


blockHeights

private int[] blockHeights
Definition in CODParameters.blockHeights


precinctWidths

private int[][] precinctWidths
Definition in CODParameters.precinctWidths


precinctHeights

private int[][] precinctHeights
Definition in CODParameters.precinctHeights


blocksPerPrecinctWidths

private int[][] blocksPerPrecinctWidths
Number of blocks in each precinct for resolution level and component (width dimension). Index means [z][rLevel]. If the number of blocks does not fit with precincts, take upper left corner in the subband to start. For example, if a subband have 3x3 blocks:
-------------------
| 1 | 2 | 3 |
|-----------------|
| 4 | 5 | 6 |
|-----------------|
| 7 | 8 | 9 |
-------------------
and BDBlocksPerPrecinctWidths[z][rLevel]==2 then precincts will contain these blocks: {1,2,4,5},{3,6},{7,8},{9}.

Values greater than 1.


blocksPerPrecinctHeights

private int[][] blocksPerPrecinctHeights
Same as blocksPerPrecinctWidths but for precinct heights.

Values greater than 1.


imageStructure

private int[][][][][][] imageStructure
Is a multi-dimensional array with the image structure. Indices means:
  z: image component
  resolutionLevel: 0 is the LL subband, and 1, 2, ... represents next starting with the little one
  precinct: precinct in the resolution level
  subband: 0 - HL, 1 - LH, 2 - HH (ifresolutionLevel == 0 --> 0 - LL)
  yBlock: block row in the subband
  xBlock: block column in the subband

Constructor Detail

GenerateImageStructure

public GenerateImageStructure(SIZParameters sizParameters,
                              CODParameters codParameters)
Constructor.

Parameters:
sizParameters - definition in SIZParameters.
codParameters - definition in CODParameters.
Method Detail

run

public void run()
Builds the imageStructure, blocksPerPrecinctHeights, and blocksPerPrecinctWidths.


getImageStructure

public int[][][][][][] getImageStructure()
Returns the imageStructure attribute.

Returns:
the imageStructure attribute.

getBlocksPerPrecinctWidths

public int[][] getBlocksPerPrecinctWidths()
Returns the blocksPerPrecinctWidths attribute.

Returns:
the blocksPerPrecinctWidths attribute.

getBlocksPerPrecinctHeights

public int[][] getBlocksPerPrecinctHeights()
Returns the blocksPerPrecinctHeights attribute.

Returns:
the blocksPerPrecinctHeights attribute.

toString

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

list

public void list(java.io.PrintStream out)
Prints this Generate Image Structure fields out to the specified output stream. This method is useful for debugging purposes.

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)