<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Thank you for your fast reply. I tried your suggestions .Unfortunately I could't accomplish it :( First Suggestions seems really good. But error is strange. What might the reason do you think? Sorry for my inconvenience again:(&nbsp;&nbsp; </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#ff0000>When I try &nbsp;like that :</FONT></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#0000ff size=2>
<P><FONT size=3>typedef</FONT></FONT> PointSetType::PointsContainer PointsContainer;</P>
<P>PointsContainer::Pointer pointsContainer = PointsContainer::New();</P>
<P>pointsContainer = mesh-&gt;GetPoints();</P>
<P>&nbsp;itk::PointSet&lt;<FONT color=#0000ff>float</FONT>, 3&gt;::Pointer pointSet = itk::PointSet&lt;<FONT color=#0000ff>float</FONT><FONT size=2><FONT size=3>,3&gt;::New();</FONT></P>
<P><FONT size=3>pointSet-&gt;SetPoints(pointsContainer);</FONT></P>
<P><FONT size=3>&nbsp;</FONT></P><FONT size=3>
<P>registrationMethod-&gt;SetFixedPointSet(pointSet);</P>
<P><FONT color=#ff0000>It gives that error:</FONT></P><FONT size=1>
<P><FONT size=3>:\documents and settings\aydemir\desktop\itktovtk\teste.cpp(234) : error C2679: binary '=' : no operator found which takes a right-hand operand of type 'itk::VectorContainer&lt;TElementIdentifier,TElement&gt; *' (or there is no acceptable conversion)</FONT></P>
<P><FONT size=3>1&gt; with</FONT></P>
<P><FONT size=3>1&gt; [</FONT></P>
<P><FONT size=3>1&gt; TElementIdentifier=itk::DefaultStaticMeshTraits&lt;vtkFloatingPointType,3,2,vtkFloatingPointType,vtkFloatingPointType&gt;::PointIdentifier,</FONT></P>
<P><FONT size=3>1&gt; TElement=itk::Point&lt;double,3&gt;</FONT></P>
<P><FONT size=3>1&gt; ]</FONT></P>
<P><FONT size=3>1&gt; c:\programme\itk\itk-src-windows\code\common\itksmartpointer.h(113): could be 'itk::SmartPointer&lt;TObjectType&gt; &amp;itk::SmartPointer&lt;TObjectType&gt;::operator =(const itk::SmartPointer&lt;TObjectType&gt; &amp;)'</FONT></P>
<P><FONT size=3>1&gt; with</FONT></P>
<P><FONT size=3>1&gt; [</FONT></P>
<P><FONT size=3>1&gt; TObjectType=itk::VectorContainer&lt;itk::DefaultStaticMeshTraits&lt;PixelType,3,3&gt;::PointIdentifier,itk::Point&lt;float,3&gt;&gt;</FONT></P>
<P><FONT size=3>1&gt; ]</FONT></P>
<P><FONT size=3>1&gt; c:\programme\itk\itk-src-windows\code\common\itksmartpointer.h(117): or 'itk::SmartPointer&lt;TObjectType&gt; &amp;itk::SmartPointer&lt;TObjectType&gt;::operator =(itk::VectorContainer&lt;TElementIdentifier,TElement&gt; *)'</FONT></P>
<P><FONT size=3>1&gt; with</FONT></P>
<P><FONT size=3>1&gt; [</FONT></P>
<P><FONT size=3>1&gt; TObjectType=itk::VectorContainer&lt;itk::DefaultStaticMeshTraits&lt;PixelType,3,3&gt;::PointIdentifier,itk::Point&lt;float,3&gt;&gt;,</FONT></P>
<P><FONT size=3>1&gt; TElementIdentifier=itk::DefaultStaticMeshTraits&lt;PixelType,3,3&gt;::PointIdentifier,</FONT></P>
<P><FONT size=3>1&gt; TElement=itk::Point&lt;float,3&gt;</FONT></P>
<P><FONT size=3>1&gt; ]</FONT></P>
<P><FONT size=3>1&gt; while trying to match the argument list '(itk::SmartPointer&lt;TObjectType&gt;, itk::VectorContainer&lt;TElementIdentifier,TElement&gt; *)'</FONT></P>
<P><FONT size=3>1&gt; with</FONT></P>
<P><FONT size=3>1&gt; [</FONT></P>
<P><FONT size=3>1&gt; TObjectType=itk::VectorContainer&lt;itk::DefaultStaticMeshTraits&lt;PixelType,3,3&gt;::PointIdentifier,itk::Point&lt;float,3&gt;&gt;</FONT></P>
<P><FONT size=3>1&gt; ]</FONT></P>
<P><FONT size=3>1&gt; and</FONT></P>
<P><FONT size=3>1&gt; [</FONT></P>
<P><FONT size=3>1&gt; TElementIdentifier=itk::DefaultStaticMeshTraits&lt;vtkFloatingPointType,3,2,vtkFloatingPointType,vtkFloatingPointType&gt;::PointIdentifier,</FONT></P>
<P><FONT size=3>1&gt; TElement=itk::Point&lt;double,3&gt;</FONT></P>
<P><FONT size=3>1&gt; ]</FONT></P></FONT></FONT></FONT></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><STRONG><FONT color=#ff0000>When I try like that</FONT></STRONG><BR>registrationMethod-&gt;SetFixedPointSet(mesh-&gt;GetPoints())&nbsp; ;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#ff0000>It gives that error:</FONT></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT size=1>
<P><FONT size=3>c:\documents and settings\aydemir\desktop\itktovtk\teste.cpp(349) : error C2664: 'itk::PointSetToImageRegistrationMethod&lt;TFixedPointSet,TMovingImage&gt;::SetFixedPointSet' : cannot convert parameter 1 from 'itk::VectorContainer&lt;TElementIdentifier,TElement&gt; *' to 'const itk::PointSet&lt;TPixelType,VDimension&gt; *'</FONT></P>
<P><FONT size=3>1&gt; with</FONT></P>
<P><FONT size=3>1&gt; [</FONT></P>
<P><FONT size=3>1&gt; TFixedPointSet=FixedPointSetType,</FONT></P>
<P><FONT size=3>1&gt; TMovingImage=MovingImageType</FONT></P>
<P><FONT size=3>1&gt; ]</FONT></P>
<P><FONT size=3>1&gt; and</FONT></P>
<P><FONT size=3>1&gt; [</FONT></P>
<P><FONT size=3>1&gt; TElementIdentifier=itk::DefaultStaticMeshTraits&lt;vtkFloatingPointType,3,2,vtkFloatingPointType,vtkFloatingPointType&gt;::PointIdentifier,</FONT></P>
<P><FONT size=3>1&gt; TElement=itk::Point&lt;double,3&gt;</FONT></P>
<P><FONT size=3>1&gt; ]</FONT></P>
<P><FONT size=3>1&gt; and</FONT></P>
<P><FONT size=3>1&gt; [</FONT></P>
<P><FONT size=3>1&gt; TPixelType=PixelType,</FONT></P>
<P><FONT size=3>1&gt; VDimension=3</FONT></P>
<P><FONT size=3>1&gt; ]</FONT></P>
<P><FONT size=3>1&gt; Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast</FONT></P></FONT><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Robert Tamburo &lt;robert.tamburo@gmail.com&gt;<BR>To: tony hakki &lt;tony2007vtk@yahoo.com&gt;<BR>Cc: Christoph Palm &lt;christoph.palm@web.de&gt;; insight-users@itk.org<BR>Sent: Thursday, February 22, 2007 9:46:15 PM<BR>Subject: Re: [Insight-users] Setting fixed image<BR><BR>
<DIV>You need to pass the point set from the mesh to the function. This is how I did it a while ago:</DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>PointsContainer::Pointer pointsContainer = PointsContainer::New();</DIV>
<DIV>pointsContainer = mesh-&gt;GetPoints();</DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>itk::PointSet&lt;float, 3&gt;::Pointer pointSet = itk::PointSet&lt;float,3&gt;::New();</DIV>
<DIV>pointSet-&gt;SetPoints(pointsContainer);</DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>registrationMethod-&gt;SetFixedPointSet(pointSet);</DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>****Note that registrationMethod is templated over itk::PointSet</DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>I don't recall the specifics of the classes involved but you may be able to directly set the points from the mesh, i.e., registrationMethod-&gt;SetFixedPointSet(mesh-&gt;GetPoints()) if you template the registration class over itk::PointsContainer (if possible).&nbsp;</DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<BLOCKQUOTE type="cite"><FONT class=Apple-style-span face="times new roman" size=4><SPAN class=Apple-style-span style="FONT-SIZE: 16px">registrationMethod-&gt;SetFixedPointSet(</SPAN></FONT></BLOCKQUOTE>
<DIV><BR>
<DIV>
<DIV>On Feb 22, 2007, at 3:00 PM, tony hakki wrote:</DIV><BR class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR>Hi christoph;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;first of all I want to thank your kind reply. I read my stl data with VTK then I converted poly data to itk mesh. And <EM>mesh </EM>is the&nbsp; result of vtkpolydata to itk mesh converting process. When I use second one (<EM>registrationMethod-&gt;SetFixedPointSet(mesh);) </EM>It gives the following error. I am really looking forward to your next reply.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Thanks </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Tony</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT size=1>
<P><FONT size=3>c:\documents and settings\aydemir\desktop\itktovtk\teste.cpp(348) : error C2664: 'itk::PointSetToImageRegistrationMethod&lt;TFixedPointSet,TMovingImage&gt;::SetFixedPointSet' : cannot convert parameter 1 from 'itk::SmartPointer&lt;TObjectType&gt;' to 'const itk::PointSet&lt;TPixelType,VDimension&gt; *'</FONT></P>
<P><FONT size=3>1&gt; with</FONT></P>
<P><FONT size=3>1&gt; [</FONT></P>
<P><FONT size=3>1&gt; TFixedPointSet=FixedPointSetType,</FONT></P>
<P><FONT size=3>1&gt; TMovingImage=MovingImageType</FONT></P>
<P><FONT size=3>1&gt; ]</FONT></P>
<P><FONT size=3>1&gt; and</FONT></P>
<P><FONT size=3>1&gt; [</FONT></P>
<P><FONT size=3>1&gt; TObjectType=itk::Mesh&lt;vtkFloatingPointType,3,MeshTraits&gt;</FONT></P>
<P><FONT size=3>1&gt; ]</FONT></P>
<P><FONT size=3>1&gt; and</FONT></P>
<P><FONT size=3>1&gt; [</FONT></P>
<P><FONT size=3>1&gt; TPixelType=PixelType,</FONT></P>
<P><FONT size=3>1&gt; VDimension=3</FONT></P>
<P><FONT size=3>1&gt; ]</FONT></P>
<P><FONT size=3>1&gt; No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called</FONT></P>
<P><FONT size=3>1&gt;Build log was saved at "<A rel=nofollow>file://c</A>:\Documents and Settings\aydemir\Desktop\itktovtk\Debug\BuildLog.htm"</FONT></P></FONT><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Christoph Palm &lt;christoph.palm@<A href="http://web.de/" target=_blank rel=nofollow>web.de</A>&gt;<BR>To: tony hakki &lt;<A href="mailto:tony2007vtk@yahoo.com" target=_blank rel=nofollow>tony2007vtk@yahoo.com</A>&gt;<BR>Sent: Thursday, February 22, 2007 6:56:11 PM<BR>Subject: Re: [Insight-users] Setting fixed image<BR><BR>
<DIV>Hi Tony,<BR><BR>the error message as result of the first try seems to be clear:<BR>GetOutput() is a function e.g. of a filter, not of a object like<BR>image or mesh. What happens, if you try your second suggestion?<BR>How is your mesh generated?<BR><BR>-- Christoph<BR><BR>On Thu, 2007-02-22 at 07:38 -0800, tony hakki wrote:<BR>&gt; Hello dear ITK users;<BR>&gt; I would like to set fixed image when implement a pointset to image<BR>&gt; registration.<BR>&gt; I Try like that;<BR>&gt; registrationMethod-&gt;SetFixedPointSet(mesh-&gt;GetOutput()); //mesh is itk<BR>&gt; mesh<BR>&gt; <BR>&gt;&nbsp;&nbsp;I also tried like that;<BR>&gt; <BR>&gt; registrationMethod-&gt;SetFixedPointSet(mesh);<BR>&gt; <BR>&gt;&nbsp;&nbsp;<BR>&gt; <BR>&gt; It gives that error:<BR>&gt; <BR>&gt; &gt;c:\documents and settings\aydemir\desktop\itktovtk\teste.cpp(366) :<BR>&gt; error C2039: 'GetOutput' : is not a member of<BR>&gt; 'itk::Mesh&lt;TPixelType,VDimension,TMeshTraits&gt;'<BR>&gt; <BR>&gt;
 1&gt; with<BR>&gt; <BR>&gt; 1&gt; [<BR>&gt; <BR>&gt; 1&gt; TPixelType=vtkFloatingPointType,<BR>&gt; <BR>&gt; 1&gt; VDimension=3,<BR>&gt; <BR>&gt; 1&gt; TMeshTraits=MeshTraits<BR>&gt; <BR>&gt; 1&gt; ]<BR>&gt; <BR>&gt;&nbsp;&nbsp;<BR>&gt; <BR>&gt; How Can I set fixed image using itk mesh format. I hope somebody will<BR>&gt; help me. Thank you very much<BR>&gt; <BR>&gt; Tony<BR><BR>&gt; <BR><BR><A href="http://www.chripa.de/AtWork" target=_blank rel=nofollow>www.chripa.de/AtWork</A><BR>----</DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR></DIV></DIV><BR>
<HR SIZE=1>
<A href="http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/" target=_blank rel=nofollow>Never miss an email again!<BR>Yahoo! Toolbar</A> alerts you the instant new Mail arrives.<A href="http://us.rd.yahoo.com/evt=49937/*http://tools.search.yahoo.com/toolbar/features/mail/" target=_blank rel=nofollow> Check it out.</A>
<DIV style="MARGIN: 0px">_______________________________________________</DIV>
<DIV style="MARGIN: 0px">Insight-users mailing list</DIV>
<DIV style="MARGIN: 0px"><A href="mailto:Insight-users@itk.org" target=_blank rel=nofollow>Insight-users@itk.org</A></DIV>
<DIV style="MARGIN: 0px"><A href="http://www.itk.org/mailman/listinfo/insight-users" target=_blank rel=nofollow>http://www.itk.org/mailman/listinfo/insight-users</A></DIV></BLOCKQUOTE></DIV><BR></DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR></DIV></div><br>

<hr size=1>Now that's room service! <a href="http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--
">Choose from over 150,000 hotels <br>in 45,000 destinations on Yahoo! Travel</a> to find your fit.</body></html>