<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><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->GetPoints();</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>itk::PointSet<float, 3>::Pointer pointSet = itk::PointSet<float,3>::New();</DIV><DIV>pointSet->SetPoints(pointsContainer);</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>registrationMethod->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->SetFixedPointSet(mesh->GetPoints()) if you template the registration class over itk::PointsContainer (if possible). </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->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-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"><BR>Hi christoph;</DIV> <DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> 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 result of vtkpolydata to itk mesh converting process. When I use second one (<EM>registrationMethod->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"> </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<TFixedPointSet,TMovingImage>::SetFixedPointSet' : cannot convert parameter 1 from 'itk::SmartPointer<TObjectType>' to 'const itk::PointSet<TPixelType,VDimension> *'</FONT></P><P><FONT size="3">1> with</FONT></P><P><FONT size="3">1> [</FONT></P><P><FONT size="3">1> TFixedPointSet=FixedPointSetType,</FONT></P><P><FONT size="3">1> TMovingImage=MovingImageType</FONT></P><P><FONT size="3">1> ]</FONT></P><P><FONT size="3">1> and</FONT></P><P><FONT size="3">1> [</FONT></P><P><FONT size="3">1> TObjectType=itk::Mesh<vtkFloatingPointType,3,MeshTraits></FONT></P><P><FONT size="3">1> ]</FONT></P><P><FONT size="3">1> and</FONT></P><P><FONT size="3">1> [</FONT></P><P><FONT size="3">1> TPixelType=PixelType,</FONT></P><P><FONT size="3">1> VDimension=3</FONT></P><P><FONT size="3">1> ]</FONT></P><P><FONT size="3">1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called</FONT></P><P><FONT size="3">1>Build log was saved at "<A href="file://c">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 <christoph.palm@<A href="http://web.de">web.de</A>><BR>To: tony hakki <<A href="mailto:tony2007vtk@yahoo.com">tony2007vtk@yahoo.com</A>><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>> Hello dear ITK users;<BR>> I would like to set fixed image when implement a pointset to image<BR>> registration.<BR>> I Try like that;<BR>> registrationMethod->SetFixedPointSet(mesh->GetOutput()); //mesh is itk<BR>> mesh<BR>> <BR>> I also tried like that;<BR>> <BR>> registrationMethod->SetFixedPointSet(mesh);<BR>> <BR>> <BR>> <BR>> It gives that error:<BR>> <BR>> >c:\documents and settings\aydemir\desktop\itktovtk\teste.cpp(366) :<BR>> error C2039: 'GetOutput' : is not a member of<BR>> 'itk::Mesh<TPixelType,VDimension,TMeshTraits>'<BR>> <BR>> 1> with<BR>> <BR>> 1> [<BR>> <BR>> 1> TPixelType=vtkFloatingPointType,<BR>> <BR>> 1> VDimension=3,<BR>> <BR>> 1> TMeshTraits=MeshTraits<BR>> <BR>> 1> ]<BR>> <BR>> <BR>> <BR>> How Can I set fixed image using itk mesh format. I hope somebody will<BR>> help me. Thank you very much<BR>> <BR>> Tony<BR><BR>> <BR><BR><A href="http://www.chripa.de/AtWork" target="_blank">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/">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/"> Check it out.</A><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Insight-users mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Insight-users@itk.org">Insight-users@itk.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>