dvid: github.com/janelia-flyem/dvid/datatype/common/downres Index | Files

package downres

import "github.com/janelia-flyem/dvid/datatype/common/downres"

Package downres provides a system for computing multi-scale 3d arrays given mutations. Two workflows are provided: (1) mutation-based with on-the-fly downres operations activated by the end of a mutation, and (2) larger ingestions where it is not possible to retain all changed data in memory. #2 is TODO.

Index

Package Files

downres.go

func BlockOnUpdating Uses

func BlockOnUpdating(uuid dvid.UUID, name dvid.InstanceName) error

BlockOnUpdating blocks until the given data is not updating from any normal updates or also downres operations. Primarily used during testing.

type BlockMap Uses

type BlockMap map[dvid.IZYXString]interface{}

type Downreser Uses

type Downreser interface {
    Updater

    DataName() dvid.InstanceName
    GetMaxDownresLevel() uint8

    // StoreDownres computes and stores the down-res for the given blocks, returning
    // the computed down-res blocks at 1/2 resolution.
    StoreDownres(v dvid.VersionID, hiresScale uint8, hires BlockMap) (BlockMap, error)
}

type Mutation Uses

type Mutation struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

Mutation is a stash of changes that will be handled in down-resolution scaling.

func NewMutation Uses

func NewMutation(d Downreser, v dvid.VersionID, mutID uint64) *Mutation

NewMutation returns a new Mutation for stashing changes.

func (*Mutation) BlockMutated Uses

func (m *Mutation) BlockMutated(bcoord dvid.IZYXString, block interface{}) error

BlockMutated caches mutations at the highest resolution (scale 0)

func (*Mutation) Execute Uses

func (m *Mutation) Execute() error

Execute computes lower-res scales for all altered blocks in a mutation.

func (*Mutation) MutationID Uses

func (m *Mutation) MutationID() uint64

MutationID returns the mutation ID associated with this mutation.

type Updater Uses

type Updater interface {
    StartScaleUpdate(scale uint8)
    StopScaleUpdate(scale uint8)
    ScaleUpdating(scale uint8) bool
    AnyScaleUpdating() bool
}

Package downres imports 5 packages (graph) and is imported by 4 packages. Updated 2018-07-24. Refresh now. Tools for package owners.