[vtkusers] QVTKWidget and VtkImageViewer issue

Peter von Niederhaeusern pvonnied at gmail.com
Tue Feb 23 13:51:27 EST 2010


Mmm...that doesn't seem to work.

Are there any known issues with the QVTKWidget and ImageViewers?

I had this combo already used before (with a slight abstraction layer
put in between)
without any  problems...I'm puzzled.

On Mon, Feb 22, 2010 at 4:03 PM, KS Jothybasu <jothybasu at gmail.com> wrote:
> Have you tried ImageViewer.Render()?
>
> And, you should set the windowtitle after Render()/Show(), I think....
>
> Jothy
>
>
>
> On Mon, Feb 22, 2010 at 1:34 PM, Peter von Niederhaeusern
> <pvonnied at gmail.com> wrote:
>>
>> Hi all,
>>
>> I googled around to find a solution for the following issue but without
>> success:
>> In a slot of my MainGui class I create a QVTKWidget and a VtkImageViewer.
>> The image viewer receives a volume from an itk to vtk filter (to read
>> in some DICOM data).
>>
>> Upon signaling the slot, the QVTKWidget gets painted but NOT its content
>> (the volume from the image viewer). The widget just hangs there with a
>> stale background
>> (when dragged around)...
>>
>> ================
>> void MainWindow::OnButtonPressed( void )
>> {
>> ...
>> this->mQvtkWidget = new QVTKWidget();
>> this->mQvtkWidget->setWindowTitle( "Test" );
>>
>> this->mVtkImageViewer = vtkImageViewer::New();
>> this->mVtkImageViewer->SetInput( obj.VtkUnsigned8BitVolume );
>>
>> this->mQvtkWidget->SetRenderWindow(
>> this->mVtkImageViewer->GetRenderWindow() );
>> this->mVtkImageViewer->SetupInteractor(
>> this->mQvtkWidget->GetRenderWindow()->GetInteractor() );
>>
>> this->mQvtkWidget->update();
>> his->mQvtkWidget->show();
>> ...
>> }
>> ================
>>
>> Frameworks: Qt 4.5.2 (2009.03), vtk-5.4.2, gcc (GCC) 3.4.5
>> (mingw-vista special r3), Itk 3.16
>> Platform: Windows Vista (64bit)
>>
>> I know that this is a rather often occuring issue, but I'm unable to
>> find a solution/workaround.
>>
>> Thank you for your help.
>>
>> Best regards,
>> Peter
>> _______________________________________________
>> 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
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list