本文整理汇总了Golang中github.com/janelia-flyem/dvid/dvid.IndexZYX.MinPoint方法的典型用法代码示例。如果您正苦于以下问题:Golang IndexZYX.MinPoint方法的具体用法?Golang IndexZYX.MinPoint怎么用?Golang IndexZYX.MinPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/janelia-flyem/dvid/dvid.IndexZYX
的用法示例。
在下文中一共展示了IndexZYX.MinPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: ComputeTransform
// ComputeTransform determines the block coordinate and beginning + ending voxel points
// for the data corresponding to the given Block.
func (v *Voxels) ComputeTransform(block *storage.TKeyValue, blockSize dvid.Point) (blockBeg, dataBeg, dataEnd dvid.Point, err error) {
var ptIndex *dvid.IndexZYX
ptIndex, err = DecodeTKey(block.K)
if err != nil {
return
}
// Get the bounding voxel coordinates for this block.
minBlockVoxel := ptIndex.MinPoint(blockSize)
maxBlockVoxel := ptIndex.MaxPoint(blockSize)
// Compute the boundary voxel coordinates for the ExtData and adjust
// to our block bounds.
minDataVoxel := v.StartPoint()
maxDataVoxel := v.EndPoint()
begVolCoord, _ := minDataVoxel.Max(minBlockVoxel)
endVolCoord, _ := maxDataVoxel.Min(maxBlockVoxel)
// Adjust the DVID volume voxel coordinates for the data so that (0,0,0)
// is where we expect this slice/subvolume's data to begin.
dataBeg = begVolCoord.Sub(v.StartPoint())
dataEnd = endVolCoord.Sub(v.StartPoint())
// Compute block coord matching dataBeg
blockBeg = begVolCoord.Sub(minBlockVoxel)
return
}