Skip to content

Commit

Permalink
Update mrcreadDetails.m
Browse files Browse the repository at this point in the history
This is a function (m-file) for GNU Octave or MATLAB that will read files in .mrc (.r3d, .d3d, etc., common to Deltavision/OMX microscopes) format.
It provides two return values: 'hdr' containing all the header info, and 'dat' containing the raw pixels
Call it this way: [hdr,dat]=mrcreadDetails(FILENAME);
Please let me know if it does/doesn't work!
  • Loading branch information
pmcarlton committed Jun 23, 2016
1 parent 8e801af commit 4a388c4
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions mrcreadDetails.m
Expand Up @@ -5,12 +5,6 @@
%Peter Carlton, Kyoto University
%This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/

%attempts to read everything relevant and handle everything

%apparently does endian okay
%xxTODO: COMPLEX numbers: it's two successive datas in MRC file, with flag set
%(will have to handle writing them as well. (done))

%20160604 -- mrcreadDetails.m
% provide two return values: 'hdr' containing all the header info, and 'dat' containing the raw pixels

Expand Down Expand Up @@ -132,7 +126,5 @@
end

%Rearrange into the right shape
buf=reshape(buf,[e(1) e(2) e(3)]);
%printf("Size = [ %i %i %i ]
" ,e(2),e(1),e(3));
for l=1:e(3);data(:,:,l)=(buf(:,:,l));end
data=reshape(buf,[e(1) e(2) e(3)]);
%printf("Size = [ %i %i %i ]" ,e(2),e(1),e(3));

0 comments on commit 4a388c4

Please sign in to comment.