Skip to content
Snippets Groups Projects
Commit eb3afcd3 authored by Yoann Guilhem's avatar Yoann Guilhem
Browse files

Update TIFF IO functions.

parent c846b7b5
No related branches found
No related tags found
No related merge requests found
......@@ -8,10 +8,10 @@ function info = gtTIFInfoReader(filename, info)
% filename = <string> Path to info file
%
% OPTIONAL INPUT
% info = <struct> TIFF info strsture to complete
% info = <struct> TIFF info structure to complete
%
% OUTPUT:
% info = <struct> Information about volume
% info = <struct> Information about volume
%
% Note:
% info file should be formatted as the following:
......@@ -33,9 +33,11 @@ bbox = fscanf(fid, '[%d, %d, %d] [%d, %d, %d]', 6).';
vSize = fscanf(fid, '%f', 1);
fclose(fid);
% Store bbox, voxel size and origin
% Store bbox, volume size, voxel size and origin
info.boundingBoxMin = bbox(1:3) + 1;
info.boundingBoxMax = bbox(4:6);
info.boundingBox = [info.boundingBoxMin info.boundingBoxMax];
info.volSize = bbox(4:6) - bbox(1:3);
info.voxelSize = vSize;
info.origin = bbox(1:3) .* info.voxelSize;
info.infoFile = filename;
......
......@@ -27,7 +27,7 @@ function [vol, info] = gtTIFVolReaderWithInfo(filename, varargin)
if isempty(varargin)
[vol, info] = gtTIFVolReader(filename);
else
[vol, info] = gtTIFVolReader(filename, varargin);
[vol, info] = gtTIFVolReader(filename, varargin{:});
end
% Extract path, basename and extension from file name
......
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