[Insight-users] (no subject)

Sylvain Jaume sylvain.jaume at kitware.com
Mon Feb 5 13:59:20 EST 2007


Hi Tony,

You can use itkVTKPolyDataReader in Insight/Code/Review.

HTH,
Sylvain

tony hakki wrote:
> 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* 
> 
> 
> ------------------------------------------------------------------------
> Finding fabulous fares is fun.
> Let Yahoo! FareChase search your favorite travel sites 
> <http://farechase.yahoo.com/promo-generic-14795097;_ylc=X3oDMTFtNW45amVpBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzEEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw-- 
>  > to find flight and hotel bargains.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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