public class FilterWriteStrategy extends Object implements IFilterWriteStrategy
| Constructor and Description |
|---|
FilterWriteStrategy(ImageInfo imgInfo) |
FilterWriteStrategy(ImageInfo imgInfo,
FilterType ctype) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
computesStatistics() |
FilterType |
preferedType(int rown)
Returns which (actual) filter is recommended to use for this row.
|
void |
reportResultsForFilter(int rown,
FilterType type,
byte[] rowbfilter,
boolean tentative)
Reports the filtered row, so that the strategy can compute statistics.
|
void |
setPreference(double none,
double sub,
double up,
double ave,
double paeth) |
List<FilterType> |
shouldTest(int rown)
Returns which filter types should be tested (tried) for this row.
|
public FilterWriteStrategy(ImageInfo imgInfo, FilterType ctype)
public FilterWriteStrategy(ImageInfo imgInfo)
public List<FilterType> shouldTest(int rown)
IFilterWriteStrategyshouldTest in interface IFilterWriteStrategypublic void setPreference(double none,
double sub,
double up,
double ave,
double paeth)
public boolean computesStatistics()
public void reportResultsForFilter(int rown,
FilterType type,
byte[] rowbfilter,
boolean tentative)
IFilterWriteStrategyreportResultsForFilter in interface IFilterWriteStrategyrown - Row numbertype - To which (real) filter this result correspondsrowbfilter - Filtered row (first byte is filter type)tentative - If true, this signals that this is a test/try; if false, we
confirm that this row is to be writtenpublic FilterType preferedType(int rown)
IFilterWriteStrategypreferedType in interface IFilterWriteStrategyFilterTypeCopyright © 2013. All rights reserved.