From 15a2d594e0619ac13db4e94f69dad9f2502af74e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 02:28:34 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/ci-cd.yaml | 28 +- README.rst | 4 +- nipype-auto-conv/generate | 4 +- nipype-auto-conv/requirements.txt | 2 +- .../specs/affine_initializer.yaml | 16 +- nipype-auto-conv/specs/ai.yaml | 14 +- nipype-auto-conv/specs/ants.yaml | 92 ++--- nipype-auto-conv/specs/ants_introduction.yaml | 16 +- nipype-auto-conv/specs/apply_transforms.yaml | 82 ++--- .../specs/apply_transforms_to_points.yaml | 18 +- nipype-auto-conv/specs/atropos.yaml | 326 +++++++++--------- .../specs/average_affine_transform.yaml | 14 +- nipype-auto-conv/specs/average_images.yaml | 12 +- nipype-auto-conv/specs/brain_extraction.yaml | 38 +- .../specs/buildtemplateparallel.yaml | 20 +- .../specs/compose_multi_transform.yaml | 16 +- .../specs/composite_transform_util.yaml | 24 +- .../specs/convert_scalar_image_to_rgb.yaml | 20 +- .../specs/cortical_thickness.yaml | 22 +- .../create_jacobian_determinant_image.yaml | 12 +- .../specs/create_tiled_mosaic.yaml | 14 +- nipype-auto-conv/specs/denoise_image.yaml | 42 +-- nipype-auto-conv/specs/gen_warp_fields.yaml | 6 +- nipype-auto-conv/specs/image_math.yaml | 46 +-- nipype-auto-conv/specs/joint_fusion.yaml | 70 ++-- nipype-auto-conv/specs/kelly_kapowski.yaml | 18 +- nipype-auto-conv/specs/label_geometry.yaml | 22 +- .../specs/laplacian_thickness.yaml | 22 +- .../specs/measure_image_similarity.yaml | 26 +- nipype-auto-conv/specs/multiply_images.yaml | 12 +- .../specs/n4_bias_field_correction.yaml | 80 ++--- nipype-auto-conv/specs/registration.yaml | 276 +++++++-------- .../specs/registration_syn_quick.yaml | 26 +- .../specs/resample_image_by_spacing.yaml | 28 +- nipype-auto-conv/specs/threshold_image.yaml | 22 +- .../specs/warp_image_multi_transform.yaml | 22 +- ...arp_time_series_image_multi_transform.yaml | 20 +- .../extras/medimage_ants/__init__.py | 1 - .../tests/test_generate_sample_data.py | 1 - .../fileformats/medimage_ants/__init__.py | 2 +- 40 files changed, 768 insertions(+), 768 deletions(-) diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 7333d04..a1ddccd 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v3 - name: Revert version to most recent tag on upstream update if: github.event_name == 'repository_dispatch' - run: git checkout $(git tag -l | tail -n 1 | awk -F post '{print $1}') + run: git checkout $(git tag -l | tail -n 1 | awk -F post '{print $1}') - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 - name: Install build dependencies @@ -53,8 +53,8 @@ jobs: uses: actions/checkout@v3 - name: Revert version to most recent tag on upstream update if: github.event_name == 'repository_dispatch' - run: git checkout $(git tag -l | tail -n 1 | awk -F post '{print $1}') - - name: Download tasks converted from Nipype + run: git checkout $(git tag -l | tail -n 1 | awk -F post '{print $1}') + - name: Download tasks converted from Nipype uses: actions/download-artifact@v3 with: name: converted-nipype @@ -83,7 +83,7 @@ jobs: python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')" python -c "import fileformats.medimage_ants as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')" python -c "import fileformats.extras.medimage_ants as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')" - + fileformats-test: runs-on: ubuntu-latest strategy: @@ -120,7 +120,7 @@ jobs: - name: Removed unnecessary tools to free space run: | sudo rm -rf /usr/share/dotnet - sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Get Download cache Key id: cache-key run: echo "::set-output name=key::ants-linux-ubuntu22_amd64-7.4.1" @@ -153,7 +153,7 @@ jobs: - name: Revert version to most recent tag on upstream update if: github.event_name == 'repository_dispatch' run: git checkout $(git tag -l | tail -n 1 | awk -F post '{print $1}') - - name: Download tasks converted from Nipype + - name: Download tasks converted from Nipype uses: actions/download-artifact@v3 with: name: converted-nipype @@ -190,7 +190,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - fetch-depth: 0 + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4 with: @@ -213,7 +213,7 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_FILEFORMATS_API_TOKEN }} - packages-dir: ./related-packages/fileformats/dist + packages-dir: ./related-packages/fileformats/dist deploy-fileformats-extras: needs: [deploy-fileformats] @@ -222,7 +222,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - fetch-depth: 0 + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4 with: @@ -245,7 +245,7 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_FILEFORMATS_EXTRAS_API_TOKEN }} - packages-dir: ./related-packages/fileformats-extras/dist + packages-dir: ./related-packages/fileformats-extras/dist deploy: needs: [deploy-fileformats-extras] @@ -255,7 +255,7 @@ jobs: with: submodules: recursive fetch-depth: 0 - - name: Download tasks converted from Nipype + - name: Download tasks converted from Nipype uses: actions/download-artifact@v3 with: name: converted-nipype @@ -268,7 +268,7 @@ jobs: git checkout $TAG git add -f pydra/tasks/ants/auto/_version.py git commit -am"added auto-generated version to make new tag for package version" - git tag ${TAG}post${POST} + git tag ${TAG}post${POST} - name: Set up Python uses: actions/setup-python@v4 with: @@ -297,9 +297,9 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + password: ${{ secrets.PYPI_API_TOKEN }} # Deploy on tags if PYPI_API_TOKEN is defined in the repository secrets. # Secrets are not accessible in the if: condition [0], so set an output variable [1] # [0] https://github.community/t/16928 -# [1] https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter \ No newline at end of file +# [1] https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter diff --git a/README.rst b/README.rst index 8910c48..9e28777 100644 --- a/README.rst +++ b/README.rst @@ -27,7 +27,7 @@ Automatically generated tasks can be found in the `pydra.tasks.ants.auto` packag These packages should be treated with extreme caution as they likely do not pass testing. Generated tasks that have been edited and pass testing are imported into one or more of the `pydra.tasks.ants.v*` packages, corresponding to the version of the ants toolkit -they are designed for. +they are designed for. Tests ----- @@ -158,6 +158,6 @@ in the ``inputs > types`` and ``outputs > types`` dicts of the YAML spec. If the required file-type is not found implemented within fileformats, please see the `fileformats docs `__ for instructions on how to define -new fileformat types, and see +new fileformat types, and see `fileformats-medimage-extras `__ for an example on how to implement methods to generate sample data for them. diff --git a/nipype-auto-conv/generate b/nipype-auto-conv/generate index 7ce7fea..2b6f024 100755 --- a/nipype-auto-conv/generate +++ b/nipype-auto-conv/generate @@ -70,7 +70,9 @@ post_release = (nipype_version + nipype2pydra_version).replace(".", "") """ ) -auto_init += "\n\n__all__ = [\n" + "\n".join(f" \"{i}\"," for i in all_interfaces) + "\n]\n" +auto_init += ( + "\n\n__all__ = [\n" + "\n".join(f' "{i}",' for i in all_interfaces) + "\n]\n" +) with open(PKG_ROOT / "pydra" / "tasks" / PKG_NAME / "auto" / "__init__.py", "w") as f: f.write(auto_init) diff --git a/nipype-auto-conv/requirements.txt b/nipype-auto-conv/requirements.txt index 06ac987..453b6b2 100644 --- a/nipype-auto-conv/requirements.txt +++ b/nipype-auto-conv/requirements.txt @@ -8,4 +8,4 @@ fileformats-medimage >=0.4 fileformats-datascience >= 0.1 fileformats-medimage-ants traits -nipype2pydra \ No newline at end of file +nipype2pydra diff --git a/nipype-auto-conv/specs/affine_initializer.yaml b/nipype-auto-conv/specs/affine_initializer.yaml index dac8edf..74f449d 100644 --- a/nipype-auto-conv/specs/affine_initializer.yaml +++ b/nipype-auto-conv/specs/affine_initializer.yaml @@ -5,17 +5,17 @@ # # Docs # ---- -# +# # Initialize an affine transform (as in antsBrainExtraction.sh) -# +# # >>> from nipype.interfaces.ants import AffineInitializer # >>> init = AffineInitializer() # >>> init.inputs.fixed_image = 'fixed1.nii' # >>> init.inputs.moving_image = 'moving1.nii' # >>> init.cmdline # 'antsAffineInitializer 3 fixed1.nii moving1.nii transform.mat 15.000000 0.100000 0 10' -# -# +# +# task_name: AffineInitializer nipype_name: AffineInitializer nipype_module: nipype.interfaces.ants.utils @@ -98,8 +98,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -120,8 +120,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/ai.yaml b/nipype-auto-conv/specs/ai.yaml index 840ce36..5fda363 100644 --- a/nipype-auto-conv/specs/ai.yaml +++ b/nipype-auto-conv/specs/ai.yaml @@ -5,9 +5,9 @@ # # Docs # ---- -# +# # Calculate the optimal linear transform parameters for aligning two images. -# +# # Examples # -------- # >>> AI( @@ -17,7 +17,7 @@ # ... ).cmdline # 'antsAI -c [10,1e-06,10] -d 3 -m Mattes[structural.nii,epi.nii,32,Regular,1] # -o initialization.mat -p 0 -s [20,0.12] -t Affine[0.1] -v 0' -# +# # >>> AI(fixed_image='structural.nii', # ... moving_image='epi.nii', # ... metric=('Mattes', 32, 'Regular', 1), @@ -25,8 +25,8 @@ # ... ).cmdline # 'antsAI -c [10,1e-06,10] -d 3 -m Mattes[structural.nii,epi.nii,32,Regular,1] # -o initialization.mat -p 0 -s [20,0.12] -g [12.0,1x1x1] -t Affine[0.1] -v 0' -# -# +# +# task_name: AI nipype_name: AI nipype_module: nipype.interfaces.ants.utils @@ -123,8 +123,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/ants.yaml b/nipype-auto-conv/specs/ants.yaml index 2d0f921..373a074 100644 --- a/nipype-auto-conv/specs/ants.yaml +++ b/nipype-auto-conv/specs/ants.yaml @@ -7,10 +7,10 @@ # ---- # ANTS wrapper for registration of images # (old, use Registration instead) -# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants import ANTS # >>> ants = ANTS() # >>> ants.inputs.dimension = 3 @@ -31,7 +31,7 @@ # >>> ants.inputs.number_of_affine_iterations = [10000,10000,10000,10000,10000] # >>> ants.cmdline # 'ANTS 3 --MI-option 32x16000 --image-metric CC[ T1.nii, resting.nii, 1, 5 ] --number-of-affine-iterations 10000x10000x10000x10000x10000 --number-of-iterations 50x35x15 --output-naming MY --regularization Gauss[3.0,0.0] --transformation-model SyN[0.25] --use-Histogram-Matching 1' -# +# task_name: ANTS nipype_name: ANTS nipype_module: nipype.interfaces.ants.registration @@ -94,43 +94,43 @@ tests: moving_image: # type=inputmultiobject|default=[]: image to apply transformation to (generally a coregisteredfunctional) metric: - # type=list|default=[]: + # type=list|default=[]: metric_weight: # type=list|default=[1.0]: the metric weight(s) for each stage. The weights must sum to 1 per stage. radius: # type=list|default=[]: radius of the region (i.e. number of layers around a voxel/pixel) that is used for computing cross correlation output_transform_prefix: - # type=str|default='out': + # type=str|default='out': transformation_model: - # type=enum|default='Diff'|allowed['Diff','Elast','Exp','Greedy Exp','SyN']: + # type=enum|default='Diff'|allowed['Diff','Elast','Exp','Greedy Exp','SyN']: gradient_step_length: - # type=float|default=0.0: + # type=float|default=0.0: number_of_time_steps: - # type=int|default=0: + # type=int|default=0: delta_time: - # type=float|default=0.0: + # type=float|default=0.0: symmetry_type: - # type=float|default=0.0: + # type=float|default=0.0: use_histogram_matching: - # type=bool|default=True: + # type=bool|default=True: number_of_iterations: - # type=list|default=[]: + # type=list|default=[]: smoothing_sigmas: - # type=list|default=[]: + # type=list|default=[]: subsampling_factors: - # type=list|default=[]: + # type=list|default=[]: affine_gradient_descent_option: - # type=list|default=[]: + # type=list|default=[]: mi_option: - # type=list|default=[]: + # type=list|default=[]: regularization: - # type=enum|default='Gauss'|allowed['DMFFD','Gauss']: + # type=enum|default='Gauss'|allowed['DMFFD','Gauss']: regularization_gradient_field_sigma: - # type=float|default=0.0: + # type=float|default=0.0: regularization_deformation_field_sigma: - # type=float|default=0.0: + # type=float|default=0.0: number_of_affine_iterations: - # type=list|default=[]: + # type=list|default=[]: num_threads: # type=int|default=1: Number of ITK threads to use args: @@ -145,8 +145,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -158,9 +158,9 @@ tests: dimension: '3' # type=enum|default=3|allowed[2,3]: image dimension (2 or 3) output_transform_prefix: '"MY"' - # type=str|default='out': + # type=str|default='out': metric: '["CC"]' - # type=list|default=[]: + # type=list|default=[]: fixed_image: # type=inputmultiobject|default=[]: image to which the moving image is warped moving_image: @@ -170,23 +170,23 @@ tests: radius: '[5]' # type=list|default=[]: radius of the region (i.e. number of layers around a voxel/pixel) that is used for computing cross correlation transformation_model: '"SyN"' - # type=enum|default='Diff'|allowed['Diff','Elast','Exp','Greedy Exp','SyN']: + # type=enum|default='Diff'|allowed['Diff','Elast','Exp','Greedy Exp','SyN']: gradient_step_length: '0.25' - # type=float|default=0.0: + # type=float|default=0.0: number_of_iterations: '[50, 35, 15]' - # type=list|default=[]: + # type=list|default=[]: use_histogram_matching: 'True' - # type=bool|default=True: + # type=bool|default=True: mi_option: '[32, 16000]' - # type=list|default=[]: + # type=list|default=[]: regularization: '"Gauss"' - # type=enum|default='Gauss'|allowed['DMFFD','Gauss']: + # type=enum|default='Gauss'|allowed['DMFFD','Gauss']: regularization_gradient_field_sigma: '3' - # type=float|default=0.0: + # type=float|default=0.0: regularization_deformation_field_sigma: '0' - # type=float|default=0.0: + # type=float|default=0.0: number_of_affine_iterations: '[10000,10000,10000,10000,10000]' - # type=list|default=[]: + # type=list|default=[]: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -195,8 +195,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -212,9 +212,9 @@ doctests: dimension: '3' # type=enum|default=3|allowed[2,3]: image dimension (2 or 3) output_transform_prefix: '"MY"' - # type=str|default='out': + # type=str|default='out': metric: '["CC"]' - # type=list|default=[]: + # type=list|default=[]: fixed_image: # type=inputmultiobject|default=[]: image to which the moving image is warped moving_image: @@ -224,23 +224,23 @@ doctests: radius: '[5]' # type=list|default=[]: radius of the region (i.e. number of layers around a voxel/pixel) that is used for computing cross correlation transformation_model: '"SyN"' - # type=enum|default='Diff'|allowed['Diff','Elast','Exp','Greedy Exp','SyN']: + # type=enum|default='Diff'|allowed['Diff','Elast','Exp','Greedy Exp','SyN']: gradient_step_length: '0.25' - # type=float|default=0.0: + # type=float|default=0.0: number_of_iterations: '[50, 35, 15]' - # type=list|default=[]: + # type=list|default=[]: use_histogram_matching: 'True' - # type=bool|default=True: + # type=bool|default=True: mi_option: '[32, 16000]' - # type=list|default=[]: + # type=list|default=[]: regularization: '"Gauss"' - # type=enum|default='Gauss'|allowed['DMFFD','Gauss']: + # type=enum|default='Gauss'|allowed['DMFFD','Gauss']: regularization_gradient_field_sigma: '3' - # type=float|default=0.0: + # type=float|default=0.0: regularization_deformation_field_sigma: '0' - # type=float|default=0.0: + # type=float|default=0.0: number_of_affine_iterations: '[10000,10000,10000,10000,10000]' - # type=list|default=[]: + # type=list|default=[]: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys diff --git a/nipype-auto-conv/specs/ants_introduction.yaml b/nipype-auto-conv/specs/ants_introduction.yaml index 710529d..7188755 100644 --- a/nipype-auto-conv/specs/ants_introduction.yaml +++ b/nipype-auto-conv/specs/ants_introduction.yaml @@ -6,10 +6,10 @@ # Docs # ---- # Uses ANTS to generate matrices to warp data from one space to another. -# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants.legacy import antsIntroduction # >>> warp = antsIntroduction() # >>> warp.inputs.reference_image = 'Template_6.nii' @@ -17,8 +17,8 @@ # >>> warp.inputs.max_iterations = [30,90,20] # >>> warp.cmdline # 'antsIntroduction.sh -d 3 -i structural.nii -m 30x90x20 -o ants_ -r Template_6.nii -t GR' -# -# +# +# task_name: antsIntroduction nipype_name: antsIntroduction nipype_module: nipype.interfaces.ants.legacy @@ -110,8 +110,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -134,8 +134,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/apply_transforms.yaml b/nipype-auto-conv/specs/apply_transforms.yaml index eba0fbb..31d3b57 100644 --- a/nipype-auto-conv/specs/apply_transforms.yaml +++ b/nipype-auto-conv/specs/apply_transforms.yaml @@ -7,10 +7,10 @@ # ---- # ApplyTransforms, applied to an input image, transforms it according to a # reference image and a transform (or a set of transforms). -# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants import ApplyTransforms # >>> at = ApplyTransforms() # >>> at.inputs.input_image = 'moving1.nii' @@ -18,7 +18,7 @@ # >>> at.inputs.transforms = 'identity' # >>> at.cmdline # 'antsApplyTransforms --default-value 0 --float 0 --input moving1.nii --interpolation Linear --output moving1_trans.nii --reference-image fixed1.nii --transform identity' -# +# # >>> at = ApplyTransforms() # >>> at.inputs.dimension = 3 # >>> at.inputs.input_image = 'moving1.nii' @@ -30,7 +30,7 @@ # >>> at.inputs.invert_transform_flags = [False, True] # >>> at.cmdline # 'antsApplyTransforms --default-value 0 --dimensionality 3 --float 0 --input moving1.nii --interpolation Linear --output deformed_moving1.nii --reference-image fixed1.nii --transform ants_Warp.nii.gz --transform [ trans.mat, 1 ]' -# +# # >>> at1 = ApplyTransforms() # >>> at1.inputs.dimension = 3 # >>> at1.inputs.input_image = 'moving1.nii' @@ -43,9 +43,9 @@ # >>> at1.inputs.invert_transform_flags = [False, False] # >>> at1.cmdline # 'antsApplyTransforms --default-value 0 --dimensionality 3 --float 0 --input moving1.nii --interpolation BSpline[ 5 ] --output deformed_moving1.nii --reference-image fixed1.nii --transform ants_Warp.nii.gz --transform trans.mat' -# +# # Identity transforms may be used as part of a chain: -# +# # >>> at2 = ApplyTransforms() # >>> at2.inputs.dimension = 3 # >>> at2.inputs.input_image = 'moving1.nii' @@ -57,7 +57,7 @@ # >>> at2.inputs.transforms = ['identity', 'ants_Warp.nii.gz', 'trans.mat'] # >>> at2.cmdline # 'antsApplyTransforms --default-value 0 --dimensionality 3 --float 0 --input moving1.nii --interpolation BSpline[ 5 ] --output deformed_moving1.nii --reference-image fixed1.nii --transform identity --transform ants_Warp.nii.gz --transform trans.mat' -# +# task_name: ApplyTransforms nipype_name: ApplyTransforms nipype_module: nipype.interfaces.ants.resampling @@ -123,15 +123,15 @@ tests: reference_image: # type=file|default=: reference image space that you wish to warp INTO interpolation: - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: interpolation_parameters: - # type=traitcompound|default=None: + # type=traitcompound|default=None: transforms: # type=inputmultiobject|default=[]: transform files: will be applied in reverse order. For example, the last specified transform will be applied first. invert_transform_flags: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: default_value: - # type=float|default=0.0: + # type=float|default=0.0: print_out_composite_warp_file: # type=bool|default=False: output a composite warp file instead of a transformed image float: @@ -150,8 +150,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -174,8 +174,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -194,13 +194,13 @@ tests: # type=file: Warped image # type=str|default='': output file name interpolation: '"Linear"' - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: default_value: '0' - # type=float|default=0.0: + # type=float|default=0.0: transforms: '["ants_Warp.nii.gz", "trans.mat"]' # type=inputmultiobject|default=[]: transform files: will be applied in reverse order. For example, the last specified transform will be applied first. invert_transform_flags: '[False, True]' - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -209,8 +209,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -229,15 +229,15 @@ tests: # type=file: Warped image # type=str|default='': output file name interpolation: '"BSpline"' - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: interpolation_parameters: (5,) - # type=traitcompound|default=None: + # type=traitcompound|default=None: default_value: '0' - # type=float|default=0.0: + # type=float|default=0.0: transforms: '["ants_Warp.nii.gz", "trans.mat"]' # type=inputmultiobject|default=[]: transform files: will be applied in reverse order. For example, the last specified transform will be applied first. invert_transform_flags: '[False, False]' - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -246,8 +246,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -266,11 +266,11 @@ tests: # type=file: Warped image # type=str|default='': output file name interpolation: '"BSpline"' - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: interpolation_parameters: (5,) - # type=traitcompound|default=None: + # type=traitcompound|default=None: default_value: '0' - # type=float|default=0.0: + # type=float|default=0.0: transforms: '["identity", "ants_Warp.nii.gz", "trans.mat"]' # type=inputmultiobject|default=[]: transform files: will be applied in reverse order. For example, the last specified transform will be applied first. imports: @@ -281,8 +281,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -322,13 +322,13 @@ doctests: # type=file: Warped image # type=str|default='': output file name interpolation: '"Linear"' - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: default_value: '0' - # type=float|default=0.0: + # type=float|default=0.0: transforms: '["ants_Warp.nii.gz", "trans.mat"]' # type=inputmultiobject|default=[]: transform files: will be applied in reverse order. For example, the last specified transform will be applied first. invert_transform_flags: '[False, True]' - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -350,15 +350,15 @@ doctests: # type=file: Warped image # type=str|default='': output file name interpolation: '"BSpline"' - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: interpolation_parameters: (5,) - # type=traitcompound|default=None: + # type=traitcompound|default=None: default_value: '0' - # type=float|default=0.0: + # type=float|default=0.0: transforms: '["ants_Warp.nii.gz", "trans.mat"]' # type=inputmultiobject|default=[]: transform files: will be applied in reverse order. For example, the last specified transform will be applied first. invert_transform_flags: '[False, False]' - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -380,11 +380,11 @@ doctests: # type=file: Warped image # type=str|default='': output file name interpolation: '"BSpline"' - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: interpolation_parameters: (5,) - # type=traitcompound|default=None: + # type=traitcompound|default=None: default_value: '0' - # type=float|default=0.0: + # type=float|default=0.0: transforms: '["identity", "ants_Warp.nii.gz", "trans.mat"]' # type=inputmultiobject|default=[]: transform files: will be applied in reverse order. For example, the last specified transform will be applied first. imports: diff --git a/nipype-auto-conv/specs/apply_transforms_to_points.yaml b/nipype-auto-conv/specs/apply_transforms_to_points.yaml index 4fd4309..1fdcd98 100644 --- a/nipype-auto-conv/specs/apply_transforms_to_points.yaml +++ b/nipype-auto-conv/specs/apply_transforms_to_points.yaml @@ -7,10 +7,10 @@ # ---- # ApplyTransformsToPoints, applied to an CSV file, transforms coordinates # using provided transform (or a set of transforms). -# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants import ApplyTransforms # >>> at = ApplyTransformsToPoints() # >>> at.inputs.dimension = 3 @@ -19,9 +19,9 @@ # >>> at.inputs.invert_transform_flags = [False, False] # >>> at.cmdline # 'antsApplyTransformsToPoints --dimensionality 3 --input moving.csv --output moving_transformed.csv --transform [ trans.mat, 0 ] --transform [ ants_Warp.nii.gz, 0 ]' -# -# -# +# +# +# task_name: ApplyTransformsToPoints nipype_name: ApplyTransformsToPoints nipype_module: nipype.interfaces.ants.resampling @@ -95,8 +95,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -121,8 +121,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/atropos.yaml b/nipype-auto-conv/specs/atropos.yaml index 5d28ba8..25b43aa 100644 --- a/nipype-auto-conv/specs/atropos.yaml +++ b/nipype-auto-conv/specs/atropos.yaml @@ -5,15 +5,15 @@ # # Docs # ---- -# +# # A multivariate n-class segmentation algorithm. -# +# # A finite mixture modeling (FMM) segmentation approach with possibilities for # specifying prior constraints. These prior constraints include the specification # of a prior label image, prior probability images (one for each class), and/or an # MRF prior to enforce spatial smoothing of the labels. Similar algorithms include # FAST and SPM. -# +# # Examples # -------- # >>> from nipype.interfaces.ants import Atropos @@ -30,7 +30,7 @@ # --likelihood-model Gaussian --mask-image mask.nii --mrf [0.2,1x1x1] --convergence [5,1e-06] # --output [structural_labeled.nii,POSTERIOR_%02d.nii.gz] --posterior-formulation Socrates[1] # --use-random-seed 1' -# +# # >>> at = Atropos( # ... dimension=3, intensity_images='structural.nii', mask_image='mask.nii', # ... number_of_tissue_classes=2, likelihood_model='Gaussian', save_posteriors=True, @@ -45,7 +45,7 @@ # --likelihood-model Gaussian --mask-image mask.nii --mrf [0.2,1x1x1] --convergence [5,1e-06] # --output [structural_labeled.nii,POSTERIOR_%02d.nii.gz] --posterior-formulation Socrates[1] # --use-random-seed 1' -# +# # >>> at = Atropos( # ... dimension=3, intensity_images='structural.nii', mask_image='mask.nii', # ... number_of_tissue_classes=2, likelihood_model='Gaussian', save_posteriors=True, @@ -63,7 +63,7 @@ # --mrf [0.2,1x1x1] --convergence [5,1e-06] # --output [structural_labeled.nii,POSTERIOR_%02d.nii.gz] # --posterior-formulation Socrates[1] --use-random-seed 1' -# +# # >>> at = Atropos( # ... dimension=3, intensity_images='structural.nii', mask_image='mask.nii', # ... number_of_tissue_classes=2, likelihood_model='Gaussian', save_posteriors=True, @@ -80,8 +80,8 @@ # --likelihood-model Gaussian --mask-image mask.nii --mrf [0.2,1x1x1] --convergence [5,1e-06] # --output [structural_labeled.nii,POSTERIOR_%02d.nii.gz] --posterior-formulation Socrates[1] # --use-random-seed 1' -# -# +# +# task_name: Atropos nipype_name: Atropos nipype_module: nipype.interfaces.ants.segmentation @@ -97,16 +97,16 @@ inputs: # for file types, where specifying the format also specifies the file that will be # passed to the field in the automatically generated unittests. intensity_images: medimage/nifti1+list-of - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: mask_image: medimage/nifti1 - # type=file|default=: + # type=file|default=: out_classified_image_name: Path - # type=file|default=: + # type=file|default=: callable_defaults: # dict[str, str] - names of methods/callable classes defined in the adjacent `*_callables.py` # to set as the `default` method of input fields out_classified_image_name: out_classified_image_name_default - # type=file|default=: + # type=file|default=: metadata: # dict[str, dict[str, any]] - additional metadata to set on any of the input fields (e.g. out_file: position: 1) outputs: @@ -121,9 +121,9 @@ outputs: # for file types, where specifying the format also specifies the file that will be # passed to the field in the automatically generated unittests. classified_image: generic/file - # type=file: + # type=file: posteriors: generic/file+list-of - # type=outputmultiobject: + # type=outputmultiobject: callables: # dict[str, str] - names of methods/callable classes defined in the adjacent `*_callables.py` # to set to the `callable` attribute of output fields @@ -138,47 +138,47 @@ tests: dimension: # type=enum|default=3|allowed[2,3,4]: image dimension (2, 3, or 4) intensity_images: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: mask_image: - # type=file|default=: + # type=file|default=: initialization: - # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: + # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: kmeans_init_centers: - # type=list|default=[]: + # type=list|default=[]: prior_image: # type=traitcompound|default=None: either a string pattern (e.g., 'prior%02d.nii') or an existing vector-image file. number_of_tissue_classes: - # type=int|default=0: + # type=int|default=0: prior_weighting: - # type=float|default=0.0: + # type=float|default=0.0: prior_probability_threshold: - # type=float|default=0.0: + # type=float|default=0.0: likelihood_model: - # type=str|default='': + # type=str|default='': mrf_smoothing_factor: - # type=float|default=0.0: + # type=float|default=0.0: mrf_radius: - # type=list|default=[]: + # type=list|default=[]: icm_use_synchronous_update: - # type=bool|default=False: + # type=bool|default=False: maximum_number_of_icm_terations: - # type=int|default=0: + # type=int|default=0: n_iterations: - # type=int|default=0: + # type=int|default=0: convergence_threshold: - # type=float|default=0.0: + # type=float|default=0.0: posterior_formulation: - # type=str|default='': + # type=str|default='': use_random_seed: # type=bool|default=True: use random seed value over constant use_mixture_model_proportions: - # type=bool|default=False: + # type=bool|default=False: out_classified_image_name: - # type=file|default=: + # type=file|default=: save_posteriors: - # type=bool|default=False: + # type=bool|default=False: output_posteriors_name_template: - # type=str|default='POSTERIOR_%02d.nii.gz': + # type=str|default='POSTERIOR_%02d.nii.gz': num_threads: # type=int|default=1: Number of ITK threads to use args: @@ -193,8 +193,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -204,35 +204,35 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) initialization: '"Random"' - # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: + # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: dimension: '3' # type=enum|default=3|allowed[2,3,4]: image dimension (2, 3, or 4) intensity_images: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: mask_image: - # type=file|default=: + # type=file|default=: number_of_tissue_classes: '2' - # type=int|default=0: + # type=int|default=0: likelihood_model: '"Gaussian"' - # type=str|default='': + # type=str|default='': save_posteriors: 'True' - # type=bool|default=False: + # type=bool|default=False: mrf_smoothing_factor: '0.2' - # type=float|default=0.0: + # type=float|default=0.0: mrf_radius: '[1, 1, 1]' - # type=list|default=[]: + # type=list|default=[]: icm_use_synchronous_update: 'True' - # type=bool|default=False: + # type=bool|default=False: maximum_number_of_icm_terations: '1' - # type=int|default=0: + # type=int|default=0: n_iterations: '5' - # type=int|default=0: + # type=int|default=0: convergence_threshold: '0.000001' - # type=float|default=0.0: + # type=float|default=0.0: posterior_formulation: '"Socrates"' - # type=str|default='': + # type=str|default='': use_mixture_model_proportions: 'True' - # type=bool|default=False: + # type=bool|default=False: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -241,8 +241,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -252,37 +252,37 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) initialization: '"KMeans"' - # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: + # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: kmeans_init_centers: '[100, 200]' - # type=list|default=[]: + # type=list|default=[]: dimension: '3' # type=enum|default=3|allowed[2,3,4]: image dimension (2, 3, or 4) intensity_images: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: mask_image: - # type=file|default=: + # type=file|default=: number_of_tissue_classes: '2' - # type=int|default=0: + # type=int|default=0: likelihood_model: '"Gaussian"' - # type=str|default='': + # type=str|default='': save_posteriors: 'True' - # type=bool|default=False: + # type=bool|default=False: mrf_smoothing_factor: '0.2' - # type=float|default=0.0: + # type=float|default=0.0: mrf_radius: '[1, 1, 1]' - # type=list|default=[]: + # type=list|default=[]: icm_use_synchronous_update: 'True' - # type=bool|default=False: + # type=bool|default=False: maximum_number_of_icm_terations: '1' - # type=int|default=0: + # type=int|default=0: n_iterations: '5' - # type=int|default=0: + # type=int|default=0: convergence_threshold: '0.000001' - # type=float|default=0.0: + # type=float|default=0.0: posterior_formulation: '"Socrates"' - # type=str|default='': + # type=str|default='': use_mixture_model_proportions: 'True' - # type=bool|default=False: + # type=bool|default=False: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -291,8 +291,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -302,41 +302,41 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) initialization: '"PriorProbabilityImages"' - # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: + # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: prior_image: '"BrainSegmentationPrior%02d.nii.gz"' # type=traitcompound|default=None: either a string pattern (e.g., 'prior%02d.nii') or an existing vector-image file. prior_weighting: '0.8' - # type=float|default=0.0: + # type=float|default=0.0: prior_probability_threshold: '0.0000001' - # type=float|default=0.0: + # type=float|default=0.0: dimension: '3' # type=enum|default=3|allowed[2,3,4]: image dimension (2, 3, or 4) intensity_images: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: mask_image: - # type=file|default=: + # type=file|default=: number_of_tissue_classes: '2' - # type=int|default=0: + # type=int|default=0: likelihood_model: '"Gaussian"' - # type=str|default='': + # type=str|default='': save_posteriors: 'True' - # type=bool|default=False: + # type=bool|default=False: mrf_smoothing_factor: '0.2' - # type=float|default=0.0: + # type=float|default=0.0: mrf_radius: '[1, 1, 1]' - # type=list|default=[]: + # type=list|default=[]: icm_use_synchronous_update: 'True' - # type=bool|default=False: + # type=bool|default=False: maximum_number_of_icm_terations: '1' - # type=int|default=0: + # type=int|default=0: n_iterations: '5' - # type=int|default=0: + # type=int|default=0: convergence_threshold: '0.000001' - # type=float|default=0.0: + # type=float|default=0.0: posterior_formulation: '"Socrates"' - # type=str|default='': + # type=str|default='': use_mixture_model_proportions: 'True' - # type=bool|default=False: + # type=bool|default=False: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -345,8 +345,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -356,39 +356,39 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) initialization: '"PriorLabelImage"' - # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: + # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: prior_image: '"segmentation0.nii.gz"' # type=traitcompound|default=None: either a string pattern (e.g., 'prior%02d.nii') or an existing vector-image file. number_of_tissue_classes: '2' - # type=int|default=0: + # type=int|default=0: prior_weighting: '0.8' - # type=float|default=0.0: + # type=float|default=0.0: dimension: '3' # type=enum|default=3|allowed[2,3,4]: image dimension (2, 3, or 4) intensity_images: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: mask_image: - # type=file|default=: + # type=file|default=: likelihood_model: '"Gaussian"' - # type=str|default='': + # type=str|default='': save_posteriors: 'True' - # type=bool|default=False: + # type=bool|default=False: mrf_smoothing_factor: '0.2' - # type=float|default=0.0: + # type=float|default=0.0: mrf_radius: '[1, 1, 1]' - # type=list|default=[]: + # type=list|default=[]: icm_use_synchronous_update: 'True' - # type=bool|default=False: + # type=bool|default=False: maximum_number_of_icm_terations: '1' - # type=int|default=0: + # type=int|default=0: n_iterations: '5' - # type=int|default=0: + # type=int|default=0: convergence_threshold: '0.000001' - # type=float|default=0.0: + # type=float|default=0.0: posterior_formulation: '"Socrates"' - # type=str|default='': + # type=str|default='': use_mixture_model_proportions: 'True' - # type=bool|default=False: + # type=bool|default=False: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -397,8 +397,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -412,35 +412,35 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. initialization: '"Random"' - # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: + # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: dimension: '3' # type=enum|default=3|allowed[2,3,4]: image dimension (2, 3, or 4) intensity_images: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: mask_image: - # type=file|default=: + # type=file|default=: number_of_tissue_classes: '2' - # type=int|default=0: + # type=int|default=0: likelihood_model: '"Gaussian"' - # type=str|default='': + # type=str|default='': save_posteriors: 'True' - # type=bool|default=False: + # type=bool|default=False: mrf_smoothing_factor: '0.2' - # type=float|default=0.0: + # type=float|default=0.0: mrf_radius: '[1, 1, 1]' - # type=list|default=[]: + # type=list|default=[]: icm_use_synchronous_update: 'True' - # type=bool|default=False: + # type=bool|default=False: maximum_number_of_icm_terations: '1' - # type=int|default=0: + # type=int|default=0: n_iterations: '5' - # type=int|default=0: + # type=int|default=0: convergence_threshold: '0.000001' - # type=float|default=0.0: + # type=float|default=0.0: posterior_formulation: '"Socrates"' - # type=str|default='': + # type=str|default='': use_mixture_model_proportions: 'True' - # type=bool|default=False: + # type=bool|default=False: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -453,37 +453,37 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. initialization: '"KMeans"' - # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: + # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: kmeans_init_centers: '[100, 200]' - # type=list|default=[]: + # type=list|default=[]: dimension: '3' # type=enum|default=3|allowed[2,3,4]: image dimension (2, 3, or 4) intensity_images: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: mask_image: - # type=file|default=: + # type=file|default=: number_of_tissue_classes: '2' - # type=int|default=0: + # type=int|default=0: likelihood_model: '"Gaussian"' - # type=str|default='': + # type=str|default='': save_posteriors: 'True' - # type=bool|default=False: + # type=bool|default=False: mrf_smoothing_factor: '0.2' - # type=float|default=0.0: + # type=float|default=0.0: mrf_radius: '[1, 1, 1]' - # type=list|default=[]: + # type=list|default=[]: icm_use_synchronous_update: 'True' - # type=bool|default=False: + # type=bool|default=False: maximum_number_of_icm_terations: '1' - # type=int|default=0: + # type=int|default=0: n_iterations: '5' - # type=int|default=0: + # type=int|default=0: convergence_threshold: '0.000001' - # type=float|default=0.0: + # type=float|default=0.0: posterior_formulation: '"Socrates"' - # type=str|default='': + # type=str|default='': use_mixture_model_proportions: 'True' - # type=bool|default=False: + # type=bool|default=False: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -496,41 +496,41 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. initialization: '"PriorProbabilityImages"' - # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: + # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: prior_image: '"BrainSegmentationPrior%02d.nii.gz"' # type=traitcompound|default=None: either a string pattern (e.g., 'prior%02d.nii') or an existing vector-image file. prior_weighting: '0.8' - # type=float|default=0.0: + # type=float|default=0.0: prior_probability_threshold: '0.0000001' - # type=float|default=0.0: + # type=float|default=0.0: dimension: '3' # type=enum|default=3|allowed[2,3,4]: image dimension (2, 3, or 4) intensity_images: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: mask_image: - # type=file|default=: + # type=file|default=: number_of_tissue_classes: '2' - # type=int|default=0: + # type=int|default=0: likelihood_model: '"Gaussian"' - # type=str|default='': + # type=str|default='': save_posteriors: 'True' - # type=bool|default=False: + # type=bool|default=False: mrf_smoothing_factor: '0.2' - # type=float|default=0.0: + # type=float|default=0.0: mrf_radius: '[1, 1, 1]' - # type=list|default=[]: + # type=list|default=[]: icm_use_synchronous_update: 'True' - # type=bool|default=False: + # type=bool|default=False: maximum_number_of_icm_terations: '1' - # type=int|default=0: + # type=int|default=0: n_iterations: '5' - # type=int|default=0: + # type=int|default=0: convergence_threshold: '0.000001' - # type=float|default=0.0: + # type=float|default=0.0: posterior_formulation: '"Socrates"' - # type=str|default='': + # type=str|default='': use_mixture_model_proportions: 'True' - # type=bool|default=False: + # type=bool|default=False: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -543,39 +543,39 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. initialization: '"PriorLabelImage"' - # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: + # type=enum|default='Random'|allowed['KMeans','Otsu','PriorLabelImage','PriorProbabilityImages','Random']: prior_image: '"segmentation0.nii.gz"' # type=traitcompound|default=None: either a string pattern (e.g., 'prior%02d.nii') or an existing vector-image file. number_of_tissue_classes: '2' - # type=int|default=0: + # type=int|default=0: prior_weighting: '0.8' - # type=float|default=0.0: + # type=float|default=0.0: dimension: '3' # type=enum|default=3|allowed[2,3,4]: image dimension (2, 3, or 4) intensity_images: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: mask_image: - # type=file|default=: + # type=file|default=: likelihood_model: '"Gaussian"' - # type=str|default='': + # type=str|default='': save_posteriors: 'True' - # type=bool|default=False: + # type=bool|default=False: mrf_smoothing_factor: '0.2' - # type=float|default=0.0: + # type=float|default=0.0: mrf_radius: '[1, 1, 1]' - # type=list|default=[]: + # type=list|default=[]: icm_use_synchronous_update: 'True' - # type=bool|default=False: + # type=bool|default=False: maximum_number_of_icm_terations: '1' - # type=int|default=0: + # type=int|default=0: n_iterations: '5' - # type=int|default=0: + # type=int|default=0: convergence_threshold: '0.000001' - # type=float|default=0.0: + # type=float|default=0.0: posterior_formulation: '"Socrates"' - # type=str|default='': + # type=str|default='': use_mixture_model_proportions: 'True' - # type=bool|default=False: + # type=bool|default=False: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys diff --git a/nipype-auto-conv/specs/average_affine_transform.yaml b/nipype-auto-conv/specs/average_affine_transform.yaml index eb2d770..7038b17 100644 --- a/nipype-auto-conv/specs/average_affine_transform.yaml +++ b/nipype-auto-conv/specs/average_affine_transform.yaml @@ -5,7 +5,7 @@ # # Docs # ---- -# +# # Examples # -------- # >>> from nipype.interfaces.ants import AverageAffineTransform @@ -15,8 +15,8 @@ # >>> avg.inputs.output_affine_transform = 'MYtemplatewarp.mat' # >>> avg.cmdline # 'AverageAffineTransform 3 MYtemplatewarp.mat trans.mat func_to_struct.mat' -# -# +# +# task_name: AverageAffineTransform nipype_name: AverageAffineTransform nipype_module: nipype.interfaces.ants.utils @@ -84,8 +84,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -108,8 +108,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/average_images.yaml b/nipype-auto-conv/specs/average_images.yaml index 15817cb..e349cd2 100644 --- a/nipype-auto-conv/specs/average_images.yaml +++ b/nipype-auto-conv/specs/average_images.yaml @@ -5,7 +5,7 @@ # # Docs # ---- -# +# # Examples # -------- # >>> from nipype.interfaces.ants import AverageImages @@ -16,7 +16,7 @@ # >>> avg.inputs.images = ['rc1s1.nii', 'rc1s1.nii'] # >>> avg.cmdline # 'AverageImages 3 average.nii.gz 1 rc1s1.nii rc1s1.nii' -# +# task_name: AverageImages nipype_name: AverageImages nipype_module: nipype.interfaces.ants.utils @@ -89,8 +89,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -116,8 +116,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/brain_extraction.yaml b/nipype-auto-conv/specs/brain_extraction.yaml index df8a840..910a9ad 100644 --- a/nipype-auto-conv/specs/brain_extraction.yaml +++ b/nipype-auto-conv/specs/brain_extraction.yaml @@ -5,9 +5,9 @@ # # Docs # ---- -# +# # Atlas-based brain extraction. -# +# # Examples # -------- # >>> from nipype.interfaces.ants.segmentation import BrainExtraction @@ -19,8 +19,8 @@ # >>> brainextraction.cmdline # 'antsBrainExtraction.sh -a T1.nii.gz -m ProbabilityMaskOfStudyTemplate.nii.gz # -e study_template.nii.gz -d 3 -s nii.gz -o highres001_' -# -# +# +# task_name: BrainExtraction nipype_name: BrainExtraction nipype_module: nipype.interfaces.ants.segmentation @@ -66,35 +66,35 @@ outputs: BrainExtractionGM: generic/file # type=file: segmentation mask with only grey matter BrainExtractionInitialAffine: generic/file - # type=file: + # type=file: BrainExtractionInitialAffineFixed: generic/file - # type=file: + # type=file: BrainExtractionInitialAffineMoving: generic/file - # type=file: + # type=file: BrainExtractionLaplacian: generic/file - # type=file: + # type=file: BrainExtractionMask: generic/file # type=file: brain extraction mask BrainExtractionPrior0GenericAffine: generic/file - # type=file: + # type=file: BrainExtractionPrior1InverseWarp: generic/file - # type=file: + # type=file: BrainExtractionPrior1Warp: generic/file - # type=file: + # type=file: BrainExtractionPriorWarped: generic/file - # type=file: + # type=file: BrainExtractionSegmentation: generic/file # type=file: segmentation mask with CSF, GM, and WM BrainExtractionTemplateLaplacian: generic/file - # type=file: + # type=file: BrainExtractionTmp: generic/file - # type=file: + # type=file: BrainExtractionWM: generic/file # type=file: segmenration mask with only white matter N4Corrected0: generic/file # type=file: N4 bias field corrected image N4Truncated0: generic/file - # type=file: + # type=file: callables: # dict[str, str] - names of methods/callable classes defined in the adjacent `*_callables.py` # to set to the `callable` attribute of output fields @@ -142,8 +142,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -168,8 +168,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/buildtemplateparallel.yaml b/nipype-auto-conv/specs/buildtemplateparallel.yaml index a712377..89ca00f 100644 --- a/nipype-auto-conv/specs/buildtemplateparallel.yaml +++ b/nipype-auto-conv/specs/buildtemplateparallel.yaml @@ -6,22 +6,22 @@ # Docs # ---- # Generate a optimal average template -# +# # .. warning:: -# +# # This can take a VERY long time to complete -# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants.legacy import buildtemplateparallel # >>> tmpl = buildtemplateparallel() # >>> tmpl.inputs.in_files = ['T1.nii', 'structural.nii'] # >>> tmpl.inputs.max_iterations = [30, 90, 20] # >>> tmpl.cmdline # 'buildtemplateparallel.sh -d 3 -i 4 -m 30x90x20 -o antsTMPL_ -c 0 -t GR T1.nii structural.nii' -# -# +# +# task_name: buildtemplateparallel nipype_name: buildtemplateparallel nipype_module: nipype.interfaces.ants.legacy @@ -111,8 +111,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -133,8 +133,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/compose_multi_transform.yaml b/nipype-auto-conv/specs/compose_multi_transform.yaml index fe0dce8..af71643 100644 --- a/nipype-auto-conv/specs/compose_multi_transform.yaml +++ b/nipype-auto-conv/specs/compose_multi_transform.yaml @@ -5,9 +5,9 @@ # # Docs # ---- -# +# # Take a set of transformations and convert them to a single transformation matrix/warpfield. -# +# # Examples # -------- # >>> from nipype.interfaces.ants import ComposeMultiTransform @@ -17,8 +17,8 @@ # >>> compose_transform.cmdline # 'ComposeMultiTransform 3 struct_to_template_composed.mat # struct_to_template.mat func_to_struct.mat' -# -# +# +# task_name: ComposeMultiTransform nipype_name: ComposeMultiTransform nipype_module: nipype.interfaces.ants.utils @@ -93,8 +93,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -115,8 +115,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/composite_transform_util.yaml b/nipype-auto-conv/specs/composite_transform_util.yaml index 70147e3..f860000 100644 --- a/nipype-auto-conv/specs/composite_transform_util.yaml +++ b/nipype-auto-conv/specs/composite_transform_util.yaml @@ -5,13 +5,13 @@ # # Docs # ---- -# +# # ANTs utility which can combine or break apart transform files into their individual # constituent components. -# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants import CompositeTransformUtil # >>> tran = CompositeTransformUtil() # >>> tran.inputs.process = 'disassemble' @@ -19,9 +19,9 @@ # >>> tran.cmdline # 'CompositeTransformUtil --disassemble output_Composite.h5 transform' # >>> tran.run() # doctest: +SKIP -# +# # example for assembling transformation files -# +# # >>> from nipype.interfaces.ants import CompositeTransformUtil # >>> tran = CompositeTransformUtil() # >>> tran.inputs.process = 'assemble' @@ -30,7 +30,7 @@ # >>> tran.cmdline # 'CompositeTransformUtil --assemble my.h5 AffineTransform.mat DisplacementFieldTransform.nii.gz ' # >>> tran.run() # doctest: +SKIP -# +# task_name: CompositeTransformUtil nipype_name: CompositeTransformUtil nipype_module: nipype.interfaces.ants.registration @@ -107,8 +107,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -129,8 +129,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -154,8 +154,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/convert_scalar_image_to_rgb.yaml b/nipype-auto-conv/specs/convert_scalar_image_to_rgb.yaml index fb24fee..ad2b320 100644 --- a/nipype-auto-conv/specs/convert_scalar_image_to_rgb.yaml +++ b/nipype-auto-conv/specs/convert_scalar_image_to_rgb.yaml @@ -5,9 +5,9 @@ # # Docs # ---- -# +# # Convert scalar images to RGB. -# +# # Examples # -------- # >>> from nipype.interfaces.ants.visualization import ConvertScalarImageToRGB @@ -19,8 +19,8 @@ # >>> converter.inputs.maximum_input = 6 # >>> converter.cmdline # 'ConvertScalarImageToRGB 3 T1.nii.gz rgb.nii.gz none jet none 0 6 0 255' -# -# +# +# task_name: ConvertScalarImageToRGB nipype_name: ConvertScalarImageToRGB nipype_module: nipype.interfaces.ants.visualization @@ -85,9 +85,9 @@ tests: maximum_input: # type=int|default=0: maximum input minimum_RGB_output: - # type=int|default=0: + # type=int|default=0: maximum_RGB_output: - # type=int|default=255: + # type=int|default=255: num_threads: # type=int|default=1: Number of ITK threads to use args: @@ -102,8 +102,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -130,8 +130,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/cortical_thickness.yaml b/nipype-auto-conv/specs/cortical_thickness.yaml index d12f14d..144441d 100644 --- a/nipype-auto-conv/specs/cortical_thickness.yaml +++ b/nipype-auto-conv/specs/cortical_thickness.yaml @@ -5,7 +5,7 @@ # # Docs # ---- -# +# # Examples # -------- # >>> from nipype.interfaces.ants.segmentation import CorticalThickness @@ -23,8 +23,8 @@ # 'antsCorticalThickness.sh -a T1.nii.gz -m ProbabilityMaskOfStudyTemplate.nii.gz # -e study_template.nii.gz -d 3 -s nii.gz -o antsCT_ # -p nipype_priors/BrainSegmentationPrior%02d.nii.gz -t brain_study_template.nii.gz' -# -# +# +# task_name: CorticalThickness nipype_name: CorticalThickness nipype_module: nipype.interfaces.ants.segmentation @@ -50,7 +50,7 @@ inputs: extraction_registration_mask: generic/file # type=file|default=: Mask (defined in the template space) used during registration for brain extraction. segmentation_priors: medimage/nifti-gz+list-of - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: t1_registration_template: medimage/nifti-gz # type=file|default=: Anatomical *intensity* template (assumed to be skull-stripped). A common case would be where this would be the same template as specified in the -e option which is not skull stripped. callable_defaults: @@ -115,7 +115,7 @@ tests: brain_probability_mask: # type=file|default=: brain probability mask in template space segmentation_priors: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: out_prefix: # type=str|default='antsCT_': Prefix that is prepended to all output files image_suffix: @@ -162,8 +162,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -181,7 +181,7 @@ tests: brain_probability_mask: # type=file|default=: brain probability mask in template space segmentation_priors: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: t1_registration_template: # type=file|default=: Anatomical *intensity* template (assumed to be skull-stripped). A common case would be where this would be the same template as specified in the -e option which is not skull stripped. imports: @@ -192,8 +192,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -215,7 +215,7 @@ doctests: brain_probability_mask: # type=file|default=: brain probability mask in template space segmentation_priors: - # type=inputmultiobject|default=[]: + # type=inputmultiobject|default=[]: t1_registration_template: # type=file|default=: Anatomical *intensity* template (assumed to be skull-stripped). A common case would be where this would be the same template as specified in the -e option which is not skull stripped. imports: diff --git a/nipype-auto-conv/specs/create_jacobian_determinant_image.yaml b/nipype-auto-conv/specs/create_jacobian_determinant_image.yaml index d524d09..8059dbb 100644 --- a/nipype-auto-conv/specs/create_jacobian_determinant_image.yaml +++ b/nipype-auto-conv/specs/create_jacobian_determinant_image.yaml @@ -5,7 +5,7 @@ # # Docs # ---- -# +# # Examples # -------- # >>> from nipype.interfaces.ants import CreateJacobianDeterminantImage @@ -15,7 +15,7 @@ # >>> jacobian.inputs.outputImage = 'out_name.nii.gz' # >>> jacobian.cmdline # 'CreateJacobianDeterminantImage 3 ants_Warp.nii.gz out_name.nii.gz' -# +# task_name: CreateJacobianDeterminantImage nipype_name: CreateJacobianDeterminantImage nipype_module: nipype.interfaces.ants.utils @@ -87,8 +87,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -111,8 +111,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/create_tiled_mosaic.yaml b/nipype-auto-conv/specs/create_tiled_mosaic.yaml index 3d370ee..e4f8dcf 100644 --- a/nipype-auto-conv/specs/create_tiled_mosaic.yaml +++ b/nipype-auto-conv/specs/create_tiled_mosaic.yaml @@ -9,10 +9,10 @@ # provides useful functionality for common image analysis tasks. The basic # usage of CreateTiledMosaic is to tile a 3-D image volume slice-wise into # a 2-D image. -# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants.visualization import CreateTiledMosaic # >>> mosaic_slicer = CreateTiledMosaic() # >>> mosaic_slicer.inputs.input_image = 'T1.nii.gz' @@ -25,7 +25,7 @@ # >>> mosaic_slicer.inputs.slices = '[2 ,100 ,160]' # >>> mosaic_slicer.cmdline # 'CreateTiledMosaic -a 0.50 -d 2 -i T1.nii.gz -x mask.nii.gz -o output.png -p [ -15x -50 , -15x -30 ,0] -r rgb.nii.gz -s [2 ,100 ,160]' -# +# task_name: CreateTiledMosaic nipype_name: CreateTiledMosaic nipype_module: nipype.interfaces.ants.visualization @@ -113,8 +113,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -148,8 +148,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/denoise_image.yaml b/nipype-auto-conv/specs/denoise_image.yaml index a0e0ea7..12f33de 100644 --- a/nipype-auto-conv/specs/denoise_image.yaml +++ b/nipype-auto-conv/specs/denoise_image.yaml @@ -5,7 +5,7 @@ # # Docs # ---- -# +# # Examples # -------- # >>> import copy @@ -15,21 +15,21 @@ # >>> denoise.inputs.input_image = 'im1.nii' # >>> denoise.cmdline # 'DenoiseImage -d 3 -i im1.nii -n Gaussian -o im1_noise_corrected.nii -s 1' -# +# # >>> denoise_2 = copy.deepcopy(denoise) # >>> denoise_2.inputs.output_image = 'output_corrected_image.nii.gz' # >>> denoise_2.inputs.noise_model = 'Rician' # >>> denoise_2.inputs.shrink_factor = 2 # >>> denoise_2.cmdline # 'DenoiseImage -d 3 -i im1.nii -n Rician -o output_corrected_image.nii.gz -s 2' -# +# # >>> denoise_3 = DenoiseImage() # >>> denoise_3.inputs.input_image = 'im1.nii' # >>> denoise_3.inputs.save_noise = True # >>> denoise_3.cmdline # 'DenoiseImage -i im1.nii -n Gaussian -o [ im1_noise_corrected.nii, im1_noise.nii ] -s 1' -# -# +# +# task_name: DenoiseImage nipype_name: DenoiseImage nipype_module: nipype.interfaces.ants.segmentation @@ -47,10 +47,10 @@ inputs: input_image: medimage/nifti1 # type=file|default=: A scalar image is expected as input for noise correction. noise_image: Path - # type=file: + # type=file: # type=file|default=: Filename for the estimated noise. output_image: Path - # type=file: + # type=file: # type=file|default=: The output consists of the noise corrected version of the input image. callable_defaults: # dict[str, str] - names of methods/callable classes defined in the adjacent `*_callables.py` @@ -69,10 +69,10 @@ outputs: # for file types, where specifying the format also specifies the file that will be # passed to the field in the automatically generated unittests. noise_image: generic/file - # type=file: + # type=file: # type=file|default=: Filename for the estimated noise. output_image: medimage/nifti-gz - # type=file: + # type=file: # type=file|default=: The output consists of the noise corrected version of the input image. callables: # dict[str, str] - names of methods/callable classes defined in the adjacent `*_callables.py` @@ -94,12 +94,12 @@ tests: shrink_factor: # type=int|default=1: Running noise correction on large images can be time consuming. To lessen computation time, the input image can be resampled. The shrink factor, specified as a single integer, describes this resampling. Shrink factor = 1 is the default. output_image: - # type=file: + # type=file: # type=file|default=: The output consists of the noise corrected version of the input image. save_noise: # type=bool|default=False: True if the estimated noise should be saved to file. noise_image: - # type=file: + # type=file: # type=file|default=: Filename for the estimated noise. verbose: # type=bool|default=False: Verbose output. @@ -117,8 +117,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -140,8 +140,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -151,7 +151,7 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) output_image: '"output_corrected_image.nii.gz"' - # type=file: + # type=file: # type=file|default=: The output consists of the noise corrected version of the input image. noise_model: '"Rician"' # type=enum|default='Gaussian'|allowed['Gaussian','Rician']: Employ a Rician or Gaussian noise model. @@ -165,8 +165,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -187,8 +187,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -217,7 +217,7 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. output_image: '"output_corrected_image.nii.gz"' - # type=file: + # type=file: # type=file|default=: The output consists of the noise corrected version of the input image. noise_model: '"Rician"' # type=enum|default='Gaussian'|allowed['Gaussian','Rician']: Employ a Rician or Gaussian noise model. diff --git a/nipype-auto-conv/specs/gen_warp_fields.yaml b/nipype-auto-conv/specs/gen_warp_fields.yaml index 2050e91..9c15214 100644 --- a/nipype-auto-conv/specs/gen_warp_fields.yaml +++ b/nipype-auto-conv/specs/gen_warp_fields.yaml @@ -5,7 +5,7 @@ # # Docs # ---- -# +# task_name: GenWarpFields nipype_name: GenWarpFields nipype_module: nipype.interfaces.ants.legacy @@ -97,8 +97,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/image_math.yaml b/nipype-auto-conv/specs/image_math.yaml index c453d82..6ce8d30 100644 --- a/nipype-auto-conv/specs/image_math.yaml +++ b/nipype-auto-conv/specs/image_math.yaml @@ -5,9 +5,9 @@ # # Docs # ---- -# +# # Operations over images. -# +# # Examples # -------- # >>> ImageMath( @@ -15,51 +15,51 @@ # ... operation='+', # ... op2='2').cmdline # 'ImageMath 3 structural_maths.nii + structural.nii 2' -# +# # >>> ImageMath( # ... op1='structural.nii', # ... operation='Project', # ... op2='1 2').cmdline # 'ImageMath 3 structural_maths.nii Project structural.nii 1 2' -# +# # >>> ImageMath( # ... op1='structural.nii', # ... operation='G', # ... op2='4').cmdline # 'ImageMath 3 structural_maths.nii G structural.nii 4' -# +# # >>> ImageMath( # ... op1='structural.nii', # ... operation='TruncateImageIntensity', # ... op2='0.005 0.999 256').cmdline # 'ImageMath 3 structural_maths.nii TruncateImageIntensity structural.nii 0.005 0.999 256' -# +# # By default, Nipype copies headers from the first input image (``op1``) # to the output image. # For some operations, as the ``PadImage`` operation, the header cannot be copied from inputs to # outputs, and so ``copy_header`` option is automatically set to ``False``. -# +# # >>> pad = ImageMath( # ... op1='structural.nii', # ... operation='PadImage') # >>> pad.inputs.copy_header # False -# +# # While the operation is set to ``PadImage``, # setting ``copy_header = True`` will have no effect. -# +# # >>> pad.inputs.copy_header = True # >>> pad.inputs.copy_header # False -# +# # For any other operation, ``copy_header`` can be enabled/disabled normally: -# +# # >>> pad.inputs.operation = "ME" # >>> pad.inputs.copy_header = True # >>> pad.inputs.copy_header # True -# -# +# +# task_name: ImageMath nipype_name: ImageMath nipype_module: nipype.interfaces.ants.utils @@ -136,8 +136,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -160,8 +160,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -184,8 +184,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -208,8 +208,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -232,8 +232,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/joint_fusion.yaml b/nipype-auto-conv/specs/joint_fusion.yaml index 7039070..7c35939 100644 --- a/nipype-auto-conv/specs/joint_fusion.yaml +++ b/nipype-auto-conv/specs/joint_fusion.yaml @@ -5,23 +5,23 @@ # # Docs # ---- -# +# # An image fusion algorithm. -# +# # Developed by Hongzhi Wang and Paul Yushkevich, and it won segmentation challenges # at MICCAI 2012 and MICCAI 2013. # The original label fusion framework was extended to accommodate intensities by Brian # Avants. # This implementation is based on Paul's original ITK-style implementation # and Brian's ANTsR implementation. -# +# # References include 1) H. Wang, J. W. Suh, S. # Das, J. Pluta, C. Craige, P. Yushkevich, Multi-atlas segmentation with joint # label fusion IEEE Trans. on Pattern Analysis and Machine Intelligence, 35(3), # 611-623, 2013. and 2) H. Wang and P. A. Yushkevich, Multi-atlas segmentation # with joint label fusion and corrective learning--an open source implementation, # Front. Neuroinform., 2013. -# +# # Examples # -------- # >>> from nipype.interfaces.ants import JointFusion @@ -33,12 +33,12 @@ # >>> jf.cmdline # "antsJointFusion -a 0.1 -g ['rc1s1.nii', 'rc1s2.nii'] -l segmentation0.nii.gz # -b 2.0 -o ants_fusion_label_output.nii -s 3x3x3 -t ['im1.nii']" -# +# # >>> jf.inputs.target_image = [ ['im1.nii', 'im2.nii'] ] # >>> jf.cmdline # "antsJointFusion -a 0.1 -g ['rc1s1.nii', 'rc1s2.nii'] -l segmentation0.nii.gz # -b 2.0 -o ants_fusion_label_output.nii -s 3x3x3 -t ['im1.nii', 'im2.nii']" -# +# # >>> jf.inputs.atlas_image = [ ['rc1s1.nii','rc1s2.nii'], # ... ['rc2s1.nii','rc2s2.nii'] ] # >>> jf.inputs.atlas_segmentation_image = ['segmentation0.nii.gz', @@ -47,7 +47,7 @@ # "antsJointFusion -a 0.1 -g ['rc1s1.nii', 'rc1s2.nii'] -g ['rc2s1.nii', 'rc2s2.nii'] # -l segmentation0.nii.gz -l segmentation1.nii.gz -b 2.0 -o ants_fusion_label_output.nii # -s 3x3x3 -t ['im1.nii', 'im2.nii']" -# +# # >>> jf.inputs.dimension = 3 # >>> jf.inputs.alpha = 0.5 # >>> jf.inputs.beta = 1.0 @@ -57,7 +57,7 @@ # "antsJointFusion -a 0.5 -g ['rc1s1.nii', 'rc1s2.nii'] -g ['rc2s1.nii', 'rc2s2.nii'] # -l segmentation0.nii.gz -l segmentation1.nii.gz -b 1.0 -d 3 -o ants_fusion_label_output.nii # -p 3x2x1 -s 3 -t ['im1.nii', 'im2.nii']" -# +# # >>> jf.inputs.search_radius = ['mask.nii'] # >>> jf.inputs.verbose = True # >>> jf.inputs.exclusion_image = ['roi01.nii', 'roi02.nii'] @@ -66,7 +66,7 @@ # "antsJointFusion -a 0.5 -g ['rc1s1.nii', 'rc1s2.nii'] -g ['rc2s1.nii', 'rc2s2.nii'] # -l segmentation0.nii.gz -l segmentation1.nii.gz -b 1.0 -d 3 -e 1[roi01.nii] -e 2[roi02.nii] # -o ants_fusion_label_output.nii -p 3x2x1 -s mask.nii -t ['im1.nii', 'im2.nii'] -v" -# +# # >>> jf.inputs.out_label_fusion = 'ants_fusion_label_output.nii' # >>> jf.inputs.out_intensity_fusion_name_format = 'ants_joint_fusion_intensity_%d.nii.gz' # >>> jf.inputs.out_label_post_prob_name_format = 'ants_joint_fusion_posterior_%d.nii.gz' @@ -77,8 +77,8 @@ # -o [ants_fusion_label_output.nii, ants_joint_fusion_intensity_%d.nii.gz, # ants_joint_fusion_posterior_%d.nii.gz, ants_joint_fusion_voting_weight_%d.nii.gz] # -p 3x2x1 -s mask.nii -t ['im1.nii', 'im2.nii'] -v" -# -# +# +# task_name: JointFusion nipype_name: JointFusion nipype_module: nipype.interfaces.ants.segmentation @@ -100,7 +100,7 @@ inputs: mask_image: generic/file # type=file|default=: If a mask image is specified, fusion is only performed in the mask region. out_label_fusion: Path - # type=file: + # type=file: # type=file|default=: The output label fusion image. callable_defaults: # dict[str, str] - names of methods/callable classes defined in the adjacent `*_callables.py` @@ -119,14 +119,14 @@ outputs: # for file types, where specifying the format also specifies the file that will be # passed to the field in the automatically generated unittests. out_atlas_voting_weight: generic/file+list-of - # type=outputmultiobject: + # type=outputmultiobject: out_intensity_fusion: generic/file+list-of - # type=outputmultiobject: + # type=outputmultiobject: out_label_fusion: medimage/nifti1 - # type=file: + # type=file: # type=file|default=: The output label fusion image. out_label_post_prob: generic/file+list-of - # type=outputmultiobject: + # type=outputmultiobject: callables: # dict[str, str] - names of methods/callable classes defined in the adjacent `*_callables.py` # to set to the `callable` attribute of output fields @@ -169,7 +169,7 @@ tests: mask_image: # type=file|default=: If a mask image is specified, fusion is only performed in the mask region. out_label_fusion: - # type=file: + # type=file: # type=file|default=: The output label fusion image. out_intensity_fusion_name_format: # type=str|default='': Optional intensity fusion image file name format. (e.g. "antsJointFusionIntensity_%d.nii.gz") @@ -193,8 +193,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -204,7 +204,7 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) out_label_fusion: '"ants_fusion_label_output.nii"' - # type=file: + # type=file: # type=file|default=: The output label fusion image. atlas_image: '[ ["rc1s1.nii","rc1s2.nii"] ]' # type=list|default=[]: The atlas image (or multimodal atlas images) assumed to be aligned to a common image domain. @@ -220,8 +220,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -240,8 +240,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -262,8 +262,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -290,8 +290,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -316,8 +316,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -327,7 +327,7 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) out_label_fusion: '"ants_fusion_label_output.nii"' - # type=file: + # type=file: # type=file|default=: The output label fusion image. out_intensity_fusion_name_format: '"ants_joint_fusion_intensity_%d.nii.gz"' # type=str|default='': Optional intensity fusion image file name format. (e.g. "antsJointFusionIntensity_%d.nii.gz") @@ -343,8 +343,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -358,7 +358,7 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. out_label_fusion: '"ants_fusion_label_output.nii"' - # type=file: + # type=file: # type=file|default=: The output label fusion image. atlas_image: '[ ["rc1s1.nii","rc1s2.nii"] ]' # type=list|default=[]: The atlas image (or multimodal atlas images) assumed to be aligned to a common image domain. @@ -446,7 +446,7 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. out_label_fusion: '"ants_fusion_label_output.nii"' - # type=file: + # type=file: # type=file|default=: The output label fusion image. out_intensity_fusion_name_format: '"ants_joint_fusion_intensity_%d.nii.gz"' # type=str|default='': Optional intensity fusion image file name format. (e.g. "antsJointFusionIntensity_%d.nii.gz") diff --git a/nipype-auto-conv/specs/kelly_kapowski.yaml b/nipype-auto-conv/specs/kelly_kapowski.yaml index b8b533d..da36af8 100644 --- a/nipype-auto-conv/specs/kelly_kapowski.yaml +++ b/nipype-auto-conv/specs/kelly_kapowski.yaml @@ -5,13 +5,13 @@ # # Docs # ---- -# +# # Nipype Interface to ANTs' KellyKapowski, also known as DiReCT. -# +# # DiReCT is a registration based estimate of cortical thickness. It was published # in S. R. Das, B. B. Avants, M. Grossman, and J. C. Gee, Registration based # cortical thickness measurement, Neuroimage 2009, 45:867--879. -# +# # Examples # -------- # >>> from nipype.interfaces.ants.segmentation import KellyKapowski @@ -27,8 +27,8 @@ # --maximum-number-of-invert-displacement-field-iterations 20 --number-of-integration-points 10 # --segmentation-image "[segmentation0.nii.gz,2,3]" --smoothing-variance 1.000000 # --smoothing-velocity-field-parameter 1.500000 --thickness-prior-estimate 10.000000' -# -# +# +# task_name: KellyKapowski nipype_name: KellyKapowski nipype_module: nipype.interfaces.ants.segmentation @@ -140,8 +140,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -166,8 +166,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/label_geometry.yaml b/nipype-auto-conv/specs/label_geometry.yaml index 21fc257..be9e873 100644 --- a/nipype-auto-conv/specs/label_geometry.yaml +++ b/nipype-auto-conv/specs/label_geometry.yaml @@ -5,9 +5,9 @@ # # Docs # ---- -# +# # Extracts geometry measures using a label file and an optional image file -# +# # Examples # -------- # >>> from nipype.interfaces.ants import LabelGeometry @@ -16,12 +16,12 @@ # >>> label_extract.inputs.label_image = 'atlas.nii.gz' # >>> label_extract.cmdline # 'LabelGeometryMeasures 3 atlas.nii.gz [] atlas.csv' -# +# # >>> label_extract.inputs.intensity_image = 'ants_Warp.nii.gz' # >>> label_extract.cmdline # 'LabelGeometryMeasures 3 atlas.nii.gz ants_Warp.nii.gz atlas.csv' -# -# +# +# task_name: LabelGeometry nipype_name: LabelGeometry nipype_module: nipype.interfaces.ants.utils @@ -93,8 +93,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -115,8 +115,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -135,8 +135,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/laplacian_thickness.yaml b/nipype-auto-conv/specs/laplacian_thickness.yaml index 23d4a39..d2cd631 100644 --- a/nipype-auto-conv/specs/laplacian_thickness.yaml +++ b/nipype-auto-conv/specs/laplacian_thickness.yaml @@ -6,22 +6,22 @@ # Docs # ---- # Calculates the cortical thickness from an anatomical image -# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants import LaplacianThickness # >>> cort_thick = LaplacianThickness() # >>> cort_thick.inputs.input_wm = 'white_matter.nii.gz' # >>> cort_thick.inputs.input_gm = 'gray_matter.nii.gz' # >>> cort_thick.cmdline # 'LaplacianThickness white_matter.nii.gz gray_matter.nii.gz white_matter_thickness.nii.gz' -# +# # >>> cort_thick.inputs.output_image = 'output_thickness.nii.gz' # >>> cort_thick.cmdline # 'LaplacianThickness white_matter.nii.gz gray_matter.nii.gz output_thickness.nii.gz' -# -# +# +# task_name: LaplacianThickness nipype_name: LaplacianThickness nipype_module: nipype.interfaces.ants.segmentation @@ -101,8 +101,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -123,8 +123,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -144,8 +144,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/measure_image_similarity.yaml b/nipype-auto-conv/specs/measure_image_similarity.yaml index cc086be..e22c947 100644 --- a/nipype-auto-conv/specs/measure_image_similarity.yaml +++ b/nipype-auto-conv/specs/measure_image_similarity.yaml @@ -5,12 +5,12 @@ # # Docs # ---- -# -# -# +# +# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants import MeasureImageSimilarity # >>> sim = MeasureImageSimilarity() # >>> sim.inputs.dimension = 3 @@ -25,7 +25,7 @@ # >>> sim.inputs.moving_image_mask = 'mask.nii.gz' # >>> sim.cmdline # 'MeasureImageSimilarity --dimensionality 3 --masks ["mask.nii","mask.nii.gz"] --metric MI["T1.nii","resting.nii",1.0,5,Regular,1.0]' -# +# task_name: MeasureImageSimilarity nipype_name: MeasureImageSimilarity nipype_module: nipype.interfaces.ants.registration @@ -68,7 +68,7 @@ outputs: # dict[str, str] - names of methods/callable classes defined in the adjacent `*_callables.py` # to set to the `callable` attribute of output fields similarity: similarity_callable - # type=float: + # type=float: templates: # dict[str, str] - `output_file_template` values to be provided to output fields requirements: @@ -84,7 +84,7 @@ tests: moving_image: # type=file|default=: Image to apply transformation to (generally a coregistered functional) metric: - # type=enum|default='CC'|allowed['CC','Demons','GC','MI','Mattes','MeanSquares']: + # type=enum|default='CC'|allowed['CC','Demons','GC','MI','Mattes','MeanSquares']: metric_weight: # type=float|default=1.0: The "metricWeight" variable is not used. radius_or_number_of_bins: @@ -111,8 +111,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -124,7 +124,7 @@ tests: dimension: '3' # type=enum|default=2|allowed[2,3,4]: Dimensionality of the fixed/moving image pair metric: '"MI"' - # type=enum|default='CC'|allowed['CC','Demons','GC','MI','Mattes','MeanSquares']: + # type=enum|default='CC'|allowed['CC','Demons','GC','MI','Mattes','MeanSquares']: fixed_image: # type=file|default=: Image to which the moving image is warped moving_image: @@ -149,8 +149,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -166,7 +166,7 @@ doctests: dimension: '3' # type=enum|default=2|allowed[2,3,4]: Dimensionality of the fixed/moving image pair metric: '"MI"' - # type=enum|default='CC'|allowed['CC','Demons','GC','MI','Mattes','MeanSquares']: + # type=enum|default='CC'|allowed['CC','Demons','GC','MI','Mattes','MeanSquares']: fixed_image: # type=file|default=: Image to which the moving image is warped moving_image: diff --git a/nipype-auto-conv/specs/multiply_images.yaml b/nipype-auto-conv/specs/multiply_images.yaml index aacb7cd..fdbcbd3 100644 --- a/nipype-auto-conv/specs/multiply_images.yaml +++ b/nipype-auto-conv/specs/multiply_images.yaml @@ -5,7 +5,7 @@ # # Docs # ---- -# +# # Examples # -------- # >>> from nipype.interfaces.ants import MultiplyImages @@ -16,7 +16,7 @@ # >>> test.inputs.output_product_image = "out.nii" # >>> test.cmdline # 'MultiplyImages 3 moving2.nii 0.25 out.nii' -# +# task_name: MultiplyImages nipype_name: MultiplyImages nipype_module: nipype.interfaces.ants.utils @@ -89,8 +89,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -116,8 +116,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/n4_bias_field_correction.yaml b/nipype-auto-conv/specs/n4_bias_field_correction.yaml index bb3f0d7..4ef01fd 100644 --- a/nipype-auto-conv/specs/n4_bias_field_correction.yaml +++ b/nipype-auto-conv/specs/n4_bias_field_correction.yaml @@ -5,9 +5,9 @@ # # Docs # ---- -# +# # Bias field correction. -# +# # N4 is a variant of the popular N3 (nonparameteric nonuniform normalization) # retrospective bias correction algorithm. Based on the assumption that the # corruption of the low frequency bias field can be modeled as a convolution of @@ -16,14 +16,14 @@ # the intensities, and then spatially smoothing this result by a B-spline modeling # of the bias field itself. The modifications from and improvements obtained over # the original N3 algorithm are described in [Tustison2010]_. -# +# # .. [Tustison2010] N. Tustison et al., # N4ITK: Improved N3 Bias Correction, IEEE Transactions on Medical Imaging, # 29(6):1310-1320, June 2010. -# +# # Examples # -------- -# +# # >>> import copy # >>> from nipype.interfaces.ants import N4BiasFieldCorrection # >>> n4 = N4BiasFieldCorrection() @@ -37,7 +37,7 @@ # -d 3 --input-image structural.nii # --convergence [ 50x50x30x20 ] --output structural_corrected.nii # --shrink-factor 3' -# +# # >>> n4_2 = copy.deepcopy(n4) # >>> n4_2.inputs.convergence_threshold = 1e-6 # >>> n4_2.cmdline @@ -45,7 +45,7 @@ # -d 3 --input-image structural.nii # --convergence [ 50x50x30x20, 1e-06 ] --output structural_corrected.nii # --shrink-factor 3' -# +# # >>> n4_3 = copy.deepcopy(n4_2) # >>> n4_3.inputs.bspline_order = 5 # >>> n4_3.cmdline @@ -53,7 +53,7 @@ # -d 3 --input-image structural.nii # --convergence [ 50x50x30x20, 1e-06 ] --output structural_corrected.nii # --shrink-factor 3' -# +# # >>> n4_4 = N4BiasFieldCorrection() # >>> n4_4.inputs.input_image = 'structural.nii' # >>> n4_4.inputs.save_bias = True @@ -61,7 +61,7 @@ # >>> n4_4.cmdline # 'N4BiasFieldCorrection -d 3 --input-image structural.nii # --output [ structural_corrected.nii, structural_bias.nii ]' -# +# # >>> n4_5 = N4BiasFieldCorrection() # >>> n4_5.inputs.input_image = 'structural.nii' # >>> n4_5.inputs.dimension = 3 @@ -69,8 +69,8 @@ # >>> n4_5.cmdline # 'N4BiasFieldCorrection -d 3 --histogram-sharpening [0.12,0.02,200] # --input-image structural.nii --output structural_corrected.nii' -# -# +# +# task_name: N4BiasFieldCorrection nipype_name: N4BiasFieldCorrection nipype_module: nipype.interfaces.ants.segmentation @@ -93,7 +93,7 @@ inputs: mask_image: generic/file # type=file|default=: image to specify region to perform final bias correction in weight_image: generic/file - # type=file|default=: image for relative weighting (e.g. probability map of the white matter) of voxels during the B-spline fitting. + # type=file|default=: image for relative weighting (e.g. probability map of the white matter) of voxels during the B-spline fitting. callable_defaults: # dict[str, str] - names of methods/callable classes defined in the adjacent `*_callables.py` # to set as the `default` method of input fields @@ -134,20 +134,20 @@ tests: mask_image: # type=file|default=: image to specify region to perform final bias correction in weight_image: - # type=file|default=: image for relative weighting (e.g. probability map of the white matter) of voxels during the B-spline fitting. + # type=file|default=: image for relative weighting (e.g. probability map of the white matter) of voxels during the B-spline fitting. output_image: # type=file: Warped image # type=str|default='': output file name bspline_fitting_distance: - # type=float|default=0.0: + # type=float|default=0.0: bspline_order: - # type=int|default=0: + # type=int|default=0: shrink_factor: - # type=int|default=0: + # type=int|default=0: n_iterations: - # type=list|default=[]: + # type=list|default=[]: convergence_threshold: - # type=float|default=0.0: + # type=float|default=0.0: save_bias: # type=bool|default=False: True if the estimated bias should be saved to file. bias_image: @@ -173,8 +173,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -188,11 +188,11 @@ tests: input_image: # type=file|default=: input for bias correction. Negative values or values close to zero should be processed prior to correction bspline_fitting_distance: '300' - # type=float|default=0.0: + # type=float|default=0.0: shrink_factor: '3' - # type=int|default=0: + # type=int|default=0: n_iterations: '[50,50,30,20]' - # type=list|default=[]: + # type=list|default=[]: imports: &id001 # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -202,8 +202,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -213,7 +213,7 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) convergence_threshold: 1e-6 - # type=float|default=0.0: + # type=float|default=0.0: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -222,8 +222,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -233,7 +233,7 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) bspline_order: '5' - # type=int|default=0: + # type=int|default=0: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -242,8 +242,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -266,8 +266,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -290,8 +290,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -309,11 +309,11 @@ doctests: input_image: # type=file|default=: input for bias correction. Negative values or values close to zero should be processed prior to correction bspline_fitting_distance: '300' - # type=float|default=0.0: + # type=float|default=0.0: shrink_factor: '3' - # type=int|default=0: + # type=int|default=0: n_iterations: '[50,50,30,20]' - # type=list|default=[]: + # type=list|default=[]: imports: *id001 # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -326,7 +326,7 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. convergence_threshold: 1e-6 - # type=float|default=0.0: + # type=float|default=0.0: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -339,7 +339,7 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. bspline_order: '5' - # type=int|default=0: + # type=int|default=0: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys diff --git a/nipype-auto-conv/specs/registration.yaml b/nipype-auto-conv/specs/registration.yaml index d066ce5..86bac8c 100644 --- a/nipype-auto-conv/specs/registration.yaml +++ b/nipype-auto-conv/specs/registration.yaml @@ -6,33 +6,33 @@ # Docs # ---- # ANTs Registration command for registration of images -# +# # `antsRegistration `_ registers a ``moving_image`` to a ``fixed_image``, # using a predefined (sequence of) cost function(s) and transformation operations. # The cost function is defined using one or more 'metrics', specifically # local cross-correlation (``CC``), Mean Squares (``MeanSquares``), Demons (``Demons``), # global correlation (``GC``), or Mutual Information (``Mattes`` or ``MI``). -# +# # ANTS can use both linear (``Translation``, ``Rigid``, ``Affine``, ``CompositeAffine``, # or ``Translation``) and non-linear transformations (``BSpline``, ``GaussianDisplacementField``, # ``TimeVaryingVelocityField``, ``TimeVaryingBSplineVelocityField``, ``SyN``, ``BSplineSyN``, # ``Exponential``, or ``BSplineExponential``). Usually, registration is done in multiple # *stages*. For example first an Affine, then a Rigid, and ultimately a non-linear # (Syn)-transformation. -# +# # antsRegistration can be initialized using one or more transforms from moving_image # to fixed_image with the ``initial_moving_transform``-input. For example, when you # already have a warpfield that corrects for geometrical distortions in an EPI (functional) image, # that you want to apply before an Affine registration to a structural image. # You could put this transform into 'intial_moving_transform'. -# +# # The Registration-interface can output the resulting transform(s) that map moving_image to # fixed_image in a single file as a ``composite_transform`` (if ``write_composite_transform`` # is set to ``True``), or a list of transforms as ``forwards_transforms``. It can also output # inverse transforms (from ``fixed_image`` to ``moving_image``) in a similar fashion using # ``inverse_composite_transform``. Note that the order of ``forward_transforms`` is in 'natural' # order: the first element should be applied first, the last element should be applied last. -# +# # Note, however, that ANTS tools always apply lists of transformations in reverse order (the last # transformation in the list is applied first). Therefore, if the output forward_transforms # is a list, one can not directly feed it into, for example, ``ants.ApplyTransforms``. To @@ -41,23 +41,23 @@ # ``reverse_forward_transforms`` outputs ``forward_transforms`` in reverse order and can be used for # this purpose. Note also that, because ``composite_transform`` is always a single file, this # output is preferred for most use-cases. -# +# # More information can be found in the `ANTS # manual `_. -# +# # See below for some useful examples. -# +# # Examples # -------- -# +# # Set up a Registration node with some default settings. This Node registers # 'fixed1.nii' to 'moving1.nii' by first fitting a linear 'Affine' transformation, and # then a non-linear 'SyN' transformation, both using the Mutual Information-cost # metric. -# +# # The registration is initialized by first applying the (linear) transform # trans.mat. -# +# # >>> import copy, pprint # >>> from nipype.interfaces.ants import Registration # >>> reg = Registration() @@ -88,51 +88,51 @@ # >>> reg.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 0 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' # >>> reg.run() # doctest: +SKIP -# +# # Same as reg1, but first invert the initial transform ('trans.mat') before applying it. -# +# # >>> reg.inputs.invert_initial_moving_transform = True # >>> reg1 = copy.deepcopy(reg) # >>> reg1.inputs.winsorize_lower_quantile = 0.025 # >>> reg1.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.025, 1.0 ] --write-composite-transform 1' # >>> reg1.run() # doctest: +SKIP -# +# # Clip extremely high intensity data points using winsorize_upper_quantile. All data points # higher than the 0.975 quantile are set to the value of the 0.975 quantile. -# +# # >>> reg2 = copy.deepcopy(reg) # >>> reg2.inputs.winsorize_upper_quantile = 0.975 # >>> reg2.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 0.975 ] --write-composite-transform 1' -# +# # Clip extremely low intensity data points using winsorize_lower_quantile. All data points # lower than the 0.025 quantile are set to the original value at the 0.025 quantile. -# -# +# +# # >>> reg3 = copy.deepcopy(reg) # >>> reg3.inputs.winsorize_lower_quantile = 0.025 # >>> reg3.inputs.winsorize_upper_quantile = 0.975 # >>> reg3.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.025, 0.975 ] --write-composite-transform 1' -# +# # Use float instead of double for computations (saves memory usage) -# +# # >>> reg3a = copy.deepcopy(reg) # >>> reg3a.inputs.float = True # >>> reg3a.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --float 1 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' -# +# # Force to use double instead of float for computations (more precision and memory usage). -# +# # >>> reg3b = copy.deepcopy(reg) # >>> reg3b.inputs.float = False # >>> reg3b.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --float 0 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' -# +# # 'collapse_output_transforms' can be used to put all transformation in a single 'composite_transform'- # file. Note that forward_transforms will now be an empty list. -# +# # >>> # Test collapse transforms flag # >>> reg4 = copy.deepcopy(reg) # >>> reg4.inputs.save_state = 'trans.mat' @@ -156,8 +156,8 @@ # 'warped_image': '...data/output_warped_image.nii.gz'} # >>> reg4.cmdline # 'antsRegistration --collapse-output-transforms 1 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 1 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --restore-state trans.mat --save-state trans.mat --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' -# -# +# +# # >>> # Test collapse transforms flag # >>> reg4b = copy.deepcopy(reg4) # >>> reg4b.inputs.write_composite_transform = False @@ -181,7 +181,7 @@ # >>> reg4b.aggregate_outputs() # doctest: +SKIP # >>> reg4b.cmdline # 'antsRegistration --collapse-output-transforms 1 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 1 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --restore-state trans.mat --save-state trans.mat --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 0' -# +# # One can use multiple similarity metrics in a single registration stage.The Node below first # performs a linear registation using only the Mutual Information ('Mattes')-metric. # In a second stage, it performs a non-linear registration ('Syn') using both a @@ -189,7 +189,7 @@ # equally ('metric_weight' is .5 for both). The Mutual Information- metric uses 32 bins. # The local cross-correlations (correlations between every voxel's neighborhoods) is computed # with a radius of 4. -# +# # >>> # Test multiple metrics per stage # >>> reg5 = copy.deepcopy(reg) # >>> reg5.inputs.fixed_image = 'fixed1.nii' @@ -201,64 +201,64 @@ # >>> reg5.inputs.sampling_percentage = [0.05, [0.05, 0.10]] # >>> reg5.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 0.5, 32, None, 0.05 ] --metric CC[ fixed1.nii, moving1.nii, 0.5, 4, None, 0.1 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' -# +# # ANTS Registration can also use multiple modalities to perform the registration. Here it is assumed # that fixed1.nii and fixed2.nii are in the same space, and so are moving1.nii and # moving2.nii. First, a linear registration is performed matching fixed1.nii to moving1.nii, # then a non-linear registration is performed to match fixed2.nii to moving2.nii, starting from # the transformation of the first step. -# +# # >>> # Test multiple inputS # >>> reg6 = copy.deepcopy(reg5) # >>> reg6.inputs.fixed_image = ['fixed1.nii', 'fixed2.nii'] # >>> reg6.inputs.moving_image = ['moving1.nii', 'moving2.nii'] # >>> reg6.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 0.5, 32, None, 0.05 ] --metric CC[ fixed2.nii, moving2.nii, 0.5, 4, None, 0.1 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' -# +# # Different methods can be used for the interpolation when applying transformations. -# +# # >>> # Test Interpolation Parameters (BSpline) # >>> reg7a = copy.deepcopy(reg) # >>> reg7a.inputs.interpolation = 'BSpline' # >>> reg7a.inputs.interpolation_parameters = (3,) # >>> reg7a.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation BSpline[ 3 ] --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' -# +# # >>> # Test Interpolation Parameters (MultiLabel/Gaussian) # >>> reg7b = copy.deepcopy(reg) # >>> reg7b.inputs.interpolation = 'Gaussian' # >>> reg7b.inputs.interpolation_parameters = (1.0, 1.0) # >>> reg7b.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Gaussian[ 1.0, 1.0 ] --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' -# +# # BSplineSyN non-linear registration with custom parameters. -# +# # >>> # Test Extended Transform Parameters # >>> reg8 = copy.deepcopy(reg) # >>> reg8.inputs.transforms = ['Affine', 'BSplineSyN'] # >>> reg8.inputs.transform_parameters = [(2.0,), (0.25, 26, 0, 3)] # >>> reg8.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform BSplineSyN[ 0.25, 26, 0, 3 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' -# +# # Mask the fixed image in the second stage of the registration (but not the first). -# +# # >>> # Test masking # >>> reg9 = copy.deepcopy(reg) # >>> reg9.inputs.fixed_image_masks = ['NULL', 'fixed1.nii'] # >>> reg9.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ trans.mat, 1 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --masks [ NULL, NULL ] --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --masks [ fixed1.nii, NULL ] --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' -# +# # Here we use both a warpfield and a linear transformation, before registration commences. Note that # the first transformation that needs to be applied ('ants_Warp.nii.gz') is last in the list of # 'initial_moving_transform'. -# +# # >>> # Test initialization with multiple transforms matrices (e.g., unwarp and affine transform) # >>> reg10 = copy.deepcopy(reg) # >>> reg10.inputs.initial_moving_transform = ['func_to_struct.mat', 'ants_Warp.nii.gz'] # >>> reg10.inputs.invert_initial_moving_transform = [False, False] # >>> reg10.cmdline # 'antsRegistration --collapse-output-transforms 0 --dimensionality 3 --initial-moving-transform [ func_to_struct.mat, 0 ] [ ants_Warp.nii.gz, 0 ] --initialize-transforms-per-stage 0 --interpolation Linear --output [ output_, output_warped_image.nii.gz ] --transform Affine[ 2.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32, Random, 0.05 ] --convergence [ 1500x200, 1e-08, 20 ] --smoothing-sigmas 1.0x0.0vox --shrink-factors 2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --transform SyN[ 0.25, 3.0, 0.0 ] --metric Mattes[ fixed1.nii, moving1.nii, 1, 32 ] --convergence [ 100x50x30, 1e-09, 20 ] --smoothing-sigmas 2.0x1.0x0.0vox --shrink-factors 3x2x1 --use-estimate-learning-rate-once 1 --use-histogram-matching 1 --winsorize-image-intensities [ 0.0, 1.0 ] --write-composite-transform 1' -# +# task_name: Registration nipype_name: Registration nipype_module: nipype.interfaces.ants.registration @@ -362,75 +362,75 @@ tests: initial_moving_transform_com: # type=enum|default=0|allowed[0,1,2]: Align the moving_image and fixed_image before registration using the geometric center of the images (=0), the image intensities (=1), or the origin of the images (=2). metric_item_trait: - # type=enum|default='CC'|allowed['CC','Demons','GC','MI','Mattes','MeanSquares']: + # type=enum|default='CC'|allowed['CC','Demons','GC','MI','Mattes','MeanSquares']: metric_stage_trait: - # type=traitcompound|default=None: + # type=traitcompound|default=None: metric: # type=list|default=[]: the metric(s) to use for each stage. Note that multiple metrics per stage are not supported in ANTS 1.9.1 and earlier. metric_weight_item_trait: - # type=float|default=1.0: + # type=float|default=1.0: metric_weight_stage_trait: - # type=traitcompound|default=None: + # type=traitcompound|default=None: metric_weight: # type=list|default=[1.0]: the metric weight(s) for each stage. The weights must sum to 1 per stage. radius_bins_item_trait: - # type=int|default=5: + # type=int|default=5: radius_bins_stage_trait: - # type=traitcompound|default=None: + # type=traitcompound|default=None: radius_or_number_of_bins: # type=list|default=[5]: the number of bins in each stage for the MI and Mattes metric, the radius for other metrics sampling_strategy_item_trait: - # type=enum|default='None'|allowed['None','Random','Regular',None]: + # type=enum|default='None'|allowed['None','Random','Regular',None]: sampling_strategy_stage_trait: - # type=traitcompound|default=None: + # type=traitcompound|default=None: sampling_strategy: # type=list|default=[]: the metric sampling strategy (strategies) for each stage sampling_percentage_item_trait: - # type=traitcompound|default=None: + # type=traitcompound|default=None: sampling_percentage_stage_trait: - # type=traitcompound|default=None: + # type=traitcompound|default=None: sampling_percentage: # type=list|default=[]: the metric sampling percentage(s) to use for each stage use_estimate_learning_rate_once: - # type=list|default=[]: + # type=list|default=[]: use_histogram_matching: # type=traitcompound|default=True: Histogram match the images before registration. interpolation: - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','GenericLabel','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','GenericLabel','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: interpolation_parameters: - # type=traitcompound|default=None: + # type=traitcompound|default=None: write_composite_transform: - # type=bool|default=False: + # type=bool|default=False: collapse_output_transforms: # type=bool|default=True: Collapse output transforms. Specifically, enabling this option combines all adjacent linear transforms and composes all adjacent displacement field transforms before writing the results to disk. initialize_transforms_per_stage: - # type=bool|default=False: Initialize linear transforms from the previous stage. By enabling this option, the current linear stage transform is directly initialized from the previous stages linear transform; this allows multiple linear stages to be run where each stage directly updates the estimated linear transform from the previous stage. (e.g. Translation -> Rigid -> Affine). + # type=bool|default=False: Initialize linear transforms from the previous stage. By enabling this option, the current linear stage transform is directly initialized from the previous stages linear transform; this allows multiple linear stages to be run where each stage directly updates the estimated linear transform from the previous stage. (e.g. Translation -> Rigid -> Affine). float: # type=bool|default=False: Use float instead of double for computations. transforms: - # type=list|default=[]: + # type=list|default=[]: transform_parameters: - # type=list|default=[]: + # type=list|default=[]: restrict_deformation: # type=list|default=[]: This option allows the user to restrict the optimization of the displacement field, translation, rigid or affine transform on a per-component basis. For example, if one wants to limit the deformation or rotation of 3-D volume to the first two dimensions, this is possible by specifying a weight vector of '1x1x0' for a deformation field or '1x1x0x1x1x0' for a rigid transformation. Low-dimensional restriction only works if there are no preceding transformations. number_of_iterations: - # type=list|default=[]: + # type=list|default=[]: smoothing_sigmas: - # type=list|default=[]: + # type=list|default=[]: sigma_units: # type=list|default=[]: units for smoothing sigmas shrink_factors: - # type=list|default=[]: + # type=list|default=[]: convergence_threshold: - # type=list|default=[1e-06]: + # type=list|default=[1e-06]: convergence_window_size: - # type=list|default=[10]: + # type=list|default=[10]: output_transform_prefix: - # type=str|default='transform': + # type=str|default='transform': output_warped_image: - # type=traitcompound|default=None: + # type=traitcompound|default=None: output_inverse_warped_image: - # type=traitcompound|default=None: + # type=traitcompound|default=None: winsorize_upper_quantile: # type=range|default=1.0: The Upper quantile to clip image ranges winsorize_lower_quantile: @@ -438,7 +438,7 @@ tests: random_seed: # type=int|default=0: Fixed seed for random number generation verbose: - # type=bool|default=False: + # type=bool|default=False: num_threads: # type=int|default=1: Number of ITK threads to use args: @@ -453,8 +453,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -468,23 +468,23 @@ tests: moving_image: # type=inputmultiobject|default=[]: Image that will be registered to the space of fixed_image. This is theimage on which the transformations will be applied to output_transform_prefix: '"output_"' - # type=str|default='transform': + # type=str|default='transform': initial_moving_transform: # type=inputmultiobject|default=[]: A transform or a list of transforms that should be applied before the registration begins. Note that, when a list is given, the transformations are applied in reverse order. transforms: '["Affine", "SyN"]' - # type=list|default=[]: + # type=list|default=[]: transform_parameters: '[(2.0,), (0.25, 3.0, 0.0)]' - # type=list|default=[]: + # type=list|default=[]: number_of_iterations: '[[1500, 200], [100, 50, 30]]' - # type=list|default=[]: + # type=list|default=[]: dimension: '3' # type=enum|default=3|allowed[2,3]: image dimension (2 or 3) write_composite_transform: 'True' - # type=bool|default=False: + # type=bool|default=False: collapse_output_transforms: 'False' # type=bool|default=True: Collapse output transforms. Specifically, enabling this option combines all adjacent linear transforms and composes all adjacent displacement field transforms before writing the results to disk. initialize_transforms_per_stage: 'False' - # type=bool|default=False: Initialize linear transforms from the previous stage. By enabling this option, the current linear stage transform is directly initialized from the previous stages linear transform; this allows multiple linear stages to be run where each stage directly updates the estimated linear transform from the previous stage. (e.g. Translation -> Rigid -> Affine). + # type=bool|default=False: Initialize linear transforms from the previous stage. By enabling this option, the current linear stage transform is directly initialized from the previous stages linear transform; this allows multiple linear stages to be run where each stage directly updates the estimated linear transform from the previous stage. (e.g. Translation -> Rigid -> Affine). metric: '["Mattes"]*2' # type=list|default=[]: the metric(s) to use for each stage. Note that multiple metrics per stage are not supported in ANTS 1.9.1 and earlier. metric_weight: '[1]*2 # Default (value ignored currently by ANTs)' @@ -496,21 +496,21 @@ tests: sampling_percentage: '[0.05, None]' # type=list|default=[]: the metric sampling percentage(s) to use for each stage convergence_threshold: '[1.e-8, 1.e-9]' - # type=list|default=[1e-06]: + # type=list|default=[1e-06]: convergence_window_size: '[20]*2' - # type=list|default=[10]: + # type=list|default=[10]: smoothing_sigmas: '[[1,0], [2,1,0]]' - # type=list|default=[]: + # type=list|default=[]: sigma_units: '["vox"] * 2' # type=list|default=[]: units for smoothing sigmas shrink_factors: '[[2,1], [3,2,1]]' - # type=list|default=[]: + # type=list|default=[]: use_estimate_learning_rate_once: '[True, True]' - # type=list|default=[]: + # type=list|default=[]: use_histogram_matching: '[True, True] # This is the default' # type=traitcompound|default=True: Histogram match the images before registration. output_warped_image: '"output_warped_image.nii.gz"' - # type=traitcompound|default=None: + # type=traitcompound|default=None: imports: &id001 # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -521,8 +521,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -543,8 +543,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -563,8 +563,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -585,8 +585,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -605,8 +605,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -625,8 +625,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -641,7 +641,7 @@ tests: restore_state: # type=file|default=: Filename for restoring the internal restorable state of the registration initialize_transforms_per_stage: 'True' - # type=bool|default=False: Initialize linear transforms from the previous stage. By enabling this option, the current linear stage transform is directly initialized from the previous stages linear transform; this allows multiple linear stages to be run where each stage directly updates the estimated linear transform from the previous stage. (e.g. Translation -> Rigid -> Affine). + # type=bool|default=False: Initialize linear transforms from the previous stage. By enabling this option, the current linear stage transform is directly initialized from the previous stages linear transform; this allows multiple linear stages to be run where each stage directly updates the estimated linear transform from the previous stage. (e.g. Translation -> Rigid -> Affine). collapse_output_transforms: 'True' # type=bool|default=True: Collapse output transforms. Specifically, enabling this option combines all adjacent linear transforms and composes all adjacent displacement field transforms before writing the results to disk. imports: @@ -652,8 +652,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -663,7 +663,7 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) write_composite_transform: 'False' - # type=bool|default=False: + # type=bool|default=False: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -672,8 +672,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -704,8 +704,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -726,8 +726,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -737,9 +737,9 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) interpolation: '"BSpline"' - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','GenericLabel','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','GenericLabel','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: interpolation_parameters: (3,) - # type=traitcompound|default=None: + # type=traitcompound|default=None: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -748,8 +748,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -759,9 +759,9 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) interpolation: '"Gaussian"' - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','GenericLabel','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','GenericLabel','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: interpolation_parameters: (1.0, 1.0) - # type=traitcompound|default=None: + # type=traitcompound|default=None: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -770,8 +770,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -781,9 +781,9 @@ tests: # dict[str, str] - values to provide to inputs fields in the task initialisation # (if not specified, will try to choose a sensible value) transforms: '["Affine", "BSplineSyN"]' - # type=list|default=[]: + # type=list|default=[]: transform_parameters: '[(2.0,), (0.25, 26, 0, 3)]' - # type=list|default=[]: + # type=list|default=[]: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -792,8 +792,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -812,8 +812,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -834,8 +834,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -853,23 +853,23 @@ doctests: moving_image: # type=inputmultiobject|default=[]: Image that will be registered to the space of fixed_image. This is theimage on which the transformations will be applied to output_transform_prefix: '"output_"' - # type=str|default='transform': + # type=str|default='transform': initial_moving_transform: # type=inputmultiobject|default=[]: A transform or a list of transforms that should be applied before the registration begins. Note that, when a list is given, the transformations are applied in reverse order. transforms: '["Affine", "SyN"]' - # type=list|default=[]: + # type=list|default=[]: transform_parameters: '[(2.0,), (0.25, 3.0, 0.0)]' - # type=list|default=[]: + # type=list|default=[]: number_of_iterations: '[[1500, 200], [100, 50, 30]]' - # type=list|default=[]: + # type=list|default=[]: dimension: '3' # type=enum|default=3|allowed[2,3]: image dimension (2 or 3) write_composite_transform: 'True' - # type=bool|default=False: + # type=bool|default=False: collapse_output_transforms: 'False' # type=bool|default=True: Collapse output transforms. Specifically, enabling this option combines all adjacent linear transforms and composes all adjacent displacement field transforms before writing the results to disk. initialize_transforms_per_stage: 'False' - # type=bool|default=False: Initialize linear transforms from the previous stage. By enabling this option, the current linear stage transform is directly initialized from the previous stages linear transform; this allows multiple linear stages to be run where each stage directly updates the estimated linear transform from the previous stage. (e.g. Translation -> Rigid -> Affine). + # type=bool|default=False: Initialize linear transforms from the previous stage. By enabling this option, the current linear stage transform is directly initialized from the previous stages linear transform; this allows multiple linear stages to be run where each stage directly updates the estimated linear transform from the previous stage. (e.g. Translation -> Rigid -> Affine). metric: '["Mattes"]*2' # type=list|default=[]: the metric(s) to use for each stage. Note that multiple metrics per stage are not supported in ANTS 1.9.1 and earlier. metric_weight: '[1]*2 # Default (value ignored currently by ANTs)' @@ -881,21 +881,21 @@ doctests: sampling_percentage: '[0.05, None]' # type=list|default=[]: the metric sampling percentage(s) to use for each stage convergence_threshold: '[1.e-8, 1.e-9]' - # type=list|default=[1e-06]: + # type=list|default=[1e-06]: convergence_window_size: '[20]*2' - # type=list|default=[10]: + # type=list|default=[10]: smoothing_sigmas: '[[1,0], [2,1,0]]' - # type=list|default=[]: + # type=list|default=[]: sigma_units: '["vox"] * 2' # type=list|default=[]: units for smoothing sigmas shrink_factors: '[[2,1], [3,2,1]]' - # type=list|default=[]: + # type=list|default=[]: use_estimate_learning_rate_once: '[True, True]' - # type=list|default=[]: + # type=list|default=[]: use_histogram_matching: '[True, True] # This is the default' # type=traitcompound|default=True: Histogram match the images before registration. output_warped_image: '"output_warped_image.nii.gz"' - # type=traitcompound|default=None: + # type=traitcompound|default=None: imports: *id001 # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -982,7 +982,7 @@ doctests: restore_state: # type=file|default=: Filename for restoring the internal restorable state of the registration initialize_transforms_per_stage: 'True' - # type=bool|default=False: Initialize linear transforms from the previous stage. By enabling this option, the current linear stage transform is directly initialized from the previous stages linear transform; this allows multiple linear stages to be run where each stage directly updates the estimated linear transform from the previous stage. (e.g. Translation -> Rigid -> Affine). + # type=bool|default=False: Initialize linear transforms from the previous stage. By enabling this option, the current linear stage transform is directly initialized from the previous stages linear transform; this allows multiple linear stages to be run where each stage directly updates the estimated linear transform from the previous stage. (e.g. Translation -> Rigid -> Affine). collapse_output_transforms: 'True' # type=bool|default=True: Collapse output transforms. Specifically, enabling this option combines all adjacent linear transforms and composes all adjacent displacement field transforms before writing the results to disk. imports: @@ -997,7 +997,7 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. write_composite_transform: 'False' - # type=bool|default=False: + # type=bool|default=False: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -1050,9 +1050,9 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. interpolation: '"BSpline"' - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','GenericLabel','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','GenericLabel','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: interpolation_parameters: (3,) - # type=traitcompound|default=None: + # type=traitcompound|default=None: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -1065,9 +1065,9 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. interpolation: '"Gaussian"' - # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','GenericLabel','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: + # type=enum|default='Linear'|allowed['BSpline','CosineWindowedSinc','Gaussian','GenericLabel','HammingWindowedSinc','LanczosWindowedSinc','Linear','MultiLabel','NearestNeighbor','WelchWindowedSinc']: interpolation_parameters: (1.0, 1.0) - # type=traitcompound|default=None: + # type=traitcompound|default=None: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys @@ -1080,9 +1080,9 @@ doctests: # If the field is of file-format type and the value is None, then the # '.mock()' method of the corresponding class is used instead. transforms: '["Affine", "BSplineSyN"]' - # type=list|default=[]: + # type=list|default=[]: transform_parameters: '[(2.0,), (0.25, 26, 0, 3)]' - # type=list|default=[]: + # type=list|default=[]: imports: # list[nipype2pydra.task.base.importstatement] - list import statements required by the test, with each list item # consisting of 'module', 'name', and optionally 'alias' keys diff --git a/nipype-auto-conv/specs/registration_syn_quick.yaml b/nipype-auto-conv/specs/registration_syn_quick.yaml index 70a6384..ab101f3 100644 --- a/nipype-auto-conv/specs/registration_syn_quick.yaml +++ b/nipype-auto-conv/specs/registration_syn_quick.yaml @@ -5,14 +5,14 @@ # # Docs # ---- -# +# # Registration using a symmetric image normalization method (SyN). # You can read more in Avants et al.; Med Image Anal., 2008 # (https://www.ncbi.nlm.nih.gov/pubmed/17659998). -# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants import RegistrationSynQuick # >>> reg = RegistrationSynQuick() # >>> reg.inputs.fixed_image = 'fixed1.nii' @@ -21,9 +21,9 @@ # >>> reg.cmdline # 'antsRegistrationSyNQuick.sh -d 3 -f fixed1.nii -r 32 -m moving1.nii -n 2 -o transform -p d -s 26 -t s' # >>> reg.run() # doctest: +SKIP -# +# # example for multiple images -# +# # >>> from nipype.interfaces.ants import RegistrationSynQuick # >>> reg = RegistrationSynQuick() # >>> reg.inputs.fixed_image = ['fixed1.nii', 'fixed2.nii'] @@ -32,7 +32,7 @@ # >>> reg.cmdline # 'antsRegistrationSyNQuick.sh -d 3 -f fixed1.nii -f fixed2.nii -r 32 -m moving1.nii -m moving2.nii -n 2 -o transform -p d -s 26 -t s' # >>> reg.run() # doctest: +SKIP -# +# task_name: RegistrationSynQuick nipype_name: RegistrationSynQuick nipype_module: nipype.interfaces.ants.registration @@ -99,7 +99,7 @@ tests: num_threads: # type=int|default=1: Number of threads (default = 1) transform_type: - # type=enum|default='s'|allowed['a','b','br','r','s','sr','t']: Transform type * t: translation * r: rigid * a: rigid + affine * s: rigid + affine + deformable syn (default) * sr: rigid + deformable syn * b: rigid + affine + deformable b-spline syn * br: rigid + deformable b-spline syn + # type=enum|default='s'|allowed['a','b','br','r','s','sr','t']: Transform type * t: translation * r: rigid * a: rigid + affine * s: rigid + affine + deformable syn (default) * sr: rigid + deformable syn * b: rigid + affine + deformable b-spline syn * br: rigid + deformable b-spline syn use_histogram_matching: # type=bool|default=False: use histogram matching histogram_bins: @@ -122,8 +122,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -146,8 +146,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -170,8 +170,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/resample_image_by_spacing.yaml b/nipype-auto-conv/specs/resample_image_by_spacing.yaml index 7c61c1e..ded527d 100644 --- a/nipype-auto-conv/specs/resample_image_by_spacing.yaml +++ b/nipype-auto-conv/specs/resample_image_by_spacing.yaml @@ -5,9 +5,9 @@ # # Docs # ---- -# +# # Resample an image with a given spacing. -# +# # Examples # -------- # >>> res = ResampleImageBySpacing(dimension=3) @@ -16,7 +16,7 @@ # >>> res.inputs.out_spacing = (4, 4, 4) # >>> res.cmdline #doctest: +ELLIPSIS # 'ResampleImageBySpacing 3 structural.nii output.nii.gz 4 4 4' -# +# # >>> res = ResampleImageBySpacing(dimension=3) # >>> res.inputs.input_image = 'structural.nii' # >>> res.inputs.output_image = 'output.nii.gz' @@ -24,7 +24,7 @@ # >>> res.inputs.apply_smoothing = True # >>> res.cmdline #doctest: +ELLIPSIS # 'ResampleImageBySpacing 3 structural.nii output.nii.gz 4 4 4 1' -# +# # >>> res = ResampleImageBySpacing(dimension=3) # >>> res.inputs.input_image = 'structural.nii' # >>> res.inputs.output_image = 'output.nii.gz' @@ -34,8 +34,8 @@ # >>> res.inputs.nn_interp = False # >>> res.cmdline #doctest: +ELLIPSIS # 'ResampleImageBySpacing 3 structural.nii output.nii.gz 0.4 0.4 0.4 1 2 0' -# -# +# +# task_name: ResampleImageBySpacing nipype_name: ResampleImageBySpacing nipype_module: nipype.interfaces.ants.utils @@ -114,8 +114,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -141,8 +141,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -170,8 +170,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -203,8 +203,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/threshold_image.yaml b/nipype-auto-conv/specs/threshold_image.yaml index beace54..9b5ac63 100644 --- a/nipype-auto-conv/specs/threshold_image.yaml +++ b/nipype-auto-conv/specs/threshold_image.yaml @@ -5,9 +5,9 @@ # # Docs # ---- -# +# # Apply thresholds on images. -# +# # Examples # -------- # >>> thres = ThresholdImage(dimension=3) @@ -19,7 +19,7 @@ # >>> thres.inputs.outside_value = 0.0 # >>> thres.cmdline #doctest: +ELLIPSIS # 'ThresholdImage 3 structural.nii output.nii.gz 0.500000 1.000000 1.000000 0.000000' -# +# # >>> thres = ThresholdImage(dimension=3) # >>> thres.inputs.input_image = 'structural.nii' # >>> thres.inputs.output_image = 'output.nii.gz' @@ -27,8 +27,8 @@ # >>> thres.inputs.num_thresholds = 4 # >>> thres.cmdline #doctest: +ELLIPSIS # 'ThresholdImage 3 structural.nii output.nii.gz Kmeans 4' -# -# +# +# task_name: ThresholdImage nipype_name: ThresholdImage nipype_module: nipype.interfaces.ants.utils @@ -117,8 +117,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -150,8 +150,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -179,8 +179,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/warp_image_multi_transform.yaml b/nipype-auto-conv/specs/warp_image_multi_transform.yaml index ea6fde2..7ba79ab 100644 --- a/nipype-auto-conv/specs/warp_image_multi_transform.yaml +++ b/nipype-auto-conv/specs/warp_image_multi_transform.yaml @@ -6,10 +6,10 @@ # Docs # ---- # Warps an image from one space to another -# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants import WarpImageMultiTransform # >>> wimt = WarpImageMultiTransform() # >>> wimt.inputs.input_image = 'structural.nii' @@ -17,7 +17,7 @@ # >>> wimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] # >>> wimt.cmdline # 'WarpImageMultiTransform 3 structural.nii structural_wimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' -# +# # >>> wimt = WarpImageMultiTransform() # >>> wimt.inputs.input_image = 'diffusion_weighted.nii' # >>> wimt.inputs.reference_image = 'functional.nii' @@ -25,8 +25,8 @@ # >>> wimt.inputs.invert_affine = [1] # this will invert the 1st Affine file: 'func2anat_coreg_Affine.txt' # >>> wimt.cmdline # 'WarpImageMultiTransform 3 diffusion_weighted.nii diffusion_weighted_wimt.nii -R functional.nii -i func2anat_coreg_Affine.txt func2anat_InverseWarp.nii.gz dwi2anat_Warp.nii.gz dwi2anat_coreg_Affine.txt' -# -# +# +# task_name: WarpImageMultiTransform nipype_name: WarpImageMultiTransform nipype_module: nipype.interfaces.ants.resampling @@ -122,8 +122,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -146,8 +146,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -172,8 +172,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/nipype-auto-conv/specs/warp_time_series_image_multi_transform.yaml b/nipype-auto-conv/specs/warp_time_series_image_multi_transform.yaml index 3884b36..1bdffda 100644 --- a/nipype-auto-conv/specs/warp_time_series_image_multi_transform.yaml +++ b/nipype-auto-conv/specs/warp_time_series_image_multi_transform.yaml @@ -6,10 +6,10 @@ # Docs # ---- # Warps a time-series from one space to another -# +# # Examples # -------- -# +# # >>> from nipype.interfaces.ants import WarpTimeSeriesImageMultiTransform # >>> wtsimt = WarpTimeSeriesImageMultiTransform() # >>> wtsimt.inputs.input_image = 'resting.nii' @@ -17,7 +17,7 @@ # >>> wtsimt.inputs.transformation_series = ['ants_Warp.nii.gz','ants_Affine.txt'] # >>> wtsimt.cmdline # 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz ants_Affine.txt' -# +# # >>> wtsimt = WarpTimeSeriesImageMultiTransform() # >>> wtsimt.inputs.input_image = 'resting.nii' # >>> wtsimt.inputs.reference_image = 'ants_deformed.nii.gz' @@ -25,7 +25,7 @@ # >>> wtsimt.inputs.invert_affine = [1] # # this will invert the 1st Affine file: ants_Affine.txt # >>> wtsimt.cmdline # 'WarpTimeSeriesImageMultiTransform 4 resting.nii resting_wtsimt.nii -R ants_deformed.nii.gz ants_Warp.nii.gz -i ants_Affine.txt' -# +# task_name: WarpTimeSeriesImageMultiTransform nipype_name: WarpTimeSeriesImageMultiTransform nipype_module: nipype.interfaces.ants.resampling @@ -109,8 +109,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -133,8 +133,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true @@ -159,8 +159,8 @@ tests: # be terminated before they complete for time-saving reasons, and therefore # these values will be ignored, when running in CI timeout: 10 - # int - the value to set for the timeout in the generated test, - # after which the test will be considered to have been initialised + # int - the value to set for the timeout in the generated test, + # after which the test will be considered to have been initialised # successfully. Set to 0 to disable the timeout (warning, this could # lead to the unittests taking a very long time to complete) xfail: true diff --git a/related-packages/fileformats-extras/fileformats/extras/medimage_ants/__init__.py b/related-packages/fileformats-extras/fileformats/extras/medimage_ants/__init__.py index e50005c..bbd39f1 100644 --- a/related-packages/fileformats-extras/fileformats/extras/medimage_ants/__init__.py +++ b/related-packages/fileformats-extras/fileformats/extras/medimage_ants/__init__.py @@ -5,4 +5,3 @@ from fileformats.core import FileSet, SampleFileGenerator from fileformats.medimage_ants import ( ) - diff --git a/related-packages/fileformats-extras/fileformats/extras/medimage_ants/tests/test_generate_sample_data.py b/related-packages/fileformats-extras/fileformats/extras/medimage_ants/tests/test_generate_sample_data.py index 7931a44..0acdc28 100644 --- a/related-packages/fileformats-extras/fileformats/extras/medimage_ants/tests/test_generate_sample_data.py +++ b/related-packages/fileformats-extras/fileformats/extras/medimage_ants/tests/test_generate_sample_data.py @@ -1,4 +1,3 @@ import pytest from fileformats.medimage_ants import ( ) - diff --git a/related-packages/fileformats/fileformats/medimage_ants/__init__.py b/related-packages/fileformats/fileformats/medimage_ants/__init__.py index a8df138..ddf95c6 100644 --- a/related-packages/fileformats/fileformats/medimage_ants/__init__.py +++ b/related-packages/fileformats/fileformats/medimage_ants/__init__.py @@ -1,2 +1,2 @@ from ._version import __version__ # noqa: F401 -from fileformats.generic import File \ No newline at end of file +from fileformats.generic import File