Skip to content
Snippets Groups Projects
Commit 05ed7aa1 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

TomoUtils: added a function to generate infoVol data structure (for gtRead*)


Signed-off-by: default avatarNicola Vigano <nicola.vigano@esrf.fr>

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@658 4c865b51-4357-4376-afb4-474e03ccb993
parent dcc69d61
No related branches found
No related tags found
No related merge requests found
function infoVol = gtCreateInfoVol(volSize, dtype, dbyteorder)
if (~exist('dtype', 'var'))
dtype = 'float32';
end
if (~exist('dbyteorder', 'var'))
[~, ~, dbyteorder] = computer();
end
infoVol.volSizeX = volSize(1);
infoVol.volSizeY = volSize(2);
infoVol.volSizeZ = volSize(3);
infoVol.ftype = dtype;
infoVol.fbyteorder = dbyteorder;
end
...@@ -81,7 +81,7 @@ function [fnames, fpath, datatype] = gtGetHST_FileNamesAndType(full_fname) ...@@ -81,7 +81,7 @@ function [fnames, fpath, datatype] = gtGetHST_FileNamesAndType(full_fname)
throw(Mexc); throw(Mexc);
end end
% Deciding Filetype % Guessing most likely Filetype
if isfield(fnames, 'raw') if isfield(fnames, 'raw')
% going with the 8 bit file % going with the 8 bit file
datatype = 'uint8'; datatype = 'uint8';
......
...@@ -53,13 +53,9 @@ function hst_header = gtHST_info(full_fname) ...@@ -53,13 +53,9 @@ function hst_header = gtHST_info(full_fname)
bytespervoxel = 1; bytespervoxel = 1;
end end
hst_header.volSizeX = volSizeX; hst_header = gtCreateInfoVol([volSizeX volSizeY volSizeZ], true_ftype, fbyteorder);
hst_header.volSizeY = volSizeY;
hst_header.volSizeZ = volSizeZ;
hst_header.bytespervoxel = bytespervoxel; hst_header.bytespervoxel = bytespervoxel;
hst_header.fpath = fpath; hst_header.fpath = fpath;
hst_header.fname_final = fname_final; hst_header.fname_final = fname_final;
hst_header.fbyteorder = fbyteorder;
hst_header.ftype = true_ftype;
hst_header.fname_prefix = fnames.prefix; hst_header.fname_prefix = fnames.prefix;
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment