Import

The RedBrick AI SDK uses a list of redbrick.types.task.InputTask objects for importing data. To import data through the CLI or SDK, create a JSON file that follows the same format.

class redbrick.types.task.InputTask[source]

Represents a single task in RedBrick AI, which is a unit of labeling work. This user-defined object can contain one or more series of mixed modalities.

namestr

A unique user defined string for quickly identifying and searching tasks.

seriesList[Series]

Add more than one series per task by adding multiple entries to series list.

classification: Classification

For importing Study level classifications redbrick.types.task.Classification.

priorityfloat

priority must between [0, 1]. Tasks will be ordered in descending order of priority.

metaDataDict[strstr]

Used for displaying Task level meta-data within the annotation viewer.

preAssignDict[strUnion[strList[str]]]

Specify user email(s) to automatically assign this task to them.

class redbrick.types.task.Series[source]

A single series represents a single volume, image, or video. A redbrick.types.task.InputTask can have multiple series.

itemsUnion[strList[str]] = <method ‘items’ of ‘dict’ objects>

Path(s) to the image instances of this series.

DICOM 3D

# DICOM instances don’t need to be in order. items = [“instance001.dcm”, “instance000.dcm”, “instance003.dcm]

DICOM 2DNIfTIVideo frames

namestr

Unique identifier for the series that will be displayed on the annotation viewport.

metaDataDict[strstr]

Series level meta-data will be displayed on the viewport.

segmentationsUnion[strList[str]]

Path to your NIfTI segmentation files for uploading annotations.

Read our guide on importing annotation to learn more.

Single

If your series has a single segmentation file.

items = “path/to/segmentation.nii”

Multiple

segmentMapDict[Union[strint], Union[strintList[str], CommonLabelProps]]

A mapping between your segmentation file instance values (values inside your NIfTI files) and your RedBrick AI taxonomy categories.

Read our guide on importing annotation to learn more.

Shorthand

“1” and “2” are values present the NIfTI files defined by redbrick.types.task.Series.segmentations. Those values will be mapped to your RedBrick AI taxonomy categories “category a” and “category b”.

segmentMap = { “1”: “category a”, “2”: “category b” }

Full

heatMapsList[HeatMap]

Heatmaps for the series.

transformsList[Transform]

Transforms for the series.

centerlineList[Centerline]

Centerline info for the series.

binaryMaskbool

Treats all files in redbrick.types.task.Series.segmentations as binary masks. That is, any non-zero value will be treated as a single instance.

pngMaskbool

Set to true if uploading PNG masks.

landmarksList[Landmark]

2D landmarks for 2D data.

landmarks3dList[Landmark3D]

3D landmarks for 3D data.

measurementsList[Union[MeasureLength, MeasureAngle]]

Length or angle measurements. Not supported in videos.

ellipsesList[Ellipse]

Ellipse annotation. Not supported in Videos.

boundingBoxesList[BoundingBox]

2D bounding box for 2D images, or slice by slice annotation in 3D images.

cuboidsList[Cuboid]

3D bounding boxes for 3D images.

polygonsList[Polygon]

Closed polygons, not supported in 3D images.

polylinesList[Polyline]

Open polylines, not supported in 3D images.

classificationsList[Classification]

Series level classifications.

instanceClassificationsList[InstanceClassification]

Instance level classifications for frame-by-frame (video) or slice-by-slice (volume) classifications.

class redbrick.types.task.HeatMap[source]

Heat map.

namestr

Name.

itemstr

File path.

presetstr

Preset.

dataRangeList[float]

Data range.

opacityPointsList[float]

Opacity points.

opacityPoints3dList[float]

Opacity points 3D.

rgbPointsList[float]

RGB points.

class redbrick.types.task.Transform[source]

Transform.

transformList[List[float]]

Transformation matrix (4x4).

class redbrick.types.task.Centerline[source]

Centerline info.

namestr

Centerline name

centerlineDict

Centerline polydata

Export

The RedBrick SDK will export a list of redbrick.types.task.OutputTask objects, along with NIfTI segmentation files if they exist, written to the disk. The CLI will export in the same format in a JSON file.

class redbrick.types.task.OutputTask[source]

Single task object on export.

taskIdstr

System generated unique identifier for the task.

namestr

A unique user defined string for quickly identifying and searching tasks.

seriesList[Series]

List of series in the task redbrick.types.task.Series.

classification: Classification

Study level classifications redbrick.types.task.Classification.

priorityfloat

Task priority in the range [0, 1].

metaDataDict[strstr]

Task level meta-data within the annotation viewer.

currentStageNamestr

Name of the stage in which this task currently is.

status: TaskStates

Current status of the task in the workflow.

createdBystr

E-mail of the user who uploaded this task.

createdAtstr

Timestamp of when this task was uploaded.

updatedBystr

E-mail of the user who last edited this task.

updatedByUserIdstr

System generated unique user ID of user who last edited this task.

updatedAtstr

Timestamp of when this task was last edited.

consensusbool

If true, this task is a consensus task, i.e., it was labeled by more than one person.

consensusScorefloat

Agreement score between annotators who labeled this task.

Read more about the score calculation here.

consensusTasksList[OutputTask]

A list of all the results from consensus. One entry for each annotator.

scoresList[ConsensusScore]

Matrix of the agreement scores between the labelers.

superTruth: OutputTask

Supertruth version produced in consensus review stage.

datapointClassification: Classification

Datapoint classification attributes.

class redbrick.types.task.ConsensusScore[source]

Consensus score for a pair of annotators for a consensus task.

secondaryUserstr

User who is compared to primary user.

secondaryUserIdstr

User id of user who is compared to primary user.

secondaryUserEmailstr

User email of user who is compared to the primary user.

scorefloat

Agreement score between the primary user and this secondary user.

class redbrick.common.enums.TaskStates(valuenames=None*module=Nonequalname=Nonetype=Nonestart=1boundary=None)[source]

Task Status.

  • UNASSIGNED - The Task has not been assigned to a Project Admin or Member.

  • ASSIGNED - The Task has been assigned to a Project Admin or Member,but work has not begun on it.

  • IN_PROGRESS - The Task is currently being worked on by a Project Admin or Member.

  • COMPLETED - The Task has been completed successfully.

  • PROBLEM - A Project Admin or Member has raised an Issue regarding the Task,and work cannot continue until the Issue is resolved by a Project Admin.

  • SKIPPED - The Task has been skipped.

  • STAGED - The Task has been saved as a Draft.

NextAnnotation type definitionsPreviousCommand Line Interface

Copyright © 2023, RedBrick AI

Made with Sphinx and @pradyunsg’s Furo

On this page

Read the Docs

Read the Docs