<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV> </DIV>
<DIV><FONT size=3>Hi all ITK users,</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>I tried to run MyProject.cxx following instructions in getting started II. Here are MyProjct.cxx and CmakeLists.txt files :</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV>PROJECT( myProject )</DIV>
<DIV> FIND_PACKAGE ( ITK )<BR> IF ( ITK_FOUND )<BR> INCLUDE( ${USE_ITK_FILE} )<BR>ENDIF( ITK_FOUND )</DIV>
<DIV> FIND_PACKAGE ( VTK )<BR> IF ( VTK_FOUND )<BR> INCLUDE( ${USE_VTK_FILE} )<BR> ENDIF( VTK_FOUND )</DIV>
<DIV> INCLUDE_DIRECTORIES( ${myProject_SOURCE_DIR})</DIV>
<DIV> ADD_EXECUTABLE( myProject myProject.cxx )</DIV>
<DIV> TARGET_LINK_LIBRARIES ( myProject<BR> ITKBasicFilters ITKCommon ITKIO<BR> vtkRendering vtkGraphics vtkHybrid<BR> vtkImaging vtkIO vtkFiltering vtkCommon<BR>)<BR></DIV>
<DIV>#include "itkImage.h"<BR itxtvisited="1">#include "itkImageFileReader.h"<BR itxtvisited="1">#include "itkImageToVTKImageFilter.h"<BR itxtvisited="1"><BR itxtvisited="1">#include "vtkImageViewer.h"<BR itxtvisited="1">#include "vtkRenderWindowInteractor.h"<BR itxtvisited="1"><BR itxtvisited="1">int main( int argc, char **argv) {<BR itxtvisited="1"><BR itxtvisited="1">typedef itk::Image<unsigned short,2> ImageType;<BR itxtvisited="1">typedef itk::ImageFileReader<Imagetype> ReaderType;<BR itxtvisited="1">typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;<BR itxtvisited="1"><BR itxtvisited="1">ReaderType::Pointer reader = readertype::New();<BR itxtvisited="1">ConnectorType::Pointer connector = ConnectorType::New();<BR itxtvisited="1"><BR itxtvisited="1">reader->setFilename( argv[1] );<BR itxtvisited="1">connector->SetInput( reader->GetOutput() );<BR itxtvisited="1"><BR itxtvisited="1">vtkImageViewer * viewer =
vtkImageViewer::New();<BR itxtvisited="1">vtkRenderWindowInteractor * renderWindowInteractor =<BR itxtvisited="1">vtkRenderWindowInteractor::New();<BR itxtvisited="1"><BR itxtvisited="1">viewer->SetupInteractor( renderWindowInteractor );<BR itxtvisited="1">viewer->SetInput( connector->GetOutput() );<BR itxtvisited="1"><BR itxtvisited="1">viewer->Render();<BR itxtvisited="1">viewer->SetColorWindow( 255 );<BR itxtvisited="1">viewer->SetColorLevel( 128 );<BR itxtvisited="1">renderWindowInteractor->Start();<BR itxtvisited="1"><BR itxtvisited="1">return 0;<BR itxtvisited="1">}<BR itxtvisited="1"><BR itxtvisited="1"><FONT size=3>I have successively built it, but in running this error message is chown :</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>Myproject-source\myProject.cxx(3) : fatal error C1083: Impossible d'ouvrir le fichier include : 'itkImageToVTKImageFilter.h' : No such file or directory</FONT></DIV>
<DIV><FONT size=3> I have red the response of Luis in OSdir forum to such problem that is as followed :</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV>The files that you need are in InsightApplications/Auxiliary/vtk :<BR itxtvisited="1"><BR itxtvisited="1">itkImageToVTKImageFilter.h<BR itxtvisited="1">itkImageToVTKImageFilter.txx<BR itxtvisited="1">itkVTKImageToImageFilter.h<BR itxtvisited="1">itkVTKImageToImageFilter.txx<BR itxtvisited="1"><BR itxtvisited="1"><FONT size=3>Copy these files into the directory where you are putting the code of your example.</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>So I copied these files in the generated binary directory with </FONT><SPAN style="FONT-SIZE: 28pt; COLOR: #ff6600; FONT-FAMILY: Arial; mso-ascii-font-family: Arial; mso-fareast-font-family: +mn-ea; mso-bidi-font-family: +mn-cs; language: en-GB"><FONT color=#000000 size=2>myProject.dsw. </FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: #ff6600; FONT-FAMILY: Arial; mso-ascii-font-family: Arial; mso-fareast-font-family: +mn-ea; mso-bidi-font-family: +mn-cs; language: en-GB"><FONT color=#000000 size=2></FONT></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: #ff6600; FONT-FAMILY: Arial; mso-ascii-font-family: Arial; mso-fareast-font-family: +mn-ea; mso-bidi-font-family: +mn-cs; language: en-GB"><FONT color=#000000 size=2>But I stiil have the same error message??</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: #ff6600; FONT-FAMILY: Arial; mso-ascii-font-family: Arial; mso-fareast-font-family: +mn-ea; mso-bidi-font-family: +mn-cs; language: en-GB"><FONT color=#000000 size=3></FONT></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: #ff6600; FONT-FAMILY: Arial; mso-ascii-font-family: Arial; mso-fareast-font-family: +mn-ea; mso-bidi-font-family: +mn-cs; language: en-GB"><FONT color=#000000 size=3>Can someone help me??</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: #ff6600; FONT-FAMILY: Arial; mso-ascii-font-family: Arial; mso-fareast-font-family: +mn-ea; mso-bidi-font-family: +mn-cs; language: en-GB"><FONT color=#000000 size=3></FONT></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: #ff6600; FONT-FAMILY: Arial; mso-ascii-font-family: Arial; mso-fareast-font-family: +mn-ea; mso-bidi-font-family: +mn-cs; language: en-GB"><FONT color=#000000 size=3>Are there other examples on how connect ITK to VTK?</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: #ff6600; FONT-FAMILY: Arial; mso-ascii-font-family: Arial; mso-fareast-font-family: +mn-ea; mso-bidi-font-family: +mn-cs; language: en-GB"><FONT color=#000000 size=3></FONT></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: #ff6600; FONT-FAMILY: Arial; mso-ascii-font-family: Arial; mso-fareast-font-family: +mn-ea; mso-bidi-font-family: +mn-cs; language: en-GB"><FONT color=#000000 size=3>Thanks,</FONT></SPAN></DIV>
<DIV><FONT size=4><FONT color=#000000><SPAN style="FONT-SIZE: 28pt; COLOR: #ff6600; FONT-FAMILY: Arial; mso-ascii-font-family: Arial; mso-fareast-font-family: +mn-ea; mso-bidi-font-family: +mn-cs; language: en-GB"><FONT color=#000000 size=3>Nora</FONT></SPAN><SPAN style="FONT-SIZE: 28pt; COLOR: yellow; FONT-FAMILY: Arial; mso-ascii-font-family: Arial; mso-fareast-font-family: +mn-ea; mso-bidi-font-family: +mn-cs; language: en-GB"> </SPAN><BR itxtvisited="1"></FONT></FONT></DIV></td></tr></table><br>