Documentation
¶
Overview ¶
Package labels64 tailors the voxels data type for 64-bit labels and allows loading of NRGBA images (e.g., Raveler superpixel PNG images) that implicitly use slice Z as part of the label index.
Index ¶
- Constants
- func RavelerSuperpixelBytes(slice, superpixel32 uint32) []byte
- type Data
- func (d *Data) CreateComposite(request datastore.Request, reply *datastore.Response) error
- func (d *Data) CreateCompositeChunk(chunk *storage.Chunk)
- func (d *Data) DenormalizeChunk(chunk *storage.Chunk)
- func (d *Data) DoHTTP(uuid dvid.UUID, w http.ResponseWriter, r *http.Request) error
- func (d *Data) DoRPC(request datastore.Request, reply *datastore.Response) error
- func (d *Data) GetLabelAtPoint(uuid dvid.UUID, pt dvid.Point) (uint64, error)
- func (d *Data) GetSparseVol(uuid dvid.UUID, label uint64) ([]byte, error)
- func (d *Data) GetSurface(uuid dvid.UUID, label uint64) (s []byte, found bool, err error)
- func (d *Data) JSONString() (string, error)
- func (d *Data) NewExtHandler(geom dvid.Geometry, img interface{}) (voxels.ExtHandler, error)
- func (d *Data) ProcessSpatially(uuid dvid.UUID)
- type Datatype
- type LabelType
- type Labels
Constants ¶
const ( Version = "0.1" RepoUrl = "github.com/janelia-flyem/dvid/datatype/labels64" )
const HelpMessage = `` /* 8077-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func RavelerSuperpixelBytes ¶
Types ¶
type Data ¶
Data of labels64 type just uses voxels.Data.
func GetByLocalID ¶
func GetByLocalID(id dvid.DatasetLocalID, name dvid.DataString) (*Data, error)
GetByLocalID returns a pointer to labels64 data given a local dataset ID and data name.
func (*Data) CreateComposite ¶
CreateComposite creates a new rgba8 image by combining hash of labels + the grayscale
func (*Data) CreateCompositeChunk ¶
CreateCompositeChunk processes each chunk of labels and grayscale data, saving the composited result into an rgba8. Only some multiple of the # of CPU cores can be used for chunk handling before it waits for chunk processing to abate via the buffered server.HandlerToken channel.
func (*Data) DenormalizeChunk ¶
DenormalizeChunk processes a chunk of data as part of a mapped operation. Only some multiple of the # of CPU cores can be used for chunk handling before it waits for chunk processing to abate via the buffered server.HandlerToken channel.
func (*Data) GetLabelAtPoint ¶
GetLabelAtPoint returns a mapped label for a given point.
func (*Data) GetSparseVol ¶
GetSparseVol returns an encoded sparse volume given a label. The encoding has the following format where integers are little endian:
byte Payload descriptor: Bit 0 (LSB) - 8-bit grayscale Bit 1 - 16-bit grayscale Bit 2 - 16-bit normal ... uint8 Number of dimensions uint8 Dimension of run (typically 0 = X) byte Reserved (to be used later) uint32 # Voxels uint32 # Spans Repeating unit of: int32 Coordinate of run start (dimension 0) int32 Coordinate of run start (dimension 1) int32 Coordinate of run start (dimension 2) ... int32 Length of run bytes Optional payload dependent on first byte descriptor
func (*Data) GetSurface ¶
GetSurface returns a gzipped byte array with # voxels and float32 arrays for vertices and normals.
func (*Data) JSONString ¶
JSONString returns the JSON for this Data's configuration
func (*Data) NewExtHandler ¶
NewExtHandler returns a labels64 ExtHandler given some geometry and optional image data. If img is passed in, the function will initialize the ExtHandler with data from the image. Otherwise, it will allocate a zero buffer of appropriate size. Unlike the standard voxels NewExtHandler, the labels64 version will modify the labels based on the z-coordinate of the given geometry.
func (*Data) ProcessSpatially ¶
Iterate through all blocks in the associated label volume, computing the spatial indices for bodies and the mappings for each spatial index.
type Datatype ¶
Datatype just uses voxels data type by composition.