⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cyst_pht.m

📁 FIELD II 是B超的matlab仿真程序。 执行 先运行 field_init.m
💻 M
字号:
%  Create a computer model of a cyst phantom. The phantom contains%  fiven point targets and 6, 5, 4, 3, 2 mm diameter waterfilled cysts, %  and 6, 5, 4, 3, 2 mm diameter high scattering regions. All scatterers %  are situated in a box of (x,y,z)=(50,10,60) mm and the box starts %  30 mm from the transducer surface.%%  Calling: [positions, amp] = cyst_phantom (N);%%  Parameters:  N - Number of scatterers in the phantom%%  Output:      positions  - Positions of the scatterers.%               amp        - amplitude of the scatterers.%%  Version 2.2, April 2, 1998 by Joergen Arendt Jensenfunction [positions, amp] = cyst_phantom (N)x_size = 50/1000;   %  Width of phantom [mm]y_size = 10/1000;   %  Transverse width of phantom [mm]z_size = 60/1000;   %  Height of phantom [mm]z_start = 30/1000;  %  Start of phantom surface [mm];%  Create the general scatterersx = (rand (N,1)-0.5)*x_size;y = (rand (N,1)-0.5)*y_size;z = rand (N,1)*z_size + z_start;%  Generate the amplitudes with a Gaussian distributionamp=randn(N,1);%  Make the cyst and set the amplitudes to zero inside%  6 mm cystr=6/2/1000;      %  Radius of cyst [mm]xc=10/1000;     %  Place of cyst [mm]zc=10/1000+z_start;  inside = ( ((x-xc).^2 + (z-zc).^2) < r^2);amp = amp .* (1-inside); %  5 mm cystr=5/2/1000;      %  Radius of cyst [mm]zc=20/1000+z_start;  inside = ( ((x-xc).^2 + (z-zc).^2) < r^2);amp = amp .* (1-inside); %  4 mm cystr=4/2/1000;      %  Radius of cyst [mm]zc=30/1000+z_start;  inside = ( ((x-xc).^2 + (z-zc).^2) < r^2);amp = amp .* (1-inside); %  3 mm cystr=3/2/1000;      %  Radius of cyst [mm]zc=40/1000+z_start;  inside = ( ((x-xc).^2 + (z-zc).^2) < r^2);amp = amp .* (1-inside); %  2 mm cystr=2/2/1000;      %  Radius of cyst [mm]zc=50/1000+z_start;  inside = ( ((x-xc).^2 + (z-zc).^2) < r^2);amp = amp .* (1-inside); %  Make the high scattering region and set the amplitudes to 10 times inside%  6 mm regionr=5/2/1000;       %  Radius of cyst [mm]xc=-5/1000;     %  Place of cyst [mm]zc=50/1000+z_start;  inside = ( ((x-xc).^2 + (z-zc).^2) < r^2) ;amp = amp .* (1-inside) + 10*amp .* inside; %  5 mm regionr=4/2/1000;       %  Radius of cyst [mm]zc=40/1000+z_start;  inside = ( ((x-xc).^2 + (z-zc).^2) < r^2) ;amp = amp .* (1-inside) + 10*amp .* inside; %  4 mm regionr=3/2/1000;       %  Radius of cyst [mm]zc=30/1000+z_start;  inside = ( ((x-xc).^2 + (z-zc).^2) < r^2) ;amp = amp .* (1-inside) + 10*amp .* inside; %  3 mm regionr=2/2/1000;       %  Radius of cyst [mm]zc=20/1000+z_start;  inside = ( ((x-xc).^2 + (z-zc).^2) < r^2) ;amp = amp .* (1-inside) + 10*amp .* inside; %  2 mm regionr=1/2/1000;       %  Radius of cyst [mm]zc=10/1000+z_start;  inside = ( ((x-xc).^2 + (z-zc).^2) < r^2) ;amp = amp .* (1-inside) + 10*amp .* inside; %  Place the point scatterers in the phantomfor i=N-5:N  x(i) = -15/1000;  y(i) = 0;  z(i) = z_start + (10+5*10)/1000 + (i-N)*10/1000;  amp(i) = 20;  end  %  Return the variablespositions=[x y z];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -