[vtkusers] Blurred images using QVtkWidget

Francois Bertel francois.bertel at kitware.com
Tue Dec 2 13:03:59 EST 2008


Looks like antialiasing. Maybe with the multisampling technique. Are
you using Qt under Linux? If so,

Try that, to initialize a render window with multisampling:
 _ren_win = _qvtk_widget->GetRenderWindow();
 _ren_win->SetMultiSamples(0); // <---------- add this line
 _ren_win->SetInteractor(_iren);

If you are using the plain vtkRenderWindow, you probably this line
somewhere in your code or you tried it on a not X11 platform.
Multisampling is only supported by VTK on X11 and is ON by
default ( MultiSamples=8 ).


On Tue, Dec 2, 2008 at 5:49 AM, Martin Baumann <mailsgetlost at web.de> wrote:
> Hi Shakes,
>
> thanks for your quick reply. I am not using vtkImageViewer2 but
>  the render window within a scroll view of Qt:
>
>  // ...
>  _sv = new Q3ScrollView(this,"scroll view");
>  // ...
>  _iren = QVTKInteractor::New();
>  _qvtk_widget = new QVTKWidget();
>  _ren_win = _qvtk_widget->GetRenderWindow();
>  _ren_win->SetInteractor(_iren);
>  _ren_win->Start();
>  _sv->addChild(_qvtk_widget);
>  // ...
>
> I added four images to the attachment showing two grids with
> two different render windows. The files called qvtkX.png are
> created using the render window of QVTKWidget. The files
> named image_filterX.png are created with a vtkWindowToImageFilter.
>
> Depending on the data and the view options the "qvtkX style" or
> the "image_filterX style" ist better. Here qvtk.png and image_filter2.png
> are the two nice images. So the best would be to be able to
> switch between these two modes for the rendering view and
> vtkWindowToImage. But how?
>
> Best regards,
> Martin Baumann
>
>
>
> shekharc schrieb:
>> Hi Martin,
>>
>> Do you mean your image display is interpolated? If you're using
>> vtkImageViewer2 use the line:
>>
>> viewer->GetImageActor()->InterpolateOff()
>>
>> to disable it. If not, a few more details would help. Hope that helps.
>>
>> Cheers
>> Shakes
>>
>> Martin Baumann wrote:
>>> I forgot to name some details about my environment:
>>>
>>> openSUSE 10.2 (X86-64)
>>> Qt-4.3.0
>>> Vtk-5.0.2
>>>
>>> Best regards,
>>> Martin Baumann
>>>
>>>
>>>
>>> Martin Baumann schrieb:
>>>> Hi,
>>>>
>>>> I am experimenting with QVTKWidget and have the problem that
>>>> images that are rendered by the render window of the QVtkWidget
>>>> are looking blurred.
>>>> Until now I used a plain vtkRenderWindow and the rendered images
>>>> had sharp edges when visualizing meshes for instance. I already
>>>> changed the Smoothing options of the render window but this
>>>> didn't help.
>>>>
>>>> What could cause this problem?
>>>>
>>>> Best regards,
>>>> Martin Baumann
>>>> _______________________________________________
>>>> This is the private VTK discussion list.
>>>> Please keep messages on-topic. Check the FAQ at:
>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>
>>>
>>> _______________________________________________
>>> This is the private VTK discussion list.
>>> Please keep messages on-topic. Check the FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtkusers mailing list