本文整理匯總了TypeScript中neuroglancer/sliceview/compressed_segmentation/decode_uint32.readSingleChannelValue函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript readSingleChannelValue函數的具體用法?TypeScript readSingleChannelValue怎麽用?TypeScript readSingleChannelValue使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了readSingleChannelValue函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: getValueAt
getValueAt(dataPosition: Vec3): Uint64|number {
let {chunkDataSize, chunkFormat} = this;
if (chunkFormat.dataType === DataType.UINT64) {
let result = new Uint64();
return readSingleChannelValueUint64(
result, this.data, /*baseOffset=*/0, chunkDataSize, chunkFormat.subchunkSize,
dataPosition);
} else {
return readSingleChannelValueUint32(
this.data, /*baseOffset=*/0, chunkDataSize, chunkFormat.subchunkSize, dataPosition);
}
}
示例2: getChannelValueAt
getChannelValueAt(dataPosition: Vec3, channel: number): Uint64|number {
let {chunkDataSize, chunkFormat} = this;
let {data} = this;
let offset = data[channel];
if (chunkFormat.dataType === DataType.UINT64) {
let result = new Uint64();
readSingleChannelValueUint64(
result, data, /*baseOffset=*/offset, chunkDataSize, chunkFormat.subchunkSize,
dataPosition);
return result;
} else {
return readSingleChannelValueUint32(
data, /*baseOffset=*/offset, chunkDataSize, chunkFormat.subchunkSize, dataPosition);
}
}