Package jj2000.j2k.roi.encoder
Class ROI
- java.lang.Object
-
- jj2000.j2k.roi.encoder.ROI
-
public class ROI extends 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
Fields Modifier and Type Field Description boolean
arbShape
Where or not the ROI shape is arbitraryint
comp
The components for which the ROI is relevantint
h
height of rectangular ROIImgReaderPGM
maskPGM
ImgReaderPGM object with the arbrtrary ROIint
r
radius of circular ROIboolean
rect
Flag indicating whether the ROI is rectangular or notint
ulx
x coordinate of upper left corner of rectangular ROIint
uly
y coordinate of upper left corner of rectangular ROIint
w
width of rectangular ROIint
x
x coordinate of center of circular ROIint
y
y coordinate of center of circular ROI
-
Constructor Summary
Constructors Constructor Description ROI(int comp, int x, int y, int rad)
Constructor for circular ROIsROI(int comp, int ulx, int uly, int w, int h)
Constructor for rectangular ROIsROI(int comp, ImgReaderPGM maskPGM)
Constructor for ROI with arbitrary shape
-
-
-
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 tomaskPGM
- 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 toulx
- x-coordinate of upper left corner of ROIuly
- y-coordinate of upper left corner of ROIw
- width of ROIh
- 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 tox
- x-coordinate of center of ROIy
- y-coordinate of center of ROIrad
- radius of ROI
-
-