vtkResliceImageViewer image quality problem

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

vtkResliceImageViewer image quality problem

Andrey
This post was updated on .
I run into strange issue with vtkResliceImageViewer in VTK 8.1.0. I use
vtkResliceImageViewer for showing MPR image reconstruction from DICOM CT
scan. And with particular scan I have artifacts on axial projection as you
can see on the first image. The same scan in another 3DViewer has no such
artifacts (the second image). The artifacts are exist on all projections I
only choose here the one most obvious. There is no artifacts on oblique
projections. There is no artifacts on 3D image (vtkImagePlaneWidget). I have
not seen such artifacts before on another images. Have you any ideas what is
it? What can be done to improve situaion? The same result I see in VTK example FourPanelViewer.
<http://vtk.1045678.n5.nabble.com/file/t342685/bad_image.png
<http://vtk.1045678.n5.nabble.com/file/t342685/good_image.png



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkResliceImageViewer image quality problem

David Gobbi
On Wed, Jan 30, 2019 at 9:55 PM Andrey <[hidden email]> wrote:
I run into strange issue with vtkResliceImageViewer in VTK 8.1.0. I use
vtkResliceImageViewer for showing MPR image reconstruction from DICOM CT
scan. And with particular scan I have artifacts on axial projection as you
can see on the first image. The same scan in another 3DViewer has no such
artifacts (the second image). The artifacts are exist on all projections I
only choose here the one most obvious. There is no artifacts on oblique
projections. There is no artifacts on 3D image (vtkImagePlaneWidget). I have
not seen such artifacts before on another images. Have you any ideas what is
it? What can be done to improve situaion?
<http://vtk.1045678.n5.nabble.com/file/t342685/bad_image.png>
<http://vtk.1045678.n5.nabble.com/file/t342685/good_image.png>

Do the artifacts in vtkResliceImageViewer move around when you zoom in
and out?  If so, there is something strange happening with the texture mapping.
If not, the problem is with the how VTK is processing the image.  What are the
dimensions of the image?  Pixel spacing?

Since vtkResliceImageViewer uses vtkImageActor, you could try using
vtkImageActor directly to see if it produces the same artifacts.

   David 

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkResliceImageViewer image quality problem

Andrey
This post was updated on .
Thank you for your answer. No artifacts not moving aroung with zoom changing but they moving around when I move resclice cursor on the same view. Image size 477x477 px, pixel spasing 0.25 mm. Artifacts looks like edges of some kind of grid cells. I've added the blue lines on image to illustrate it. May be it can say something? I'm not very good at VTK. May be you can give me more detailed description what I can do to understand and solve the problem? Today I updated my project on VTK 8.2.0 and the problem is the same. <http://vtk.1045678.n5.nabble.com/file/t342685/bad_image.png> -- Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Search the list archives at: http://markmail.org/search/?q=vtkusers Follow this link to subscribe/unsubscribe: https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkResliceImageViewer image quality problem

David Gobbi
In reply to this post by David Gobbi
On Thu, Jan 31, 2019 at 11:29 AM Andrey <[hidden email]> wrote:
Thank you for your answer. No artifacts don't move around when I change zoom.
But the changing when I move reslice coursor on this view (not on another
view only on the same). Image size 477x477 px, pixel spacing 0.25 mm. May be
it's not so obvious on the uploaded images but seems that artifacts are
edges of cells of grid. I've tried to show them with blue line on image. I'm
not very strong in VTK what can you recomend?
<http://vtk.1045678.n5.nabble.com/file/t342685/bad_image.png>

It looks to me like the image is being stretched using nearest-neighbor
interpolation before it is going into the input of the vtkImageActor.  The
number of dislocations is the number of pixels by which the image is
stretched, and the dislocations would be expected to be evenly spaced,
just as we see in your screenshot.  The texture interpolation is then
blurring the dislocations so that they look the way they do.

My suspicion is that vtkImageResliceMapper is doing some incorrect
calculations.  It should not be stretching the image when you do an
orthogonal view, it should simply pass the image slices directly to
vtkImageActor.  It is also possible (but less likely) that vtkImageActor
is stretching the image before generating the texture that is used to
display it on the screen.

I can try testing with a similarly sized image (probably not today, but
soon).  Was this just a 2D slice, or was it a stack?  If a stack, what
was the size and spacing?  If the math in vtkImageResliceMapper is
bad, then certain image sizes probably trigger the error.

   David

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkResliceImageViewer image quality problem

Andrey
It's a stack. I can share it with you
https://www.dropbox.com/s/0u7j03j7v4mulnu/Results_30.01.2019_13_57%20good.zip?dl=0
(125 Mb) if you'd like emulate it, each image size 477x477, pixel spacing
0.25 number of images 800.
And one more: I see this artifacts on each projection (XY, XZ, YZ) but when
I change ResliceMode to 0 there is no artifacts.



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkResliceImageViewer image quality problem

Sean McBride
On Thu, 31 Jan 2019 11:54:42 -0700, Andrey said:

>It's a stack. I can share it with you
>https://www.dropbox.com/s/0u7j03j7v4mulnu/
>Results_30.01.2019_13_57%20good.zip?dl=0
>(125 Mb) if you'd like emulate it, each image size 477x477, pixel spacing

FWIW, I tried it with my app and don't see those artifacts.  I use VTK for visualization, but I use ITK (which uses GDCM) to actually load DICOM files.

Cheers,

Sean


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkResliceImageViewer image quality problem

Andrey
This post was updated on .
Thank you for information I use VTK only. But I'll keep it in mind. I didn't have any problems with images until yesterday then I run in this image
series. After reproducing the artifacts with VTK example I decided to ask
for help.



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkResliceImageViewer image quality problem

Andrey
In reply to this post by David Gobbi
Hi! I converted dicom image to 512x512 and in this case I have no artifacts
on projections. I uploaded images stack here for example:
https://www.dropbox.com/s/f5nok0syka9g1er/battery_result_uint16_512x512_tags.zip?dl=0
And images 256х256 have no artifacts too. So probably only than the image
size is power of 2 it works without artifacts.



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers