Conversation
- add copyright notice, author info, requisite usage() fields - use Math::pi - some style changes
need to add -lfftw3 to final linker command
Otherwise the command produces bad output, presumably due to wraparound after subtraction of unsigned integers
This requires explicit handling of potential divide-by-zero later in the code.
|
I won't be in a position to test this this week still, but I would really, really want to see RC2 happen this week though... it's been delayed already quite a bit as is. So if anyone else can give this a test, that'd be great. Even if not, I'm not against having it in RC2, maybe with a "beta" kind of warning to go with it? As we all know, the best testing is that from the whole user base. We've often had features tested quite well, only for a user to highlight a bug/problem on day 1 after release of said feature. 😐 |
Yes, I'm leaning that way too. I think it works fine, and the output seems to match the original authors' Any other thoughts...? |
This adds tests to the configure script to detect FFTW, and sets the requisite flags if found. It also required some changes to ensure all the FFTW plans are properly allocated prior to thread launch, since their plan allocation routines are not thread-safe.
|
OK, added a couple more enhancements - we can now link against FFTW. This results in equivalent runtime to the authors' original I'll add a test, and then we should be good to go. One final note: are we all OK with the name |
|
Haven't tested myself, but if you can (almost) identically reproduce Just raising some points for thought:
|
Good point about adding documentation for the handling of partial Fourier acquisitions - I'll do that in a bit. However, running this in 1D or 3D is going to be quite a bit of work, and require fairly extensive modifications, particularly to the filtering that's applied initially. I'm not sure there's any discussion of that in Kellner's original paper, but I suggest that if they don't cover it, we should leave it well alone - maybe leave it as a topic for future research for a Master's student...? I note there is discussion of the 1D case (since that's essentially what's applied to each row & column in the image in the 2D case, but no mention of the appropriate filtering to perform 1D unringing on a 2D image. Personally, I think we should stick as close as possible to the original
Good suggestion, will do. Should also mention that this should probably run after
OK, the shifts clearly will make a difference, but I didn't find the difference to be particularly appreciable visually even going down as low as 10 on my run-of-the-mill data... The processing time will scale almost linearly with the number of shifts, so I wouldn't make 100 the default unless there was solid evidence that the difference it makes is non-negligible. Personally, I find it hard to believe that a granularity of 1/20th of a voxel isn't sufficient. I'd personally rather stick with the original authors' implementation defaults here, which they presumably chose with good reason, and modify if that proves insufficient.
Not the test data, no. I used the small cropped
Well, I assumed you would be, given that's the name you suggested in #715... 😉 |
now using a full size b=0 image, and comparing against output of original 'unring' implementation.
|
OK, that's all done. I reckon we can merge...? |
|
Ok, looks like we've got sufficient approval here. This should also not affect any other existing functionality, and we're not actively recommending the step yet in any pipeline (i.e. in the userdocs), so I reckon it's safe to be in "pretty-well-tested-beta". Let's merge now. |
Based on @bjeurissen's original implementation. Seems to work as expected on my system, but I would really appreciate someone giving this a thorough going over...
Seems FFTW really is a lot faster than the Eigen FFT routines - on my system, this command is ~3x faster using FFTW (single-threaded), and this despite all the unnecessary back & forth FFTs performed in the original implementation, which I've removed from here... I guess if people really care, they can use the FFTW backend that Eigen provides.
Would be good to get this out with
3.0_RC2if possible, but only if everyone is comfortable with that...