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
Workshop
Download
Contrib Data
GREIT
Browse Docs
Browse SVN

News
Mailing list
(archive)
FAQ
Developer
                       

 

Hosted by
SourceForge.net Logo

 

Customizing EIDORS

EIDORS has several parameters that can be customized. Those are set to sensible values when you run
run /path/to/eidors3d/startup.m
but in some cases you may want to modify the defaults. A good way to do it is to write your own startup file, or a matlab toolbar shortcut if you use the GUI.
This tutorial explains what can be customized.

Colours

calc_colours is the main function that affects how EIDORS displays models and images. For details see the EIDORS Colours tutorial.
For example, you may want to modify the default colormap and image background at startup:
calc_colours('backgnd',[.8,.8,.8]);    % gray background colour
calc_colours('cmap_type','draeger'');  % Draegerwerk colourmap

Cache

EIDORS caches results of certain calculations. The default cache size is 256 MB, but if you work with big FEMs, you will likely need more:
eidors_cache('cache_size', 2*1024^3 ); % 2 GB cache

EIDORS also requires a writeable directory for caching and some other functions. This can be set by:
eidors_cache('cache_path','C:/path/to/a/writeable/folder');

The function mk_library_model also stores its models to disk.
Alternatively, you may download the model_library.zip file with all the models (some of which are expensive to build).
The path where models are stored can be specified by calling:
mk_library_model('LIBRARY_PATH','path/to/models');

At startup, both LIBRARY_PATH and cache_path are set to
path/to/eidors3d/models/cache

Default functions

Several EIDORS functions, particularly those building forward and inverse models, make extensive use of the function eidors_default,
which maintains a list of default implementations of certain functionalities. For instance, fwd_solve_1st_order is the default forward solver:
>> eidors_default('get','fwd_solve')

ans =

fwd_solve_1st_order
You can list all defaults by runnning:
 eidors_default('list')
To maintain flexibility, fields on EIDORS forward and inverse model structures are set to 'eidors_default' rather than a specific function:
>> mk_common_model('a2C',16)

ans = 

             solve: 'eidors_default'
    hyperparameter: [1x1 struct]
         RtR_prior: 'eidors_default'
    jacobian_bkgnd: [1x1 struct]
      reconst_type: 'difference'
         fwd_model: [1x1 struct]
              name: 'EIDORS common_model_a2C0'
              type: 'inv_model'
Thus, if you want a specific inverse solver to be used by default, specify
eidors_default('set','inv_solve',@my_solver);

For Developers

If you are a developer, it is nice to add your staging directory (under /dev) to Matlab's path.
That way, you can shadow specific functions while you develop them.
A convenient way to do this is by calling the eidors_startup function rather than the startup script.
Thus, we need a custom startup function (or a Toolbar shortcut) that could look like this:
% Custom EIDORS Startup
curdir = cd;                                   % save current directory
cd /path/to/eidors
warning off MATLAB:dispatcher:nameConflict     % prevent complaining
eidors_startup({'my_dev_folder_name'});        % add my dev to path

% Set additional options (cache size, background, etc)

warning off MATLAB:dispatcher:nameConflict     % re-enable the warning
cd(curdir);                                    % restore the working directory
clear curdir                                   % clean up

Last Modified: $Date: 2017-02-28 13:12:08 -0500 (Tue, 28 Feb 2017) $ by $Author: aadler $