<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><BR>
<DIV><FONT size=3>Thanks Andinet for response, </FONT></DIV>
<DIV><FONT size=3>I copied these four files in the source directory with MyProject.cxx, here is the new error message I got :</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>2>..\Myproject-source\myProject.cxx(10) : error C2065: 'Imagetype' : identificateur non déclaré</DIV>
<DIV>2>..\Myproject-source\myProject.cxx(13) : error C2955: 'itk::ImageFileReader' : l'utilisation d'une classe modèle requiert une liste d'arguments modèle</DIV>
<DIV>2> c:\program files\insighttoolkit-3.10.0\code\io\itkImageFileReader.h(93) : voir la déclaration de 'itk::ImageFileReader'</DIV>
<DIV>2>..\Myproject-source\myProject.cxx(13) : error C2653: 'readertype' : n'est pas un nom de classe ni d'espace de noms</DIV>
<DIV>2>..\Myproject-source\myProject.cxx(13) : error C3861: 'New' : identificateur introuvable</DIV>
<DIV>2>..\Myproject-source\myProject.cxx(13) : error C2514: 'itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>' : la classe n'a aucun constructeur</DIV>
<DIV>2>..\Myproject-source\myProject.cxx(16) : error C2678: '->' binaire : aucun opérateur trouvé qui accepte un opérande de partie gauche de type 'itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>' (ou il n'existe pas de conversion acceptable)</DIV>
<DIV>2> c:\program files\insighttoolkit-3.10.0\code\common\itkSmartPointer.h(69): peut être 'TObjectType *itk::SmartPointer<TObjectType>::operator ->(void) const'</DIV>
<DIV>2> lors de la tentative de mise en correspondance de la liste des arguments '(itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>)'</DIV>
<DIV>2>..\Myproject-source\myProject.cxx(16) : error C2039: 'setFilename' : n'est pas membre de 'itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>'</DIV>
<DIV>2>..\Myproject-source\myProject.cxx(17) : error C2678: '->' binaire : aucun opérateur trouvé qui accepte un opérande de partie gauche de type 'itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>' (ou il n'existe pas de conversion acceptable)</DIV>
<DIV>2> c:\program files\insighttoolkit-3.10.0\code\common\itkSmartPointer.h(69): peut être 'TObjectType *itk::SmartPointer<TObjectType>::operator ->(void) const'</DIV>
<DIV>2> lors de la tentative de mise en correspondance de la liste des arguments '(itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>)'</DIV>
<DIV>2>..\Myproject-source\myProject.cxx(17) : error C2039: 'GetOutput' : n'est pas membre de 'itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>'</DIV>
<DIV>2>Le journal de génération a été enregistré à l'emplacement "file://c:\Documents and Settings\PC.WORK-PC\Bureau\ITK-VTK\MyProject\MyProject-Bin\myProject.dir\Debug\BuildLog.htm"</DIV>
<DIV>2>myProject - 9 erreur(s), 0 avertissement(s)</DIV>
<DIV><BR><FONT size=3>Is the problem in including Lib or in adding namespace?</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>I will appreciate you help,</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>Nora</FONT><BR>--- En date de : <B>Lun 29.12.08, Andinet Enquobahrie <I><andinet.enqu@kitware.com></I></B> a écrit :<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">De: Andinet Enquobahrie <andinet.enqu@kitware.com><BR>Objet: Re: [Insight-users] Problem in running MyProject.cxx in getting started II?<BR>À: nora_droit@yahoo.fr<BR>Date: Lundi 29 Décembre 2008, 22h14<BR><BR>
<DIV id=yiv1048540700>Nora-<BR><BR>Copy those files into your Project source directory ( where you have MyProject.cxx ) NOT to your binary directory..<BR><BR><BR>
<DIV class=gmail_quote>On Mon, Dec 29, 2008 at 5:04 PM, Nora Nora <SPAN dir=ltr><<A href="mailto:nora_droit@yahoo.fr" target=_blank rel=nofollow>nora_droit@yahoo.fr</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD style="FONT-FAMILY: inherit; font-size-adjust: inherit; font-stretch: inherit" vAlign=top>
<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>#include "itkImageFileReader.h"<BR>#include "itkImageToVTKImageFilter.h"<BR><BR>#include "vtkImageViewer.h"<BR>#include "vtkRenderWindowInteractor.h"<BR><BR>int main( int argc, char **argv) {<BR><BR>typedef itk::Image<unsigned short,2> ImageType;<BR>typedef itk::ImageFileReader<Imagetype> ReaderType;<BR>typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;<BR><BR>ReaderType::Pointer reader = readertype::New();<BR>ConnectorType::Pointer connector = ConnectorType::New();<BR><BR>reader->setFilename( argv[1] );<BR>connector->SetInput( reader->GetOutput() );<BR><BR>vtkImageViewer * viewer = vtkImageViewer::New();<BR>vtkRenderWindowInteractor * renderWindowInteractor =<BR>vtkRenderWindowInteractor::New();<BR><BR>viewer->SetupInteractor( renderWindowInteractor );<BR>viewer->SetInput( connector->GetOutput() );<BR><BR>viewer->Render();<BR>viewer->SetColorWindow( 255
);<BR>viewer->SetColorLevel( 128 );<BR>renderWindowInteractor->Start();<BR><BR>return 0;<BR>}<BR><BR><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><BR>itkImageToVTKImageFilter.h<BR>itkImageToVTKImageFilter.txx<BR>itkVTKImageToImageFilter.h<BR>itkVTKImageToImageFilter.txx<BR><BR><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: rgb(255,102,0); FONT-FAMILY: Arial"><FONT color=#000000 size=2>myProject.dsw. </FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: rgb(255,102,0); FONT-FAMILY: Arial"><FONT color=#000000 size=2></FONT></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: rgb(255,102,0); FONT-FAMILY: Arial"><FONT color=#000000 size=2>But I stiil have the same error message??</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: rgb(255,102,0); FONT-FAMILY: Arial"><FONT color=#000000 size=3></FONT></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: rgb(255,102,0); FONT-FAMILY: Arial"><FONT color=#000000 size=3>Can someone help me??</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: rgb(255,102,0); FONT-FAMILY: Arial"><FONT color=#000000 size=3></FONT></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: rgb(255,102,0); FONT-FAMILY: Arial"><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: rgb(255,102,0); FONT-FAMILY: Arial"><FONT color=#000000 size=3></FONT></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 28pt; COLOR: rgb(255,102,0); FONT-FAMILY: Arial"><FONT color=#000000 size=3>Thanks,</FONT></SPAN></DIV>
<DIV><FONT size=4><FONT color=#000000><SPAN style="FONT-SIZE: 28pt; COLOR: rgb(255,102,0); FONT-FAMILY: Arial"><FONT color=#000000 size=3>Nora</FONT></SPAN><SPAN style="FONT-SIZE: 28pt; COLOR: yellow; FONT-FAMILY: Arial"> </SPAN><BR></FONT></FONT></DIV></TD></TR></TBODY></TABLE><FONT color=#888888><BR></FONT><BR>_______________________________________________<BR>Insight-users mailing list<BR><A href="mailto:Insight-users@itk..org" target=_blank rel=nofollow>Insight-users@itk.org</A><BR><A href="http://www.itk.org/mailman/listinfo/insight-users" target=_blank rel=nofollow>http://www.itk.org/mailman/listinfo/insight-users</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></td></tr></table><br>