[Insight-users] Problem of ImageToVTKImageFilter,
when displaying 2 images
ask ITK
askitk at gmail.com
Wed Jan 25 12:42:03 EST 2006
Problem occurs when I want to use itkImageToVTKImageFilter to display
2 different images.
I want to display to different image with the VTK viewer..
of coz I think it requires 2 different viewers and 2 different interactors.
So I created 2 for both of them.
Loading the first image is fine, but after I load teh second image,
the first image also become the second image!
I don't know how to solve this problem...so please help...
following error is displayed:
ERROR: In D:\Research\VTK\src\Filtering\vtkStreamingDemandDrivenPipeline.cxx,
line 643
vtkImageImportExecutive (020D8F78): The update extent specified in the
information for output port 0 on algorithm vtkImageImport(020D8AD0) is
0 142 0 167 0 0, which is outside the whole extent 0 141 0 166 0 0.
I attached my code below, very short, can I can run the program
smoothly except the stated error. Please help, thanks!
=======================================================
void ApplicationCore::callViewer(ImagePtr image, int choice)
{
m_itkvtkconnector[choice]->SetInput( image );
m_ImageViewer[choice]->SetupInteractor( m_renderWindowInteractor[choice]);
m_ImageViewer[choice]->SetInput( m_itkvtkconnector[choice]->GetOutput() );
m_ImageViewer[choice]->SetSize(image->GetLargestPossibleRegion().GetSize()[0],image->GetLargestPossibleRegion().GetSize()[1]);
m_ImageViewer[choice]->Render();
m_ImageViewer[choice]->SetColorWindow( 255);
m_ImageViewer[choice]->SetColorLevel( 128);
// m_renderWindowInteractor[choice]->Start();
}
=======================================================
More information about the Insight-users
mailing list