<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Thanks a lot Mr. Cemal Cagatay Bilgin, the example has perfectly executed exactly after correcting these 3 bugs!I appreciated yoyr help.</DIV>
<DIV> </DIV>
<DIV>Nora<BR><BR>--- En date de : <B>Mar 30.12.08, Cemal Cagatay Bilgin <I><bilgic@cs.rpi.edu></I></B> a écrit :<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">De: Cemal Cagatay Bilgin <bilgic@cs.rpi.edu><BR>Objet: Re: [Insight-users] Problem in running MyProject.cxx in getting started II?<BR>À: nora_droit@yahoo.fr<BR>Cc: insight-users@itk.org<BR>Date: Mardi 30 Décembre 2008, 22h20<BR><BR>
<DIV id=yiv1008440283>Nora,
<DIV><BR></DIV>
<DIV>there are 3 bugs in your code:</DIV>
<DIV>
<BLOCKQUOTE type="cite"><SPAN class=Apple-style-span style="COLOR: rgb(0,0,0)"><PRE>> typedef itk::ImageFileReader<Imagetype> ReaderType;</PRE></SPAN></BLOCKQUOTE>should be </DIV>
<DIV>typedef itk::ImageFileReader<ImageType> ReaderType; </DIV>
<DIV>Node the ImageType with the capital letters. </DIV>
<DIV><BR></DIV>
<DIV>the others are </DIV>
<DIV>
<DIV>ReaderType::Pointer reader = ReaderType::New(); //</DIV>
<DIV>and reader->SetFileName. </DIV>
<DIV><BR></DIV>
<DIV>Your code should compile after you take care of these. </DIV>
<DIV><BR></DIV>
<DIV>Cagatay Bilgin</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV></DIV>
<DIV><BR></DIV>
<DIV>
<DIV>
<DIV>On Dec 30, 2008, at 8:58 AM, Nora Nora wrote:</DIV><BR class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV><BR>Dear Andinet,</DIV>
<DIV> </DIV>
<DIV>I got the error message posted in the last email when trying to run a new build. I have just repeated the building processus after deleting the first binary directory and copying the four files in source directory. Here is the error message wich is the same :</DIV>
<DIV>I can't advance in my registration project without resolving this problem. May be the problem is in visual C++ version?As <FONT size=2>itkImageToVTKImageFilter.h is a part of itk applications and most applications are done in old vs versions??I'm using visual express 2008!! </FONT></DIV><FONT size=2></FONT>
<DIV> Are threre any other way or other examples to connect ITK to VTK??</DIV>
<DIV> </DIV>
<DIV>Thanks, </DIV>
<DIV>Nora<BR>--- En date de : <B>Mar 30.12.08, Andinet Enquobahrie <I><<A href="mailto:andinet.enqu@kitware.com" target=_blank rel=nofollow>andinet.enqu@kitware.com</A>></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 <<A href="mailto:andinet..enqu@kitware.com" target=_blank rel=nofollow>andinet.enqu@kitware.com</A>><BR>Objet: Re: [Insight-users] Problem in running MyProject.cxx in getting started II?<BR>À: <A href="mailto:nora_droit@yahoo.fr" target=_blank rel=nofollow>nora_droit@yahoo.fr</A><BR>Date: Mardi 30 Décembre 2008, 13h01<BR><BR><PRE>Nora-
Start from a clean build tree and try again...
> Thanks Andinet for response,
> I copied these four files in the source directory with MyProject.cxx, here
is the new error message I got :
> 2>..\Myproject-source\myProject.cxx(10) : error C2065:
'Imagetype' : identificateur non déclaré
> 2>..\Myproject-source\myProject.cxx(13) : error C2955:
'itk::ImageFileReader' : l'utilisation d'une classe modèle
requiert une liste d'arguments modèle
> 2> c:\program
files\insighttoolkit-3.10.0\code\io\itkImageFileReader.h(93) :
voir la déclaration de 'itk::ImageFileReader'
> 2>..\Myproject-source\myProject.cxx(13) : error C2653:
'readertype' : n'est pas un nom de classe ni d'espace de noms
> 2>..\Myproject-source\myProject.cxx(13) : error C3861:
'New' : identificateur introuvable
> 2>..\Myproject-source\myProject.cxx(13) : error C2514:
'itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>'
: la classe n'a aucun constructeur
> 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)
> 2> c:\program
files\insighttoolkit-3.10.0\code\common\itkSmartPointer.h(69):
peut être 'TObjectType *itk::SmartPointer<TObjectType>::operator
->(void) const'
> 2> lors de la tentative de mise en correspondance de la liste des
arguments
'(itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>)'
> 2>..\Myproject-source\myProject.cxx(16) : error C2039:
'setFilename' : n'est pas membre de
'itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>'
> 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)
> 2> c:\program
files\insighttoolkit-3.10.0\code\common\itkSmartPointer.h(69):
peut être 'TObjectType *itk::SmartPointer<TObjectType>::operator
->(void) const'
> 2> lors de la tentative de mise en correspondance de la liste des
arguments
'(itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>)'
> 2>..\Myproject-source\myProject.cxx(17) : error C2039:
'GetOutput' : n'est pas membre de
'itk::SmartPointer<itk::ImageFileReader<TOutputImage,ConvertPixelTraits>>'
> 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"
> 2>myProject - 9 erreur(s), 0 avertissement(s)
>
> Is the problem in including Lib or in adding namespace?
> I will appreciate you help,
> Nora
>
> --- En date de : *Lun 29.12.08, Andinet Enquobahrie
/<<A href="mailto:andinet.enqu@kitware.com" target=_blank rel=nofollow>andinet.enqu@kitware.com</A>>/* a écrit :
>
> De: Andinet Enquobahrie <<A href="mailto:andinet.enqu@kitware..com" target=_blank rel=nofollow>andinet.enqu@kitware.com</A>>
> Objet: Re: [Insight-users] Problem in running MyProject.cxx in
> getting started II?
> À: <A href="mailto:nora_droit@yahoo.fr" target=_blank rel=nofollow>nora_droit@yahoo.fr</A>
> Date: Lundi 29 Décembre 2008, 22h14
>
> Nora-
>
> Copy those files into your Project source directory ( where you
> have MyProject.cxx ) NOT to your binary directory.
>
>
> On Mon, Dec 29, 2008 at 5:04 PM, Nora Nora <<A href="mailto:nora_droit@yahoo.fr" target=_blank rel=nofollow>nora_droit@yahoo.fr</A>
> <<A href="mailto:nora_droit@yahoo.fr" target=_blank rel=nofollow>mailto:nora_droit@yahoo.fr</A>>> wrote:
>
> Hi all ITK users,
> I tried to run MyProject.cxx following instructions in
> getting started II. Here are MyProjct.cxx and CmakeLists.txt
> files :
> PROJECT( myProject )
> FIND_PACKAGE ( ITK )
> IF ( ITK_FOUND )
> INCLUDE( ${USE_ITK_FILE} )
> ENDIF( ITK_FOUND )
> FIND_PACKAGE ( VTK )
> IF ( VTK_FOUND )
> INCLUDE( ${USE_VTK_FILE} )
> ENDIF( VTK_FOUND )
> INCLUDE_DIRECTORIES( ${myProject_SOURCE_DIR})
> ADD_EXECUTABLE( myProject myProject.cxx )
> TARGET_LINK_LIBRARIES ( myProject
> ITKBasicFilters ITKCommon ITKIO
> vtkRendering vtkGraphics vtkHybrid
> vtkImaging vtkIO vtkFiltering vtkCommon
> )
> #include "itkImage.h"
> #include "itkImageFileReader.h"
> #include "itkImageToVTKImageFilter.h"
>
> #include "vtkImageViewer.h"
> #include "vtkRenderWindowInteractor.h"
>
> int main( int argc, char **argv) {
>
> typedef itk::Image<unsigned short,2> ImageType;
> typedef itk::ImageFileReader<Imagetype> ReaderType;
> typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;
>
> ReaderType::Pointer reader = readertype::New();
> ConnectorType::Pointer connector = ConnectorType::New();
>
> reader->setFilename( argv[1] );
> connector->SetInput( reader->GetOutput() );
>
> vtkImageViewer * viewer = vtkImageViewer::New();
> vtkRenderWindowInteractor * renderWindowInteractor =
> vtkRenderWindowInteractor::New();
>
> viewer->SetupInteractor( renderWindowInteractor );
> viewer->SetInput( connector->GetOutput() );
>
> viewer->Render();
> viewer->SetColorWindow( 255 );
> viewer->SetColorLevel( 128 );
> renderWindowInteractor->Start();
>
> return 0;
> }
>
> I have successively built it, but in running this error
> message is chown :
> Myproject-source\myProject.cxx(3) : fatal error
C1083:
> Impossible d'ouvrir le fichier include :
> 'itkImageToVTKImageFilter.h' : No such file or directory
> I have red the response of Luis in OSdir forum to such
> problem that is as followed :
> The files that you need are in
InsightApplications/Auxiliary/vtk :
>
> itkImageToVTKImageFilter.h
> itkImageToVTKImageFilter.txx
> itkVTKImageToImageFilter.h
> itkVTKImageToImageFilter.txx
>
> Copy these files into the directory where you are putting the
> code of your example.
> So I copied these files in the generated binary directory
with
> myProject.dsw.
> But I stiil have the same error message??
> Can someone help me??
> Are there other examples on how connect ITK to VTK?
> Thanks,
> Nora
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@itk.org <<A href="mailto:Insight-users@itk...org" target=_blank rel=nofollow>mailto:Insight-users@itk..org</A>>
> <A href="http://www.itk.org/mailman/listinfo/insight-users" target=_blank rel=nofollow>http://www.itk.org/mailman/listinfo/insight-users</A>
>
>
>
-- ==========================================================
Andinet A. Enquobahrie, PhD
R&D Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x124
<A href="http://www.kitware.com/" target=_blank rel=nofollow>www.kitware.com</A>
</PRE></BLOCKQUOTE></TD></TR></TBODY></TABLE><BR>_______________________________________________<BR>Insight-users mailing list<BR><A href="mailto:Insight-users@itk.org" target=_blank rel=nofollow>Insight-users@itk.org</A><BR>http://www.itk.org/mailman/listinfo/insight-users<BR></BLOCKQUOTE></DIV><BR></DIV></DIV></BLOCKQUOTE></td></tr></table><br>