Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 3c60ebc86799dbf425965469357136c728cf1cf9 authored by kwerys on 25 January 2019, 15:20:19 UTC, committed by kwerys on 25 January 2019, 15:20:19 UTC
working with ice
1 parent 383b7e2
  • Files
  • Changes
  • bf5ea83
  • /
  • scriptsMatlab
  • /
  • tomatoMatlab.m
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:3c60ebc86799dbf425965469357136c728cf1cf9
directory badge
swh:1:dir:aa7329459b9c06b6f4002488ab3ac447569579dd
content badge
swh:1:cnt:bd437a46261e5546f72c484f916180b04e9a727a

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
tomatoMatlab.m
% To use tomato you need two things:
% 1. tomato executable
% 2. configuration file in yaml. 
%	a. yamlmatlab allows you to read yaml to a structure and write a
%	structure to yaml
%   b. the best way to start with the config files is to read a template
%   yaml file
%   c. define/modify parameters in the structure
%   d. save structure to a yaml file
% Then, using matlab 'system' command you can run tomato from matlab. Voila!
%
% Hint: look at the output of the tomato executable to see what options are
% available in the yaml config file
%
% Konrad Werys 2018
% konrad.werys@cardiov.ox.ac.uk

clear 

%% 1. what is the path to the tomato exacutable?
% exepath = 'TomatoExe_v0.1_Windows_x64.exe'; % downloaded from github on windows
exepath = '../cmake-build-release/TomatoExe'; % build from clion on macos

%% 2.a. add yaml reading and writing lib to path
addpath(genpath('../thirdparty/yamlmatlab'));

%% 2.b. the best way to start with the config files is to read a template yaml file and modify it (2.c.)
template_yaml_file = '../tests/testData/Hcmr_Phantom_1916_Shmolli_192i_e11_inputDirs.yaml';
% template_yaml_file = '../tests/testData/Hcmr_Phantom_1916_Shmolli_192i_e11_fileList.yaml';
YamlStruct = yaml.ReadYaml(template_yaml_file);

%% 2.c. define/modify params in the structure. Input params are obligatory for calculation, the rest are optional. 

% %%% input params %%%
YamlStruct.files_magnitude = '';
YamlStruct.files_phase = '';
YamlStruct.dir_magnitude = '../tests/testData/dicom/Hcmr_Phantom_1916_260C/Konrad_Shmolli/ShMOLLI_192i_e11_12';
YamlStruct.dir_phase = '../tests/testData/dicom/Hcmr_Phantom_1916_260C/Konrad_Shmolli/ShMOLLI_192i_e11_13';

% % %%% output params %%%
% YamlStruct.dir_output_map = 'map';
% YamlStruct.dir_output_fitparams = 'fitparams';
% YamlStruct.output_map_series_number = 9998;
% YamlStruct.output_fitparams_series_number = 9999;
% 
% %%% calculation params %%%
% YamlStruct.parameter_to_map = 'T1_MOLLI';
% YamlStruct.fitting_method = 'LevMarVnl';
% YamlStruct.functions_type = 'FunctionsBasic';
% YamlStruct.sign_calc_method = 'NoSign';
% YamlStruct.start_point_calc_method = 'Default';
% YamlStruct.fTolerance = 1.0E-12;
% YamlStruct.max_function_evals = 4000.0;
% YamlStruct.use_gradient = 0;
% YamlStruct.mean_cut_off = 10;
% YamlStruct.number_of_threads = 0;
% 
% %%% visualise params %%%
% YamlStruct.visualise = 1;

%% 2.d. save structure to a yaml file
my_yaml_file = './my_yaml_file.yaml';
yaml.WriteYaml(my_yaml_file, YamlStruct, 0);

%% Run tomato
system([exepath, ' ', my_yaml_file]);
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API