horosproject / horos

Horos™ is a free, open source medical image viewer. The goal of the Horos Project is to develop a fully functional, 64-bit medical image viewer for OS X. Horos is based upon OsiriX and other open source medical imaging libraries. Horos is made freely available under the GNU Lesser General Public License, Version 3 (LGPL-3.0). Horos is linked against the Grok JPEG 2000 library, for fast viewing of JPEG 2000 images. This library is licensed under the terms of the GNU Affero General Public License.
http://www.horosproject.org
Other
478 stars 145 forks source link

Interpolation issues #376

Open DanielVH1 opened 6 years ago

DanielVH1 commented 6 years ago

Hi

I have noticed that the interpolation method used in Horos is different from that of other DICOM workstations. It results in noisy images where individual pixels still can be seen, even with the "High Quality Zoom (Lanczos 5)" option.

This may not be an issue with grayscale and large matrices, like in CR, CT or MRI. However, it becomes evident in NM and PET images, which use 256 x 256 or even smaller matrices. And it gets worse when using multiple color CLUTs, which are very useful in nuclear medicine.

Here is an example of this issue in an axial slice of a brain FDG-PET study. The first image was captured from Horos (v3.1.2) using Lanczos 5. The second image was captured from Philips IntelliSpace, a Windows-based radiology and nuclear medicine workstation. Both are from the same slice of the same study, using the same CLUT and WL/WW settings as shown at the right side of each image.

brain fdg-pet horos

brain fdg-pet intellispace

There are many other nuclear medicine workstations that use the same interpolation as IntelliSpace: Mirage (Segami), Xeleris (GE), Syngo (Siemens), etc. I'm not sure, but I believe this interpolation method relies on edge smoothing, keeping the original values, while Horos interpolates values between pixels.

Is it possible to achieve this kind of smooth interpolation in Horos without compromising scrolling frame rate? This would make Horos a lot more friendly for nuclear medicine users like me.

Thanks,

Daniel.

brizolara commented 6 years ago

Hi Daniel!

I can't tell for sure if implementing this kind of isolevels plot would compromise scrolling speed. But it is a nice feature request.

[EDIT] It is important to notice that, although having a nicer look, the 2nd image is less accurate than the first, that interpolates just among the original pixels but doesn't change the values at these original pixels...

For the sake of curiosity: In the posterior area we see in the first image a black square region (comprising 4 data points, I would say), that appears almost white in the second image. Isn't this kind of extrapolation artifact an issue of concern?

Thanks for the topic,

Tiago

DanielVH1 commented 6 years ago

Hi Tiago

Thank you very much for considering my request :)

It is actually a single pixel, as you can see in this non-interpolated image. It looks large because the matrix size is only 180 x 180 and the FOV is quite large (this image is part of a whole body acquisition).

brain fdg-pet horos no interpolation

I checked and the CLUT and windowing settings are exactly the same. I assume the smoothing algorithm indeed causes the pixel to slightly move down in the CLUT, thus compromising visual accuracy. This may be of concern for some people, but I can live with some minor blurring if it allows me to avoid noisy or pixelated images. After all, I can always draw a ROI or use the cursor if I need the exact pixel values.

Maybe you could include this interpolation algorithm as an alternative to the existing one, for those who would like to try it. Believe me, It will have a good reception.

Thanks again,

Daniel.

MartinRX commented 6 years ago

You can test this kind of 'advanced' rendering in OsiriX Lite (https://www.osirix-viewer.com/osirix/osirix-md/download-osirix-lite/): it uses a bi-cubic GPU rendering technique, instead of bi-linear interpolation.

screen shot 2
brizolara commented 6 years ago

Hmmm... but, Lanczos is known to behave better than bicubic spline... (for example: https://matplotlib.org/gallery/images_contours_and_fields/interpolation_methods.html)

MartinRX commented 6 years ago

There is maybe a problem in your 'Lancos' method? When you compare OsiriX to Horos, the difference is obvious... Same image, same settings :

screenshot
brizolara commented 6 years ago

Thanks for testing that out.

As I understand, the image at the left is applying a contour-based plot (I called isolevels in my first reply...), not simply bicubic spline.

The image at the right is what I expect with purely a Lanczos interpolation (a purely bicubic would appear similar, but a little darker).

Anyway, very well pointed. This is surely a nice feature request.

On 13 Aug 2018, at 20:24, MartinRX notifications@github.com wrote:

There is maybe a problem in your 'Lancos' method? When you compare OsiriX to Horos, the difference is obvious... Same image, same settings :

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

DanielVH1 commented 6 years ago

Here is another example. This is from a planar bone scintigraphy, using a simple 8-color CLUT with the same windowing parameters.

bone scan 8 bands comparison

As you can see, Horos (using Lanczos) interpolates values AND colors, while IntelliSpace interpolates values without creating new colors between existing ones (it only adds a single narrow band of an intermediate color). You can also see how it changes the original pixel values in certain areas, as you pointed out earlier.

I hope this example will help you understand how this interpolation method works, if you want to add it as a new feature in future versions of Horos.

Daniel.