Re: vtkResliceImageViewer image quality problem
David Gobbi <[email protected]> Thu, 31 Jan 2019 11:48:35 -0700
| Newsgroups | gmane.comp.lib.vtk.user |
|---|---|
| Message-ID | <CANwS1=E2uvYTBWP7baJtfk2GxFXWTxvdrXYe3WBG+fvuONd+hQ@mail.gmail.com> |
On Thu, Jan 31, 2019 at 11:29 AM Andrey <[email protected]> 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