[Insight-users] How to calculate displacement from deformation field

pinpress sb_ji at yahoo.com
Tue Nov 25 09:12:04 EST 2008


Hi,

I have used demons registration recently, but in my case, I have
M-by-N-by-P-by-3 double values of the displacement, that means 3
displacement values (e.g., vector) at each and every voxel.

My wild guess: you read in the displacement file in Matlab as a sequence of
one-byte (e.g., uint8) integer, but you really should have read in the file
as a sequence of 4-byte double value. Then you will also get 3 displacement
values at each voxel, instead of 12.

Also be cautious here, Matlab uses column major, whereas VTK files from ITK
are row major. So you need to switch the first two dimensions of the
deformation matrix in Matlab.


Li Yufei wrote:
> 
> Hi all,
> 
> I have been working with some deformation fields generated from my demons
> registration. I am able to view the field in paraview with no problem.
> What I really want is to quantify the displacement (max, min, average
> displacement) and subsequently the strains. 
> 
> I tried to read the field to matlab and I found that for an image size of
> 300*300*100, there are 300*300*100*12 elements in the field. so I guess
> for each pixel, there are 12 numbers specifying the deformation. Can
> someone tell me what are these 12 elements? or anyone has an idea how to
> calculate the displacement? Thank you very much.
> 
> Best regards
> 
> Yufei
> 

-- 
View this message in context: http://www.nabble.com/How-to-calculate-displacement-from-deformation-field-tp20677817p20681978.html
Sent from the ITK - Users mailing list archive at Nabble.com.



More information about the Insight-users mailing list