Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 101x 101x 101x | import { vec3 } from 'gl-matrix'; /** * Calculates the scanAxisNormal based on a image orientation vector extract from a frame * @param {*} imageOrientation * @returns */ export default function calculateScanAxisNormal(imageOrientation) { const rowCosineVec = vec3.fromValues( imageOrientation[0], imageOrientation[1], imageOrientation[2] ); const colCosineVec = vec3.fromValues( imageOrientation[3], imageOrientation[4], imageOrientation[5] ); return vec3.cross(vec3.create(), rowCosineVec, colCosineVec); } |