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 22 23 24 25 26 27 28 29 | 568x 568x 568x 1414x 1414x 1412x 568x | import type { Types } from '@cornerstonejs/core'; /** * Given an array of viewports, returns a list of viewports that are viewing a * world space with the given `FrameOfReferenceUID`. * * @param viewports - An array of viewports. * @param FrameOfReferenceUID - The UID defining a particular world space/Frame Of Reference. * * @returns A filtered array of viewports. */ export default function filterViewportsWithFrameOfReferenceUID( viewports: Array<Types.IViewport>, FrameOfReferenceUID: string ): Array<Types.IStackViewport | Types.IVolumeViewport> { const numViewports = viewports.length; const viewportsWithFrameOfReferenceUID = []; for (let vp = 0; vp < numViewports; vp++) { const viewport = viewports[vp]; if (viewport.getFrameOfReferenceUID() === FrameOfReferenceUID) { viewportsWithFrameOfReferenceUID.push(viewport); } } return viewportsWithFrameOfReferenceUID; } |