Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Denoise kernel size #22

Closed
mattcieslak opened this issue Jul 10, 2019 · 7 comments
Closed

Denoise kernel size #22

mattcieslak opened this issue Jul 10, 2019 · 7 comments

Comments

@mattcieslak
Copy link
Collaborator

I'm finding for some older phase1/phase2 fieldmaps that it's necessary to set the kernel size to 5 for this node: https://github.com/poldracklab/sdcflows/blob/0.0.2/sdcflows/workflows/phdiff.py#L98

Is there a downside to setting the default to 5? Or should we make this a parameter?

@effigies
Copy link
Member

Does it make sense to set a target smoothness instead of a straight kernel smoothing, as with 3dBlurToFWHM? Then we're less dependent on the quality of the input data.

@oesteban
Copy link
Member

oesteban commented Aug 7, 2019

Hopefully, this will not be necessary after #14, but it doesn't hurt to first get this done.

@mattcieslak
Copy link
Collaborator Author

For now I have the kernel size only go up to 5 if there are two phase maps (#30) and the size stays 3 for phasediff images. #30 also re-organizes the workflows so that #14 can be used on these fieldmaps

oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 25, 2019
Putting together the lessons learned in nipreps#30, leveraging nipreps#52 and nipreps#53
(unfolded from nipreps#30 too), and utilizing nipreps#50 and nipreps#51, this workflow adds
the phase difference map calculation, considering it one use-case of the
general phase-difference fieldmap workflow.

On top of this PR, we can continue the discussions held in nipreps#30.
Probably, we will want to address nipreps#23 the first - the magnitude
segmentation is sometimes really bad (e.g. see the phase1/2 unit test).

Another discussion arisen in nipreps#30 is the spatial smoothing of the
fieldmap (nipreps#22).

Finally, the plan is to revise this implementation and determine whether
the subtraction should happen before or after PRELUDE, and whether the
arctan2 route is more interesting.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 25, 2019
Putting together the lessons learned in nipreps#30, leveraging nipreps#52 and nipreps#53
(unfolded from nipreps#30 too), and utilizing nipreps#50 and nipreps#51, this workflow adds
the phase difference map calculation, considering it one use-case of the
general phase-difference fieldmap workflow.

On top of this PR, we can continue the discussions held in nipreps#30.
Probably, we will want to address nipreps#23 the first - the magnitude
segmentation is sometimes really bad (e.g. see the phase1/2 unit test).

Another discussion arisen in nipreps#30 is the spatial smoothing of the
fieldmap (nipreps#22).

Finally, the plan is to revise this implementation and determine whether
the subtraction should happen before or after PRELUDE, and whether the
arctan2 route is more interesting.
@oesteban oesteban added this to the 1.1.0 milestone Nov 25, 2019
@oesteban
Copy link
Member

I've set 5 as the default for now, and I'm pretty happy with the results.

I'm also with @effigies that 3dBlurToFWHM is a very cheap but effective solution to the problem.

Finally, we need to investigate the resampling when moving the fieldmap to the target EPI dataset because I'm under the impression that it is introducing some little spikes in it.

@mattcieslak
Copy link
Collaborator Author

Isn't 3dBlurToFWHM doing Gaussian smoothing instead of a median filter? I thought the main purpose was to remove spikes, which would end up getting spread out spatially if you just smooth with a Gaussian kernel.

@oesteban
Copy link
Member

Isolated spikes would be removed with a Gaussian filter easily - median filters are better for salt&pepper kind of noise. It doesn't hurt to try.

But yes, you are right - the median filter is just to remove spikes

@oesteban oesteban modified the milestones: 1.2.0, 1.3.0 Dec 18, 2019
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 14, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: nipreps#71, nipreps#22.
Resolves: nipreps#72.
Resolves: nipreps#14.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 14, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: nipreps#71, nipreps#22.
Resolves: nipreps#72.
Resolves: nipreps#14.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 14, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: nipreps#71, nipreps#22.
Resolves: nipreps#72.
Resolves: nipreps#14.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 14, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: nipreps#71, nipreps#22.
Resolves: nipreps#72.
Resolves: nipreps#14.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 14, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: nipreps#71, nipreps#22.
Resolves: nipreps#72.
Resolves: nipreps#14.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 16, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: nipreps#71, nipreps#22.
Resolves: nipreps#72.
Resolves: nipreps#14.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 16, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: nipreps#71, nipreps#22.
Resolves: nipreps#72.
Resolves: nipreps#14.
@oesteban oesteban modified the milestones: 1.5.0, 1.4.0 Nov 18, 2020
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 19, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: nipreps#71, nipreps#22.
Resolves: nipreps#72.
Resolves: nipreps#14.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 22, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: nipreps#71, nipreps#22.
Resolves: nipreps#72.
Resolves: nipreps#14.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 22, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: nipreps#71, nipreps#22.
Resolves: nipreps#72.
Resolves: nipreps#14.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 25, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: nipreps#71, nipreps#22.
Resolves: nipreps#72.
Resolves: nipreps#14.
@oesteban
Copy link
Member

Superseded by #119.

oesteban added a commit that referenced this issue Nov 26, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: #71, #22.
Resolves: #72.
Resolves: #14.
oesteban added a commit that referenced this issue Nov 30, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: #71, #22.
Resolves: #72.
Resolves: #14.
oesteban added a commit that referenced this issue Dec 1, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: #71, #22.
Resolves: #72.
Resolves: #14.
oesteban added a commit that referenced this issue Dec 3, 2020
This PR finally adds an implementation for B-Spline smoothing and
extrapolation of fieldmaps.

References: #71, #22.
Resolves: #72.
Resolves: #14.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants