-
Notifications
You must be signed in to change notification settings - Fork 15
Boss Reserve Ids Tutorial
Tim Gion edited this page Jan 25, 2017
·
2 revisions
Before writing ids to an annotation channel, ids may be reserved to ensure that
unique ids are used. The Boss provides a reserve_ids()
method to enable
this.
The example below assumes the resources created in the [Boss Project Setup](https://github.com/jhuapl-boss/intern/wiki/Boss Project Setup Tutorial) tutorial exist.
The Boss does not check if non-reserved ids are used. Thus, if you use the reserve id feature, then you should use it for consistently for all ids that are written to an annotation channel. If you only use it some of the time, you will most likely cause problems for yourself.
from intern.remote.boss import BossRemote
from intern.resource.boss.resource import *
rmt = BossRemote()
ann_chan = ChannelResource(
'Algorithm1', 'JHUAPL', 'Mouse17', 'annotation')
# Reserve a block of 30 ids. The first id of the block of 30 is returned.
first_id = rmt.reserve_ids(ann_chan, 30)
Table of Contents:
- Overview
- Installation
- Get started
- Boss
- Boss Bounding Box Tutorial
- Boss Download Cutout Tutorial
- Boss Examples
- Boss Ids in Region Tutorial
- Boss Project Auth Tutorial
- Boss Project Metadata Tutorial
- Boss Project Setup Tutorial
- Boss Reserve Ids Tutorial
- Boss Setup Tutorial
- Boss Tutorials
- Boss Upload Cutout Tutorial
- Boss User Management Tutorial
- Dvid
- HDF5