jj2000.j2k.roi.encoder
Class ROI

java.lang.Object
  |
  +--jj2000.j2k.roi.encoder.ROI

public class ROI
extends java.lang.Object

This class contains the shape of a single ROI. In the current implementation only rectangles and circles are supported.

See Also:
ROIMaskGenerator

Field Summary
 boolean arbShape
          Where or not the ROI shape is arbitrary
 int comp
          The components for which the ROI is relevant
 int h
          height of rectangular ROI
 ImgReaderPGM maskPGM
          ImgReaderPGM object with the arbrtrary ROI
 int r
          radius of circular ROI
 boolean rect
          Flag indicating whether the ROI is rectangular or not
 int ulx
          x coordinate of upper left corner of rectangular ROI
 int uly
          y coordinate of upper left corner of rectangular ROI
 int w
          width of rectangular ROI
 int x
          x coordinate of center of circular ROI
 int y
          y coordinate of center of circular ROI
 
Constructor Summary
ROI(int comp, ImgReaderPGM maskPGM)
          Constructor for ROI with arbitrary shape
ROI(int comp, int x, int y, int rad)
          Constructor for circular ROIs
ROI(int comp, int ulx, int uly, int w, int h)
          Constructor for rectangular ROIs
 
Method Summary
 java.lang.String toString()
          This function prints all relevant data for the ROI
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

maskPGM

public ImgReaderPGM maskPGM
ImgReaderPGM object with the arbrtrary ROI

arbShape

public boolean arbShape
Where or not the ROI shape is arbitrary

rect

public boolean rect
Flag indicating whether the ROI is rectangular or not

comp

public int comp
The components for which the ROI is relevant

ulx

public int ulx
x coordinate of upper left corner of rectangular ROI

uly

public int uly
y coordinate of upper left corner of rectangular ROI

w

public int w
width of rectangular ROI

h

public int h
height of rectangular ROI

x

public int x
x coordinate of center of circular ROI

y

public int y
y coordinate of center of circular ROI

r

public int r
radius of circular ROI
Constructor Detail

ROI

public ROI(int comp,
           ImgReaderPGM maskPGM)
Constructor for ROI with arbitrary shape
Parameters:
comp - The component the ROI belongs to
maskPGM - ImgReaderPGM containing the ROI

ROI

public ROI(int comp,
           int ulx,
           int uly,
           int w,
           int h)
Constructor for rectangular ROIs
Parameters:
comp - The component the ROI belongs to
x - x-coordinate of upper left corner of ROI
y - y-coordinate of upper left corner of ROI
w - width of ROI
h - height of ROI

ROI

public ROI(int comp,
           int x,
           int y,
           int rad)
Constructor for circular ROIs
Parameters:
comp - The component the ROI belongs to
x - x-coordinate of center of ROI
y - y-coordinate of center of ROI
w - radius of ROI
Method Detail

toString

public java.lang.String toString()
This function prints all relevant data for the ROI
Overrides:
toString in class java.lang.Object