BarcodeOptions
Leave feedback
On this page
Inheritance: java.lang.Object
public class BarcodeOptions
Provides the options which are used for barcode extraction.
| Constructor | Description |
|---|---|
| BarcodeOptions() | Initializes a new instance of the BarcodeOptions class with default values. |
| BarcodeOptions(Rectangle rectangle) | Initializes a new instance of the BarcodeOptions class with the rectangular area. |
| BarcodeOptions(QualityMode imageQuality, QualityMode barcodeQuality, String[] codeTypes) | Initializes a new instance of the BarcodeOptions class with quality settings and code types. |
| BarcodeOptions(Rectangle rectangle, QualityMode imageQuality, QualityMode barcodeQuality, Float dimension, boolean allowIncorrectBarcodes, String[] codeTypes) | Initializes a new instance of the BarcodeOptions class. |
| Method | Description |
|---|---|
| isAllowIncorrectBarcodes() | Gets the value that indicates whether the incorrect barcodes are allowed. |
| getDimension() | Gets the minimal size of the barcode minimal element. |
| getImageQuality() | Gets the quality of a source image. |
| getBarcodeQuality() | Gets the quality of a source barcode. |
| getRectangle() | Gets the rectangular area that contains page areas. |
| getCodeTypes() | Gets the types of barcodes to read. |
| setAllowIncorrectBarcodes(boolean allowIncorrectBarcodes) | Sets the value that indicates whether the incorrect barcodes are allowed. |
| setDimension(Float dimension) | Sets the minimal size of the barcode minimal element. |
| setImageQuality(QualityMode imageQuality) | Sets the quality of a source image. |
| setBarcodeQuality(QualityMode barcodeQuality) | Sets the quality of a source barcode. |
| setRectangle(Rectangle rectangle) | Sets the rectangular area that contains barcodes. |
| setCodeTypes(List |
Sets the types of barcodes to read. |
public BarcodeOptions()
Initializes a new instance of the BarcodeOptions class with default values.
public BarcodeOptions(Rectangle rectangle)
Initializes a new instance of the BarcodeOptions class with the rectangular area.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| rectangle | Rectangle | The rectangular area that contains barcodes. |
public BarcodeOptions(QualityMode imageQuality, QualityMode barcodeQuality, String[] codeTypes)
Initializes a new instance of the BarcodeOptions class with quality settings and code types.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| imageQuality | QualityMode | The quality of a source image. |
| barcodeQuality | QualityMode | The quality of a source barcode. |
| codeTypes | java.lang.String[] | The types of barcodes to read. |
BarcodeOptions(Rectangle rectangle, QualityMode imageQuality, QualityMode barcodeQuality, Float dimension, boolean allowIncorrectBarcodes, String[] codeTypes)
public BarcodeOptions(Rectangle rectangle, QualityMode imageQuality, QualityMode barcodeQuality, Float dimension, boolean allowIncorrectBarcodes, String[] codeTypes)
Initializes a new instance of the BarcodeOptions class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| rectangle | Rectangle | The rectangular area that contains barcodes. |
| imageQuality | QualityMode | The quality of a source image. |
| barcodeQuality | QualityMode | The quality of a source barcode. |
| dimension | java.lang.Float | The minimal size of the barcode minimal element. |
| allowIncorrectBarcodes | boolean | The value that indicates whether the incorrect barcodes are allowed. |
| codeTypes | java.lang.String[] | The types of barcodes to read. |
public boolean isAllowIncorrectBarcodes()
Gets the value that indicates whether the incorrect barcodes are allowed.
Returns: boolean - true if the incorrect barcodes are allowed; otherwise, false .
public Float getDimension()
Gets the minimal size of the barcode minimal element.
Returns: java.lang.Float - The float value that represents the barcode minimal element; null if auto mode is used.
public QualityMode getImageQuality()
Gets the quality of a source image.
Returns: QualityMode - The mode which defines the level of the source image quality.
public QualityMode getBarcodeQuality()
Gets the quality of a source barcode.
Returns: QualityMode - The mode which defines the level of the source barcode quality.
public Rectangle getRectangle()
Gets the rectangular area that contains page areas.
Returns: Rectangle - An instance of Rectangle class that represents the rectangular area that contains page areas; null if it isn’t set.
public List<String> getCodeTypes()
Gets the types of barcodes to read.
Returns: java.util.List<java.lang.String> - The readonly collection that contains a types of barcodes to read; empty collection if isn’t set.
public void setAllowIncorrectBarcodes(boolean allowIncorrectBarcodes)
Sets the value that indicates whether the incorrect barcodes are allowed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| allowIncorrectBarcodes | boolean | true if the incorrect barcodes are allowed. |
public void setDimension(Float dimension)
Sets the minimal size of the barcode minimal element.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| dimension | java.lang.Float | The barcode minimal element; null for auto mode. |
public void setImageQuality(QualityMode imageQuality)
Sets the quality of a source image.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| imageQuality | QualityMode | The image quality mode. |
public void setBarcodeQuality(QualityMode barcodeQuality)
Sets the quality of a source barcode.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| barcodeQuality | QualityMode | The barcode quality mode. |
public void setRectangle(Rectangle rectangle)
Sets the rectangular area that contains barcodes.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| rectangle | Rectangle | The rectangular area; null to scan the whole page. |
public void setCodeTypes(List<String> codeTypes)
Sets the types of barcodes to read.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| codeTypes | java.util.List<java.lang.String> | The types of barcodes; null or empty for all types. |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.