Coordinate transform API endpoint

Named, versioned mapping from a BrainSTEM coordinate type to an atlas.

Table of contents

  1. Endpoints
  2. Fields
  3. List
  4. Detail
  5. Writing
  6. Data model

Endpoints

  • Private portal: https://www.brainstem.org/api/private/taxonomies/coordinatetransform/ (needs a token; one record: append <id>/)
  • Public portal: https://www.brainstem.org/api/public/taxonomies/coordinatetransform/ (read-only, public projects, no token)
  • Response keys: coordinate_transform (detail, create, update), coordinate_transforms (list)
  • Permissions: see the permissions page
  • Uniqueness: code unique across BrainSTEM
  • Deleting: refused (400) while procedure records point to it

Fields

[required] fields must be sent on create; [read-only] fields are returned but cannot be set. A nestable relation can be traversed in filters (filter{field.other}) and sideloaded with include[]=field.*; other relations can only be compared with ids (filter{field}=<id>). See the query syntax.

FieldDescription
idUUID string [read-only]
codestring [read-only]
namestring [read-only]
versionstring [read-only]
source_coordinate_systemchoice (see the list below) [read-only]
anatomical_referenceanatomicalreference id [read-only]
mapping_kindone of identity, affine_4x4, stereotaxic_surface [read-only]
qualityone of exact, estimated [read-only]
method_descriptionstring [read-only]
provenance_urlstring [read-only]
citationstring [read-only]
warningstring [read-only]
implementation_versionnumber [read-only]
is_activeboolean [read-only]
  • source_coordinate_system choices: External_XYZ_Euler, External_XYZ_Quaternion, Stereotaxic_BregmaAbsolute, Stereotaxic_BregmaBrainSurface, Stereotaxic_LambdaAbsolute, Stereotaxic_LambdaBrainSurface, Landmark_APMLDV_Absolute, Landmark_APML_SurfaceDepth, Spinal_RCMLDV_Absolute, Spinal_RCML_SurfaceDepth, CCF_XYZ_Absolute, WHS_XYZ_Absolute, MNI152_XYZ_Absolute, NMT_XYZ_Absolute, MapZebrain_XYZ_Absolute, JRC2018U_XYZ_Absolute, BMA_XYZ_Absolute

List

  • Allowed portals: private, public
  • Request method: GET
  • URL: https://www.brainstem.org/api/private/taxonomies/coordinatetransform/
  • Responses: 200 OK; 401 Not authenticated; 403 Not allowed

Use example (Python API tool)

resp = client.load('coordinatetransform', load_all=True)
records = resp['coordinate_transforms']

Use example (MATLAB API tool)

resp = client.load('coordinatetransform', 'load_all', true);
records = resp.coordinate_transforms;

Response example

{
    "coordinate_transforms": [
        {
            "id": "<id>",
            "code": "",
            "name": "Coordinate transform 1",
            "version": "",
            "source_coordinate_system": "External_XYZ_Euler",
            "anatomical_reference": "<anatomicalreference-id>",
            "mapping_kind": "identity",
            "quality": "exact",
            "method_description": "",
            "provenance_url": "",
            "citation": "",
            "warning": "",
            "implementation_version": 1,
            "is_active": true
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 100,
        "total_results": 1,
        "total_pages": 1
    }
}

Detail

  • Allowed portals: private, public
  • Request method: GET
  • URL: https://www.brainstem.org/api/private/taxonomies/coordinatetransform/<id>/
  • Responses: 200 OK; 403 Not allowed; 404 Not found

Use example (Python API tool)

resp = client.load('coordinatetransform', id='<id>')
record = resp.json()['coordinate_transform']

Use example (MATLAB API tool)

out = client.load('coordinatetransform', 'id', '<id>');
record = out.coordinate_transform;

Response example

{
    "coordinate_transform": {
        "id": "<id>",
        "code": "",
        "name": "Coordinate transform 1",
        "version": "",
        "source_coordinate_system": "External_XYZ_Euler",
        "anatomical_reference": "<anatomicalreference-id>",
        "mapping_kind": "identity",
        "quality": "exact",
        "method_description": "",
        "provenance_url": "",
        "citation": "",
        "warning": "",
        "implementation_version": 1,
        "is_active": true
    }
}

Writing

This resource is maintained by BrainSTEM administrators or system processes and is read-only through the REST API.

Data model

The fields are described for the web forms on the Coordinate transform data model page.