Method RegisterAnnotationDefinition
RegisterAnnotationDefinition(string, string, string, Guid)
Creates an annotation type, which can be used to produce annotations during the simulation. See ReportAnnotationFile(AnnotationDefinition, string), ReportAnnotationValues<T>(AnnotationDefinition, T[]) and ReportAnnotationAsync(AnnotationDefinition).
Declaration
public static AnnotationDefinition RegisterAnnotationDefinition(string name, string description = null, string format = "json", Guid id = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Human readable annotation spec name (e.g. sementic_segmentation, instance_segmentation, etc.) |
| string | description | Description of the annotation. |
| string | format | Optional format name. |
| Guid | id | The ID for this annotation type. This allows annotation types to be shared across simulations and sequences. |
Returns
| Type | Description |
|---|---|
| AnnotationDefinition | An AnnotationDefinition. If the given id has already been defined, its AnnotationDefinition is returned. |
RegisterAnnotationDefinition<TSpec>(string, TSpec[], string, string, Guid)
Creates an annotation type, which can be used to produce annotations during the simulation. See ReportAnnotationFile(AnnotationDefinition, string), ReportAnnotationValues<T>(AnnotationDefinition, T[]) and ReportAnnotationAsync(AnnotationDefinition).
Declaration
public static AnnotationDefinition RegisterAnnotationDefinition<TSpec>(string name, TSpec[] specValues, string description = null, string format = "json", Guid id = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Human readable annotation spec name (e.g. sementic_segmentation, instance_segmentation, etc.) |
| TSpec[] | specValues | Format-specific specification for the annotation values (ex. label-value mappings for semantic segmentation images) |
| string | description | Description of the annotation. |
| string | format | Optional format name. |
| Guid | id | The ID for this annotation type. This allows annotation types to be shared across simulations and sequences. |
Returns
| Type | Description |
|---|---|
| AnnotationDefinition | An AnnotationDefinition. If the given id has already been defined, its AnnotationDefinition is returned. |
Type Parameters
| Name | Description |
|---|---|
| TSpec | The type of the values for the spec array in the resulting json. |