[Insight-users] 1-converting itk mesh,2-registration

tony hakki tony2007vtk at yahoo.com
Mon Feb 5 13:57:28 EST 2007


Hello;
1-I converted vtkpoly data to Itk mesh, How Can I test if converting process works correctly?
Here  is the last part of the converting process
// then copy the normal triangles
polygons->InitTraversal();
while( polygons->GetNextCell( numberOfCellPoints, cellPoints ) )
{
if( numberOfCellPoints !=3 ) // skip any non-triangle.
{
continue;
}
MeshType::CellAutoPointer c;
TriangleCellType * t = new TriangleCellType;
t->SetPointIds( (unsigned long*)cellPoints );
c.TakeOwnership( t );
mesh->SetCell( cellId, c );
cellId++;
}
 
2- I made a registration application which is Pointset to image registration benefit from itkPointSetToImageRegistrationTest_1.cxx. I would like to display both data sets on one window,But I don't know how to use registration result and dispay two data sets overlapping. 
Here  is the last part of the  registration process
 
registrationMethod->SetMetric( metric );
registrationMethod->SetOptimizer( optimizer );
registrationMethod->SetTransform( transform );
registrationMethod->SetFixedPointSet(mesh.GetPointer());
//registrationMethod->SetFixedPointSet(fixedPointSet);
registrationMethod->SetMovingImage(rawreader->GetOutput());
registrationMethod->SetInterpolator(interpolator);
//------------------------------------------------------------
// Set up transform parameters
//------------------------------------------------------------
ParametersType parameters( transform->GetNumberOfParameters() );
// initialize the offset/vector part
for( unsigned int k = 0; k <Dimension; k++ )
{
parameters[k]= 0.0f;
}
try 
{
registrationMethod->StartRegistration();
}
catch( itk::ExceptionObject & e )
{
std::cout << e << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
 
 
I am looking forward to your answer,I really need them,
Thanks in advance
Tony


 
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070205/0bce5220/attachment.html


More information about the Insight-users mailing list