使用Field_II_ver_3_24_windows_gcc工具箱实现超声波数据成像matlab仿真

Posted fpga和matlab

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用Field_II_ver_3_24_windows_gcc工具箱实现超声波数据成像matlab仿真相关的知识,希望对你有一定的参考价值。

目录

一、理论基础

二、核心程序

三、测试结果


FPGA教程目录

MATLAB教程目录

一、理论基础

Field II Ultrasound Simulation Program

关于Field_II_ver_3_24_windows_gcc工具箱,从上述网址,我们可以知道:

       今年,Field II庆祝其为超声波社区服务25年。最初的C版本是在1991-92年我休假期间在杜克大学开发的,这是1995-1996年开发的通用Field II的基础。从那时起,该程序就可以在网上免费下载。Field IIpro并行版本现已发布,可在Matlab 2021a上使用,并制作了新的Python版本,即将发布。目前,它存在于Matlab和Octave的版本中,也存在于可用于构建独立可执行文件的C库版本中。有关该程序的更多信息,请访问左侧菜单中的Field IIpro。在这里,您还可以找到一篇关于Field IIpro性能的论文。

        用于windows的Field II 3.30版已发布用于Matlab 2021a。您可以在左边的菜单中找到代码:Download/For Matlab 2021。

       你现在可以在LinkedIn上关注Field II并发表评论和讨论。您可以自由加入名为:Field II超声模拟程序的小组,在那里将发布有关FieldⅡ新版本的新闻。

        Field II是一个使用线性声学模拟超声换能器场和超声成像的程序。该程序使用Tupholme Stepanishen方法计算脉冲超声场。该程序能够计算大量不同换能器的脉冲和连续波情况下的发射和脉冲回波场。此外,可以模拟任何类型的线性成像以及人体组织的真实图像。该程序在Matlab下运行在多种不同的操作系统(Windows、Linux、Mac OS X)上,并且这些程序目前在某些限制下可以自由使用(参见版权)。

该程序的最新版本是2021 4月5日的3.30版本。请注意,该代码将在64位版本的Linux、Mac和Windows下与Matlab 2019-2021配合使用。

References

[1] G.E. Tupholme: Generation of acoustic pulses by baffled plane pistons, Mathematika 16, pp. 209-224, 1969.

[2] P.R. Stepanishen: The time-dependent force and radiation impedance on a piston in a rigid infinite planar baffle, J.Acoust.Soc.Am. 49 (3), pp. 841-849, 1971A.

[3] P.R. Stepanishen: Transient radiation from pistons in a infinite planar baffle, J.Acoust.Soc.Am. 49, pp. 1627-1638, 1971B.

[4] P.R. Stepanishen: Pulsed transmit/receive response of ultrasonic piezoelectric transducers, J.Acoust.Soc.Am. 69, pp. 1815-1827, 1981.

[5] J.A. Jensen: A Model for the Propagation and Scattering of Ultrasound in Tissue, J.Acoust.Soc.Am. 89, pp. 182-191, 1991.

[6] J.A. Jensen and N. B. Svendsen: Calculation of pressure fields from arbitrarily shaped, apodized, and excited ultrasound transducers, IEEE Trans. Ultrason., Ferroelec., Freq. Contr., 39, pp. 262-267, 1992.

[7] J.A. Jensen: Linear description of ultrasound imaging systems, Notes for the International Summer School on Advanced Ultrasound Imaging, Technical University of Denmark July 5 to July 9, 1999, Technical University of Denmark, June, 1999.

[8] J.A. Jensen: Field: A Program for Simulating Ultrasound Systems, Paper presented at the 10th Nordic-Baltic Conference on Biomedical Imaging Published in Medical & Biological Engineering & Computing, pp. 351-353, Volume 34, Supplement 1, Part 1, 1996.

[9] J. A. Jensen, Darshan Gandhi, and William D. O'Brien: Ultrasound fields in an attenuating medium, Proceedings of the IEEE 1993 Ultrasonics Symposium, pp. 943-946, Vol. 2, 1993.

[10] J. A. Jensen: Ultrasound fields from triangular apertures, Journal of the Acoustical Society of America, Vol. 100(4), pp. 2049-2056, October, 1996.

[11] J. A. Jensen: Simulating arbitrary-geometry ultrasound transducers using triangles, Proceedings of IEEE International Ultrasonics Symposium, Vol. 2, pp. 885-888, 1996.

[12] J. A. Jensen and Peter Munk: Computer phantoms for simulating ultrasound B-mode and cfm images, 23rd Acoustical Imaging Symposium, Boston, Massachusetts, USA, April 13-16, 1997.

[13] J. A. Jensen: A new approach to calculating spatial impulse responses, Proceedings of IEEE Ultrasonics Symposium Proceedings, pp. 1755-1759, 1997

[14] J. A. Jensen: A new Calculation Procedure for Spatial Impulse Responses in Ultrasound, Journal of the Acoustical Society of America, Vol. 105, pp. 3266-3274, 1999.

[15] J. A. Jensen: Ultrasound Imaging and its modeling, in "Imaging of Complex Media with Acoustic and Seismic Waves", Editors: Fink, M.; Kuperman, W.A.; Montagner, J-P; Tourin, A., Topics in Applied Physics, Springer Verlag, pp. 135-165, 2002.

[16] J. A. Jensen: Speed-accuracy trade-offs in computing spatial impulse responses for simulation medical ultrasound imaging, Journal of Computational Acoustics, Vol.9, no..3, pp.731-744, 2001

[17] M. Schlaikjer, S. Torp-Pedersen and J. A. Jensen: Simulation of RF data with tissue motion for optimizing stationary echo canceling filters, Ultrasonics, Vol. 41 (6) , pp. 415-419. 2003.

[18] J. A. Jensen and S. Nikolov: Fast simulation of ultrasound images, Proceedings the IEEE Ultrasonics Symposium, vol. 2, pp. 1721-1724, 2000.

二、核心程序

............................................................
%搜索缺陷
[flag3,X,Y,env_gray0] = func_holesearch(env_gray,x*1000,depth*1000);


figure;
subplot(121);
image(x*1000, depth*1000, 255*flag3); 
xlabel('Lateral distance [mm]')
ylabel('Depth [mm]')
axis('image')
colormap(gray(128))
 
subplot(122);
image(x*1000, depth*1000, env_gray0);
xlabel('Lateral distance [mm]')
ylabel('Depth [mm]')
axis('image')
colormap(gray(128))
 
%将数据量缩小,否则三维的时候内存会不够
SCALE     = 250;
flag31    = flag3(1:8295/SCALE:end,:);
[RR,CC]   = size(flag31);
%像素坐标转换为转化为体素数据
VoxelMat0 = zeros(RR,CC,10);
for i=1:RR
    for j=1:CC
        for k=1:10
            if flag31(i,j)==0
               VoxelMat0(i,j,k)=1;
            end
        end
    end
end
figure;
subplot(121);
[vol_handle,FV]=VoxelPlotter(VoxelMat0,1); 
daspect([0.5,1,1]);
view([100,34]);


%像素坐标转换为转化为体素数据
VoxelMat=zeros(RR,CC,1);
for i=1:RR
    for j=1:CC
        for k=1:1
            if flag31(i,j)==0
               VoxelMat(i,j,k)=1;
            end
        end
    end
end
subplot(122);
[vol_handle,FV]=VoxelPlotter(VoxelMat,1); 
view([90,90]);
daspect([0.5,1,1]);
 



VoxelMat2=zeros(RR,CC,1);
for i=1:RR
    for j=1:CC
        for k=1:1
            if flag31(i,j)==1
               VoxelMat2(i,j,k)=1;
            end
        end
    end
end
figure;
[vol_handle,FV2]=VoxelPlotter(VoxelMat2,1); 
 

%八叉树法细化,缩小成像范围;
%第一次
pts = FV2.vertices; 
OT  = OcTree(pts,'binCapacity',3000,'minSize',0.001); 
OT.shrink 
X1  = OT.Points(1:4:end,1);
Y1  = OT.Points(1:4:end,2);
Z1  = OT.Points(1:4:end,3);
VoxelMat3 = VoxelMat0;
for i = 1:length(X1)
    VoxelMat3(floor(X1(i))+0,floor(Y1(i))+0,floor(Z1(i))+1)=0; 
    VoxelMat3(floor(X1(i))+0,floor(Y1(i))+1,floor(Z1(i))+1)=0;        
    VoxelMat3(floor(X1(i))+1,floor(Y1(i))+0,floor(Z1(i))+1)=0;    
    VoxelMat3(floor(X1(i))+1,floor(Y1(i))+1,floor(Z1(i))+1)=0;         
end
%第二次
.....................................

三、测试结果

 

 

 

A19-18

以上是关于使用Field_II_ver_3_24_windows_gcc工具箱实现超声波数据成像matlab仿真的主要内容,如果未能解决你的问题,请参考以下文章

lduan Centos 7 KVM Centos Windos

求原生windos xp sp3 iso下载网址 干净的系统!啥软件都没有的!

Windos_Hook_动态链接库-CreateDllDemo ——第一课 _Po学校

大数据技术之_24_电影推荐系统项目_02_Python 基础语法

python全栈开发day24-__new____del__item系列异常处理

大数据技术之_24_电影推荐系统项目_04_推荐系统算法详解