[CCPPETMR/SIRF] examples/Python/MR/Gadgetron/fully_sampled_recon_single_chain.py (#167)

0 views
Skip to first unread message

David Atkinson

unread,
May 6, 2018, 8:36:56 AM5/6/18
to CCPPETMR/SIRF, Subscribed
  1. Incorrectly displays modulus data when labelled as imaginary. Problem is with 'abs' in:
    show_3D_array(abs(image_array[1::2,:,:])

  2. Appears to reconstruct 3D data, but fails in show_3D_array:
    sirfuser@ubuntu-xenial:~/CCP-Elba$ python /home/sirfuser/devel/buildVM/sources/SIRF/examples/Python/MR/Gadgetron/fully_sampled_recon_single_chain.py -f m3d.h5 -o m3d_out.h5 -p .
    Input stream has terminated
    Traceback (most recent call last):
    File "/home/sirfuser/devel/buildVM/sources/SIRF/examples/Python/MR/Gadgetron/fully_sampled_recon_single_chain.py", line 118, in
    main()
    File "/home/sirfuser/devel/buildVM/sources/SIRF/examples/Python/MR/Gadgetron/fully_sampled_recon_single_chain.py", line 99, in main
    show = False)
    File "/home/sirfuser/devel/install/python/pUtilities.py", line 138, in show_3D_array
    rows = int(round(math.sqrt(n*nx/ny)))
    ZeroDivisionError: integer division or modulo by zero

  3. When applied to our dataset 'simulated_MR_2D_cartesian.h5', it labels output images as two slices, but I believe they are 2 repetitions of one slice.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

evgueni-ovtchinnikov

unread,
May 10, 2018, 7:08:42 AM5/10/18
to CCPPETMR/SIRF, Subscribed
  1. corrected
  2. need your data to debug
  3. slice number means its number in the whole set of slices wherever they come from (different z, different repetition etc.) - do not see how to label slices otherwise, too many dimensions:(

David Atkinson

unread,
May 10, 2018, 7:45:00 AM5/10/18
to CCPPETMR/SIRF, Subscribed


1. corrected - Thanks
2. need your data to debug - run siemens_to_ismrmrd on this 3D dataset to generate an input h5 file: https://www.dropbox.com/s/tz7q02fziskq9u7/meas_MID00103_FID57244_test.dat?dl=0
3. slice number means its number in the whole set of slices wherever they come from (different z, different repetition etc.) - do not see how to label slices otherwise, too many dimensions:( . ‘slice’ implies spatial position, suggest subplot title is something like ‘3rd dimension index’ or ‘ind3’.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://github.com/CCPPETMR/SIRF/issues/167#issuecomment-388024019>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AF2bn4rFndNK9S-OuYzyOBuXAltJSQQCks5txB-3gaJpZM4T0BHK>.

evgueni-ovtchinnikov

unread,
May 10, 2018, 8:36:13 AM5/10/18
to CCPPETMR/SIRF, Subscribed
  1. I do not have siemens_to_ismrmrd - can you not just let me have m3d.h5?
    By the way, what makes you think the reconstruction succeeded? Can you print image_data.number() and image_data.norm()? image_array.shape is clearly wrong as show_3D_array found that ny = image_array.shape[1] = 0.

  2. So you suggest to have 'slice with 3rd dimension index 1' or 'slice with ind3 = 1' instead of 'slice 1'? The former is too long and the latter rather cryptic, are they not?
    @ckolbPTB: any ideas?
    @KrisThielemans: I suggest we have a discussion on this on a Friday tcon, and for the time being shift it to milestone 1.2.

Kris Thielemans

unread,
May 10, 2018, 8:51:54 AM5/10/18
to CCPPETMR/SIRF, Subscribed
  1. for the data, you have siemens_to_ismrmrd on the VM. would that be ok?

  2. let's definitely discuss, but I suppose that the data issue needs to be fixed before the course. can just as well adjust the plot then?

evgueni-ovtchinnikov

unread,
May 10, 2018, 11:04:44 AM5/10/18
to CCPPETMR/SIRF, Subscribed
  1. the error is due to failure to read the saved image - have no idea why. for now commented out the reading.
  2. the point is - how to adjust. i considered David's suggestions and pointed out at their limitations. it will not take more than 5 min to implement any of the two.

evgueni-ovtchinnikov

unread,
May 11, 2018, 11:24:53 AM5/11/18
to CCPPETMR/SIRF, Subscribed

found a bug in image read from file, now reads ok

however, gadgetrton sometimes crashes with the message:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorGadgetron::bad_alloc >'
what(): x

in fact, it was this crash that caused zero ny and hence division by zero in show_3D_array

crash might be due to insufficient memory on VM - the raw data size is 1.3G

an annoying thing is that the crash happens on the server and the client does not know about it

Kris Thielemans

unread,
May 11, 2018, 11:32:34 AM5/11/18
to CCPPETMR/SIRF, Subscribed

how much memory does your VM have? (check in Machine Settings in the VB interface). If you have spare, try to increase it (shutdown VM, change memory, start it).

evgueni-ovtchinnikov

unread,
May 15, 2018, 8:44:54 AM5/15/18
to CCPPETMR/SIRF, Subscribed

on laptop i use VM with 4096MB, which leaves me with about 3GB free memory

tried 8192MB VM on desktop, ran 6 times - no crashes, so must be the VM memory issue

btw, implemented empty-chain connection check, now have correct error traceback (to Reconstructor.process) and more useful message, @DANAJK please try again on m3d.h5

evgueni-ovtchinnikov

unread,
Sep 28, 2018, 11:55:42 AM9/28/18
to CCPPETMR/SIRF, Subscribed

Closed #167.

Reply all
Reply to author
Forward
0 new messages