Eidors-logo    

EIDORS: Electrical Impedance Tomography and Diffuse Optical Tomography Reconstruction Software

EIDORS (mirror)
Main
Documentation
Examples
Tutorials
− Image Reconst
− Data Structures
− Application Examples
− FEM Modelling
Download
Contrib Data
GREIT
Browse SVN

News
FAQ
Developer
                       

 

Hosted by SourceForge.net Logo

 

EIDORS data structures and Variables

What version am I running?

>> eidors_obj('eidors_version')
ans =
3.2

Controlling Output Images

The colours of the graphics may be controlled with the calc_colours function. This applies to output of the show_fem and show_slices and other functions that work using the matlab graphics engine.
% Show EIDORS colours $Id: eidors_vars01.m 1535 2008-07-26 15:36:27Z aadler $

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];
show_fem(img);

print -r50 -dpng eidors_vars01a.png


Figure: Simple EIDORS image with three contrasts to show the effect of changing the colour mapping parameters

The Calc Colours function can modify these values:

calc_colours( 'param', value );
The following parameters are accepted

  • 'greylev' (DEFAULT -.01): the colour of the ref_level.
    Negative values indicate black (inversed colour). For almost white, greylev=.01; Black=> greylev=-.01
  • 'sat_adj' (DEFAULT .9): max G,B when R=1
  • 'window_range' (DEFAULT .9); window colour range Colour slope outside range is 1/3 of centre slope
  • 'backgnd' ( DEFAULT [.5,.5,.15] ): image border colour
  • 'ref_level' (DEFAULT 'auto') conductivity of centre of colour mapping. 'auto' tries to estimate a good level.
  • 'mapped_colour' (DEFAULT 127) number of colourmap entries using mapped_colour allows matlab to print vector graphics to eps
  • 'npoints' (DEFAULT 64) number of points accross the image

Image Output Resolution

% Show EIDORS colours $Id: eidors_vars02.m 1535 2008-07-26 15:36:27Z aadler $

subplot(131)
calc_colours('npoints',32);
show_slices(img);

subplot(132)
calc_colours('npoints',128);
show_slices(img);

subplot(133)
calc_colours('npoints',64);
show_slices(img); %default value
print -r100 -dpng eidors_vars02a.png


Figure: Effect of changing the npoints parameter. From left: 1) npoints=32 2) npoints=128 3) npoints=64 (default)

Image Reference Colours

% Show EIDORS colours $Id: eidors_vars03.m 1535 2008-07-26 15:36:27Z aadler $

clf;
% Set square figure and make figure fill the axis
axes('position',[0 0 1 1]);
pp= get(gcf,'paperposition');
set(gcf,'paperposition',[pp(1:3),pp(3)]);

calc_colours('greylev',.001); % black background level
show_slices(img);
print -r20 -dpng eidors_vars03a.png

calc_colours('greylev',.2); % grey background level
show_slices(img);
print -r20 -dpng eidors_vars03b.png

calc_colours('greylev',-.2); %light grey background level
show_slices(img);
print -r20 -dpng eidors_vars03c.png

calc_colours('greylev',-.001); %white background level (default)
show_slices(img);
print -r20 -dpng eidors_vars03d.png


calc_colours('backgnd',[0.2,0.1,0.15]);
show_slices(img);
calc_colours('backgnd',[0.5,0.5,0.15]); %default value
print -r20 -dpng eidors_vars03e.png
set(gcf,'paperposition',pp(1:4));


Figure: Effect of changing the greylev parameter. From left: 1) greylev=0.001 2) greylev=0.2 3) greylev=-0.2 4) greylev=-0.001 (default) 5) Changing backgnd

Colour Mapping in the image

The default EIDORS behaviour is to auto range the colours, so that the full image range is displayed. This can be changed to set a strict colour limit, or to show a non linear colour break.
% Show EIDORS colours $Id: eidors_vars04.m 1535 2008-07-26 15:36:27Z aadler $

idx= [51:52, 56:-1:53, 57:60, 64:-1:61, 49,50]; % clockwise index elements 
img.elem_data(idx)= linspace(-2,2,16);
subplot(131)
calc_colours('clim',1.3); % Limit colours to 1,3
show_slices(img);

subplot(132)
calc_colours('clim',[]); % default
show_slices(img);

subplot(133)
img.calc_colours.clim= .3;
show_slices(img);
print -r100 -dpng eidors_vars04a.png


Figure: Effect of changing the greylev parameter. From left: 1) clim=1.3 2) clim=[] (autorange) 3) clim=0.3

Last Modified: $Date: 2008-07-26 11:36:27 -0400 (Sat, 26 Jul 2008) $ by $Author: aadler $