[ismrmrd] 179/281: Changed matlab api so that readAcquisition sets the data shape to match what is given in the corresponding header.
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:01:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag ismrmrd0.5
in repository ismrmrd.
commit 933ab5d424079526bd03d7ff3460ec4feeee6ba8
Author: Souheil Inati <souheil.inati at nih.gov>
Date: Thu Aug 29 13:39:07 2013 -0400
Changed matlab api so that readAcquisition sets the data shape to match what is given in the corresponding header.
---
matlab/+ismrmrd/IsmrmrdDataset.m | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/matlab/+ismrmrd/IsmrmrdDataset.m b/matlab/+ismrmrd/IsmrmrdDataset.m
index 8fde4de..0326fd2 100644
--- a/matlab/+ismrmrd/IsmrmrdDataset.m
+++ b/matlab/+ismrmrd/IsmrmrdDataset.m
@@ -190,7 +190,9 @@ classdef IsmrmrdDataset
acq.head = d.head(1);
acq.traj = d.traj{1};
t = d.data{1};
- acq.data = t(1:2:end) + 1j*t(2:2:end);
+ acq.data = reshape( t(1:2:end) + 1j*t(2:2:end) , ...
+ [acq.head.number_of_samples, ...
+ acq.head.active_channels] );
% Clean up
H5S.close(mem_space_id);
@@ -258,9 +260,9 @@ classdef IsmrmrdDataset
d.head(1).idx = struct(acq.head.idx);
warning(swarn.state, 'MATLAB:structOnObject')
d.traj{1} = acq.traj;
- t = zeros(2*length(acq.data),1,'single');
- t(1:2:end) = real(acq.data);
- t(2:2:end) = imag(acq.data);
+ t = zeros(2*length(acq.data(:)),1,'single');
+ t(1:2:end) = real(acq.data(:));
+ t(2:2:end) = imag(acq.data(:));
d.data{1} = t;
% Write
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ismrmrd.git
More information about the debian-science-commits
mailing list