Back to the main page.

Bug 2176 - support real time fMRI for VB17 on Skyra

Status CLOSED FIXED
Reported 2013-05-22 17:58:00 +0200
Modified 2019-08-10 12:37:14 +0200
Product: FieldTrip
Component: realtime
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to: Tim van Mourik
URL: http://fieldtrip.fcdonders.nl/development/realtime/fmri
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2013-05-22 17:58:53 +0200

On 22 May 2013, at 16:33, Markus Barth wrote: as the Skyra has a new software the realtime fMRI as implemented in the fieldtrip buffer does not work any more. In order to make it work on the new Skyra platform, I think a few changes have to be made: I think I have identified the main problem, which is that the protocol information (from the file: E:\IMAGE\mrprot.txt) that is read by the buffer has changed (at least the format). I send you two example versions of the mrprot files, a current VB17 one, and a new one. If you have a look at the source code and the prot files, maybe you can already identify the problem. I am happy to help you and go over the code together.


Robert Oostenveld - 2013-05-22 18:00:47 +0200

Created attachment 476 one version of the mrprot file


Robert Oostenveld - 2013-05-22 18:01:09 +0200

Created attachment 477 another version of the mrprot file


Robert Oostenveld - 2013-05-23 15:05:30 +0200

Some documentation is provided here http://fieldtrip.fcdonders.nl/development/realtime/fmri The gui_streamer executable mentioned in the documentation is not available in compiled form in the FT release, although a cpp file is present at fieldtrip/realtime/src/acquisition/siemens/gui_streamer.cpp The corresponding Makefile fails on osx with a reference to bug 1532. Probably this relates to 1) the reorganization of the realtime files in the fieldtrip svn and release 2) the redesign of the compile procedure


Robert Oostenveld - 2013-05-23 15:06:09 +0200

the documentation mentions an UDP packet sent to lab-mri001, but it is not really clear to me what the purpose of this packet is


Robert Oostenveld - 2013-05-24 11:48:50 +0200

I discussed with markus, the mrprot.txt without specifications is for vd13.


Robert Oostenveld - 2013-05-24 11:49:51 +0200

Created attachment 478 relevant lines from the vb17 prot file relevant lines from the vb17 prot file


Robert Oostenveld - 2013-05-24 11:50:10 +0200

Created attachment 479 relevant lines from the vd13 prot file relevant lines from the vd13 prot file


Robert Oostenveld - 2013-05-24 11:50:45 +0200

the relevant code is in fieldtrip/realtime/src/acquisition/siemens/PixelDataGrabber.cc


Markus Barth - 2013-05-29 16:06:06 +0200

I compared the two "relevant" mrprot files and I think that one of these two parameters causes the problem: (1) VD13 file: "ucReconstructionMode = 1" In the VD13 version the parameter "ucReconstructionMode" is in decimal notation, while in VB17 it is in hexadecimal notation ("ucReconstructionMode = 0x1") (2) VD13 has an additional parameter ## alTR.__attribute__.size = 128: that could be mistaken to be the original VB17 parameter: "alTR[0] = 2320000" In the VD13 file the parameter alTR[0] also exists


Robert Oostenveld - 2013-11-22 09:56:59 +0100

I have given Jenni read/write access to the fieldtrip svn repo (read access everywhere, write access only in fieldtrip/realtime).


Robert Oostenveld - 2013-11-22 10:07:37 +0100

(In reply to comment #10) @Jenni, you can follow instructions here http://fieldtrip.fcdonders.nl/development/svn to get a working copy of fieldtrip. The relevant code is under fieldtrip/realtime/src/acquisition/siemens/ and it pertains to PixelDataGrabber. Ideally there would not be a branch of the code, but there would remain a single executable that works on all VB versions. After making the change, I you probably should use fieldtrip/realtime/src/rebuild.sh (or bat) to rebuild the executable, as that also copies it in the right place. I don't know the details of the expected compile environment (i.e. the development environment that Stefan used), but we can look at that together. I guess it involves mingw and fltk.


Robert Oostenveld - 2013-11-22 10:08:57 +0100

(In reply to comment #11) please do have a look at http://fieldtrip.fcdonders.nl/development/realtime/fmri, which holds the documentation that Stefan left behind.


Robert Oostenveld - 2015-04-01 21:08:33 +0200

Tim implemented a new version of the Siemens interface. I'll post some details here once I have his code in git.


Robert Oostenveld - 2015-04-01 21:34:09 +0200

(In reply to Robert Oostenveld from comment #13) I looked at the diff. The following files have been changed or added. realtime/src/acquisition/siemens/Projects/Buffer/Buffer.pro realtime/src/acquisition/siemens/Projects/Buffer/Buffer.pro.user realtime/src/acquisition/siemens/Projects/Buffer/Makefile realtime/src/acquisition/siemens/Projects/Buffer/Makefile.Debug realtime/src/acquisition/siemens/Projects/Buffer/Makefile.Release realtime/src/acquisition/siemens/Projects/Buffer/object_script.buffer.Debug realtime/src/acquisition/siemens/Projects/Buffer/object_script.buffer.Release realtime/src/acquisition/siemens/Projects/GuiBufferClient/GuiBufferClient.pro realtime/src/acquisition/siemens/Projects/GuiBufferClient/GuiBufferClient.pro.user realtime/src/acquisition/siemens/Projects/GuiBufferClient/Makefile realtime/src/acquisition/siemens/Projects/GuiBufferClient/Makefile.Debug realtime/src/acquisition/siemens/Projects/GuiBufferClient/Makefile.GuiBufferClient realtime/src/acquisition/siemens/Projects/GuiBufferClient/Makefile.GuiBufferClient.Debug realtime/src/acquisition/siemens/Projects/GuiBufferClient/Makefile.GuiBufferClient.Release realtime/src/acquisition/siemens/Projects/GuiBufferClient/Makefile.Release realtime/src/acquisition/siemens/Projects/GuiBufferClient/gui_buffer_client.pro.user realtime/src/acquisition/siemens/Projects/GuiStreamer/GuiStreamer.pro realtime/src/acquisition/siemens/Projects/GuiStreamer/GuiStreamer.pro.user realtime/src/acquisition/siemens/Projects/GuiStreamer/Makefile realtime/src/acquisition/siemens/Projects/GuiStreamer/Makefile.Debug realtime/src/acquisition/siemens/Projects/GuiStreamer/Makefile.Release realtime/src/acquisition/siemens/Projects/Makefile realtime/src/acquisition/siemens/Projects/NiftiToBuffer/Makefile realtime/src/acquisition/siemens/Projects/NiftiToBuffer/Makefile.Debug realtime/src/acquisition/siemens/Projects/NiftiToBuffer/Makefile.NiftiToBuffer realtime/src/acquisition/siemens/Projects/NiftiToBuffer/Makefile.NiftiToBuffer.Debug realtime/src/acquisition/siemens/Projects/NiftiToBuffer/Makefile.NiftiToBuffer.Release realtime/src/acquisition/siemens/Projects/NiftiToBuffer/Makefile.Release realtime/src/acquisition/siemens/Projects/NiftiToBuffer/NiftiToBuffer.pro realtime/src/acquisition/siemens/Projects/NiftiToBuffer/NiftiToBuffer.pro.user realtime/src/acquisition/siemens/Projects/PixelDataToRemoteBuffer/Makefile realtime/src/acquisition/siemens/Projects/PixelDataToRemoteBuffer/Makefile.Debug realtime/src/acquisition/siemens/Projects/PixelDataToRemoteBuffer/Makefile.PixelDataToRemoteBuffer realtime/src/acquisition/siemens/Projects/PixelDataToRemoteBuffer/Makefile.PixelDataToRemoteBuffer.Debug realtime/src/acquisition/siemens/Projects/PixelDataToRemoteBuffer/Makefile.PixelDataToRemoteBuffer.Release realtime/src/acquisition/siemens/Projects/PixelDataToRemoteBuffer/Makefile.Release realtime/src/acquisition/siemens/Projects/PixelDataToRemoteBuffer/PixelDataToRemoteBuffer.pro realtime/src/acquisition/siemens/Projects/PixelDataToRemoteBuffer/PixelDataToRemoteBuffer.pro.user realtime/src/acquisition/siemens/Projects/PixelDataToRemoteBuffer/PixelDataToRemoteBuffer.pro.user.3.2-pre1 realtime/src/acquisition/siemens/Projects/README.txt realtime/src/acquisition/siemens/Projects/RealTimeFmri.pro realtime/src/acquisition/siemens/Projects/RealTimeFmri.pro.user realtime/src/acquisition/siemens/Projects/SaveAsNifti/Makefile realtime/src/acquisition/siemens/Projects/SaveAsNifti/Makefile.Debug realtime/src/acquisition/siemens/Projects/SaveAsNifti/Makefile.Release realtime/src/acquisition/siemens/Projects/SaveAsNifti/Makefile.SaveAsNifti realtime/src/acquisition/siemens/Projects/SaveAsNifti/Makefile.SaveAsNifti.Debug realtime/src/acquisition/siemens/Projects/SaveAsNifti/Makefile.SaveAsNifti.Release realtime/src/acquisition/siemens/Projects/SaveAsNifti/SaveAsNifti.pro realtime/src/acquisition/siemens/Projects/SaveAsNifti/SaveAsNifti.pro.user realtime/src/acquisition/siemens/Projects/TestReadMrprot/Makefile realtime/src/acquisition/siemens/Projects/TestReadMrprot/Makefile.Debug realtime/src/acquisition/siemens/Projects/TestReadMrprot/Makefile.Release realtime/src/acquisition/siemens/Projects/TestReadMrprot/Makefile.TestReadMrprot realtime/src/acquisition/siemens/Projects/TestReadMrprot/Makefile.TestReadMrprot.Debug realtime/src/acquisition/siemens/Projects/TestReadMrprot/Makefile.TestReadMrprot.Release realtime/src/acquisition/siemens/Projects/TestReadMrprot/TestReadMrprot.pro realtime/src/acquisition/siemens/Projects/TestReadMrprot/debug/test.exe realtime/src/acquisition/siemens/Projects/TestReadMrprot/mrprot.txt realtime/src/acquisition/siemens/Projects/TestReadMrprot/mrprot_avanto.txt realtime/src/acquisition/siemens/Projects/TestReadMrprot/mrprot_skyra.txt realtime/src/acquisition/siemens/Projects/TestReadMrprot/mrprot_test.txt realtime/src/acquisition/siemens/Projects/TestReadMrprot/mrprot_triotim.txt realtime/src/acquisition/siemens/Projects/TestReadMrprot/release/test.exe realtime/src/acquisition/siemens/debug/buffer.dll realtime/src/acquisition/siemens/debug/gui_streamer.exe realtime/src/acquisition/siemens/debug/libfltk.dll realtime/src/acquisition/siemens/debug/libfltk_gl.dll realtime/src/acquisition/siemens/debug/libgcc_s_dw2-1.dll realtime/src/acquisition/siemens/debug/libstdc++-6.dll realtime/src/acquisition/siemens/debug/libwinmm.a realtime/src/acquisition/siemens/debug/libwinpthread-1.dll realtime/src/acquisition/siemens/debug/libws2_32.a realtime/src/acquisition/siemens/debug/pthreadGC2.dll realtime/src/acquisition/siemens/include/Brain3dWindow.h realtime/src/acquisition/siemens/include/FolderWatcher.h realtime/src/acquisition/siemens/include/PixelDataGrabber.h realtime/src/acquisition/siemens/include/compiler.h realtime/src/acquisition/siemens/include/nifti1.h realtime/src/acquisition/siemens/include/platform.h realtime/src/acquisition/siemens/include/siemensap.h realtime/src/acquisition/siemens/include/unixtime.h realtime/src/acquisition/siemens/matlab/compileSap2matlab.m realtime/src/acquisition/siemens/matlab/mrprotString.mat realtime/src/acquisition/siemens/matlab/replay_dicoms.m realtime/src/acquisition/siemens/matlab/sap2matlab.mexa64 realtime/src/acquisition/siemens/release/buffer.dll realtime/src/acquisition/siemens/release/gui_streamer.exe realtime/src/acquisition/siemens/release/libbuffer.a realtime/src/acquisition/siemens/release/libfltk.dll realtime/src/acquisition/siemens/release/libfltk_gl.dll realtime/src/acquisition/siemens/release/libgcc_s_dw2-1.dll realtime/src/acquisition/siemens/release/libstdc++-6.dll realtime/src/acquisition/siemens/release/libwinmm.a realtime/src/acquisition/siemens/release/libwinpthread-1.dll realtime/src/acquisition/siemens/release/libws2_32.a realtime/src/acquisition/siemens/release/pthreadGC2.dll realtime/src/acquisition/siemens/siemens.zip A lot of them are binary files and are not at the right location for inclusion in the source code repository. Since it should be possible to compile everything from scratch (assuming that external dependencies are also properly documented), I will not include the binary files in the repository for now. Furthermore, if I am correct, the Makefiles in the QT project directory should be constructed from QT project file and hence should not be included. According to google, the *.pro.user files are auto generated and also don't belong in version control. The commit has now been boiled down to https://github.com/oostenveld/fieldtrip/commit/23fd72a335f23fafd7b56693b9a70560c14e606b Note that it is not yet included in the fieldtrip main repo.


Robert Oostenveld - 2015-04-01 21:38:40 +0200

i see that there is a lot of replication, i.e. old files still on the original place and new versions with the same name on another place.


Robert Oostenveld - 2015-04-01 21:55:49 +0200

(In reply to Robert Oostenveld from comment #15) the top level makefile at realtime/src/acquisition/siemens/Makefile is still doing quite well. With some small changes I was able to compile on osx. mac011> git commit [bug2176-siemens 7dce30b] updated makefile, compiled on maci64 4 files changed, 48 insertions(+), 22 deletions(-) create mode 100755 realtime/bin/maci64/gui_buffer_client create mode 100755 realtime/bin/maci64/nii_to_buffer create mode 100755 realtime/bin/maci64/opengl_client See https://github.com/oostenveld/fieldtrip/tree/bug2176-siemens


Robert Oostenveld - 2015-04-01 21:58:06 +0200

(In reply to Robert Oostenveld from comment #16) this still belongs to the previous comment mac011> git push oostenveld bug2176-siemens Counting objects: 49, done. Delta compression using up to 4 threads. Compressing objects: 100% (12/12), done. Writing objects: 100% (12/12), 33.29 KiB | 0 bytes/s, done. Total 12 (delta 9), reused 0 (delta 0) To https://github.com/oostenveld/fieldtrip.git 23fd72a..7dce30b bug2176-siemens -> bug2176-siemens


Robert Oostenveld - 2018-11-08 13:59:40 +0100

this seems to have been solved. If not, please reopen.


Robert Oostenveld - 2019-08-10 12:37:14 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.