Rescale Slope image petct
1 view (last 30 days)
Show older comments
Hai..
Can everyone help me.
I have 47 slice PET image (Positron Emission Tomography). So i done extract value from all slice that contain pixel value from 20000 to 32767. My code like below.
P = zeros(256, 256, 47);
for K = 1 : 47
petname = sprintf('PET_I1001_PT%03d.dcm', K);
P(:,:,K) = dicomread(petname);
end
[r,c,slice] = findND(P >= 20000 & P <= 32767)
VALUE=P(P(:)>=20000 & P(:)<=32767 );
But my problem is, how to me multiply the VALUE i get with RescaleSlope itselp. I have code for extract RescaleSlope value, but it just extract the RescaleSlope by slice.
So i have to multiply manually. Now i want to it multiply automatically. The code for extract RescaleSlope like below.
for K = 47 : -1 : 1
petname = sprintf('PET_I1001_PT%03d.dcm', K);
thisinfo = dicominfo(petname);
fn = fieldnames(thisinfo);
for N = 1 : length(fn)
thisfield = fn{N};
info(K).(thisfield) = thisinfo.(thisfield);
end
this_slice = dicomread(petname);
slices{K} = this_slice;
end
rescale_slopes = {info.RescaleSlope};
mask = cellfun(@isempty, rescale_slopes);
rescale_slopes(mask) = {0}; %set missing entries to 0
rescale_slopes = cell2mat(rescale_slopes);
inrange_mask = cellfun(@(M) any(M(:) >= 20000 & M(:) <= 32767), slices);
idx_of_inrange = find(inrange_mask);
rescale_slope_of_inrange = rescale_slopes(inrange_mask)
0 Comments
Answers (0)
See Also
Categories
Find more on Biomedical Imaging in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!