Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
This is a module for the Insight Toolkit (ITK) that provides filters to replace regions within a masked region with the surrounding labels.
Readme
This is a module for the Insight Toolkit (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.
The module includes a filter called DissolveMaskImageFilter.
import itk
labels = itk.imread('path/to/labels.mha').astype(itk.US)
mask = itk.imread('path/to/mask.mha').astype(itk.UC)
ImageType = type(labels)
MaskType = type(mask)
dissolve = itk.DissolveMaskImageFilter[ImageType, MaskType].New()
dissolve.SetInput(labels)
dissolve.SetMaskImage(mask)
dissolve.Update()
modified_labels = dissolve.GetOutput()
itk.imwrite(modified_labels, 'modified_labels2.mha')
Or using the pythonic API:
import itk
labels = itk.imread('path/to/labels.mha').astype(itk.US)
mask = itk.imread('path/to/mask.mha').astype(itk.US)
modified_labels = itk.dissolve_mask_image_filter(labels, mask_image=mask)
itk.imwrite(modified_labels, 'path/to/modified_labels.mha')
To install the binary Python packages:
python -m pip install itk-dissolve
FAQs
This is a module for the Insight Toolkit (ITK) that provides filters to replace regions within a masked region with the surrounding labels.
We found that itk-dissolve demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.