Skip to main content

ITK external module to control topology of binary mask regions

Project description

ITKTopologyControl

Build Status License PyPI version

Overview

This is a module for the Insight Toolkit (ITK). The module includes a filter called FixTopologyCarveOutside which works like morphological closing, except that in the "erode" phase topological constraints are enforced to avoid re-opening holes. It is able to close holes in thin layers (e.g. skull) with a minimal thickness.

    import itk
    skull_mask = itk.imread('path/to/skull_with_holes.mha').astype(itk.US)

    ImageType = type(skull_mask)
    MaskType = itk.Image[itk.UC, 3]

    top_control = itk.FixTopologyCarveOutside[ImageType, ImageType, MaskType].New()
    top_control.SetInput(skull_mask)
    top_control.SetRadius(5)
    top_control.Update()
    skull_mask_closed = top_control.GetOutput()

    itk.imwrite(skull_mask_closed, 'skull_mask_closed.mha')

Or using a custom mask (e.g. a sphere around a hole):

    import itk
    custom_mask = itk.imread('path/to/custom_mask.mha').astype(itk.UC)
    skull_mask = itk.imread('path/to/skull_with_holes.mha').astype(itk.US)
    skull_mask_closed = itk.fix_topology_carve_outside(skull_mask, MaskImage=custom_mask, Radius=5)
    itk.imwrite(skull_mask_closed, 'skull_mask_closed.mha')

Closing holes in skull

Installation

To install the binary Python packages:

  python -m pip install itk-topologycontrol

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

itk_topologycontrol-1.2.0-cp311-abi3-win_amd64.whl (596.6 kB view details)

Uploaded CPython 3.11+ Windows x86-64

itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11+ manylinux: glibc 2.28+ x86-64

itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_28_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.11+ manylinux: glibc 2.28+ ARM64

itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_17_x86_64.whl (880.5 kB view details)

Uploaded CPython 3.11+ manylinux: glibc 2.17+ x86-64

itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11+ manylinux: glibc 2.17+ x86-64

itk_topologycontrol-1.2.0-cp311-abi3-macosx_11_0_arm64.whl (534.9 kB view details)

Uploaded CPython 3.11+ macOS 11.0+ ARM64

itk_topologycontrol-1.2.0-cp311-abi3-macosx_10_9_x86_64.whl (654.4 kB view details)

Uploaded CPython 3.11+ macOS 10.9+ x86-64

itk_topologycontrol-1.2.0-cp310-cp310-win_amd64.whl (597.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_28_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ ARM64

itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_17_x86_64.whl (883.7 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

itk_topologycontrol-1.2.0-cp310-cp310-macosx_11_0_arm64.whl (534.1 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

itk_topologycontrol-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl (653.3 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

itk_topologycontrol-1.2.0-cp39-cp39-win_amd64.whl (597.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_28_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ ARM64

itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_17_x86_64.whl (883.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

itk_topologycontrol-1.2.0-cp39-cp39-macosx_11_0_arm64.whl (534.1 kB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

itk_topologycontrol-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl (653.3 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

itk_topologycontrol-1.2.0-cp38-cp38-win_amd64.whl (624.7 kB view details)

Uploaded CPython 3.8 Windows x86-64

itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_28_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ ARM64

itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_17_x86_64.whl (883.8 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

itk_topologycontrol-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl (653.3 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file itk_topologycontrol-1.2.0-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d336a6c90a15546ac40a1bb39d8361e25ab3562283f3381f09d469d8502ad43c
MD5 9a8ac957cbb6835f0eff201141d40a85
BLAKE2b-256 66f0d6fd20721eda92d1ff72f6d18eea7b0fc10b7648e68ae962d09b941ceba1

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 98088ee2bb2974168f500aa699ab655cc2cff8b790a33f314d7b2cac62b36ce3
MD5 f8c0ddcd0ffff4245e35cdd405f733f3
BLAKE2b-256 d151687ce29a41c12efa1bcd35bcb45379555a6daa387e9be9f4d1b65986de4c

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5fd0f306bb2d45e1e662d1d1965d9deddf4e19455e8a482908cca799be7ffcf3
MD5 a0cbf267f364cf099905afce3853dfa4
BLAKE2b-256 f90edbed5ca3d9b9ebd9a1251bf0b7615d436c1461fc367fcbc51a3aa168b2b9

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 83c60272d3a014ce2795cfa9dca31661ea4294d7eae5a9460c030deb6feee961
MD5 f9c360242def1ad669ea7918bae251a3
BLAKE2b-256 66d4aab39fb7477125b6383f73bbeeab3936647ee96ebb240138c8dd9af488b2

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 450abb7958523cfb489f444389035321531c9ca049fcd4e48be72f0b30f6afd0
MD5 15694ff265ff8b4788593ac9d4759744
BLAKE2b-256 a81fc4ef8eeec281f1d396e10fb42602b8e1b414c17be33081cca353088a1e5b

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4ae420a622eb214655094ac68050f57a32f4f0b7b768aa63aae86eb1718e0da3
MD5 e9538baba25c0ceae85b1d4c40616e10
BLAKE2b-256 571c95400f91c09d620216370c95b2aeb1dae7c99a787857d6976996356752ca

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp311-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp311-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3d562ae7ac137db92193f585063f6efe7a6ed464d410429d2895ac29877e4695
MD5 07a7a5596158efe53bd8245de6b0b9b4
BLAKE2b-256 950c86f4fd79ad6c4b173d5e2b492fe26996268d1683b9365bdbc0938cee83f0

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9e39017a123e7806da732d39c6dd0d5bf43d762b8c44b9b89cce672527998d94
MD5 4db510a5aebd64207e086ab862954a5c
BLAKE2b-256 3fb58b43b29df6167a421649a805eaadb144a6372a72f79f8d58a667ee4a8826

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5e095520059c926d34efcc055f7dd01e820cda29367bdeeb6ca35c87e6703561
MD5 86bb1bc3293442a2822dcd9bf018443c
BLAKE2b-256 881de02152163f21ff98aee158793eecbe0cf27c0a4313c05a259e3582e1a328

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c6e34b8de746d57bcc0fce51bd180eb7464fccb1aad2ce768a05d5f108efe753
MD5 b0477f583f0fc2faca5f4cc5ba0a45fd
BLAKE2b-256 3d42ade8bda4413232083e89cecf6076cc8fb3fd6857419fee4c77775354ce90

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 cd0f44a31616c52761e1d2cd00506af7f08246d52501d92f5bf4c4e1efa369ad
MD5 c8115ffc3e8727d901a9a6aaa39febac
BLAKE2b-256 78a40adada9ea8488d623a6859cddb77fb3a910f29b6a0258ddd5b6b0b380f5e

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 437ee036356ce66a4bc8c0d617c4081cf168d28cc60cd468120ebb2c3b481eeb
MD5 8f5ce0125fcb6409b8faa315f80ba5ab
BLAKE2b-256 4280a95d9b756c472d382c5be20e3fb9aa835ada0ee6d82ff5862dc235e1613d

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 50a0a1c91cb19d59d24bb37971e4f8e421f2f9ed465d56608a1945d99e228735
MD5 496a438581012751a383b9d8cf998d8f
BLAKE2b-256 79947f488333c192e728a5a4ddd065a05033d7625cc709f96f80e688f390914e

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 77d57c7874a3e475510f03207a49ff4d0cca19e94df7809c95a22a964c168b1d
MD5 ee8ad570215a78193d489a69666dbcbc
BLAKE2b-256 79f1867529c0c40b4d4c516d803b95fa9ecd66cd7c0b43125d7676341878686c

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2b9777d7af5a0cff9d632d551b24f401132ce4ff22508961aabde200352f9b4f
MD5 e9f7c9db138f23ab99f81142640996f3
BLAKE2b-256 676811bf9061638466be97c36dda199eccc41efb3f7341094ca50b9c1bdae197

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d315af80c00f377ea9278321b70fb468ffa254767b8c12f026038499659d903
MD5 cd3e247c657d4f7d8d2213f36193a0b9
BLAKE2b-256 a1d471d39fc763cb2b21770dd33e9afc0933c3af6b89475c086ba0998cca5ead

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 72d7bbcd48f964af1f8c04b9c22a6a630731544418492a6e4e09d3c8a60b8296
MD5 d7f60d510eeb9561a2091e07e121803a
BLAKE2b-256 111b7cb94e40a1387f545bae1a4e1a9072a5f8ead18bb5d8b59c7e741a9fdcdf

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 f58c51cb5f5b9c573678b1162170542b48015a83e06294c6b5107dd282c36586
MD5 69a3a763161d249facf0d9c35da1550f
BLAKE2b-256 29621f7fd2fb17de1a6a14a026c0424748e2c98f9644cbece9798b6397be6af3

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1cd5df1871799f5c9fe0031f53b227c2b8aa95b711c07724cc935da500e3d421
MD5 74a4e9c0d7c6c59de0143e8009bbce49
BLAKE2b-256 26df0d7ec0596301b63fbf9af71bbe5d46072aa34bb7651dea9a7d689ac4130d

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 867f94fe9ee6564e9f30a205ea5b1824efe11c5d4e638d0808aec8e89660fa62
MD5 28c0b1c123b565a94158e7f5bcb2697d
BLAKE2b-256 cca0aaea840ecfe2a685e5443ad6fc84d54fdd97073252ffe2b91bf57cad68c9

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 51390d88c1872c60dd470531dd77fc977826b520ef849059f1444ffae3433a2e
MD5 6cb976306857bc2833e7c52b178c7953
BLAKE2b-256 30961076b679d475337adca40a4df8aec77b3b23f1dcee8b01a0576648a42373

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1a73b115d3ec227ad94d66d858b0493e78d72257ed7fe26c64756af0f278f03c
MD5 4d9b91ef822778de9926ee7fdfcd75fe
BLAKE2b-256 1a672b31de7df6b110160953706ae3b81dff8a24b14e4c4cba68ef0df2f5e46f

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9c91dd2f5335760c3fd8549c9c5c6eb75800d3dbd5ee1a4bc35e6bfeab873cc4
MD5 d62f378d8fd422bd077208ce28936bec
BLAKE2b-256 55e99e2fc220cea67b43f66ec07359688d446f15707347ade7047a8811db2937

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 16a52c02e2236aff038d2b7e8f26e2bb2ca08f909ae562adcf5efbb4a5855442
MD5 a6831c4f0536125908eb716e2932ef0f
BLAKE2b-256 2618bfa8911f7f2ac42fae1f1d48294d20ccc7ab5ddeebb8d1d9074ed59fd68f

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 376b754de7854d7ae4f0b9df01e977ec6207276ce61e0a718957611a254bbd54
MD5 9c9ae4ba645a4e7404d0a4f17d59c18d
BLAKE2b-256 56570e56780f6b77d4a9370179632760858f324474cd826248f307abf985a06c

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ba89cfa0d424e8cc4f20e12cc54e7207104a35da156452d6a47a1961143ae08
MD5 f892d52a085f265551f71864e7ba7d57
BLAKE2b-256 752b393aee1c5f8f005be0698e4f7b5eabfd82c6a7b6450269a7055ba0d2275a

See more details on using hashes here.

File details

Details for the file itk_topologycontrol-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for itk_topologycontrol-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7dadec135d8adf3a527888f4827c5ae34308fa45d9266d13a980d7fffac83361
MD5 784a5772d8a661ca85a81744b5966155
BLAKE2b-256 21d3867a3d6de7c4bba7fe506dcb746d5d14c6a39c09bf88ad548bfb907aca2e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page