source: plugins/open_in_imtool.m

Last change on this file was 167, checked in by tjniskan, 8 years ago
  • Added a plugin for opening a slice in the IMTOOL gui provided by Image Processing Toolbox

A plugins/open_in_imtool.m
M aedes_revision.m

File size: 678 bytes
Line 
1function open_in_imtool(DATA,ROI,AddInfo)
2%
3% This Aedes plugin opens the current slice in the imtool that comes with
4% Matlab Image Processing Toolbox.
5%
6
7if AddInfo.isDataMixed
8        imdata = DATA{AddInfo.CurrentSlice}.FTDATA;
9else
10        dt_ind = AddInfo.CurrentSlice;
11        if AddInfo.AxView==0 || AddInfo.AxView==1
12                imdata = DATA{1}.FTDATA(:,:,dt_ind(1));
13        elseif AddInfo.AxView==3
14                imdata = squeeze(DATA{1}.FTDATA(dt_ind(3),:,:));
15        else
16                imdata = squeeze(DATA{1}.FTDATA(:,dt_ind(2),:));
17        end
18end
19
20% Colormap and clim
21cmap = get(AddInfo.hFigure,'colormap');
22clim = AddInfo.Clim;
23
24% Open imtool
25imtool(imdata,'Colormap',cmap,...
26        'DisplayRange',clim,...
27        'InitialMagnification','fit');
Note: See TracBrowser for help on using the repository browser.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008