Skip to content

Commit

Permalink
Merge pull request #45 from ghisvail/new/fslsmoothfill
Browse files Browse the repository at this point in the history
NEW: Add task definition for fslsmoothfill
  • Loading branch information
ghisvail authored May 4, 2023
2 parents 94e2e9e + 58e75a5 commit d1d0a8f
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ for FMRI, MRI and DTI brain imaging data.

## Available tasks

| Module | Tasks |
|--------|-------------------------------------------------------------------------------------------------------------------------------------------|
| bet | BET, RobustFOV |
| eddy | Eddy |
| fast | FAST |
| flirt | FLIRT, ApplyXFM, ConcatXFM, ConvertXFM, InvertXFM, Img2ImgCoord, Img2StdCoord, Std2ImgCoord |
| fnirt | FNIRT, FNIRTFileUtils, ApplyWarp, ConvertWarp, InvWarp |
| fugue | FUGUE |
| susan | SUSAN |
| utils | fslmaths, FSLFFT, FSLROI, FSLChFileType, FSLInfo, FSLInterleave, FSLMerge, FSLReorient2Std, FSLSelectVols, FSLSlice, FSLSplit, FSLSwapDim |
| Module | Tasks |
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| bet | BET, RobustFOV |
| eddy | Eddy |
| fast | FAST |
| flirt | FLIRT, ApplyXFM, ConcatXFM, ConvertXFM, InvertXFM, Img2ImgCoord, Img2StdCoord, Std2ImgCoord |
| fnirt | FNIRT, FNIRTFileUtils, ApplyWarp, ConvertWarp, InvWarp |
| fugue | FUGUE |
| susan | SUSAN |
| utils | fslmaths, FSLFFT, FSLROI, FSLChFileType, FSLInfo, FSLInterleave, FSLMerge, FSLReorient2Std, FSLSelectVols, FSLSlice, FSLSmoothFill, FSLSplit, FSLSwapDim |

## Installation

Expand Down
1 change: 1 addition & 0 deletions src/pydra/tasks/fsl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
FSLReorient2Std,
FSLSelectVols,
FSLSlice,
FSLSmoothFill,
FSLSplit,
FSLSwapDim,
fslmaths,
Expand Down
1 change: 1 addition & 0 deletions src/pydra/tasks/fsl/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
from .fslreorient2std import FSLReorient2Std
from .fslroi import FSLROI
from .fslselectvols import FSLSelectVols
from .fslsmoothfill import FSLSmoothFill
from .fslsplit import FSLSlice, FSLSplit
from .fslswapdim import FSLSwapDim
46 changes: 46 additions & 0 deletions src/pydra/tasks/fsl/utils/fslsmoothfill.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"""
FSLSmoothFill
=============
Examples
--------
>>> task = FSLSmoothFill(input_image="input.nii", output_image="smoothed.nii", input_mask="mask.nii")
>>> task.cmdline
'fslsmoothfill --in input.nii --out smoothed.nii --mask mask.nii'
"""

__all__ = ["FSLSmoothFill"]

import os

import attrs

import pydra


@attrs.define(slots=False, kw_only=True)
class FSLSmoothFillSpec(pydra.specs.ShellSpec):
"""Specifications for fslsmoothfill."""

input_image: os.PathLike = attrs.field(metadata={"help_string": "input image", "mandatory": True, "argstr": "--in"})

output_image: str = attrs.field(
metadata={
"help_string": "output image",
"argstr": "--out",
"output_file_template": "{input_image}_smoothed",
}
)

input_mask: os.PathLike = attrs.field(metadata={"help_string": "input mask", "argstr": "--mask"})

num_iterations: int = attrs.field(metadata={"help_string": "number of iterations", "argstr": "--niter"})


class FSLSmoothFill(pydra.engine.ShellCommandTask):
"""Task definition for fslsmoothfill."""

executable = "fslsmoothfill"

input_spec = pydra.specs.SpecInfo(name="Inputs", bases=(FSLSmoothFillSpec,))

0 comments on commit d1d0a8f

Please sign in to comment.