> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Utilities.coco.exporter

## DicomAnnotationData Objects

```python theme={"dark"}
@dataclass(frozen=True)
class DicomAnnotationData()
```

#### multiframe\_frame\_number

only present for multi-frame DICOMs

## CocoExporter Objects

```python theme={"dark"}
class CocoExporter()
```

This class is intentionally designed in a modular fashion to facilitate extensibility.
You are encouraged to subclass this exporter and modify any of the custom functions.
While return types are provided for convenience, they can also be subclassed to suit your specific requirements.
All functions that could be static are intentionally not made static, allowing you the option to access the `self`
object at any time.

#### get\_categories

```python theme={"dark"}
def get_categories() -> List[Dict[str, Any]]
```

This does not translate classifications as they are not part of the Coco spec.

#### get\_images

```python theme={"dark"}
def get_images() -> List[Dict[str, Any]]
```

All the data is in the specific label\_row

#### get\_polyline

```python theme={"dark"}
def get_polyline(object_: Dict, image_id: int, size: Size,
                 object_answers: Dict, object_actions: Dict) -> CocoAnnotation
```

Polylines are technically not supported in COCO, but here we use a trick to allow a representation.

#### join\_polyline\_from\_polygon

```python theme={"dark"}
@staticmethod
def join_polyline_from_polygon(polygon: List[float]) -> List[float]
```

Essentially a trick to represent a polyline in coco. We pretend for this to be a polygon and join every
coordinate from the end back to the beginning, so it will essentially be an area-less polygon.
This function technically changes the input polygon in place.

#### add\_unselected\_attributes

```python theme={"dark"}
def add_unselected_attributes(feature_hash: str,
                              attributes_dict: Dict[str, Optional[bool]],
                              match_dynamic_attributes: bool) -> None
```

Attributes which have never been selected will not show up in the actions map. They will need to be
added separately. NOTE: this assumes uniqueness of features. Quite an edge case but if it ever comes
up it needs to be solved somewhere here.
