<div>Hi,</div>
<div> </div>
<div> I am building an application which needs vtk and itk to be connected.My application is of viewing an image in vtk gui and to develop a 3d volume rendered image .I tried a sample code from the vtk get start guide but when I execute it the error message Cannot open include file: 'itkImageToVTKImageFilter.h': No such file or directory Error executing cl.exe. flashes.Please provide me a solution .I am attaching the code snippet.</div>
<div> </div>
<div> </div>
<div>#include "itkImage.h"<br>#include "itkImageFileReader.h"<br>#include "itkImageToVTKImageFilter.h"<br>#include "itkVTKImageExport.h"<br>#include "vtkImageImport.h"<br>
#include "vtkImageData.h"<br>#include "vtkImageViewer.h"<br>#include "vtkRenderWindowInteractor.h"<br>int main() <br>{<br>typedef itk::Image<unsigned short,2> ImageType;</div>
<div>typedef itk::Image<unsigned int ,2>Image Type;<br>typedef itk::ImageFileReader<ImageType> ReaderType;<br>typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;<br>ReaderType::Pointerreader= ReaderType::New();<br>
ConnectorType::Pointerconnector= ConnectorType::New();</div>
<div><br>itkVTKExporter = itkVTKImageExportType::New();<br>vtkImporter = vtkImageImport::New();<br>itkVTKExporter->SetInput( m_InputImage );<br>ConnectPipelines(itkVTKExporter, vtkImporter);</div>
<div> </div>
<div><br>reader->SetFileName( "D:\\test\\in\\in.bmp");</div>
<div>connector->SetInput( reader->GetOutput() );<br>vtkImageViewer* viewer= vtkImageViewer::New();<br>vtkRenderWindowInteractor* renderWindowInteractor= vtkRenderWindowInteractor::New();<br>viewer->SetupInteractor( renderWindowInteractor);<br>
viewer->SetInput( connector->GetOutput() );<br>viewer->Render();<br>viewer->SetColorWindow( 255);<br>viewer->SetColorLevel( 128);<br>renderWindowInteractor->Start();<br>return 0;<br>}<br clear="all"><br>
-- <br>Warm Regards<br><br>Raghu Prasad<br></div>