Is there anyone in this group that have used vtkImageViewer2 with QVTKWidget successfully?<br><br>Am I wrong to think that QVTKWidget works only with vtkImageViewer?<br><br>Thanks,<br>Luis<br><br><div class="gmail_quote">On Mon, Nov 10, 2008 at 7:47 PM, Luis Roberto P. Paula <span dir="ltr"><<a href="mailto:luisrpp@gmail.com">luisrpp@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi All,<br><br>I'm trying to use the vtkImageViewer2 to display a 2D image in a QVTKWidget, but I'm getting some errors.<br>
<br>Here is a piece of code:<br><br> image_viewer = vtkImageViewer2::New();<br> qvtkWidget->SetRenderWindow(image_viewer->GetRenderWindow());<br>
image_viewer->SetInput(get2DImage());<br> image_viewer->Render();<br><br>Error messages:<br><br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br>
<br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br>
<br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br>
<br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br>
<br>ERROR: In /home/luis/dev-tools/VTK/Rendering/vtkImageActor.cxx, line 267<br>vtkOpenGLImageActor (0x8ba93e0): This filter requires unsigned char scalars as input<br><br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>
vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br><br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>
vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br><br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>
vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br><br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>
vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br><br>ERROR: In /home/luis/dev-tools/VTK/Rendering/vtkImageActor.cxx, line 267<br>
vtkOpenGLImageActor (0x8ba93e0): This filter requires unsigned char scalars as input<br><br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br>
<br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br>
<br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br>
<br>ERROR: In /home/luis/dev-tools/VTK/Filtering/vtkDemandDrivenPipeline.cxx, line 725<br>vtkStreamingDemandDrivenPipeline (0x8ba9890): Input port 0 of algorithm vtkImageMapToWindowLevelColors(0x8b62358) has 0 connections but is not optional.<br>
<br>ERROR: In /home/luis/dev-tools/VTK/Rendering/vtkImageActor.cxx, line 267<br>vtkOpenGLImageActor (0x8ba93e0): This filter requires unsigned char scalars as input<br><br>-------------------------------------------------------------------------------------------<br>
<br>Does anybody knows how to fix this? It works with the vtkImageViewer class, but I think the vtkImageViewer2 is a better option to display a 2D image in a widget.<br><br>Thank's<br><font color="#888888">Luis<br>
</font></blockquote></div><br>