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
java.lang.IllegalArgumentException: w and h must be > 0
at java.desktop/java.awt.image.Raster.createInterleavedRaster(Raster.java:214)
at java.desktop/java.awt.image.ComponentColorModel.createCompatibleWritableRaster(ComponentColorModel.java:2827)
at weasis.core.img@4.8.1/org.weasis.opencv.op.ImageConversion.toBufferedImage(ImageConversion.java:76)
at weasis.core.img@4.8.1/org.weasis.opencv.op.ImageConversion.toBufferedImage(ImageConversion.java:120)
at dcm4che.imageio.opencv@5.31.2/org.dcm4che3.opencv.NativeImageReader.read(NativeImageReader.java:252)
at dcm4che.imageio@5.31.2/org.dcm4che3.imageio.plugins.dcm.DicomImageReader.readRaster(DicomImageReader.java:375)
To Reproduce
String filepath = "path to file";
try (DicomInputStream dis = new DicomInputStream(new File(filepath))) {
try (ImageInputStream iis = ImageIO.createImageInputStream(dis)) {
this.reader.setInput(iis, true);
ImageReadParam param = this.reader.getDefaultReadParam();
Raster raster = this.reader.readRaster(0, param); //error here
int[] pixels = raster.getPixels(0, 0, raster.getWidth(), raster.getHeight(), (int[]) null);
int pixelIndex = 0;
for (int x = 0; x < this.frameSetVolume.width; x++) {
for (int y = 0; y < this.frameSetVolume.height; y++) {
//does something with pixeldata
pixelIndex += 3;
}
}
}
} catch (IOException e) {
throw new RuntimeException(e);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Describe the bug
error:
To Reproduce
Expected behavior
read compressed pixelData
i was unable to link file here:
https://wetransfer.com/downloads/9ab5f66922b7b18acbefc437b6eb4be720240319202957/69f1f4e7dceccd8c4f85b5f8d7cf20ad20240319203032/129f57?trk=TRN_TDL_01&utm_campaign=TRN_TDL_01&utm_medium=email&utm_source=sendgrid
or
https://drive.google.com/file/d/14Kb-9p6ZxcDCkIpBVrx95b0-DbMogN1K/view?usp=drive_link
The text was updated successfully, but these errors were encountered: