[ismrmrd] 45/281: Correct Matlab examples to reflect new storage convention

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:00:54 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 9b382c29256c52b3500538e1e3b6e24f353a8d6e
Author: Michael S. Hansen <michael.hansen at nih.gov>
Date:   Wed Sep 12 10:46:55 2012 -0400

    Correct Matlab examples to reflect new storage convention
---
 examples/matlab/simple_cartesian_recon.m | 2 +-
 examples/matlab/simple_spiral_recon.m    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/matlab/simple_cartesian_recon.m b/examples/matlab/simple_cartesian_recon.m
index 787f95e..9e9daec 100644
--- a/examples/matlab/simple_cartesian_recon.m
+++ b/examples/matlab/simple_cartesian_recon.m
@@ -54,7 +54,7 @@ for p=1:length(raw_data.head.flags),
    end
    line_number      = (int32(raw_data.head.idx.kspace_encode_step_1(p))-center_line)+bitshift(matrix_size(2),-1);  
    partition_number = (int32(raw_data.head.idx.kspace_encode_step_2(p))-center_partition)+bitshift(matrix_size(3),-1);  
-   buffer(:,line_number+1,partition_number+1,:) = reshape(complex(raw_data.data{p}.real, raw_data.data{p}.imag), samples, 1, 1, channels);
+   buffer(:,line_number+1,partition_number+1,:) = reshape(complex(raw_data.data{p}(1:2:end), raw_data.data{p}(2:2:end)), samples, 1, 1, channels);
    
    if (bitget(uint64(raw_data.head.flags(p)),8)), %Is this the last in slice? We should make an image
       fprintf('Reconstructing image %d....', counter+1); 
diff --git a/examples/matlab/simple_spiral_recon.m b/examples/matlab/simple_spiral_recon.m
index 0851211..3815580 100644
--- a/examples/matlab/simple_spiral_recon.m
+++ b/examples/matlab/simple_spiral_recon.m
@@ -42,7 +42,7 @@ for p=1:length(raw_data.head.flags),
       continue; 
    end
    
-   d = reshape(complex(raw_data.data{p}.real, raw_data.data{p}.imag), samples, channels);
+   d = reshape(complex(raw_data.data{p}(1:2:end), raw_data.data{p}(2:2:end)), samples, channels);
    t = reshape(raw_data.traj{p}, raw_data.head.trajectory_dimensions(p), samples);
    current_interleave = raw_data.head.idx.kspace_encode_step_1(p)+1;
    start_sample = samples_to_skip_start+1;

-- 
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