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

Li Yufei yli at research.balgrist.ch
Tue Nov 25 09:54:12 EST 2008


Thank you for your help pinpress. I tried to read it with float32 and now the numbers make sense. Just another question, is the unit of the displacement values here in millimeters or pixels? I need to calculate the strains from them. Thanks!

Yufei


-----Original Message-----
From: insight-users-bounces at itk.org on behalf of pinpress
Sent: Tue 25.11.2008 15:12
To: insight-users at itk.org
Subject: Re: [Insight-users] How to calculate displacement from deformation field
 

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.

_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users



*****************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for content and by McAffee Webshield for the presence of computer viruses.
*****************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081125/096f9cd0/attachment-0001.htm>


More information about the Insight-users mailing list