Fourier Based Field-shift for MRI源码程序 - matlab算法设计 - 谷速源码
下载频道> 资源分类> matlab源码> 算法设计> Fourier Based Field-shift for MRI源码程序

标题:Fourier Based Field-shift for MRI源码程序
分享到:

所属分类: 算法设计 资源类型: 文件大小: 4.75 KB 上传时间: 2016-01-25 19:41:57 下载次数: 5 资源积分:1分 提 供 者: xiaopeng2 Fourier Based Field-shift for MRI源码程序
内容:
Fourier Based Field-shift for MRI源码程序,程序员在编程的过程中可以参考学习使用,希望对IT程序员有用,此源码程序简单易懂、方便阅读,有很好的学习价值!
%% Fourier Based Field-shift Calculation for MRI
% A test file to demonstrate the feasibility of low resolution 
% aliasing subtraction.
%% Written 06-07-2012 by Job Bouwman (jgbouwman@hotmail.com)
% Updated 14-06-13
clear all; close all; clc;
 
%% creating a numerical phantom:  
% - an eccentric sphere (radius of 97.3)
% - with tissue-like susceptibility (dChi = - 9 ppm)
% - within an FOV of (256 x 256 x 256)
N  = 192; 
radius  =  round(0.38*N);
dChi    = -9e-6;
voxelSize = [1 1 1];
 
M = round(0.4*N);
Nx =  N; Ny = N; Nz = N;
Mx =  M; My = M; Mz = M;
 
FOV = [Ny Nx Nz].*voxelSize;
 
X_dev = zeros(Ny, Nx, Nz); 
X_dev(My,Mx,Mz) = 1;
X_dev = bwdist(X_dev); 
X_dev(X_dev<=radius) = dChi;
X_dev(X_dev>radius)  = 0;
 
%% The kernel (Gk):
kxSeries = (-Nx/2:Nx/2-1)/FOV(2);
kySeries = (-Ny/2:Ny/2-1)/FOV(1);
kzSeries = (-Nz/2:Nz/2-1)/FOV(3);
 
[kx, ky, kz] = meshgrid(kxSeries,kySeries,kzSeries);
 
k2 = kx.^2 + ky.^2 + kz.^2;
k2(k2==0) = eps;
 
Gk = 1/3 - kz.^2 ./ k2;    
Gk(k2==eps) = 0;
Gk = ifftshift(Gk);
 
%% Field shift calculations:
% without zero-padding the result would be: 
B_dev_aliased = ifftn(fftn(X_dev).*Gk);
 
% with virtual zero-padding the result is: 
B_dev_cleared = calculateFieldShift(X_dev, voxelSize);
 
% thus the aliasing removed is: 
Aliasing = B_dev_aliased - B_dev_cleared;
 
 
%% Displaying the results:
% setting a fixed intensity window, for good visual validation:
close all;
intensityWindow = [min(B_dev_cleared(:)), max(B_dev_cleared(:))];
 
scrsz = get(0,'ScreenSize'); % full screen looks better
figure('Position', scrsz, 'Units', 'normalized');
axes('Position',[0 0 1 1], 'Units','normalized');
 
% the result without zero-padding
subplot(1,3,1);
imagesc(squeeze(B_dev_aliased(My, :, :))',intensityWindow);axis equal tight
text(Nz*0.95,My,'\rightarrow','HorizontalAlignment','right','fontsize',35)
text(Nz*0.65,My*1.1,'aliasing','HorizontalAlignment',...
    'right', 'fontsize', 12)
title('Result without aliasing prevention',...
    'fontsize', 12);
xlabel('axis perpendicular to B_0 \rightarrow');
ylabel('B_0 direction \rightarrow');
 
% the estimated aliasing distribution
subplot(1,3,2);
imagesc(squeeze(Aliasing(My, :, :))',intensityWindow);axis equal tight
text(Nz*0.95,My,'\rightarrow','HorizontalAlignment','right','fontsize',35)
text(Nz*0.65,My*1.1,'correction','HorizontalAlignment',...
    'right', 'fontsize', 12)
title(strcat('Estimated aliasing distribution', ...
    ' (calculated in low-res)'),'fontsize', 12);
xlabel('axis perpendicular to B_0 \rightarrow');
ylabel('B_0 direction \rightarrow');
 
% the final result of using virtual zero-padding:
subplot(1,3,3);
imagesc(squeeze(B_dev_cleared(My, :, :))',intensityWindow);axis equal tight
text(Nz*0.95,My,'\rightarrow','HorizontalAlignment','right','fontsize',35)
text(Nz*0.65,My*1.1,'result','HorizontalAlignment',...
    'right', 'fontsize', 12)
title('Final result of virtual zero-padding','fontsize', 12);
xlabel('axis perpendicular to B_0 \rightarrow');
ylabel('B_0 direction \rightarrow');

文件列表(点击上边下载按钮,如果是垃圾文件请在下面评价差评或者投诉):

Fourier Based Field-shift for MRI源码程序/
Fourier Based Field-shift for MRI源码程序/CalculateFieldShift/
Fourier Based Field-shift for MRI源码程序/CalculateFieldShift/calculateFieldShift.m
Fourier Based Field-shift for MRI源码程序/CalculateFieldShift/demonstration.m

关键词: 源码 程序

Top_arrow
回到顶部
联系方式| 版权声明| 招聘信息| 广告服务| 银行汇款| 法律顾问| 兼职技术| 付款方式| 关于我们|
网站客服网站客服 程序员兼职招聘 程序员兼职招聘
沪ICP备19040327号-3
公安备案号:沪公网安备 31011802003874号
库纳格流体控制系统(上海)有限公司 版权所有
Copyright © 1999-2014, GUSUCODE.COM, All Rights Reserved