public class RectROIMaskGenerator extends ROIMaskGenerator
The values are calculated from the scaling factors of the ROIs. The values with which to scale are equal to u-umin where umin is the lowest scaling factor within the block. The umin value is sent to the entropy coder to be used for scaling the distortion values.
To generate and to store the boundaries of the ROIs, the class SubbandRectROIMask is used. There is one tree of SubbandMasks for each component.
Modifier and Type | Field and Description |
---|---|
private int[] |
lrxs
The lower right xs of the ROIs
|
private int[] |
lrys
The lower right ys of the ROIs
|
private int[] |
nrROIs
Number of ROIs
|
private SubbandRectROIMask[] |
sMasks
The tree of subbandmask.
|
private int[] |
ulxs
The upper left xs of the ROIs
|
private int[] |
ulys
The upper left ys of the ROIs
|
nrc, roiInTile, rois, tileMaskMade
Constructor and Description |
---|
RectROIMaskGenerator(ROI[] ROIs,
int nrc)
The constructor of the mask generator.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getROIMask(DataBlkInt db,
Subband sb,
int magbits,
int c)
This functions gets a DataBlk the size of the current code-block and
fills this block with the ROI mask.
|
void |
makeMask(Subband sb,
int magbits,
int n)
This function generates the ROI mask for the entire tile.
|
String |
toString()
This function returns the relevant data of the mask generator
|
getROIs, tileChanged
private int[] ulxs
private int[] ulys
private int[] lrxs
private int[] lrys
private int[] nrROIs
private SubbandRectROIMask[] sMasks
public RectROIMaskGenerator(ROI[] ROIs, int nrc)
ROIs
- The ROI info.nrc
- number of components.public boolean getROIMask(DataBlkInt db, Subband sb, int magbits, int c)
In order to get the mask for a particular Subband, the subband tree is traversed and at each decomposition, the ROI masks are computed. The roi bondaries for each subband are stored in the SubbandRectROIMask tree.
getROIMask
in class ROIMaskGenerator
db
- The data block that is to be filled with the masksb
- The root of the subband tree to which db belongsmagbits
- The max number of magnitude bits in any code-blockc
- The component for which to get the maskpublic String toString()
public void makeMask(Subband sb, int magbits, int n)
makeMask
in class ROIMaskGenerator
sb
- The root of the subband tree used in the decompositionn
- component numbermagbits
- The max number of magnitude bits in any code-blockCopyright © 2016 Open Microscopy Environment