Eidors-logo    

EIDORS: Electrical Impedance Tomography and Diffuse Optical Tomography Reconstruction Software

EIDORS (mirror)
Main
Documentation
Tutorials
− Image Reconst
− Data Structures
− Applications
− FEM Modelling
− GREIT
− Old tutorials
Download
Contrib Data
GREIT
Browse Docs
Browse SVN

News
Mailing list
(archive)
FAQ
Developer
                       

 

Hosted by
SourceForge.net Logo

 

EIDORS display functions and control of colours

Colour Mapping in the image

The parameters to control the colours of an eidors image may be specified globally, or for a specific image.

Specify clim=1.5 for all subsequent display

calc_colours('clim',1.5);
show_slices( img )
% future images still use clim=1.5

Specify clim=1.5 for only this image

img.calc_colours.clim= 1.5;
show_slices( img )
% only 'img' uses clim=1.5

Create a demo image

Here we create a small sample image with a sequence of colours around the boundary
% Show EIDORS colours $Id: eidors_colours01.m 1535 2008-07-26 15:36:27Z aadler $

% Create sample image
imdl= mk_common_model('a2c2',16);
img= eidors_obj('image','small demo','fwd_model',imdl.fwd_model, ...
                'elem_data', zeros(1,64) );
img.elem_data(1:2)=[1,1];
img.elem_data([14,16])=[-1,-1];
img.elem_data([27,30])=.5*[1,1];
idx= [51:52, 56:-1:53, 57:60, 64:-1:61, 49,50]; % clockwise index elements 
img.elem_data(idx)= linspace(-2,2,16);

img.elem_data = img.elem_data + 10;

Change colour mapping parameters: greylev

% Show EIDORS colours $Id: eidors_colours02.m 2764 2011-07-14 16:12:52Z bgrychtol $
subplot(221);
img1= img;
img1.calc_colours.cb_shrink_move = [0.5,0.8,.02];

show_fem(img1,1);
axis equal; axis off; 
print_convert eidors_colours02a.png '-density 75'

img1.calc_colours.greylev= -0.35;
show_fem(img1,1);
axis equal; axis off; 
print_convert eidors_colours02b.png '-density 75'

img1.calc_colours.greylev= 0.35;
show_fem(img1,1);
axis equal; axis off; 
print_convert eidors_colours02c.png '-density 75'


Figure: greylev values of (from left to right) 1) -.001 default, 2) -.35, 3) +.35,

Change colour mapping parameters: clim

% Show EIDORS colours $Id: eidors_colours03.m 2764 2011-07-14 16:12:52Z bgrychtol $
subplot(221); img1= img;
img1.calc_colours.cb_shrink_move = [0.5,0.8,.02];

show_fem(img1,1);
axis equal; axis off; 
print_convert eidors_colours03a.png '-density 75'

img1.calc_colours.clim= 1;
show_fem(img1,1);
axis equal; axis off;
print_convert eidors_colours03b.png '-density 75'

img1.calc_colours.clim= 0.3;
show_fem(img1,1);
axis equal; axis off; 
print_convert eidors_colours03c.png '-density 75'


Figure: clim values of (from left to right) 1) [] default, 2) 1.0, 3) 0.3,

Change colour mapping parameters: sat_adj

% Show EIDORS colours $Id: eidors_colours04.m 2764 2011-07-14 16:12:52Z bgrychtol $
subplot(221); img1= img;
img1.calc_colours.cb_shrink_move = [0.5,0.8,.02];

show_fem(img1,1);
axis equal; axis off; 
print_convert eidors_colours04a.png '-density 75'

img1.calc_colours.sat_adj= 0.99;
show_fem(img1,1);
axis equal; axis off;
print_convert eidors_colours04b.png '-density 75'

img1.calc_colours.sat_adj= 0.8;
show_fem(img1,1);
axis equal; axis off;
print_convert eidors_colours04c.png '-density 75'


Figure: sat_adj values of (from left to right) 1) 0.9 default, 2) 0.90, 3) 0.8,

Change colour mapping parameters: window_range

% Show EIDORS colours $Id: eidors_colours05.m 2764 2011-07-14 16:12:52Z bgrychtol $
subplot(221); img1= img;
img1.calc_colours.cb_shrink_move = [0.5,0.8,.02];

show_fem(img1,1);
axis equal; axis off;
print_convert eidors_colours05a.png '-density 75'

img1.calc_colours.window_range= 0.90;
show_fem(img1,1);
axis equal; axis off;
print_convert eidors_colours05b.png '-density 75'

img1.calc_colours.window_range= 0.20;
show_fem(img1,1);
axis equal; axis off;
print_convert eidors_colours05c.png '-density 75'


Figure: window_range values of (from left to right) 1) 0.7 default, 2) 0.9, 3) 0.2,

Colours and lung images

% Show lung images $Id: eidors_colours06.m 2764 2011-07-14 16:12:52Z bgrychtol $
load montreal_data_1995
imdl = mk_common_model('c2t2',16);
imdl.fwd_model.normalize_measurements = 1;
imdl.RtR_prior= @gaussian_HPF_prior;
imdl.hyperparameter.value = 0.2;
img = inv_solve(imdl, zc_resp(:,1), zc_resp(:,20));

img.calc_colours.ref_level= 0;
img.calc_colours.cb_shrink_move = [0.5,0.8,.02];

subplot(221);
show_fem(img,[1,1]);
axis equal; axis off;

subplot(222);
img.calc_colours.ref_level =  0.1;
show_fem(img,[1,1]);
axis equal; axis off;

print_convert eidors_colours06.png '-density 75'


Figure: Lung images with the zero level centred (left) and set to an off centre value − 0.1 (right)
% Show lung images $Id: eidors_colours07.m 2764 2011-07-14 16:12:52Z bgrychtol $
img = inv_solve(imdl, zc_resp(:,1), zc_resp(:,20));
img.calc_colours.ref_level= 0;
img.calc_colours.cb_shrink_move = [0.5,0.8,.02];

clf;
subplot(221);

img.calc_colours.greylev = 0.01;
show_fem(img,[1,1]);
axis equal; axis off;
print_convert eidors_colours07a.png '-density 75'

img.calc_colours.greylev =  0.3;
show_fem(img,[1,1]);
axis equal; axis off; 
print_convert eidors_colours07b.png '-density 75'

img.calc_colours.greylev = -0.01;
show_fem(img,[1,1]);
axis equal; axis off;
print_convert eidors_colours07c.png '-density 75'

img.calc_colours.cmap_type = 'draeger';
show_fem(img,[1,1]);
axis equal; axis off;
print_convert eidors_colours07d.png '-density 75'


Figure: Lung images with various colour maps. From left to right: centre-black, centre-grey, centre-white, and the Amato/Dräger Colourmap. set to an off centre value − 0.1 (right)

Last Modified: $Date: 2011-07-15 06:48:46 -0400 (Fri, 15 Jul 2011) $ by $Author: aadler $