[Insight-users] outputimagetype and imagetype

Mathias Seitel mathias.seitel@igd.fhg.de
Fri May 7 09:49:07 EDT 2004


Hi Luke,

it seems that the ImageType used for the importer is not the same as the 
ImageType of QtGlSliceView. I guess that ImageType is defined twice, 
both in your code fragment and also in the QtGlSliceView class? Both 
definitions should be the same, i.e. have the same template parameters.

Hope that helps,
Mathias


Luke wrote:

> I'm new to itk. I tried to connect itk and vtk together.
>  
> The following code connect vtkExporter to itkimporter.
>  
> typedef itk::Image<float, 3> ImageType;
>  typedef itk::VTKImageImport<ImageType> ImageImportType;
>  ImageImportType::Pointer itkImporter = ImageImportType::New();
>  ConnectPipelines(vtkExporter, itkImporter);
>  
> I have this function call to get image.
>  T_view->SetInputImage(itkImporter->GetOutput());
>  
> The setInputImage method need a ImageType pointer.
> SetInputImage(ImageType * newImData)
>  
> I compiled the code and got following error.
>  
> cannot convert parameter 1 from 
> 'itk::ImageSource<TOutputImage>::OutputImageType *' to 
> 'QtGlSliceView::ImageType *'
>  
> How can I change itkImporter->GetOutput() to ImageType.
>  
> Thanks!
>  
>                                                                    Luke
>  

-- 
Dipl.-Inf. (FH) Mathias Seitel
Fraunhofer Gesellschaft         Phone: +49-6151-155 513
Institute for Computer Graphics Fax: +49-6151-155 559
Fraunhoferstr. 5                mailto: mathias.seitel@igd.fhg.de
D-64283 Darmstadt, Germany      www: http://www.igd.fhg.de/igd-a7



More information about the Insight-users mailing list