[Insight-users] Accuracy of demons registration

Branislav Goga brano.goga at centrum.sk
Fri May 15 07:24:07 EDT 2009


Well, first thing I would check is direction of registration. Does
deformation field really transform points from fixed to moving or vice
versa? Or it will transform images from fixed to moving. If I understand
well algorithm for calculation of transformed image (resample image filter,
warping image filter), you use transformation, which transforms points from
fixed image to points in moving image to transform moving image to fixed
image. Maybe you problem could origin here.

regards
Brano


Yogish Mallya wrote:
> 
> Dear All,
>  
> Here is a piece of code that I have written to estimate accuracy of demons
> registration.  The code reads index of the landmark points on fixed and
> moving image from a file and calculates reference vectors. Accuracy
> is calculated by taking difference between reference vector field and
> vector field generated by demons at fixed landmark position. Qualitativly
> or visually the registration results look good (deformed moving image
> overlaid on to fixed image). However the components of error vector are
> very high. Is there any coding errors ?
>  
> FILE *read_fixed_landmarks = fopen(argv[7],"rt");
> FILE *read_moving_landmarks = fopen(argv[8],"rt");
> FILE *error_file = fopen(argv[9],"w");
> 
>  
> VectorType est_displacement;
> VectorType ref_displacement;
>  
> double error[3];
> ;
>  
> while (!feof(read_fixed_landmarks) && !feof(read_moving_landmarks))
> {
> 
> float fixed_x, fixed_y, fixed_z;
> float moving_x, moving_y, moving_z;
>  
> fscanf(read_fixed_landmarks,"%f %f %f\n", &fixed_x, &fixed_y, &fixed_z);
> fscanf(read_moving_landmarks,"%f %f %f\n", &moving_x, &moving_y,
> &moving_z);
> 
>  
> DeformationFieldType::IndexType index;
> index[0] = fixed_x;
> index[1] = fixed_y;
> index[2] = fixed_z;
> 
> est_displacement = field->GetPixel(index);
> ref_displacement[0] = moving_x*moving_spacing[0]-
> fixed_x*fixed_spacing[0];
> ref_displacement[1] = moving_y*moving_spacing[1]-
> fixed_y*fixed_spacing[1];
> ref_displacement[2] = moving_z*moving_spacing[2]-
> fixed_z*fixed_spacing[2];
>  
> error[0] = est_displacement[0]- ref_displacement[0];
> error[1] = est_displacement[1]- ref_displacement[1];
> error[2] = est_displacement[2]- ref_displacement[2];
> 
> 
> 
>  
> }
>  
> Thank you in advance
> Yogish Mallya
> 
> 
>       Explore and discover exciting holidays and getaways with Yahoo!
> India Travel http://in.travel.yahoo.com/
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Accuracy-of-demons-registration-tp23545022p23557784.html
Sent from the ITK - Users mailing list archive at Nabble.com.



More information about the Insight-users mailing list