tarsupervoxels

package
v0.8.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2018 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package tarsupervoxels implements DVID support for data blobs associated with supervoxels.

Index

Constants

View Source
const (
	Version  = "0.1"
	RepoURL  = "github.com/janelia-flyem/dvid/datatype/tarsupervoxels"
	TypeName = "tarsupervoxels"
)

Variables

This section is empty.

Functions

func DecodeTKey

func DecodeTKey(tk storage.TKey) (supervoxel uint64, ext string, err error)

DecodeTKey returns the supervoxel id corresponding to the type-specific ke.y

func NewTKey

func NewTKey(supervoxel uint64, ext string) (storage.TKey, error)

NewTKey returns the type-specific key corresponding to a supervoxel id in simple ASCII bytes.

Types

type Data

type Data struct {
	*datastore.Data

	// Extension is the expected extension for blobs uploaded.
	// If no extension is given, it is "dat" by default.
	Extension string
}

Data embeds the datastore's Data and extends it with keyvalue properties (none for now).

func GetByUUIDName

func GetByUUIDName(uuid dvid.UUID, name dvid.InstanceName) (*Data, error)

GetByUUIDName returns a pointer to tarsupervoxels data given a UUID and data name.

func (*Data) DeleteData

func (d *Data) DeleteData(uuid dvid.UUID, supervoxel uint64) error

DeleteData deletes upervoxel data

func (*Data) DoRPC

func (d *Data) DoRPC(request datastore.Request, reply *datastore.Response) error

DoRPC acts as a switchboard for RPC commands.

func (*Data) Equals

func (d *Data) Equals(d2 *Data) bool

func (*Data) GetData

func (d *Data) GetData(uuid dvid.UUID, supervoxel uint64) ([]byte, bool, error)

GetData gets data for a supervoxel where the returned bool is true if data is found

func (*Data) GetSyncSubs

func (d *Data) GetSyncSubs(synced dvid.Data) (datastore.SyncSubs, error)

GetSyncSubs implements the datastore.Syncer interface, but tarsupervoxels doesn't need to process events.

func (*Data) GobDecode

func (d *Data) GobDecode(b []byte) error

func (*Data) GobEncode

func (d *Data) GobEncode() ([]byte, error)

func (*Data) Help

func (d *Data) Help() string

func (*Data) JSONString

func (d *Data) JSONString() (jsonStr string, err error)

JSONString returns the JSON for this Data's configuration

func (*Data) MarshalJSON

func (d *Data) MarshalJSON() ([]byte, error)

func (*Data) PutData

func (d *Data) PutData(uuid dvid.UUID, supervoxel uint64, data []byte) error

PutData puts supervoxel data

func (*Data) ServeHTTP

func (d *Data) ServeHTTP(uuid dvid.UUID, ctx *datastore.VersionedCtx, w http.ResponseWriter, r *http.Request)

ServeHTTP handles all incoming HTTP requests for this data.

type Type

type Type struct {
	datastore.Type
}

Type embeds the datastore's Type to create a unique type for keyvalue functions.

func NewType

func NewType() *Type

NewType returns a pointer to a new keyvalue Type with default values set.

func (*Type) Help

func (dtype *Type) Help() string

func (*Type) NewDataService

func (dtype *Type) NewDataService(uuid dvid.UUID, id dvid.InstanceID, name dvid.InstanceName, c dvid.Config) (datastore.DataService, error)

NewDataService returns a pointer to new keyvalue data with default values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL