MATLAB Answers

0

how to form volume from the 2d slice of gated spect images

Asked by andhavarapu lokesh on 24 Jan 2017
Latest activity Commented on by mohd akmal masud on 9 Apr 2018
dear members iam new to matlab want to form a volume from 2d slices where each dcm file has 72 frames where 1-35 one volume and 36 to 72 other volume is there any way to form volume reconstruction or rendering
if true
projectdir = 'E:\SHIVA BACKUP\THYROID\P1\newcodes\data1\13002';
X = zeros(128, 128, 1, 72,'uint16');
% Read the series of images.
% for p=1
p=1;
thisfile = sprintf('IM_%d.dcm', p);
filename = fullfile( projectdir, thisfile );
imdata = dicomread(filename);
imsize = size(imdata);
if ~isequal( imsize, [128 128 1 72] )
fprintf('file is unexpected size %s instead of [128 128 1 72], skipping "%s"\n', mat2str(imsize), filename);
else
X(:, :, :, :,p) = imdata;
end
figure();
montage(X(:,:,:,:,p), [0 100])
s=[];
v=zeros(128,128,72);
sum=0;
v=squeeze(X);
for i=1:1:35
v(:,:,i)=X(:,:,:,i);
figure()
imshow(v(:,:,i),[0 100])
end
volume=sum*8;
isoval=15;
fig = figure();
ax = axes('Parent', fig);
fv=isosurface(v,isoval);
hiso = patch(fv, ...
'Parent', ax, 'FaceAlpha', 0.74, ...
'FaceColor', [0.75,0.75,0.75],'EdgeColor','red');
lighting(ax, 'phong');
%lightangle(ax, 90, 30);
rotate3d(ax, 'on');
title( sprintf('p = %d', p) )
[K,V] = convhull(fv.vertices);
end

  1 Comment

Sign in to comment.

0 Answers