[Insight-users] registration results

tony hakki tony2007vtk at yahoo.com
Fri Mar 23 13:32:27 EST 2007


hello all;
I have tried to implement point set to image registration;I would like to manipulate the results like that:
Supposing that these are the registation results;
const double versorX = finalParameters[0];
const double versorY = finalParameters[1];
const double versorZ = finalParameters[2];
const double finalTranslationX = finalParameters[3];
const double finalTranslationY = finalParameters[4];
const double finalTranslationZ = finalParameters[5];


I would like to manipulate them like that:

finalParameters[0]=2*vtkMath::Pi()-versorX;
finalParameters[1]=2*vtkMath::Pi()-versorY;
finalParameters[2]= 2*vtkMath::Pi()-versorZ;
finalParameters[3]=finalTranslationX *(-1);
finalParameters[4]=finalTranslationY *(-1);
finalParameters[5]=finalTranslationZ *(-1);


When I manipulate finalParameters[0], finalParameters[1],finalParameters[2]  , It doesn't give any error,  but these parameters are for rotation parameters  where as my image translate when I change these parameters.Why it doesn't rotate but translates through the x,y,z coordinate system When I manupulate them.
On the other hand I couldn't manupulate the rest of the parameters finalParameters[3],,finalParameters[4],,finalParameters[5], ,it gives break or continue error when I run my program. And these are the translation parameters,aren't they? Why I couldn't manupulate these parameters as I showed above? 

here is the my translation code:
typedef itk::TranslationTransform<float,3> NTransformType;
NTransformType::Pointer finalTransform = NTransformType::New();
finalTransform->SetParameters( finalParameters );  //this is registration result
typedef FMeshType::PointsContainer PointsContainerType;
typedef FMeshType::PointsContainerPointer 
PointsContainerPointer;
typedef itk::TransformMeshFilter<
FMeshType,
FMeshType,
NTransformType > FilterType;
 
// Create a Filter 
FilterType::Pointer filter = FilterType::New();
// Connect the inputs
filter->SetInput( input_mesh ); 
filter->SetTransform( finalTransform ); 
// Execute the filter
filter->Update();
std::cout << "Filter: " << filter;
// Get the Smart Pointer to the Filter Output 
FMeshType::Pointer outputMesh = filter->GetOutput();
std::cout << "Output Mesh has " << outputMesh->GetNumberOfPoints();
std::cout << " points " << std::endl;
// Get the the point container
FMeshType::PointsContainerPointer 
transformedPoints = outputMesh->GetPoints();


 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070323/1d6454ee/attachment.html


More information about the Insight-users mailing list