@@ -287,39 +287,40 @@ protected void initFile(String id) throws FormatException, IOException {
287287 // further reference:
288288 // http://www.grahamwideman.com/gw/brain/analyze/formatdoc.htm
289289 // https://eeg.sourceforge.net/mri_orientation_notes.html
290+ String orientationDescription = String .valueOf (orient );
290291 switch (orient ) {
291- case '0' :
292- // transverse unflipped
292+ case 0 :
293+ orientationDescription = " transverse unflipped" ;
293294 xAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .RIGHT_TO_LEFT );
294295 yAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .POSTERIOR_TO_ANTERIOR );
295296 zAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .INFERIOR_TO_SUPERIOR );
296297 break ;
297- case '1' :
298- // coronal unflipped
298+ case 1 :
299+ orientationDescription = " coronal unflipped" ;
299300 xAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .RIGHT_TO_LEFT );
300301 yAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .INFERIOR_TO_SUPERIOR );
301302 zAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .POSTERIOR_TO_ANTERIOR );
302303 break ;
303- case '2' :
304- // sagittal unflipped
304+ case 2 :
305+ orientationDescription = " sagittal unflipped" ;
305306 xAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .POSTERIOR_TO_ANTERIOR );
306307 yAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .INFERIOR_TO_SUPERIOR );
307308 zAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .RIGHT_TO_LEFT );
308309 break ;
309- case '3' :
310- // transverse flipped
310+ case 3 :
311+ orientationDescription = " transverse flipped" ;
311312 xAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .RIGHT_TO_LEFT );
312313 yAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .ANTERIOR_TO_POSTERIOR );
313314 zAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .INFERIOR_TO_SUPERIOR );
314315 break ;
315- case '4' :
316- // coronal flipped
316+ case 4 :
317+ orientationDescription = " coronal flipped" ;
317318 xAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .RIGHT_TO_LEFT );
318319 yAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .SUPERIOR_TO_INFERIOR );
319320 zAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .POSTERIOR_TO_ANTERIOR );
320321 break ;
321- case '5' :
322- // sagittal flipped
322+ case 5 :
323+ orientationDescription = " sagittal flipped" ;
323324 xAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .POSTERIOR_TO_ANTERIOR );
324325 yAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .SUPERIOR_TO_INFERIOR );
325326 zAxis = new Orientation (OrientationType .ANATOMICAL , AnatomicalOrientation .RIGHT_TO_LEFT );
@@ -345,7 +346,7 @@ protected void initFile(String id) throws FormatException, IOException {
345346 addGlobalMeta ("Pixel minimum" , pixelMin );
346347 addGlobalMeta ("Description" , description );
347348 addGlobalMeta ("Auxiliary file" , auxFile );
348- addGlobalMeta ("Orientation" , orient );
349+ addGlobalMeta ("Orientation" , orientationDescription );
349350 addGlobalMeta ("Originator" , originator );
350351 addGlobalMeta ("Generated" , generated );
351352 addGlobalMeta ("Scan Number" , scannum );
0 commit comments