Re: ISMRMRD mathlab example execution

292 views
Skip to first unread message

Michael Hansen

unread,
Dec 16, 2015, 6:13:16 PM12/16/15
to Ranjith KO, ISMRMRD
Make sure you have the Matlab api on your Matlab path:


That is the folder in the repo, so depends on where you checked it out.

The recon script has changed name, it is in 


And is called 

test_recon_dataset.m


Hope this helps.

Michael 

------
Sent from a mobile device - please excuse brevity and/or typos.

On Dec 16, 2015, at 6:36 AM, Ranjith KO <kor...@gmail.com> wrote:

Hello,
While trying to run the matlab example showing the " ismrmrd" missing error message .

>> test_create_dataset
Undefined variable "ismrmrd" or class "ismrmrd.Dataset".

I couldn't find the ismrmrd mathlab class in the downloaded folder.
In lot of locations in the code in different files showing the reference the ismrmrd object.


In ismrmrd website matlab example code and datasets section,  have mentioned about a  "simple_cartesian_recon.m" file, that also missing in the downloaded folder (link; https://github.com/ismrmrd/ismrmrd). 
Is the mistake with the version of downloaded files? 
How can I solve the issue?  please help..

--
You received this message because you are subscribed to the Google Groups "ISMRMRD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ismrmrd+u...@googlegroups.com.
To post to this group, send email to ism...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ismrmrd/d599ef2b-562e-4370-a8b0-df18e237ef2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Ranjith KO

unread,
Dec 17, 2015, 3:46:00 AM12/17/15
to ISMRMRD, kor...@gmail.com
Thanks for the replay Mr.Michael Hansen ,

I could test the sample,

In case of cartesian reconstruction example "test_recon_dataset.m", can input the "simple_gre.h5" & "3D_partial_fourier.h5" sample files as input instead of the "testdata.h5" file? 

Is the test_recon_dataset. m  general code which support all the 2D or 3D cartesian sample reconstruction? 

My requirement is to develop  general matlab programs for creation and reconstruction of  cartesian trajectory based ismrmrd raw data file.

 I found details about such type of a old program written by you in the link, 
 







Ranjith KO

unread,
Dec 17, 2015, 4:45:30 AM12/17/15
to ISMRMRD, kor...@gmail.com

I tried to execute the "test_recon_dataset.m" script file by inputting one of the cartesian type simple_gre.h5 sample file mentioned in ismrmrd website (after renaming it as  testdata.h5). But execution failed and showing the below error messages
 
>> test_recon_dataset
Error using hdf5lib2
The rank of the dataspace does not correspond to the length of the START argument.

Error in H5S.select_hyperslab (line 39)
H5ML.hdf5lib2('H5Sselect_hyperslab',space_id,op,h5_start,h5_stride,h5_count,h5_block);

Error in ismrmrd.Dataset/readAcquisition (line 181)
            H5S.select_hyperslab(space,'H5S_SELECT_SET',offset,[1],[1],dims);

Error in test_recon_dataset (line 96)
D = dset.readAcquisition();
 
>>  

How can I solve the errors to make the program to reconstruct general cartesian based isrmrd raw data files.

Michael Hansen

unread,
Dec 17, 2015, 11:01:05 AM12/17/15
to Ranjith KO, ISMRMRD
I am not sure I understand your question. Are you asking if you can input other files into the test_recon_dataset.m? The answer is maybe, it depends on what files we are talking about and how they were generated. It is not something we test or support, so you will just have to try. 

That is a toy example reconstruction and it does not support all possible cases. Not even close. It is an example to show how to read and reconstruct data, it is not a complete example. 

On Wed, Dec 16, 2015 at 11:47 PM, Ranjith KO <kor...@gmail.com> wrote:


Thanks for the replay,
I could test the sample,
In case of cartesian reconstruction example "test_recon_dataset.m", caninput the "simple_gre.h5" & "3D_partial_fourier.h5" sample files as input instead of the "testdata.h5" file? 
Is the test_recon_dataset. m  general code which support all the 2D or 3D cartesian sample reconstruction? 

 
 

--
You received this message because you are subscribed to the Google Groups "ISMRMRD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ismrmrd+u...@googlegroups.com.
To post to this group, send email to ism...@googlegroups.com.

Ranjith KO

unread,
Dec 18, 2015, 5:52:50 AM12/18/15
to ISMRMRD, kor...@gmail.com

Thanks again Mr. Michael Hansen for the support,

Ok,  I'm trying  to develop a general matlab  programs for handling (generation and reconstruction) cartesian type ISMRMRD file.

Another issue I have faced during exploring is,
while I tried to execute the "s
imple_spiral_recon" sample program as per the instructions in website,  the following error messages were generated.


>> images = simple_spiral_recon('../data/simple_spiral.h5');
Error using hdf5lib2
The rank of the dataspace does not correspond to the length of the START argument.

Error in H5S.select_hyperslab (line 39)
H5ML.hdf5lib2('H5Sselect_hyperslab',space_id,op,h5_start,h5_stride,h5_count,h5_block);

Error in ismrmrd.Dataset/readAcquisition (line 181)
            H5S.select_hyperslab(space,'H5S_SELECT_SET',offset,[1],[1],dims);

Error in simple_spiral_recon (line 24)
raw_data = dset.readAcquisition();  % read all the acquisitions


Please help to solve the issue.

OS :Windows 7,  32 bit
Matlab ver : R2014a

Michael Hansen

unread,
Dec 22, 2015, 9:15:22 AM12/22/15
to ISMRMRD, kor...@gmail.com
Sorry for the late reply. Where are you getting this spiral data from?

Ranjith KO

unread,
Dec 23, 2015, 12:00:19 AM12/23/15
to ISMRMRD, kor...@gmail.com

Mr. Michael Hansen

I modified in the code and now its working. 
In "Dataset.m" file,
1) changed  "[~,dims,~] = H5S.get_simple_extent_dims(space)"   to
        [rank,dims,~] = H5S.get_simple_extent_dims(space);
  
2) commented the "nacq = dims(1);" line
        %nacq = dims(1);

3) changed "mem_space = H5S.create_simple(1,dims,[]) "
        mem_space = H5S.create_simple(rank,dims,[]);

After these modifications, the code executing successfully.
Also,  reconstructed the "simple_gre.h5" cartesian type sample data(mensioned in site)  using the example code "test_recon_dataset.m"

Sincere thanks for spending your valid time...




Reply all
Reply to author
Forward
0 new messages