{"id":15296134,"url":"https://github.com/dyollb/itkdissolve","last_synced_at":"2026-01-27T21:18:15.031Z","repository":{"id":57750971,"uuid":"527029536","full_name":"dyollb/ITKDissolve","owner":"dyollb","description":"ITK external module to dissolve masked regions","archived":false,"fork":false,"pushed_at":"2024-03-26T07:10:06.000Z","size":45,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-26T13:46:27.782Z","etag":null,"topics":["c-plus-plus","image-processing","itk","itk-module","python","segmentation"],"latest_commit_sha":null,"homepage":"","language":"C++","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/dyollb.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-08-20T20:11:05.000Z","updated_at":"2024-03-23T22:59:31.000Z","dependencies_parsed_at":"2024-03-26T08:26:55.302Z","dependency_job_id":"42bd9226-9a19-48b1-be90-0997aec5c287","html_url":"https://github.com/dyollb/ITKDissolve","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.1428571428571429,"last_synced_commit":"95659f2bb91f6a036c2249563c80dcd69af51e1f"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyollb%2FITKDissolve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyollb%2FITKDissolve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyollb%2FITKDissolve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyollb%2FITKDissolve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyollb","download_url":"https://codeload.github.com/dyollb/ITKDissolve/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247443626,"owners_count":20939712,"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","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":["c-plus-plus","image-processing","itk","itk-module","python","segmentation"],"created_at":"2024-09-30T18:09:30.819Z","updated_at":"2026-01-27T21:18:14.997Z","avatar_url":"https://github.com/dyollb.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ITKDissolve\n\n[![Build Status](https://github.com/dyollb/ITKDissolve/workflows/Build,%20test,%20package/badge.svg)](https://github.com/dyollb/ITKDissolve/actions)\n[![License]( https://img.shields.io/github/license/dyollb/ITKDissolve?color=blue)](https://github.com/dyollb/ITKDissolve/blob/main/LICENSE)\n[![PyPI version](https://img.shields.io/pypi/v/itk-dissolve.svg)](https://badge.fury.io/py/itk-dissolve)\n\u003cimg src=\"https://img.shields.io/pypi/dm/itk-dissolve.svg?label=pypi%20downloads\u0026logo=python\u0026logoColor=green\"/\u003e\n\u003cimg src=\"https://img.shields.io/badge/python-%203.8%20|%203.9%20|%203.10%20|%203.11%20-3776ab.svg\"/\u003e\n## Overview\n\nThis is a module for the Insight Toolkit ([ITK](https://github.com/InsightSoftwareConsortium/ITK)) that provides functionality to discard pixels within a masked region. Unlike masking, the pixels in the masked region are replaced (dissolved) by their nearest pixels outside the mask. This can be useful to clean-up label fields, e.g. to remove small islands/holes or remove entire labels, and replace them by the adjacent labels.\n\nThe module includes a filter called DissolveMaskImageFilter.\n\n```python\n    import itk\n    labels = itk.imread('path/to/labels.mha').astype(itk.US)\n    mask = itk.imread('path/to/mask.mha').astype(itk.UC)\n\n    ImageType = type(labels)\n    MaskType = type(mask)\n\n    dissolve = itk.DissolveMaskImageFilter[ImageType, MaskType].New()\n    dissolve.SetInput(labels)\n    dissolve.SetMaskImage(mask)\n    dissolve.Update()\n    modified_labels = dissolve.GetOutput()\n\n    itk.imwrite(modified_labels, 'modified_labels2.mha')\n```\n\nOr using the pythonic API:\n\n```python\n    import itk\n    labels = itk.imread('path/to/labels.mha').astype(itk.US)\n    mask = itk.imread('path/to/mask.mha').astype(itk.US)\n    modified_labels = itk.dissolve_mask_image_filter(labels, mask_image=mask)\n    itk.imwrite(modified_labels, 'path/to/modified_labels.mha')\n```\n\n## Installation\n\nTo install the binary Python packages:\n\n```shell\n  python -m pip install itk-dissolve\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyollb%2Fitkdissolve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyollb%2Fitkdissolve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyollb%2Fitkdissolve/lists"}