You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have a large (>3Gb) UltrasoundMultiFrameImageStorage dicom file, containing over 2000 image frames.
When i try to retrieve the BufferedImages for the first ~1000 frames it's working fine but for larger frame numbers an exception is thrown:
java.lang.IndexOutOfBoundsException: pos < flushedPos!
at java.desktop/javax.imageio.stream.FileImageInputStream.seek(FileImageInputStream.java:143)
at org.dcm4che3.imageio.plugins.dcm.DicomImageReader.readRaster(DicomImageReader.java:395)
at org.dcm4che3.imageio.plugins.dcm.DicomImageReader.read(DicomImageReader.java:465)
I think the problematic line in this case is in DicomImageReader class the method readRaster:
iis.seek(pixelData.offset() + frameIndex * frameLength);
In my case:
frameIndex = 1492
frameLength = 1440000
The multiply will cause an integer owerflow add the position will be negative.
The text was updated successfully, but these errors were encountered:
Hi,
I have a large (>3Gb) UltrasoundMultiFrameImageStorage dicom file, containing over 2000 image frames.
When i try to retrieve the BufferedImages for the first ~1000 frames it's working fine but for larger frame numbers an exception is thrown:
java.lang.IndexOutOfBoundsException: pos < flushedPos!
at java.desktop/javax.imageio.stream.FileImageInputStream.seek(FileImageInputStream.java:143)
at org.dcm4che3.imageio.plugins.dcm.DicomImageReader.readRaster(DicomImageReader.java:395)
at org.dcm4che3.imageio.plugins.dcm.DicomImageReader.read(DicomImageReader.java:465)
I think the problematic line in this case is in DicomImageReader class the method readRaster:
iis.seek(pixelData.offset() + frameIndex * frameLength);
In my case:
frameIndex = 1492
frameLength = 1440000
The multiply will cause an integer owerflow add the position will be negative.
The text was updated successfully, but these errors were encountered: