{"id":19378155,"url":"https://github.com/almarklein/pyelastix","last_synced_at":"2025-10-27T05:08:50.370Z","repository":{"id":50731323,"uuid":"69877271","full_name":"almarklein/pyelastix","owner":"almarklein","description":"Thin wrapper around elastix - a toolbox for rigid and nonrigid registration of images","archived":false,"fork":false,"pushed_at":"2020-04-02T08:00:31.000Z","size":47,"stargazers_count":109,"open_issues_count":13,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-08T22:37:13.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/almarklein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-03T14:14:53.000Z","updated_at":"2025-09-04T09:23:42.000Z","dependencies_parsed_at":"2022-09-10T17:52:01.572Z","dependency_job_id":null,"html_url":"https://github.com/almarklein/pyelastix","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/almarklein/pyelastix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almarklein%2Fpyelastix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almarklein%2Fpyelastix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almarklein%2Fpyelastix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almarklein%2Fpyelastix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/almarklein","download_url":"https://codeload.github.com/almarklein/pyelastix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almarklein%2Fpyelastix/sbom","scorecard":{"id":186040,"data":{"date":"2025-08-11","repo":{"name":"github.com/almarklein/pyelastix","commit":"12448e0dc261ff6786e4a98fb2ea147ffa570d50"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":1,"reason":"Found 2/18 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: PYSEC-2019-156 / GHSA-xp76-357g-9wqq","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T19:49:16.105Z","repository_id":50731323,"created_at":"2025-08-16T19:49:16.105Z","updated_at":"2025-08-16T19:49:16.105Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281216687,"owners_count":26463033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T09:05:01.792Z","updated_at":"2025-10-27T05:08:50.339Z","avatar_url":"https://github.com/almarklein.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyElastix - Python wrapper for the Elastix nonrigid registration toolkit\n\nThis Python module wraps the [Elastix](http://elastix.isi.uu.nl/)\nregistration toolkit. Elastix is a powerful tool, suitable for 2D and 3D\nimages, capable of rigid as well as non-rigid (i.e. elastic) image\nregistration.\n\nFor an overview of other image registration projects in Python,\nsee http://pyimreg.github.io.\n\n## Installation\n\nInstall this library using `pip install pyelastix` or\n`conda install pyelastix -c conda-forge`. This module depends on numpy.\n\nFurther, the Elastix command-line application needs to be installed on\nyour computer. You can obtain a copy at http://elastix.isi.uu.nl/.\n\nThis module tries to detect the Elastix executable in a series of common\nlocations, such as program directories, the user directory, and next to\nthis module. The executable (or the directory that contains it) can also\nbe provided by setting the `ELASTIX_PATH` environment variable.\n\n## How it works\n\nThis module writes the images to register to disk, calls Elastix to do\nthe registration, and reads the resulting data. The temporary data is\nautomatically cleaned up. This approach keeps this module relatively\neasy, while providing the full power of the awesome Elastix registration\ntoolkit.\n\n## Example\n\n```py\n# Given im1 and im2 images stored as numpy arrays ...\n\nimport pyelastix\n\n# Get params and change a few values\nparams = pyelastix.get_default_params()\nparams.MaximumNumberOfIterations = 200\nparams.FinalGridSpacingInVoxels = 10\n\n# Apply the registration (im1 and im2 can be 2D or 3D)\nim1_deformed, field = pyelastix.register(im1, im2, params)\n```\n\nSee `example.py` for a more complete example.\n\n## API\n\n----\n\n### `Parameters()`\n\nStruct object to represent the parameters for the Elastix\nregistration toolkit. Sets of parameters can be combined by\naddition. (When adding `p1 + p2`, any parameters present in both\nobjects will take the value that the parameter has in `p2`.)\n\nUse `get_default_params()` to get a Parameters struct with sensible\ndefault values.\n\n### `get_advanced_params()`\n\nGet `Parameters` struct with parameters that most users do not\nwant to think about.\n\n### `get_default_params(type='BSPLINE')`\n\nGet `Parameters` struct with parameters that users may want to tweak.\nThe given `type` specifies the type of allowed transform, and can\nbe 'RIGID', 'AFFINE', 'BSPLINE'.\n\nFor detail on what parameters are available and how they should be used,\nwe refer to the Elastix documentation. Here is a description of the\nmost common parameters:\n\n* Transform (str):\n    Can be 'BSplineTransform', 'EulerTransform', or\n    'AffineTransform'. The transformation to apply. Chosen based on `type`.\n* FinalGridSpacingInPhysicalUnits (int):\n    When using the BSplineTransform, the final spacing of the grid.\n    This controls the smoothness of the final deformation.\n* AutomaticScalesEstimation (bool):\n    When using a rigid or affine transform. Scales the affine matrix\n    elements compared to the translations, to make sure they are in\n    the same range. In general, it's best to use automatic scales\n    estimation.\n* AutomaticTransformInitialization (bool):\n    When using a rigid or affine transform. Automatically guess an\n    initial translation by aligning the geometric centers of the \n    fixed and moving.\n* NumberOfResolutions (int):\n    Most registration algorithms adopt a multiresolution approach\n    to direct the solution towards a global optimum and to speed\n    up the process. This parameter specifies the number of scales\n    to apply the registration at. (default 4)\n* MaximumNumberOfIterations (int):\n    Maximum number of iterations in each resolution level.\n    200-2000 works usually fine for nonrigid registration.\n    The more, the better, but the longer computation time.\n    This is an important parameter! (default 500).\n\n### `get_elastix_exes()`\n\nGet the executables for elastix and transformix. Raises an error\nif they cannot be found.\n\n### `get_tempdir()`\n\nGet the temporary directory where pyelastix stores its temporary\nfiles. The directory is specific to the current process and the\ncalling thread. Generally, the user does not need this; directories\nare automatically cleaned up. Though Elastix log files are also\nwritten here.\n\n### `register(im1, im2, params, exact_params=False, verbose=1)`\n\nPerform the registration of `im1` to `im2`, using the given \nparameters. Returns `(im1_deformed, field)`, where `field` is a\ntuple with arrays describing the deformation for each dimension\n(x-y-z order, in world units).\n\nParameters:\n\n* im1 (ndarray or file location):\n    The moving image (the one to deform).\n* im2 (ndarray or file location):\n    The static (reference) image.\n* params (dict or Parameters):\n    The parameters of the registration. Default parameters can be\n    obtained using the `get_default_params()` method. Note that any\n    parameter known to Elastix can be added to the parameter\n    struct, which enables tuning the registration in great detail.\n    See `get_default_params()` and the Elastix docs for more info.\n* exact_params (bool):\n    If True, use the exact given parameters. If False (default)\n    will process the parameters, checking for incompatible\n    parameters, extending values to lists if a value needs to be\n    given for each dimension.\n* verbose (int):\n    Verbosity level. If 0, will not print any progress. If 1, will\n    print the progress only. If 2, will print the full output\n    produced by the Elastix executable. Note that error messages\n    produced by Elastix will be printed regardless of the verbose\n    level.\n\nIf `im1` is a list of images, performs a groupwise registration.\nIn this case the resulting `field` is a list of fields, each\nindicating the deformation to the \"average\" image.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmarklein%2Fpyelastix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falmarklein%2Fpyelastix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmarklein%2Fpyelastix/lists"}