Home > functions > tool_box > atlas2vb_dir > vb_save_correct_atlas.m

vb_save_correct_atlas

PURPOSE ^

Save atlas label

SYNOPSIS ^

function vb_save_correct_atlas(Atlas,atlasfile,atlas_id)

DESCRIPTION ^

 Save atlas label
  vb_save_correct_atlas(Atlas)
  vb_save_correct_atlas(Atlas,atlasfile)
  vb_save_correct_atlas(Atlas,atlasfile,atlas_id)
 --- Input
 Atlas : structure of atlas label
 --- Optional Input
  If input is not given, file name is asked by vb_file_select
 atlasfile
 atlas_id

 2006-11-12 M. Sato

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function     vb_save_correct_atlas(Atlas,atlasfile,atlas_id)
0002 % Save atlas label
0003 %  vb_save_correct_atlas(Atlas)
0004 %  vb_save_correct_atlas(Atlas,atlasfile)
0005 %  vb_save_correct_atlas(Atlas,atlasfile,atlas_id)
0006 % --- Input
0007 % Atlas : structure of atlas label
0008 % --- Optional Input
0009 %  If input is not given, file name is asked by vb_file_select
0010 % atlasfile
0011 % atlas_id
0012 %
0013 % 2006-11-12 M. Sato
0014 %
0015 % Copyright (C) 2011, ATR All Rights Reserved.
0016 % License : New BSD License(see VBMEG_LICENSE.txt)
0017 
0018 if ~exist('atlasfile','var')
0019     [pathname, filename] = vb_file_select({'.atlas.mat'}, 'Select atlas file');
0020     if isempty(filename), return; end;
0021     atlasfile = fullfile(pathname, filename{1})
0022 end
0023 
0024 if ~exist('atlas_id','var')
0025     prompt = 'Enter atlas key for save';
0026     answer = inputdlg(prompt,'Atlas key',1, {Atlas.key});
0027     atlas_id = answer{1}
0028 end
0029 
0030 Atlas.key = atlas_id;
0031 
0032 vb_add_act(atlasfile , Atlas);
0033 
0034 [pathname, fname] = fileparts(atlasfile);
0035 
0036 areafile = fullfile(pathname, [atlas_id '.area.mat'])
0037 
0038 vb_save_atlas_label(areafile, Atlas.xxP, Atlas.label, Atlas.label_name);

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005