<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello users ! </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm a student, novice with itk/vtk. I'm trying to
connect Itk to Vtk along the lines of 'getting started with vtk+itk , Luis
Ibanez - William Schroeder'.</FONT></DIV>
<DIV><FONT face=Arial size=2>The problem is I cannot find the filter
'ItkImageToVTKImagefilter.h'. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I saw that It is also possible to do it using
'itkVtkImageExport' at the end of the itk pipeline and 'vtkImageImport' at the
beginning of the vtk pipeline. </FONT></DIV>
<DIV><FONT face=Arial size=2>But i cant manage to use 'vtkImageImport': I read
the doxygen documentation about it but I cant figure out which method to
use....</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Help ! Does someone have a C++ example
?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks in advance, </FONT></DIV>
<DIV><FONT face=Arial size=2>Nicolas Dumont.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I tried to adapt the code found in 'getting started
with vtk+itk', here is it: </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><FONT face=Arial size=2>
<DIV>*****************************************************************<BR>#include
"itkImage.h"<BR>#include "itkImageFileReader.h"<BR>#include
"itkVTKImageExport.h"</DIV>
<DIV> </DIV>
<DIV>#include "vtkImageImport.h"<BR>#include
"vtkRenderWindowInteractor.h"<BR>#include "vtkImageViewer.h"</DIV>
<DIV> </DIV>
<DIV>int main (int argc, char **argv) {<BR> typedef itk::Image<unsigned
short,2> ImageType;<BR> typedef
itk::ImageFileReader<ImageType> ReaderType;<BR> typedef
itk::VTKImageExport<ImageType> ConnectorType;</DIV>
<DIV> </DIV>
<DIV> ReaderType::Pointer reader =
ReaderType::New();<BR> ConnectorType::Pointer connector =
ConnectorType::New();</DIV>
<DIV> </DIV>
<DIV> reader->SetFileName(argv[1]);<BR> connector->SetInput(reader->GetOutput());</DIV>
<DIV> </DIV>
<DIV>vtkImageImport ?????????????????????;</DIV>
<DIV><BR> vtkImageViewer * viewer = vtkImageViewer::New();</DIV>
<DIV> </DIV>
<DIV> vtkRenderWindowInteractor * renderWindowInteractor =
vtkRenderWindowInteractor::New();</DIV>
<DIV> </DIV>
<DIV> viewer->SetupInteractor(renderWindowInteractor);<BR> viewer->SetInput(
???????? );</DIV>
<DIV> </DIV>
<DIV> viewer->Render();<BR> viewer->SetColorWindow(255);<BR> viewer->SetColorLevel(128);<BR> renderWindowInteractor->Start();</DIV>
<DIV> </DIV>
<DIV> return 0;<BR>}</FONT></DIV>
<DIV><FONT face=Arial
size=2>**************************************************************************</FONT></DIV></BODY></HTML>