Ango Hub Docs
Open Ango HubContact iMerit
  • Ango Hub Documentation
  • Video Guides
  • Changelog
  • FAQs & Troubleshooting
  • All Keyboard and Mouse Shortcuts
  • Core Concepts
    • Assets
    • Attachments
    • Batches
    • Benchmarks
    • Category Schema (Ontologies)
    • Frame Interpolation
    • Geofencing
    • Idle Time Detection & Time Tracking
    • Instructions
    • Issues
      • Issue Error Codes
    • Label Validation
    • Labeler Performance
    • Labeling
    • Labeling Queue
    • Multiple Classification
    • Notifications
    • Organizations
    • Projects
    • Requeuing
    • Reviewing
    • Review Queue
    • Skipping
    • Stage History
    • Tasks
    • Usage
    • User Roles
    • Workflow
      • Complete
      • Consensus
      • Hold
      • Label
      • Logic
      • Plugin
      • Review
      • Start
      • Webhook
  • Labeling
    • Managing Users in Projects
      • Profile Page
    • Managing the Project Ontology
    • Labeling Editor Interface
      • Audio Labeling Editor
      • Image Labeling Editor
      • Video Labeling Editor
      • DICOM Labeling Editor
      • Medical Labeling Editor
        • 3D Bounding Box
        • Fill Between Slices
        • Island Tools
        • Line (Tape Measure)
        • Smoothing
      • PDF Labeling Editor
      • Text (NER) Labeling Editor
      • LLM Chat Labeling Editor
      • Markdown Labeling Editor
      • 3D Multi-Sensor Fusion Labeling Editor
    • Labeling Classes
      • Tools
        • Bounding Box
        • Brush
        • Entity
        • Message
        • Nested Classifications
        • PCT
        • PDF Tool
        • Point
        • Polygon
        • Polyline
        • Rotated Bounding Box
        • Segmentation
        • Spline
        • Voxel Brush
      • Classification
        • Checkbox
        • Multiple Dropdown
        • Radio
        • Rank
        • Single Dropdown
        • Text
        • Tree Dropdown Tools (Single and Multiple Selection)
      • Relation
        • Single Relation
        • Group Relation
    • Magnetic Lasso
    • Performance & Compatibility Considerations
  • Data
    • Data in Ango Hub
      • Embedding Private Bucket Files in MD Assets
    • Importing Assets
      • Asset Builder
      • Bundled Assets
        • Importing Multiple Images as One Multi-Page Asset
        • Importing Multiple Single-Frame DICOM Files as One Multi-Page Asset
        • Importing multiple DICOM files to be annotated and displayed at once
        • Importing Multiple Single-Frame DICOM Files as a DICOM Series
        • Importing Multiple Markdown Files as One Multi-Page Asset
      • File Explorer
      • Supported Asset File Types & Codecs
      • Importing Cloud (Remote) Assets
      • Importing From Local Machine
      • Creating and Importing LLM Chat Assets
      • Importing Data in the 3D Multi-Sensor Fusion Labeling Tool
      • Bulk Importing Markdown/HTML Assets
      • Importing Attachments during Asset Import
      • Importing Annotations during Asset Import
      • contextData: Adding Extra Data to Assets
      • Importing Reference Images as Overlay
      • Importing Reference Medical Data During Asset Import
    • Importing and Exporting Annotations
      • Importing Annotations
        • Ango Import Format
        • Importing Brush Traces
        • Importing NRRD Annotations
      • Exporting Annotations
        • Ango Export Format
          • Asset
            • Task
              • Tools
              • Classifications
              • Relations
          • Stage History
    • Adding and Managing LLMs
    • Storages
      • Set up a storage integration with Azure
      • Set up a storage integration with AWS S3
      • Set up a storage integration with MinIO and S3-compatible custom storage services
      • Set up a storage integration with GCP (Google Cloud Platform)
      • Set up CORS
      • Validating Storage Integrations
    • Purging Data from Ango Hub
  • Plugins
    • Overview of Plugins in Ango Hub
      • Installing Plugins
      • Plugin Setting Presets
      • Monitoring Plugin Progress
    • First-Party Plugins
      • Ango Export Converter Plugins
      • Asset Converter Plugins
      • Ango to Mask Converter
      • Batch Assignment
      • ChatGPT
      • Column-Agnostic Markdown Generator
      • CSV Export for Classification
      • DALL-E
      • DALL-E (Model Plugin)
      • File Explorer Plugin
      • General Object Detector
      • General Object Segmenter
      • Markdown Generator
      • One-Click Segmentation
      • Open World Object Detection
      • Optical Character Recognition
      • TPT Export
      • YOLO | Instance Segmentation
      • YOLO | Pose Estimation
      • YOLO | Object Detection
      • YOLO | Image Classification
    • Plugin Developer Documentation
      • Export Plugins
      • Batch Model Plugins
      • Model Plugins
      • File Explorer Plugins
      • Markdown Generator Plugins
      • Plugin Logger
      • [WIP] Deploying your Plugin
      • Plugin 'Host' Information
  • SDK
    • SDK Documentation
      • Project Level SDK Functions
        • add_members_to_project
        • assign_batches
        • assign_task
        • create_attachment
        • create_batch
        • create_issue
        • create_label_set
        • create_project
        • delete_issue
        • export
        • exportV3
        • get_assets
        • get_batches
        • get_issues
        • get_metrics
        • get_project
        • get_project_performance
        • get_task
        • get_tasks
        • get_task_history
        • import_labels
        • list_projects
        • requeue_tasks
        • rerun_webhook
        • update_workflow_stages
        • upload_files
        • upload_files_cloud
        • upload_files_with_asset_builder
        • upload_chat_assets
      • Organization Level SDK Functions
        • create_storage
        • delete_organization_invites
        • delete_organization_members
        • delete_storage
        • get_organization_invites
        • get_organization_members
        • get_storages
        • invite_members_to_org
        • update_organization_members_role
    • SDK - Useful Snippets
    • SDK Changelog
  • API
    • API Documentation
  • How-To
    • Add Members
      • Add multiple users to a project
    • Annotate
      • Annotate 3D Point Cloud Files on Ango Hub
      • Perform targeted OCR on images
    • Export Data
      • Automatically send Ango Hub Webhook contents to Google Sheets, Email, Slack, and more with Zapier
      • Download a JSON of your project ontology
      • Download DICOM Segmentation Masks
      • Download your annotations in the COCO, KITTI, or YOLO format
      • Download your Segmentation Masks
      • Get your export as separate JSON files for each asset
    • Manage a Project
      • Get your API Key
      • Get your Organization ID
      • Mute your notifications
      • Open an asset provided the Asset ID
      • Pre-label assets
      • Share a filtered view of the Tasks table with others
      • Transfer project ontologies between projects
      • Transfer project workflows between projects
    • Perform Model Evaluation on Ango Hub
  • Troubleshooting
    • I get a "0 Tasks Labeled" alert when trying to pre-label tasks
    • I get a 'The data couldn't be loaded properly' error when opening certain assets
    • I get a "Unknown Classification" warning when opening a task
  • Feature Availability Status for projects of the 3D Multi-Sensor Fusion type
  • Comparison between QuickServe and Ango Hub
  • Changes from Ango Hub Legacy
  • Video V2 Breaking Changes and Transition
  • Data Access, Storage, and Security
  • Two-Factor Authentication
  • Single Sign-On (SSO) Support
  • Customer Support
  • Ango Hub Status Page
Powered by GitBook
On this page
  • How to Import NRRD Segmentations
  • Prepare the project ontology
  • Prepare the JSON
  • Upload the JSON
  1. Data
  2. Importing and Exporting Annotations
  3. Importing Annotations

Importing NRRD Annotations

PreviousImporting Brush TracesNextExporting Annotations

Last updated 8 months ago

If you have access to the , you may import existing segmentations in the NRRD format, created, for example, using 3D Slicer.

How to Import NRRD Segmentations

Prepare the project ontology

In short, to match the segmentation classes in your NRRD with the segmentation classes on Hub, you'll have to make sure that the schemaId of the class on Hub matches the SegmentX_LabelValue value in the header of the NRRD file.

For example, imagine the NRRD segmentation you wish to import has one segmentation class, and you wish for this class to be paired with a class on Ango Hub. This is how you would go about it:

  1. Open the Segmentation NRRD you wish to import into Ango Hub with a text editor. The first few lines (e.g. the file header) will likely look something like this:

[more ...]
space origin: (100.331,-86.50509999999997,88.181799999999967)
Segment0_Color:=0.501961 0.682353 0.501961
Segment0_ColorAutoGenerated:=1
Segment0_Extent:=40 207 13 235 0 90
Segment0_ID:=Segment_1
Segment0_LabelValue:=1
Segment0_Layer:=0
Segment0_Name:=Segment_1
Segment0_NameAutoGenerated:=1
Segment0_Tags:=Segmentation.Status:inprogress|TerminologyEntry:Segmentation category and type - 3D Slicer General Anatomy list~SCT^85756007^Tissue~SCT^85756007^Tissue~^^~Anatomic codes - DICOM master list~^^~^^|
[... more]
  1. Each segmentation class in the NRRD is represented by metadata starting with the prefix SegmentX, where X is an index starting from 0. All metadata pertaining to a class will have the same index. What we care about is the SegmentX_LabelValue value. In this case, since there is only one segmentation, its index will be 0, so we will look at Segment0_LabelValue only. In our case, this value is 1. We'll take note of that.

  2. In the project where you'd like to import the NRRD segmentation, go to the Settings tab, then to the Category Schema section. Create a new Medical Brush tool. By default, schema IDs for Medical Brush tools start at 1, so in this case, since the schema ID matches the number we took note of earlier, there would be no need to change the schema ID.

  3. If we did need to change the schema ID, then we would click on the Show JSON button (1) and change the ID from the JSON that appears to match SegmentX_LabelValue's value.

  1. Save your category schema by clicking on Save at the bottom of the page.

Prepare the JSON

  1. Create a JSON with this format:

For Segmentations with Publicly Accessible URLs

[
  {
    "data": "https://my-bucket.com/asset.nrrd",
    "externalId": "asset_external_id",
    "medicalBrushDataUrl": "https://medical.url/sample-segmentation.nrrd"
  },
  {
    "data": "https://my-bucket.com/asset.nrrd",
    "externalId": "asset_external_id",
    "medicalBrushDataUrl": "https://medical.url/sample-segmentation.nrrd"
  }
]

Where externalId is the external ID of the asset to pre-annotate, and medicalBrushDataUrl is a link to your publicly-accessible NRRD segmentation mask.

If your segmentations are stored in a cloud storage service, ensure the bucket's CORS settings are set properly, or they will not be visible on Hub.

For Segmentations in Private Buckets

  • Navigate to your organization's Organization page, then navigate to the Storages tab.

  • Copy the ID of the storage where your brush traces are stored.

  • Prepare a JSON with the following format:

[
  {
    "data": "https://my-bucket.com/asset.nrrd",
    "externalId": "asset_external_id",
    "medicalBrushDataUrl": "https://medical.url/sample-segmentation.nrrd?storageId=YOUR_STORAGE_ID"
  },
  {
    "data": "https://my-bucket.com/asset.nrrd",
    "externalId": "asset_external_id",
    "medicalBrushDataUrl": "https://medical.url/sample-segmentation.nrrd?storageId=YOUR_STORAGE_ID"
  }
]

The JSON will be a list of objects, where each object represents an asset-segmentation pair. The data and externalId fields are used by Hub to understand to which asset the prelabels will be imported. You do not need to provide both, either of them is enough.

Upload the JSON

  1. From your project's dashboard, enter the Assets tab, then click on Import. A dialog will pop up.

  1. Drag and drop the JSON you created earlier on the box. Your assets will be prelabeled.

on how to set up CORS in such a way that your masks will be visible.

Integrate your private bucket with Ango Hub by following the instructions in the docs page.

New Medical Labeling Editor
Here is a guide
Storages