[ismrmrd] 182/281: Slowly migrating back to a (faster) matlab class.

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 d883988db4f6c2b28cb9d1c1a99184381326db01
Author: Souheil Inati <souheil.inati at nih.gov>
Date:   Fri Sep 6 09:39:44 2013 -0400

    Slowly migrating back to a (faster) matlab class.
---
 {matlab/+ismrmrd => examples/matlab}/example.m     |  0
 .../{ => +util}/AcquisitionHeaderFromBytes.m       |  0
 .../{ => +util}/AcquisitionHeaderToBytes.m         |  0
 matlab/+ismrmrd/{ => +util}/ImageHeaderFromBytes.m |  0
 matlab/+ismrmrd/{ => +util}/ImageHeaderToBytes.m   |  0
 matlab/+ismrmrd/{ => +util}/hdf5_datatypes.m       |  0
 matlab/+ismrmrd/{ => +util}/includejar.m           |  0
 matlab/+ismrmrd/{ => +util}/isInt.m                |  0
 matlab/+ismrmrd/EncodingCounters.m                 | 94 ----------------------
 matlab/+ismrmrd/IsmrmrdDataset.m                   |  2 +-
 matlab/CMakeLists.txt                              |  2 +-
 11 files changed, 2 insertions(+), 96 deletions(-)

diff --git a/matlab/+ismrmrd/example.m b/examples/matlab/example.m
similarity index 100%
rename from matlab/+ismrmrd/example.m
rename to examples/matlab/example.m
diff --git a/matlab/+ismrmrd/AcquisitionHeaderFromBytes.m b/matlab/+ismrmrd/+util/AcquisitionHeaderFromBytes.m
similarity index 100%
rename from matlab/+ismrmrd/AcquisitionHeaderFromBytes.m
rename to matlab/+ismrmrd/+util/AcquisitionHeaderFromBytes.m
diff --git a/matlab/+ismrmrd/AcquisitionHeaderToBytes.m b/matlab/+ismrmrd/+util/AcquisitionHeaderToBytes.m
similarity index 100%
rename from matlab/+ismrmrd/AcquisitionHeaderToBytes.m
rename to matlab/+ismrmrd/+util/AcquisitionHeaderToBytes.m
diff --git a/matlab/+ismrmrd/ImageHeaderFromBytes.m b/matlab/+ismrmrd/+util/ImageHeaderFromBytes.m
similarity index 100%
rename from matlab/+ismrmrd/ImageHeaderFromBytes.m
rename to matlab/+ismrmrd/+util/ImageHeaderFromBytes.m
diff --git a/matlab/+ismrmrd/ImageHeaderToBytes.m b/matlab/+ismrmrd/+util/ImageHeaderToBytes.m
similarity index 100%
rename from matlab/+ismrmrd/ImageHeaderToBytes.m
rename to matlab/+ismrmrd/+util/ImageHeaderToBytes.m
diff --git a/matlab/+ismrmrd/hdf5_datatypes.m b/matlab/+ismrmrd/+util/hdf5_datatypes.m
similarity index 100%
rename from matlab/+ismrmrd/hdf5_datatypes.m
rename to matlab/+ismrmrd/+util/hdf5_datatypes.m
diff --git a/matlab/+ismrmrd/includejar.m b/matlab/+ismrmrd/+util/includejar.m
similarity index 100%
rename from matlab/+ismrmrd/includejar.m
rename to matlab/+ismrmrd/+util/includejar.m
diff --git a/matlab/+ismrmrd/isInt.m b/matlab/+ismrmrd/+util/isInt.m
similarity index 100%
rename from matlab/+ismrmrd/isInt.m
rename to matlab/+ismrmrd/+util/isInt.m
diff --git a/matlab/+ismrmrd/EncodingCounters.m b/matlab/+ismrmrd/EncodingCounters.m
deleted file mode 100644
index 7f818b5..0000000
--- a/matlab/+ismrmrd/EncodingCounters.m
+++ /dev/null
@@ -1,94 +0,0 @@
-classdef EncodingCounters
-    
-    properties
-        kspace_encode_step_1 = uint16(0); % e.g. phase encoding line number %
-        kspace_encode_step_2 = uint16(0); % e.g. partition encodning number %
-        average              = uint16(0); % e.g. signal average number %
-        slice                = uint16(0); % e.g. imaging slice number %
-        contrast             = uint16(0); % e.g. echo number in multi-echo %
-        phase                = uint16(0); % e.g. cardiac phase number %
-        repetition           = uint16(0); % e.g. dynamic number for dynamic scanning %
-        set                  = uint16(0); % e.g. flow encodning set %
-        segment              = uint16(0); % e.g. segment number for segmented acquisition %
-        user                 = zeros(1,8,'uint16'); % Free user parameters %
-    end
-    
-    methods
-
-        % Constructor
-        function obj = EncodingCounters(bytes)
-            if (nargin == 1)
-                obj.kspace_encode_step_1 = typecast(bytes( 1: 2),'uint16');
-                obj.kspace_encode_step_2 = typecast(bytes( 3: 4),'uint16');
-                obj.average              = typecast(bytes( 5: 6),'uint16');
-                obj.slice                = typecast(bytes( 7: 8),'uint16');
-                obj.contrast             = typecast(bytes( 9:10),'uint16');
-                obj.phase                = typecast(bytes(11:12),'uint16');
-                obj.repetition           = typecast(bytes(13:14),'uint16');
-                obj.set                  = typecast(bytes(15:16),'uint16');
-                obj.segment              = typecast(bytes(17:18),'uint16');
-                obj.user                 = typecast(bytes(19:34),'uint16');
-            end
-        end
-
-        function bytes = toBytes(obj)
-            bytes = zeros(34,1,'int8');
-            bytes( 1: 2) = typecast(obj.kspace_encode_step_1,'int8');
-            bytes( 3: 4) = typecast(obj.kspace_encode_step_2,'int8');
-            bytes( 5: 6) = typecast(obj.average             ,'int8');
-            bytes( 7: 8) = typecast(obj.slice               ,'int8');
-            bytes( 9:10) = typecast(obj.contrast            ,'int8');
-            bytes(11:12) = typecast(obj.phase               ,'int8');
-            bytes(13:14) = typecast(obj.repetition          ,'int8');
-            bytes(15:16) = typecast(obj.set                 ,'int8');
-            bytes(17:18) = typecast(obj.segment             ,'int8');
-            bytes(19:34) = typecast(obj.user                ,'int8');
-        end
-        
-        % Set methods
-        function obj = set.kspace_encode_step_1(obj,v)
-            obj.kspace_encode_step_1 = uint16(v);
-        end
-        
-        function obj = set.kspace_encode_step_2(obj,v)
-            obj.kspace_encode_step_2 = uint16(v);
-        end
-        
-        function obj = set.average(obj,v)
-            obj.average = uint16(v);
-        end
-        
-        function obj = set.slice(obj,v)
-            obj.slice = uint16(v);
-        end
-        
-        function obj = set.contrast(obj,v)
-            obj.contrast = uint16(v);
-        end
-        
-        function obj = set.phase(obj,v)
-            obj.phase = uint16(v);
-        end
-        
-        function obj = set.repetition(obj,v)
-            obj.repetition = uint16(v);
-        end
-        
-        function obj = set.set(obj,v)
-            obj.set = uint16(v);
-        end
-        
-        function obj = set.segment(obj,v)
-            obj.segment = uint16(v);
-        end
-        
-        function obj = set.user(obj,v)
-            if (length(v)~=8)
-                error('EncodingCounters.user must have 8 elements')
-            end
-            obj.user = uint16(v);
-        end
-        
-    end
-   
-end % EncodingCounters
diff --git a/matlab/+ismrmrd/IsmrmrdDataset.m b/matlab/+ismrmrd/IsmrmrdDataset.m
index e3332a3..909d92c 100644
--- a/matlab/+ismrmrd/IsmrmrdDataset.m
+++ b/matlab/+ismrmrd/IsmrmrdDataset.m
@@ -16,7 +16,7 @@ classdef IsmrmrdDataset
             ismrmrd.includejar();
 
             % Set the hdf types
-            obj.htypes = ismrmrd.hdf5_datatypes;
+            obj.htypes = ismrmrd.utils.hdf5_datatypes;
                       
             % If the file exists, open it for read/write
             % otherwise, create it
diff --git a/matlab/CMakeLists.txt b/matlab/CMakeLists.txt
index 78632b3..2b92ab0 100644
--- a/matlab/CMakeLists.txt
+++ b/matlab/CMakeLists.txt
@@ -69,4 +69,4 @@ else (NOT JAVA_FOUND)
 endif(NOT JAVA_FOUND)
 
 INSTALL(DIRECTORY +ismrmrd DESTINATION matlab)
-INSTALL(FILES ${ISMRMRD_JAR} DESTINATION matlab/+ismrmrd)
+INSTALL(FILES ${ISMRMRD_JAR} DESTINATION matlab/+ismrmrd/+util)

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