# DeformationResistedBarcodeImageUnit Class

The `DeformationResistedBarcodeImageUnit` class represents a unit that contains deformation resisted barcode image data. It inherits from the `IntermediateResultUnit` class.

## Definition

*Package:* com.dynamsoft.dbr.intermediate_results

*Inheritance:* [IntermediateResultUnit](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/intermediate-results/intermediate-result-unit.md) -> DeformationResistedBarcodeImageUnit

```java
public class DeformationResistedBarcodeImageUnit extends IntermediateResultUnit
```

## Methods

| Method                            | Description |
|-----------------------------------|-------------|
| [`getDeformationResistedBarcode`](#getdeformationresistedbarcode) | Gets the deformation resisted barcode object.|
| [`setDeformationResistedBarcode`](#setdeformationresistedbarcode) | Sets the deformation resisted barcode object.|

### getDeformationResistedBarcode

Gets the deformation resisted barcode object.

```java
public DeformationResistedBarcode getDeformationResistedBarcode()
```

**Return value**

Returns an instance of `DeformationResistedBarcode`.

**See Also**

[DeformationResistedBarcode](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/deformation-resisted-barcode.md)

### setDeformationResistedBarcode

Sets the deformation resisted barcode object.

```java
public void setDeformationResistedBarcode(DeformationResistedBarcode barcode) throws BarcodeReaderException
public void setDeformationResistedBarcode(DeformationResistedBarcode barcode, double[] matrixToOriginalImage) throws BarcodeReaderException
```

**Parameters**

`barcode` The deformation resisted barcode object.

`matrixToOriginalImage` The matrix to original image. The array length must be 9.

**Exceptions**

`BarcodeReaderException` If an error occurs while setting the deformation resisted barcode.

`IllegalArgumentException` If the `matrixToOriginalImage` array length is not 9.

**See Also**

[BarcodeReaderException](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/barcode-reader-exception.md)

[DeformationResistedBarcode](https://www.dynamsoft.com/barcode-reader/docs/server/programming/java/api-reference/deformation-resisted-barcode.md)
