Program using ISMRMRD

119 views
Skip to first unread message

Yishi Wang

unread,
Mar 24, 2015, 5:16:24 AM3/24/15
to ism...@googlegroups.com
Hi all,
    I'm try to program an application to write philips data to ISMRMRD, is it enough to just include the header files for ISMRMRD(dataset.h, export.h, ismrmrd.h, meta.h, xml.h) into my project in Visual Studio 2012 or I need to follow all the installation steps to make things work?

Thanks!
Yishi

Souheil Inati

unread,
Mar 24, 2015, 5:35:37 AM3/24/15
to Yishi Wang, ism...@googlegroups.com
No you need to install it and then you need to compile and link against it. 
--
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/033c4bd5-628e-4ee2-8e72-121ed074ba21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Hansen

unread,
Mar 24, 2015, 7:53:52 AM3/24/15
to ism...@googlegroups.com
You need to compile and install the ISMRMRD library. As pointed out by Souheil, your application will need to link against the library. The header files just describe the functions that the library provides, your application will need to find the actual library when linking. 

If you want to see a "simple" example of setting up a CMake configuration for an application that links against ISMRMRD, you could checkout the gadgetron_ismrmrd_client:


Hope this helps,
Michael

PS. We would be interested in hearing about any progress you make on converting Philips data. I know of some efforts here and there, but not sure how far along it is. 

Yishi Wang

unread,
Mar 24, 2015, 8:04:50 AM3/24/15
to ism...@googlegroups.com
Thank you Michael, I'll keep you updated.
Yishi

在 2015年3月24日星期二 UTC+8下午7:53:52,Michael Hansen写道:

Yishi Wang

unread,
Mar 24, 2015, 8:06:05 AM3/24/15
to ism...@googlegroups.com, wangyst...@gmail.com
Thank you Souheil.

在 2015年3月24日星期二 UTC+8下午5:35:37,Souheil Inati写道:

Yishi Wang

unread,
Mar 24, 2015, 9:58:11 PM3/24/15
to ism...@googlegroups.com
During installing, the cmake could not find boost. I've tried a few versions of boost. I added the boost root folder to path:D:\Program Files\boost_1_57_0 and a few more such as:D:\Program Files\boost_1_55_0\lib64-msvc-11.0;D:\Program Files\boost_1_55_0_32\boost_1_55_0\lib32-msvc-11.0; 
But cmake still can't find boost.



在 2015年3月24日星期二 UTC+8下午5:16:24,Yishi Wang写道:

Michael Hansen

unread,
Mar 24, 2015, 10:23:52 PM3/24/15
to ism...@googlegroups.com
You don't need boost to build the ISMRMRD library. As it says it just means it cannot build some utilities. However, it looks like it cannot find HDF5 and that is an absolute requirement. Did you install HDF5?


On Tuesday, March 24, 2015 at 5:16:24 AM UTC-4, Yishi Wang wrote:

Yishi Wang

unread,
Mar 24, 2015, 10:46:35 PM3/24/15
to ism...@googlegroups.com
Yes, I installed HDF5. And added "C:\Program Files\HDF_Group\HDF5\1.8.14\bin" to the path. Did I miss something?

在 2015年3月25日星期三 UTC+8上午10:23:52,Michael Hansen写道:

Michael Hansen

unread,
Mar 24, 2015, 10:50:15 PM3/24/15
to ism...@googlegroups.com
Well if you look at your output it says that the HDF5_C_INCLUDE_DIR was NOTFOUND, so something is not quite right. It is unable to find the include files for HDF5 and so it fails. 

Yishi Wang

unread,
Mar 24, 2015, 11:01:12 PM3/24/15
to ism...@googlegroups.com
I added all of these to path:C:\Program Files\HDF_Group\HDF5\1.8.14\bin;C:\Program Files\HDF_Group\HDF5\1.8.14;C:\Program Files\HDF_Group\HDF5\1.8.14\lib;C:\Program Files\HDF_Group\HDF5\1.8.14\include;C:\Program Files\HDF_Group\HDF5\1.8.14\cmake\hdf5;
Still not working.

在 2015年3月25日星期三 UTC+8上午10:50:15,Michael Hansen写道:

Yishi Wang

unread,
Mar 24, 2015, 11:36:07 PM3/24/15
to ism...@googlegroups.com
Windows will drive me mad.

在 2015年3月25日星期三 UTC+8上午11:01:12,Yishi Wang写道:

Yishi Wang

unread,
Mar 24, 2015, 11:44:20 PM3/24/15
to ism...@googlegroups.com
Is it possible I skip cmake and go directly to visual studio 2012?

在 2015年3月25日星期三 UTC+8上午11:36:07,Yishi Wang写道:

Yishi Wang

unread,
Mar 25, 2015, 8:11:47 AM3/25/15
to ism...@googlegroups.com
Dear Michael, 
I don't know how but cmake is not giving the errors now.
But When I launched the generated vs project in vs 2012, it still can't find hdf5.h.
When I tried to include the folder containing hdf5.h into the project, more errors occurred.





在 2015年3月25日星期三 UTC+8上午11:44:20,Yishi Wang写道:

Yishi Wang

unread,
Mar 25, 2015, 8:48:55 AM3/25/15
to ism...@googlegroups.com
I just converted my language set from Chinese to English for vs 2012. 
The errors are shown below.


2>E:\ismrmrd\libsrc\ismrmrd.c(531): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
2>E:\ismrmrd\libsrc\ismrmrd.c(543): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
2>  ismrmrd.cpp
2>  dataset.c
2>E:\ismrmrd\libsrc\dataset.c(540): warning C4244: '=' : conversion from 'hsize_t' to 'uint32_t', possible loss of data
2>E:\ismrmrd\libsrc\dataset.c(1030): error C2143: syntax error : missing ';' before 'type'
2>E:\ismrmrd\libsrc\dataset.c(1034): error C2065: 'buff' : undeclared identifier
2>E:\ismrmrd\libsrc\dataset.c(1034): warning C4022: 'H5Dread' : pointer mismatch for actual parameter 6
2>E:\ismrmrd\libsrc\dataset.c(1035): error C2065: 'buff' : undeclared identifier
2>E:\ismrmrd\libsrc\dataset.c(1035): error C2109: subscript requires array or pointer type
2>E:\ismrmrd\libsrc\dataset.c(1042): error C2065: 'buff' : undeclared identifier
2>E:\ismrmrd\libsrc\dataset.c(1042): error C2109: subscript requires array or pointer type
2>E:\ismrmrd\libsrc\dataset.c(1042): error C2168: 'strlen' : too few actual parameters for intrinsic function
2>E:\ismrmrd\libsrc\dataset.c(1047): error C2065: 'buff' : undeclared identifier
2>E:\ismrmrd\libsrc\dataset.c(1047): error C2109: subscript requires array or pointer type
2>E:\ismrmrd\libsrc\dataset.c(1047): error C2168: 'strlen' : too few actual parameters for intrinsic function
2>E:\ismrmrd\libsrc\dataset.c(1047): warning C4022: 'memcpy' : pointer mismatch for actual parameter 2
2>E:\ismrmrd\libsrc\dataset.c(1047): error C2168: 'memcpy' : too few actual parameters for intrinsic function
2>E:\ismrmrd\libsrc\dataset.c(1074): error C2061: syntax error : identifier 'ismrmrd_get_number_of_acquisitions'
2>E:\ismrmrd\libsrc\dataset.c(1074): error C2059: syntax error : ';'
2>E:\ismrmrd\libsrc\dataset.c(1074): error C2059: syntax error : 'type'
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

在 2015年3月25日星期三 UTC+8下午8:11:47,Yishi Wang写道:

Yishi Wang

unread,
Mar 25, 2015, 9:21:15 AM3/25/15
to ism...@googlegroups.com
At the same time, I am trying to do this job on Ubuntu 14.10 with codeblocks. ISMRMRD has already been installed on that machine. I included the 5 header files for ISMRMRD and the linked the library file found in /usr/local/lib. Is that enough for me to do my project? If not, what did I miss?
Thanks.

在 2015年3月25日星期三 UTC+8下午8:48:55,Yishi Wang写道:

Joseph Naegele

unread,
Mar 25, 2015, 9:34:39 AM3/25/15
to ism...@googlegroups.com
This problem:

2>E:\ismrmrd\libsrc\dataset.c(1030): error C2143: syntax error : missing ';' before 'type'
is due to VS2012 only supporting C89. We intend for ISMRMRD to compile with VS2012 but we didn't catch that one.
For now, I will fix it in the master branch.

Yishi Wang

unread,
Mar 25, 2015, 9:45:58 AM3/25/15
to ism...@googlegroups.com
Wow, thank you for pointing out the problem, then I can't use vs 2012 now.
So, should I switch to vs 2010 and do all the installation again or just wait for your fixing? How soon will it be fixed?
If I switch to vs2010, will vs 2010 conflict with 2012?


在 2015年3月25日星期三 UTC+8下午9:34:39,Joseph Naegele写道:

Yishi Wang

unread,
Mar 25, 2015, 9:49:04 AM3/25/15
to ism...@googlegroups.com
Or do you suggest VS 2013 or higher? As long as it works now, I'll take it.
Yishi

在 2015年3月25日星期三 UTC+8下午9:45:58,Yishi Wang写道:

Michael Hansen

unread,
Mar 25, 2015, 9:57:21 AM3/25/15
to ism...@googlegroups.com
VS2013 is what we use at the moment on our build systems. 

Yishi Wang

unread,
Mar 25, 2015, 10:37:11 AM3/25/15
to ism...@googlegroups.com
Thanks Michael and Joseph, I'll try 2013 then.

在 2015年3月25日星期三 UTC+8下午9:57:21,Michael Hansen写道:

Yishi Wang

unread,
Mar 27, 2015, 8:51:12 AM3/27/15
to ism...@googlegroups.com
Hi Michael and Joseph, I got this new error in VS 2013.

2>C:\Program Files\HDF_Group\HDF5\1.8.14\bin\hdf5.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x330
I reinstalled HDF5 a few times, don't know why this file is invalid or corrupted.

Regards!
Yishi

在 2015年3月25日星期三 UTC+8下午10:37:11,Yishi Wang写道:

Michael Hansen

unread,
Mar 27, 2015, 8:53:24 AM3/27/15
to Yishi Wang, ism...@googlegroups.com

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

Michael Hansen

unread,
Mar 27, 2015, 8:54:52 AM3/27/15
to Yishi Wang, ism...@googlegroups.com
There is obviously something wrong with your installation, but it is very hard for us to debug your specific Windows setup.

Yishi Wang

unread,
Mar 27, 2015, 10:26:39 AM3/27/15
to ism...@googlegroups.com, wangyst...@gmail.com
Thank you Michael, this is exactly the same version of HDF5 I used. The error is still there.

在 2015年3月27日星期五 UTC+8下午8:54:52,Michael Hansen写道:

Michael Hansen

unread,
Mar 27, 2015, 10:31:00 AM3/27/15
to Yishi Wang, ism...@googlegroups.com
You must have some other problem. We use it all the time. A complete build (ISMRMRD, Gadgetron, etc.) just ran on Windows VS2013. It finished 20 minutes ago:


So you must have some other configuration that is wrong. But is is basically impossibly for us to debug all the strangeness of windows installations. Sorry.

Michael

Michael Hansen

unread,
Mar 27, 2015, 10:42:26 AM3/27/15
to Yishi Wang, ism...@googlegroups.com
Looks at the commands here to run CMake on the Windows machine. Take a note of the environment variables:

Reply all
Reply to author
Forward
0 new messages