# ColourImageUnit

The `ColourImageUnit` class represents a unit that contains color image. It is derived from the `IntermediateResultUnit` class.

## Definition

*Package:* `com.dynamsoft.core.intermediate_results`

```java
class ColourImageUnit extends IntermediateResultUnit
```

## Methods

| Method               | Description |
|----------------------|-------------|
| [`getImageData`](#getimagedata) | Gets the image data of the color image unit. |
| [`setImageData`](#setimagedata) | Sets the image data of the color image unit. |

### getImageData

Gets the image data of the color image unit.

```java
ImageData getImageData()
```

**Return value**

Returns an `ImageData` object that contains the image data of the color image unit.

**See Also**

[ImageData](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/image-data.md)

### setImageData

Sets the image data of the color image unit.

```java
void setImageData(ImageData imgData) throws CoreException
```

**Parameters**

`imgData` The image data to set.

**Exceptions**

[`CoreException`](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/core-exception.md)

**See Also**

[ImageData](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/image-data.md)

[ImageData](https://www.dynamsoft.com/capture-vision/docs/server/programming/java/api-reference/core/basic-classes/image-data.md)
