Commit 42e92497 authored by Paul Philipp Meyer's avatar Paul Philipp Meyer

corrected documentation and redundancy of ccd support

parent 9cb1e9bb
Pipeline #118067 passed with stage
in 2 minutes and 10 seconds
function image = imread_ccd(filename)
% reads data part of WinView/WinSpec CCD files (*.spe)
% to load all data contained in *.spe-file use readspe instead
% modified by P.Meyer 19.12.2019
% IMREAD_CCD reads in \*.spe files saved by WinWiew/32.
%
% ``data = imread_ccd(filename)``
%
% This function reads the header of WinView/32's \*.spe files (CCD) according to
% documentation.
%
% Parameters
% ----------
% filename : string
% full filename (and path) of the \*.spe-file to be read
%
% Returns
% -------
% image : numerical array
% acquired image
%
% HoloTomoToolbox
% Copyright (C) 2019 Institut fuer Roentgenphysik, Universitaet Goettingen
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
fid = fopen(filename,'r','l');
if fid > 0
......@@ -12,16 +41,16 @@ if fid > 0
fseek(fid, 108, 'bof');
datatype = fread(fid, 1, 'uint16'); % 108 experiment datatype
% 0 = FLOATING POINT
% 1 = LONG INTEGER
% 2 = INTEGER
% 3 = UNSIGNED INTEGER
% 0 = FLOATING POINT
% 1 = LONG INTEGER
% 2 = INTEGER
% 3 = UNSIGNED INTEGER
fseek(fid, 656, 'bof');
ydim = fread(fid, 1, 'uint16'); % 656 y dimension of raw data.
fseek(fid, 1446, 'bof');
NumFrames = fread(fid, 1, 'uint16'); %% 1446 number of frames in file.
NumFrames = fread(fid, 1, 'uint16'); % 1446 number of frames in file.
% goto data
fseek(fid, 4100, 'bof');
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment