Good Morning all
Thanks for a great DICOM viewer.
Ive noticed that if you export reformats to DICOM file, and then load these reformats into a different viewer (say MicroDicom), they often appear somewhat squishy.
It turns out that Weasis uses asymmetric pixel spacing for he reformat, something that no doubt saves on math, but sadly not many DICOM viewers support asymmetric pixel spacing's properly and hence render the Weasis generated reformat using the incorrect smaller pixel spacing dimension.
As luck will have it the ImageProcessor class has a wonderful scale function that can actually provide the needed scaling to generate reformats that have square pixel spacings.
By adding a short scaling spiel just above line 353 in weasis-dicom-viewer2d/src/main/java/org/weasis/dicom/viewer2d/mpr/SeriesBuilder.java
newSeries[i].write(ImageProcessor.scale(newSeries[i].read(), new Dimension(dim.height,dim.width), Imgproc.INTER_LINEAR)); // provide interpolation such that pixel dimension can be square
newSeries[i].write(ImageProcessor.getRotatedImage(newSeries[i].read(), Core.ROTATE_90_CLOCKWISE));
You need to tweak a few other things in the SeriesBuilder.java file, (see attached SeriesBuilder.java file from Weasis 3.0.2;) to get this working. But Ive been able to successfully export reformats and use them in other DICOM software with this change.
Hope it proves useful to you all.
Logi