// GetVolume retrieves a n-d volume from a version node given a geometry of labels. func (d *Data) GetVolume(v dvid.VersionID, vox *Labels, roiname dvid.InstanceName) ([]byte, error) { r, err := imageblk.GetROI(v, roiname, vox) if err != nil { return nil, err } if err := d.GetLabels(v, vox, r); err != nil { return nil, err } return vox.Data(), nil }
// GetImage retrieves a 2d image from a version node given a geometry of labels. func (d *Data) GetImage(v dvid.VersionID, vox *Labels, roiname dvid.InstanceName) (*dvid.Image, error) { r, err := imageblk.GetROI(v, roiname, vox) if err != nil { return nil, err } if err := d.GetLabels(v, vox, r); err != nil { return nil, err } return vox.GetImage2d() }