[ismrmrd] 177/281: Merge branch 'development' of vatican.nhlbi.nih.gov:/home/gitrepos/ismrmrd into development

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:01:11 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 fb8e97f6526a9a6e0950f4c01fda231523b89d8c
Merge: 1454f25 29434c9
Author: Souheil Inati <souheil.inati at nih.gov>
Date:   Thu Aug 29 11:22:59 2013 -0400

    Merge branch 'development' of vatican.nhlbi.nih.gov:/home/gitrepos/ismrmrd into development
    
    Conflicts:
    	matlab/+ismrmrd/IsmrmrdDataset.m
    	matlab/+ismrmrd/XMLHeader.m

 CMakeLists.txt                   |   5 +-
 bindings/java/CMakeLists.txt     |   4 +-
 cmake/FindJava.cmake             | 212 +++++++++++++++++++++++++++++++++++++++
 matlab/+ismrmrd/IsmrmrdDataset.m |  26 ++---
 matlab/+ismrmrd/example.m        |   6 +-
 matlab/+ismrmrd/includejar.m     |  15 +++
 matlab/CMakeLists.txt            |  72 +++++++++++++
 matlab/XMLString.java            |  42 ++++++++
 matlab/cfg.jxb                   |  10 ++
 9 files changed, 366 insertions(+), 26 deletions(-)

diff --cc bindings/java/CMakeLists.txt
index fa3c159,90edc7e..8790bd3
--- a/bindings/java/CMakeLists.txt
+++ b/bindings/java/CMakeLists.txt
@@@ -34,4 -32,3 +32,4 @@@ add_custom_command
  
  install(TARGETS jismrmrd DESTINATION java)
  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ismrmrd.jar DESTINATION java)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ismrmrdxmlhdr.jar DESTINATION matlab/+ismrmrd)
++
diff --cc matlab/+ismrmrd/IsmrmrdDataset.m
index c4eae9b,8427543..8fde4de
--- a/matlab/+ismrmrd/IsmrmrdDataset.m
+++ b/matlab/+ismrmrd/IsmrmrdDataset.m
@@@ -12,19 -11,9 +12,12 @@@ classdef IsmrmrdDatase
      methods
  
          function obj = IsmrmrdDataset(filename,groupname)
+             % add the ismrmrd jar to the javaclasspath
+             ismrmrd.includejar();
  
 +            % Set the hdf types
 +            obj.htypes = ismrmrd.hdf5_datatypes;
-             
-             % Set the javaclasspath to be able to load the xml header bits
-             % Check to see if the jar is already on our path
-             [loc,~,~] = fileparts(which(sprintf('ismrmrd.%s',mfilename)));
-             jarpath = fullfile(loc,'ismrmrdxmlhdr.jar');
-             jpath = javaclasspath('-all');
-             if ~any(strcmp(jarpath,jpath))
-                 javaaddpath(jarpath);
-             end
-             
++                      
              % If the file exists, open it for read/write
              % otherwise, create it
              if exist(filename,'file')
@@@ -51,16 -40,17 +44,16 @@@
              % Check if the group exists
              lapl_id=H5P.create('H5P_LINK_ACCESS');
              if (H5L.exists(obj.fid,grouppath,lapl_id) == 0)
 -                % group does not exist, create it and set a default header
 +                % group does not exist, create it
                  group_id = H5G.create(obj.fid, grouppath, 0);
                  H5G.close(group_id);
-                 % initialize the xmlhdr object
-                 obj.xmlhdr = org.ismrm.ismrmrd.xmlhdr.IsmrmrdHeader();
-                 obj.writexml(obj.xmlstring());
+                 % create a default xml header object
+                 %obj.xmlhdr = ismrmrd.XMLHeader();
+                 obj.xmlhdr = org.ismrm.ismrmrd.IsmrmrdHeader();
              else
                  % group exists, read the xml header
--                % and create a new convert it to an xml header object
-                 obj.xmlhdr = org.ismrm.ismrmrd.xmlhdr.XMLString.StringToIsmrmrdHeader(obj.readxml());
+                 %obj.xmlhdr = ismrmrd.XMLHeader().stringToHeader(obj.readxml());
+                 obj.xmlhdr = org.ismrm.ismrmrd.XMLString.StringToIsmrmrdHeader(obj.readxml());
              end
              H5P.close(lapl_id);
  
@@@ -73,12 -65,8 +66,13 @@@
              H5F.close(obj.fid);
          end
  
 +        function xmlstring = xmlstring(obj)
 +            % convert xmlhdr to a string
-             xmlstring = org.ismrm.ismrmrd.xmlhdr.XMLString.IsmrmrdHeaderToString(obj.xmlhdr);
++            %xmlstring = ismrmrd.XMLHeader.headerToString(obj.xmlhdr);
++            xmlstring = org.ismrm.ismrmrd.XMLString.IsmrmrdHeaderToString(obj.xmlhdr);
 +        end
 +        
          function xmlstring = readxml(obj)
 -
              % Check if the XML header exists
              % TODO: set it's value to the default
              lapl_id=H5P.create('H5P_LINK_ACCESS');
diff --cc matlab/+ismrmrd/includejar.m
index 0000000,8c01859..dcaa62e
mode 000000,100644..100644
--- a/matlab/+ismrmrd/includejar.m
+++ b/matlab/+ismrmrd/includejar.m
@@@ -1,0 -1,6 +1,15 @@@
+ function includejar()
++% Set the javaclasspath to be able to load the xml header bits
++
++    % Path to the jar file
+     fpath = mfilename('fullpath');
+     [pathstr, name, ext] = fileparts(fpath);
+     jar = fullfile(pathstr, 'ismrmrd-matlab.jar');
 -    javaaddpath(jar);
++    
++    % Only add if it's not already on our path
++    jpath = javaclasspath('-all');
++    if ~any(strcmp(jar,jpath))
++        javaaddpath(jar);
++    end
++
+ end

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