FranckLab / FIDVC

Fast Iterative Digital Volume Correlation Algorithm
31 stars 18 forks source link

Retrieving mesh #3

Closed xacababosa closed 8 years ago

xacababosa commented 8 years ago

Hello,

I was wondering how can I retrieve the mesh coordinates where the displacement field is defined. I am a little bit confused beacause I used the default spacing (8) for a 519x694x120 volume image and the size of the displacement field (for example, u{1}{1}) is 66x88x16 (which is not the length expected for vectors of the form 1:dm:519,1:dm:694 and 1:dm:120). Should the spacing between subsets be a divisor of each of the dimensions in order to get a well defined mesh?

Thank you very much,

Xavier

mohakpatel commented 8 years ago

Hi Xavier, It's a good question, the mesh coordinates for displacement field can be confusing. The displacement field has the spacing of dm = 8. The way it has been setup, it works as 1:dm:519+2, 1:dm:694+3 and 1:dm:120+1. Basically, it asymmetrically pads the image such that, the image size has reminder of 1 when divided by 8. Does it makes sense?

Best, Mohak

xacababosa commented 8 years ago

Then the displacement field in these coordinates has been interpolated after finding its values in the center of each subset, right? So the output displacement is defined in the coordinates in the way you told me. It makes much more sense now.

Thank you very much!

Xavier

mohakpatel commented 8 years ago

Just a minor correction. The displacement aren't interpolated but calculated at the coordinates as I defined earlier.

On another note, a cleaner way to describe the coordinates will be: 1:dm:size(I,i)+dm