[Insight-users] Accuracy of demons registration

Yogish Mallya mallyayogish at yahoo.co.in
Thu May 21 23:14:33 EDT 2009


 
Hi Luis,
 
The  landmarks are recorded in terms of pixel coordinates.  The origin is (0,0,0) and orientation is trans-axial.
 
The code mentioned in my mail was correct .I found that the issue was with the paramter values that I had used for demons. I adjusted certain parameters of demons (iterations, histogram matching criteria). Now the qualitative results match with the error vectors.
 
Best Wishes
Yogish
 
 

--- On Thu, 21/5/09, Luis Ibanez <luis.ibanez at kitware.com> wrote:


From: Luis Ibanez <luis.ibanez at kitware.com>
Subject: Re: [Insight-users] Accuracy of demons registration
To: "Yogish Mallya" <mallyayogish at yahoo.co.in>
Cc: insight-users at itk.org
Date: Thursday, 21 May, 2009, 8:34 AM



Hi Yogish,


  Why are you assigning the landmarks to Indexes ?

  Are they really defined in pixel coordinates ?

  Usually landmarks are recorded in Physical Space
  (taking origin,spacing and orientation into account).



   Luis



-------------------
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 Click here! <http://in.rd.yahoo.com/tagline_Travel_1/*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



      Share files, take polls, and make new friends - all under one roof. Go to http://in.promos.yahoo.com/groups/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090522/35dee414/attachment-0001.htm>


More information about the Insight-users mailing list