参考:field ii自带彩色血流成像例程
【2022/10/10】重看了又一遍,发现fieldii的血流成像仿真问题贼大。仿体只有血流那部分得自己叠加组织上去才行,没有正交解调过程、滤波用的直接相减的方式,没有方差那部分的彩色编码,也没有能量多普勒,问题贼大昂,需要修修修- -|||。(明年发,要不怕毕业查重)
【20221206】中期发现这个信号基础上还得叠加一下噪声信号才对
【20230312】还有缓慢组织运动 T T
一、B超成像:(方法参考专栏(三))
(一)仿体搭建
mk_pht.m+tissue_pht.m
(二)数据采集
sim_phas.m
(三)数据处理
make_pht.m
二、彩色血流成像:
(一)血流仿体搭建
make_sct.m
(二)数据采集
sim_flow.m
- 每条线采集M次,共采集N条线。
(三)数据处理
cfm_image.m
- 每条数据线根据tstart对齐补0,经过希尔伯特变化转化为正交复数数组,再将M次采集构成一组;
- 计算每组第一条线标准差RMS,根据计算速度间隔est_dist得到多少个点Ndist计算一次速度。
- 对每个点计算一次速度,计算方法如下:求M次一阶导数(差分),如果一阶导数的标准差小于RMS/5,则为静止区域。否则计算速度,速度计算方法为自相关法。
(三)显示
使用map根据血流值及正反向显示颜色。
三、合成
cfm_bmode.m
把多普勒图像贴到B超图像上去。贴图时B超图像像素值低于多普勒血流部分,并使用map分段成像。
fieldii中彩色多普勒应用到的一些函数
(一)atan 和 atan2:
都是求反正切函数,但参数数量和计算方法都有不同。
atan2(a,b)是4象限反正切,它的取值不仅取决于正切值a/b,还取决于点 (b, a) 落入哪个象限
当点(b, a) 落入第一象限时,atan2(a,b)的范围是 0 ~ pi/2;
当点(b, a) 落入第二象限时,atan2(a,b)的范围是 pi/2 ~ pi;
当点(b, a) 落入第三象限时,atan2(a,b)的范围是 -pi/2~0;
当点(b, a) 落入第四象限时,atan2(a,b)的范围是 -pi~-pi/2
而 atan(a/b) 仅仅根据正切值为a/b求出对应的角度 (可以看作仅仅是2象限反正切)
当 a/b > 0 时,atan(a/b)取值范围是 0 ~ pi/2;
当 a/b < 0 时,atan(a/b)取值范围是 -pi/2~0
这个函数可以直接求矩阵相位:p=angle(z);
(二)自相关算法(见超声基础专栏,但估计我毕业才会发出来,明年见吧)
(三)interp