Changeset 166


Ignore:
Timestamp:
May 26, 2011, 9:28:14 AM (6 years ago)
Author:
tjniskan
Message:
  • Fixed a confusing error message when plugin menu construction failed.
  • Fixed a bug in reading S.M.I.S. data files when a footer was present in SUR-files.

M aedes.m
M aedes_revision.m
M aedes_smisread.m

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • aedes.m

    r159 r166  
    19981998% Show error message that plugin initialization has failed (if necessary)
    19991999if ShowPluginError
    2000   errordlg(['Error: Could not initialize plugins menu. Please, check the ' ...
    2001             'file "aedes_plugins.m".'],'Error initializing plugins','modal');
     2000  errordlg(['Error: Could not initialize plugins menu.'],'Error initializing plugins','modal');
    20022001end
    20032002
  • aedes_revision.m

    r165 r166  
    9393% bash-script every time it is called so that this file "aedes_revision.m" is
    9494% always in the list of committed files. DO NOT EDIT THE NEXT LINE!!!
    95 % - SVN Hook -
     95% - Svn Hook -
  • aedes_smisread.m

    r80 r166  
    218218%         0x06    double                  8 bytes
    219219dataTypes = {...
    220   '*uint8',...
    221   '*int8',...
    222   '*int16',...
    223   '*int16',...
    224   '*int32',...
    225   '*single',...
    226   '*double'};
    227 precision = dataTypes{hdr.DataTypeCode+1};
     220  '*uint8',1;...
     221  '*int8',1;...
     222  '*int16',2;...
     223  '*int16',2;...
     224  '*int32',4;...
     225  '*single',4;...
     226  '*double',6};
     227precision = dataTypes{hdr.DataTypeCode+1,1};
    228228
    229229% Seek to the beginning of the data
    230230fseek(file_fid,512,-1);
    231231
     232% Size of the data in bytes
     233data_size = hdr.nPixelsX*hdr.nPixelsY*hdr.nPixelsZ*hdr.nPixels4D;
     234
    232235try
    233236  % Read image data
    234   data = fread(file_fid,Inf,precision);
     237  data = fread(file_fid,data_size,precision);
    235238 
    236239  % Reshape and permute to correct size
Note: See TracChangeset for help on using the changeset viewer.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008