rotating and translating nifti image

4 ビュー (過去 30 日間)
Richa Rawat
Richa Rawat 2020 年 12 月 21 日
コメント済み: Richa Rawat 2020 年 12 月 24 日
Hi!
I have a nifti image and I want to rotate the image by 10 degree and translate the image by [10, 10, 0] in matlab. The new image should have the same orientation and header information as the original image. Please help me with this task.

回答 (1 件)

Pratyush Roy
Pratyush Roy 2020 年 12 月 24 日
編集済み: Pratyush Roy 2020 年 12 月 24 日
Hi,
MATLAB allows reading of nifti files using the niftiread command.
After reading the image, one can use imrotate3 and imtranslate commands to rotate and translate the image respectively.
Hope this helps!
  1 件のコメント
Richa Rawat
Richa Rawat 2020 年 12 月 24 日
Hi!
Thanks for your answer. I have already tried what you suggested but the orientation of the image changes when I use niftiread.
image02 = niftiread('02'); # orientation of image02 and 02 is different.
J = imrotate(image02,10);
J = imtranslate(J,[10, 15, 0]);
niftiwrite(J,'rot_trans02.nii');

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeNeuroimaging についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by