Skip to content

[WIP] Task generation #1

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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
pip install ".[dev]"
- name: Test with pytest
run: |
pytest -sv --doctest-modules pydra/tasks/TODO
pytest -sv --doctest-modules pydra/tasks/sem
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include versioneer.py
include pydra/tasks/TODO/_version.py
include pydra/tasks/sem/_version.py
7 changes: 0 additions & 7 deletions pydra/tasks/TODO/__init__.py

This file was deleted.

30 changes: 30 additions & 0 deletions pydra/tasks/sem/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from registration import *
from filtering import *
from segmentation import *
from utilities import *
from diffusion import *
from quantification import BRAINSLabelStats, PETStandardUptakeValueComputation
from brains import *
from testing import (
CLIROITest,
ComputeReflectiveCorrelationMetric,
GenerateAverageLmkFile,
LandmarksCompare,
)
from converters import (
CreateDICOMSeries,
DWICompare,
DWISimpleCompare,
OrientScalarVolume,
)
from legacy import *
from superresolution import GenerateEdgeMapImage
from classification import GeneratePurePlugMask
from surface import (
GrayscaleModelMaker,
LabelMapSmoothing,
MergeModels,
ModelMaker,
ModelToLabelMap,
ProbeVolumeWithModel,
)
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_config():
cfg.style = "pep440"
cfg.tag_prefix = ""
cfg.parentdir_prefix = ""
cfg.versionfile_source = "pydra/tasks/TODO/_version.py"
cfg.versionfile_source = "pydra/tasks/sem/_version.py"
cfg.verbose = False
return cfg

Expand Down
2 changes: 2 additions & 0 deletions pydra/tasks/sem/brains/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from classify import BRAINSPosteriorToContinuousClass
from segmentation import BRAINSTalairach, BRAINSTalairachMask
141 changes: 141 additions & 0 deletions pydra/tasks/sem/brains/classify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
"""
Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator.
"""

import attr
from nipype.interfaces.base import (
Directory,
File,
InputMultiPath,
OutputMultiPath,
traits,
)
from pydra import ShellCommandTask
from pydra.engine.specs import SpecInfo, ShellSpec


class BRAINSPosteriorToContinuousClass:
"""
title: Tissue Classification
category: BRAINS.Classify
description: This program will generate an 8-bit continuous tissue classified image based on BRAINSABC posterior images.
version: 5.2.0
documentation-url: http://www.nitrc.org/plugins/mwiki/index.php/brains:BRAINSClassify
license: https://www.nitrc.org/svn/brains/BuildScripts/trunk/License.txt
contributor: Vincent A. Magnotta
acknowledgements: Funding for this work was provided by NIH/NINDS award NS050568
"""

input_fields = [
(
"inputWhiteVolume",
attr.ib(
type=File,
metadata={
"argstr": "--inputWhiteVolume %s",
"help_string": "White Matter Posterior Volume",
"exists": "True",
},
),
),
(
"inputBasalGmVolume",
attr.ib(
type=File,
metadata={
"argstr": "--inputBasalGmVolume %s",
"help_string": "Basal Grey Matter Posterior Volume",
"exists": "True",
},
),
),
(
"inputSurfaceGmVolume",
attr.ib(
type=File,
metadata={
"argstr": "--inputSurfaceGmVolume %s",
"help_string": "Surface Grey Matter Posterior Volume",
"exists": "True",
},
),
),
(
"inputCsfVolume",
attr.ib(
type=File,
metadata={
"argstr": "--inputCsfVolume %s",
"help_string": "CSF Posterior Volume",
"exists": "True",
},
),
),
(
"inputVbVolume",
attr.ib(
type=File,
metadata={
"argstr": "--inputVbVolume %s",
"help_string": "Venous Blood Posterior Volume",
"exists": "True",
},
),
),
(
"inputCrblGmVolume",
attr.ib(
type=File,
metadata={
"argstr": "--inputCrblGmVolume %s",
"help_string": "Cerebellum Grey Matter Posterior Volume",
"exists": "True",
},
),
),
(
"inputCrblWmVolume",
attr.ib(
type=File,
metadata={
"argstr": "--inputCrblWmVolume %s",
"help_string": "Cerebellum White Matter Posterior Volume",
"exists": "True",
},
),
),
(
"outputVolume",
attr.ib(
type=File,
metadata={
"argstr": "--outputVolume %s",
"help_string": "Output Continuous Tissue Classified Image",
"hash_files": "False",
},
),
),
]
output_fields = [
(
"outputVolume",
attr.ib(
type=File,
metadata={
"help_string": "Output Continuous Tissue Classified Image",
"exists": "True",
},
),
)
]

input_spec = SpecInfo(name="Input", fields=input_fields, bases=(ShellSpec,))
output_spec = SpecInfo(name="Output", fields=output_fields, bases=(ShellSpec,))

task = ShellCommandTask(
name="BRAINSPosteriorToContinuousClass",
executable=" BRAINSPosteriorToContinuousClass ",
input_spec=input_spec,
output_spec=output_spec,
)
Loading