changeset 577:98928de7faeb

Added orient_flag == 16 for coronal. Added message about assuming transverse orientation for unknown orient_flag.
author neelin <neelin>
date Fri, 08 Jul 1994 08:20:48 +0000
parents db297b369dd3
children 16281f051e3e
files conversion/mri_to_minc/ge5_to_minc.pl
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/conversion/mri_to_minc/ge5_to_minc.pl
+++ b/conversion/mri_to_minc/ge5_to_minc.pl
@@ -104,13 +104,18 @@
     $file_info{'slicepos'} = &unpack_value(*image_hdr, 126, 'f');
     $file_info{'patient_name'} = &unpack_value(*exam_hdr, 97, "A25");
     local($orient_flag) = &unpack_value(*image_hdr, 114, 's');
-    if ($orient_flag == 4) {    # Sagittal
+    if ($orient_flag == 2) {    # Transverse
+        $file_info{'orientation'} = 'transverse';
+    }
+    elsif ($orient_flag == 4) {    # Sagittal
         $file_info{'orientation'} = 'sagittal';
     }
-    elsif ($orient_flag == 8) { # Coronal
+    elsif (($orient_flag == 8) ||
+           ($orient_flag == 16)) { # Coronal
         $file_info{'orientation'} = 'coronal';
     }
-    else {                      # Transverse
+    else {                      # Assume transverse
+        print STDERR "orient_flag = $orient_flag, assuming transverse\n";
         $file_info{'orientation'} = 'transverse';
     }