[Insight-users] itk transform apply to vtk polydata
Luis Ibanez
luis.ibanez at kitware.com
Tue Jul 1 18:49:10 EDT 2008
Hi Flavio,
It is your lucky day ! :-)
We recently committed an example to InsightApplications, illustrating
how to do exactly that.
Please look at the code in:
InsightApplications/Auxiliary/vtk
and the files:
vtkRegistrationMonitor.cxx
vtkRegistrationMonitor.h
itkRegisterITKMonitorVTK.cxx
The itkRegistrer..cxx file performs a 3D registration.
It sends Iteration events that are received by the
vtkRegistrationMonitor, which in its turn updates the
visualization of two polydata surfaces extracted from
the fixed and moving images by using the vtkContour
filter.
the usage should be as simple as:
itkRegisterITKMonitorVTK fixedImage movingImage outputDir/outputimage
Note that you MUST explicitly add the directory of the output image.
This is because, as a bonus, the application saves into png files
screenshots of the visualization at every 10 iterations. These PNG
files will be saved in the "outputDir" directory.
Please give it a try and let us konw if you
find any problems,
Thanks
Luis
------------------
flavio wrote:
> hi
> I wrote e MR registration program, between two mri, that return a
> versorRigid3DTransform.trf.
> I want to use this transform to move a geometric object associeted with
> the registration's moving image and display it with vtk but I don't
> understand how to convert itk
> transfom to vtk coordinate system.
> How I should use rotation(get with GetMatrix) and translation in order
> to have the right position in vtk space?
>
> thanks a lot
> Flavio Simonetti
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list