[vtkusers] "zoom in" in VTK Image viewer when displaying CT images

David Gobbi david.gobbi at gmail.com
Sun Jun 7 10:55:57 EDT 2015


Hi Prashanth,

VTK uses glLoadMatrix and glMultMatrix to load the view transforms, but
whether these are used, versus glScale, has no impact on image quality.

Instead, image display quality is a result of what filtering is used when
drawing the image.  When image interpolation is turned on in VTK (which is
the default) the following OpenGL calls are made as part of the texture
display pipeline:

    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

If ITK-SNAP uses textures to display images, these functions should also
work there.

 - David

* Note: VTK is rapidly moving to a new OpenGL implementation where shader
programs are used, rather than calls to glLoadMatrix and glTexParameter.

On Sun, Jun 7, 2015 at 8:13 AM, Prashanth <prashanth.dumpuri at gmail.com>
wrote:

> All,
>
> I recently discovered ITK-SNAP and have noticed that ITK-SNAP produces a
> pixelated image (poor quality image) when zooming in the 2D image views.
> I'm just doing a 2x zoom in ITK-SNAP but the image looks really pixelated
> after zooming in.
>
> In my opinion VTK Image viewer produces better looking images. My CT image
> is of size 832 x 832 x 265 (0.8mm slice thickness). So, it's not lack of
> data in the input image that's causing pixelated displays. I don't know how
> VTK handles zooming but as I understand it, glScalef is the function in
> ITK-SNAP handling zoom.
>
> How does VTK handle 'zoom in' ? Is there something I can do to improve the
> quality in ITK-SNAP?
>
> P.S. I have asked ITK-SNAP a similar question about 'zooming in' and
> glScalef. I'm posting here because I would like to know how VTK handles
> 'zooming in' and also in my limited experience with ITK-SNAP, the response
> time in VTK users mailing list is quicker.
>
> Thanks
> Prashanth
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150607/aae6b5dd/attachment.html>


More information about the vtkusers mailing list