One figure instead of 100 and scroll.

19 ビュー (過去 30 日間)
Maxime
Maxime 2013 年 10 月 17 日
回答済み: Sailesh Sidhwani 2019 年 10 月 19 日
I am trying to scroll through a whole stack of CT images. So in order for this to work, I have to open lets say 100 separate figure windows and then smoothly scroll through them. However - how can I just open ONE figure window and have ALL my images be scrolling through in it?

採用された回答

Daniel Shub
Daniel Shub 2013 年 10 月 17 日
I am not sure what you mean by a "stack" of CT images. If you mean a 3D reconstruction, then maybe FEX:SliceBrowser does what you want. If you want a bunch of subplots with a scroll bar on the figure maybe technical note 1-16B5M helps you.
  2 件のコメント
Maxime
Maxime 2013 年 10 月 17 日
編集済み: Maxime 2013 年 10 月 17 日
This is the kind of picture I have and I have a 100 of them. But instead of a 100 figures, I'd like only one and scroll to go from one to another
John D'Errico
John D'Errico 2013 年 10 月 17 日
You could easily write a simple tool that would take a stack of images, creating a figure with a scroll bar on it. Callbacks from the scroll bar would let you move to any image in the stack, stepping along or jumping as you might desire. But you would need to write the code for that task. Simple, but not currently in existence that I know.

サインインしてコメントする。

その他の回答 (2 件)

Maxime
Maxime 2013 年 10 月 21 日
編集済み: Maxime 2013 年 10 月 21 日
Actually, this is what I was looking for :
function windowScrollWheelFcn(hObject, eventData)
if (eventData.VerticalScrollCount > 0 && currentIndex>start)
currentIndex = currentIndex - 1;
drawImage(currentIndex)
elseif (eventData.VerticalScrollCount < 0 && currentIndex<fin)
currentIndex = currentIndex + 1;
drawImage(currentIndex)
end
function drawImage(index) clf(handleFigure) fprintf('Image %d\n', index) subplot(2,2,[1 3]);
%draw the different pictures
imshow(I{index},'DisplayRange',[], 'XData', [info{index}.ImagePositionPatient(1) info{index}.ImagePositionPatient(1)+info{index}.PixelSpacing(1)*double(info{index}.Columns)],...
'YData',[info{index}.ImagePositionPatient(2) info{index}.ImagePositionPatient(2)+info{index}.PixelSpacing(1)*double(info{index}.Rows)]);
iptsetpref('ImshowAxesVisible','on');
hold on;
plot(x{index},y{index},'.');
axis equal
subplot(2,2,[2 4]);
plot(xcomp{index},zcomp{index},'.');
hold on;
xlim([min(xcomp{index})-10 max(xcomp{index})+10])
axis equal
plot(domaine{index},hauteur{index},'r-')
end

Sailesh Sidhwani
Sailesh Sidhwani 2019 年 10 月 19 日
Check out these new viewers that are added to Image Processing Toolbox in R2019b:

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by