[Insight-users] Setting fixed image
Robert Tamburo
robert.tamburo at gmail.com
Thu Feb 22 15:46:15 EST 2007
You need to pass the point set from the mesh to the function. This is
how I did it a while ago:
PointsContainer::Pointer pointsContainer = PointsContainer::New();
pointsContainer = mesh->GetPoints();
itk::PointSet<float, 3>::Pointer pointSet = itk::PointSet<float,
3>::New();
pointSet->SetPoints(pointsContainer);
registrationMethod->SetFixedPointSet(pointSet);
****Note that registrationMethod is templated over itk::PointSet
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).
> registrationMethod->SetFixedPointSet(
On Feb 22, 2007, at 3:00 PM, tony hakki wrote:
>
> Hi christoph;
> 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 mesh is the
> result of vtkpolydata to itk mesh converting process. When I use
> second one (registrationMethod->SetFixedPointSet(mesh);) It gives
> the following error. I am really looking forward to your next reply.
> Thanks
> Tony
>
> 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> *'
>
> 1> with
>
> 1> [
>
> 1> TFixedPointSet=FixedPointSetType,
>
> 1> TMovingImage=MovingImageType
>
> 1> ]
>
> 1> and
>
> 1> [
>
> 1> TObjectType=itk::Mesh<vtkFloatingPointType,3,MeshTraits>
>
> 1> ]
>
> 1> and
>
> 1> [
>
> 1> TPixelType=PixelType,
>
> 1> VDimension=3
>
> 1> ]
>
> 1> No user-defined-conversion operator available that can perform
> this conversion, or the operator cannot be called
>
> 1>Build log was saved at "file://c:\Documents and Settings\aydemir
> \Desktop\itktovtk\Debug\BuildLog.htm"
>
>
> ----- Original Message ----
> From: Christoph Palm <christoph.palm at web.de>
> To: tony hakki <tony2007vtk at yahoo.com>
> Sent: Thursday, February 22, 2007 6:56:11 PM
> Subject: Re: [Insight-users] Setting fixed image
>
> Hi Tony,
>
> the error message as result of the first try seems to be clear:
> GetOutput() is a function e.g. of a filter, not of a object like
> image or mesh. What happens, if you try your second suggestion?
> How is your mesh generated?
>
> -- Christoph
>
> On Thu, 2007-02-22 at 07:38 -0800, tony hakki wrote:
> > Hello dear ITK users;
> > I would like to set fixed image when implement a pointset to image
> > registration.
> > I Try like that;
> > registrationMethod->SetFixedPointSet(mesh->GetOutput()); //mesh
> is itk
> > mesh
> >
> > I also tried like that;
> >
> > registrationMethod->SetFixedPointSet(mesh);
> >
> >
> >
> > It gives that error:
> >
> > >c:\documents and settings\aydemir\desktop\itktovtk\teste.cpp(366) :
> > error C2039: 'GetOutput' : is not a member of
> > 'itk::Mesh<TPixelType,VDimension,TMeshTraits>'
> >
> > 1> with
> >
> > 1> [
> >
> > 1> TPixelType=vtkFloatingPointType,
> >
> > 1> VDimension=3,
> >
> > 1> TMeshTraits=MeshTraits
> >
> > 1> ]
> >
> >
> >
> > How Can I set fixed image using itk mesh format. I hope somebody
> will
> > help me. Thank you very much
> >
> > Tony
>
> >
>
> www.chripa.de/AtWork
> ----
>
>
> Never miss an email again!
> Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070222/bb91c7f8/attachment.htm
More information about the Insight-users
mailing list