File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData';
55import { Vector3 } from '@kitware/vtk.js/types' ;
66import { mat3 , vec3 } from 'gl-matrix' ;
77import vtkDataArray from '@kitware/vtk.js/Common/Core/DataArray' ;
8- import { vtkWarningMacro } from '@kitware/vtk.js/macros' ;
98
109const ImagePositionPatientTag = NAME_TO_TAG . get ( 'ImagePositionPatient' ) ! ;
1110const ImageOrientationPatientTag = NAME_TO_TAG . get ( 'ImageOrientationPatient' ) ! ;
@@ -90,10 +89,13 @@ export function allocateImageFromChunks(sortedChunks: Chunk[]) {
9089 ? Number ( meta . get ( NumberOfFrames ) )
9190 : null ;
9291
93- // If we have NumberOfFrames, chances are it's a multi-frame DICOM.
94- if ( numberOfFrames !== null && sortedChunks . length > 1 ) {
95- vtkWarningMacro (
96- 'Found a multi-frame chunk in a group of chunks of size > 1'
92+ if (
93+ numberOfFrames !== null &&
94+ numberOfFrames > 1 &&
95+ sortedChunks . length > 1
96+ ) {
97+ throw new Error (
98+ 'First chunk in a group of chunks (size > 1) is a multi-frame chunk'
9799 ) ;
98100 }
99101
You can’t perform that action at this time.
0 commit comments