Extracting Velocity from Color Doppler Image

10 次查看(过去 30 天)
How can I accurately extract velocities from a color Doppler image (the dicom header doesn't contain the velocity map)? I have an image with a color bar in the upper right of the image that gives the minimum and maximum velocities represented by colors in the image. I've been able to manually map the colors to velocities but am having difficulty accounting for aliasing.

回答(1 个)

Fei Deng
Fei Deng 2016-9-23
Hi Vibhav,
I presume you have an image generated in other software and you want to read the value each/a certain point/pixel according to the color bar you have, which is part of the image and not a colorbar object.
You can do that in several steps:
1) Open the image in MATLAB; 2) Get the range of the velocity from the old color bar; 3) Add a real color bar; 4) Get the RGB value for a certain location on the figure, associate it with the real color bar, and compute value represented by this RGB value (color).
Following script is an example to give you an idea how to do that.
close all
clear all
x = linspace(0,3*pi,200);
y = cos(x) + rand(1,200);
c = linspace(1,10,length(x));
scatter(x,y,50,c,'filled')
colorbar
saveas(gcf,'test','tif')
close all
X = imread('test.tif');
imshow(X)
colorbar,
cmap = colormap;
% you have to know the min and max of you data
% get that from the original color bar you have in the upper right of the image;
mindata = 1;
maxdata = 10;
% take location [351,314] for example, here location is the pixel location
% you can also check the RGB of this point by placing mouse and single
% click it at the location on MATLAB figure (enable Data Cursor mode).
locX = 351; locY = 314;
rvalue = double(X(locY,locX,1));
gvalue = double(X(locY,locX,2));
bvalue = double(X(locY,locX,3));
rgbInBar = [rvalue,gvalue,bvalue]/255;
compare = (repmat(rgbInBar,length(cmap),1)-cmap);
comparetotal = sum(compare,2);
[valuediff,rowLoc] = min(abs(comparetotal));
currentPointValue = mindata+(maxdata-mindata)*rowLoc/length(cmap)
  1 个评论
Vibhav Rangarajan
Vibhav Rangarajan 2016-9-30
Thank you for your response. This is very helpful. Your script does a great job of pulling the velocities from the image, however, I'm still running into the difficulty of how to account for aliasing in the image. When velocities higher than the max are encountered, the Doppler signal "wraps around" and are represented by the color at the bottom of the color bar. So the code above will represent these velocities as negative velocities instead of higher positive velocities.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Detection, Range and Doppler Estimation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by