changeset 646:051cf5393bbf

analyze75read: Can now read int16 and int32 images.
author adam78a
date Wed, 03 Oct 2012 21:09:28 +0000
parents cc81e4acc53c
children ad6b73ba5416
files inst/analyze75read.m
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/inst/analyze75read.m
+++ b/inst/analyze75read.m
@@ -53,9 +53,13 @@
     error ('analyze75read: unable to fopen `%s'': %s', [fileprefix, '.img'], err);
   end
 
-  if (strcmp (header.ImgDataType, 'DT_FLOAT'))
+  if (strcmp (header.ImgDataType, 'DT_SIGNED_SHORT'));
+    datatype = 'int16';
+  elseif (strcmp (header.ImgDataType, 'DT_SIGNED_INT'));
+    datatype = 'int32';
+  elseif (strcmp (header.ImgDataType, 'DT_FLOAT'));
     datatype = 'single';
-  else
+  elseif (strcmp (header.ImgDataType, 'DT_DOUBLE'));
     datatype = 'double';
   end