Skip to content

Commit

Permalink
Merge pull request #442 from michaelhallquist/1.9.1.8-HOTFIX
Browse files Browse the repository at this point in the history
Fix for SUSAN double FWHM -> sigma problem
  • Loading branch information
trh3 authored Oct 8, 2024
2 parents 374dbe4 + 7be2646 commit 7f505ad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion clpipe/config/package.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME = "clpipe"
VERSION = "1.9.1.7"
VERSION = "1.9.1.8"

DESCRIPTION = "clpipe: MRI processing pipeline for high performance clusters"
REPO_URL = "https://github.com/cohenlabUNC/clpipe"
Expand Down
9 changes: 3 additions & 6 deletions clpipe/postprocutils/image_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,11 +528,6 @@ def build_SUSAN_workflow(
if crashdump_dir is not None:
workflow.config["execution"]["crashdump_dir"] = crashdump_dir

# Calculate fwhm
fwhm_to_sigma = sqrt(8 * log(2))
sigma = fwhm_mm / fwhm_to_sigma
print(f"fwhm_to_sigma: {fwhm_to_sigma}")

# Setup identity (pass through) input/output nodes
input_node = build_input_node()
output_node = build_output_node()
Expand Down Expand Up @@ -563,7 +558,9 @@ def build_SUSAN_workflow(
),
name="setup_usans",
)
susan_node = pe.Node(SUSAN(fwhm=sigma, use_median=1, dimension=3), name="SUSAN")

# N.B. the SUSAN node in nipype does the FWHM -> sigma conversion, so we should not!
susan_node = pe.Node(SUSAN(fwhm=fwhm_mm, use_median=1, dimension=3), name="SUSAN")

# Set WF inputs and outputs
if in_file:
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 1.9.1.8 (Oct 4, 2024)

- Fix `fwhm_mm` usage in `SUSAN`, which was converting to sigma (SD of Gaussian), but then nipype applied that conversion, too.

## 1.9.1 (Dec 7, 2023)

### Enhancements
Expand Down

0 comments on commit 7f505ad

Please sign in to comment.