필터 지우기
필터 지우기

Strain measurement

조회 수: 8 (최근 30일)
K BV
K BV 2012년 4월 19일
댓글: Raluca 2024년 4월 22일
Hi,
I have a sequence of cardiac MRI and I would like to plot the circumferential strain (deformation) during the time.
For that, I made the hypothesis that I can measure the strain between every two successive points. For that, I wrote this code :
for i=1:loopimages % my images sequence
for j=1:looppoints % all points
% Initial distance between the 1st and 2nd points
distance_initiale = (MAT_Xinitial(1,j+1) - MAT_Xinitial(1,1)).^2 + (MAT_Yinitial(1,j+1) - MAT_Yinitial(1,1)).^2;
Mat_dist_init(1,j) = distance_initiale;
for k=1:((j+1) - 1) % every pair of points
distance = (MAT_Xfinal_track(j+1,i) - MAT_Xfinal_track(j,i)).^2 + (MAT_Yfinal_track(j+1,i) - MAT_Yfinal_track(j,i)).^2;
Mat_dist(1,j) = distance;
strain = (Mat_dist - Mat_dist_init) / Mat_dist_init;
Mat_strain(j,:) = strain;
end
end
plot(mm,Mat_strain,'+r')
end
I'm sure that my code is far to be perfect but I would appreciate any remarks that can help me ameliorate it.
Thank you in advance !
  댓글 수: 2
Honey
Honey 2023년 9월 7일
Hi if you could share your full code. It would be much helpful.
DGM
DGM 2023년 9월 7일
OP is gone. This thread died over 11 years ago, and OP has been inactive for a decade now.
If this is truly important for your needs, you can try to contact them via their user profile, but be aware that the probability of a fruitful response is very low.
Otherwise, if you need help with something, you may consider asking a fresh question. There's no certainty that it will solve whatever problem you have, but it might be more prudent than waiting on ghosts.

댓글을 달려면 로그인하십시오.

답변 (2개)

Sean de Wolski
Sean de Wolski 2012년 4월 19일
If you explain your use case and your data (maybe with an image to help!) I think I can help you. Strain is notoriously hard to calculate as it requires differentiation, which in turn amplifies noise.
For my MS thesis I calculated strain in CT image deformation using a method that smooths. It was still difficult since I lost a fair amount of points to noise, but overall it did a good job. I don't have my thesis or the code on me right now so I can't get you the paper until later.
For what you have above, a comment:
  • Shouldn't there be a sqrt() in there? If so look at hypot(), to calculate dist_initial and dist_final
  댓글 수: 1
Raluca
Raluca 2024년 4월 22일
Hello, could you please help me with your code for scientific purposes?

댓글을 달려면 로그인하십시오.


K BV
K BV 2012년 4월 19일
Thanks for your answer !
I have a sequence of MRI images, the number of these images is stored in loopimages.
I used two filters "median" and "gaussian" to have a better contour smoothing.
Also, I have about 23 points (markers) to track stored in looppoints.
MAT_Xinitial is a matrix containing the X-position of j-th markers in the first image, same for MAT_Yinitial which contains the Y-position of j-th markers in the first image. Its size is 1x(looppoints)
MAT_Xfinal_track is a matrix again containing the X-position of j markers in i images (after the tracking), same for MAT_Yfinal_track is a matrix again containing the Y-position of the j-th markers in i-th images (after the tracking).
distance_initiale is the distance between the first and the second marker in the first image. It will be my reference distance.
distance is the distance between two successive markers through the rest of images : 2 -> loopimages.
I omitted sqrt to have big values to plot, I'll add it right now.
  댓글 수: 2
Sean de Wolski
Sean de Wolski 2012년 4월 19일
So you have displacements for markers that are not on a regular grid? How irregular is your grid (i.e. marker distriubution)? The strain calculation method that I was thinking of (I believe, though I could very well be wrong) requires markers to be on a regular grid. This would require interpolating to a regular grid first or finding a different method.
K BV
K BV 2012년 4월 19일
I think that we can call my grid regular since the markers I'm tracking are sampled with a sampling rate of 9 pixels.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by