Change orientation of analyze file image convert_analyze_las(fname, fnout, orient_now) --- Input fname : input Analyze file fnout : output Analyze file orient_now : orient number of current image --- orient_now orient_now = [orient_now_x orient_now_y orient_now_z] orient_now_x : current x-axis orient number defined below orient_now_y : current y-axis orient number defined below orient_now_z : current z-axis orient number defined below --- orient number Left to Right 1 [R] % Right to Left -1 [L] Posterior to Anterior 2 [A] % Anterior to Posterior -2 [P] Inferior to Superior 3 [S] % Superior to Inferior -3 [I] Made by Masa-aki Sato 2008-02-17 Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function convert_analyze_las(fname, fnout, orient_now) 0002 % Change orientation of analyze file image 0003 % convert_analyze_las(fname, fnout, orient_now) 0004 % --- Input 0005 % fname : input Analyze file 0006 % fnout : output Analyze file 0007 % orient_now : orient number of current image 0008 % --- orient_now 0009 % orient_now = [orient_now_x orient_now_y orient_now_z] 0010 % orient_now_x : current x-axis orient number defined below 0011 % orient_now_y : current y-axis orient number defined below 0012 % orient_now_z : current z-axis orient number defined below 0013 % --- orient number 0014 % Left to Right 1 [R] % Right to Left -1 [L] 0015 % Posterior to Anterior 2 [A] % Anterior to Posterior -2 [P] 0016 % Inferior to Superior 3 [S] % Superior to Inferior -3 [I] 0017 % 0018 % Made by Masa-aki Sato 2008-02-17 0019 % 0020 % Copyright (C) 2011, ATR All Rights Reserved. 0021 % License : New BSD License(see VBMEG_LICENSE.txt) 0022 0023 avw = avw_img_read(fname); 0024 0025 avw = change_orient_analyze(avw, orient_now); 0026 0027 avw_img_write(avw, fnout);