Coder Social home page Coder Social logo

Comments (5)

mckib2 avatar mckib2 commented on June 3, 2024

Hi @kanghyunryu , I was able to replicate the issue with cgrappa, but my test example works with grappa (see tests/test_nonsquare_matrix_size.py). I believe the issue is in src/get_sampling_patterns.cpp. I'll look into what's going on here.

Is there a way you can send me the data you're using which gives you an error?

from pygrappa.

mckib2 avatar mckib2 commented on June 3, 2024

A quick fix for this issue was released with pygrappa-0.14.1. The test_nonsquare_matrix_size.py script demonstrates the solution. Let me know if this fixes the issue for you.

The plan going forward right now is to maybe use a different, more flexible method for finding unique sampling patterns based on a k-d tree, so I probably won't spend very much time looking into what's going wrong in get_sampling_patters.cpp.

from pygrappa.

kanghyunryu avatar kanghyunryu commented on June 3, 2024

Thank you for the quick response.
I apologize for the mistake, as you mentioned cgrappa is what is causing the error not grappa.py
Thanks I thinks everythings are fine and I will be thrilled for your plans on more flexible methods which may accelerate the code.
Also, I am wondering about vcgrappa implementation.
Your code seems to be working when sampling patterns of regular coil and virtual coils are equivalent
(for instance when sampling patterns are 0, R, 2R, ....) However, when regular coil and virtual coil sampling patterns is not equivalent, it does not work. I think it's because your code seems to match the virtual coil sampling patterns ( zero them out when sampling pattern does not match).
I am also wondering about the nlgrappa.py, you seems to be augmenting more coils by squaring them. This might not be beneficial where ACS lines are small. Is there any chance of implementing "KerNL: Kernel-Based Nonlinear Approach to Parallel MRI Reconstruction. IEEE Trans Med Imaging. 2019 Jan;38(1):312-321" which seems to be working fine also for small ACS lines.
Thanks for your wonderful sharing of codes!

A quick fix for this issue was released with pygrappa-0.14.1. The test_nonsquare_matrix_size.py script demonstrates the solution. Let me know if this fixes the issue for you.

The plan going forward right now is to maybe use a different, more flexible method for finding unique sampling patterns based on a k-d tree, so I probably won't spend very much time looking into what's going wrong in get_sampling_patters.cpp.

from pygrappa.

mckib2 avatar mckib2 commented on June 3, 2024

Hi @kanghyunryu , the vc-grappa implementation simply conjugates the existing coil channels and appends them to the existing coil channels. The sampling pattern between real and virtual coils should be the same, so I'm not sure what you mean by having different patterns. Have I misunderstood?

If you have a dataset that does not share a single sampling pattern between all coil channels, then there does not exist an implementation in pygrappa that can handle it. I can see an argument for this feature if you were doing some kind of joint grappa reconstruction using differently undersampled acquisitions. Please open a new issue if you have this use case, could be interesting to look into, I've not heard of this and unsure how one might go about adapting grappa for it.

nl-grappa currently only has a polynomial kernel data augmentation implemented, and part of that includes channels for so-called "squared coils." This comes straight from the original nl-grappa paper. My implementation does not work as well as I'd like and I find the original implementation provided by the original author in MATLAB difficult to parse, so I'm unsure if there's a better way to implement the paper. I'm happy to look at other grappa-like algorithms, if you have any code for KerNL please submit a pull request!

from pygrappa.

mckib2 avatar mckib2 commented on June 3, 2024

As the original issue has been addressed, I'll go ahead and close this issue. Please feel free open new issues in response to the other items discussed. Thanks!

from pygrappa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.