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 | 4046x 4046x 4046x 4046x 4046x 10080x 4046x 4046x | import type { IVolumeViewport } from '../types'; import { getRenderingEngines } from '../RenderingEngine/getRenderingEngine'; /** * Retrieves viewports containing a specific volume ID. * * @param volumeId - The ID of the volume to search for within viewports. * @returns An array of volume viewports that contain the specified volume ID. */ function getViewportsWithVolumeId(volumeId: string): IVolumeViewport[] { // If rendering engine is not provided, use all rendering engines const renderingEngines = getRenderingEngines(); const targetViewports: IVolumeViewport[] = []; renderingEngines.forEach((renderingEngine) => { const viewports = renderingEngine.getVolumeViewports(); const filteredViewports = viewports.filter((vp) => vp.hasVolumeId(volumeId) ); targetViewports.push(...filteredViewports); }); return targetViewports; } export default getViewportsWithVolumeId; |