Skip to main content

Erase masked regions from cryo-EM images

Project description

torch-cryoeraser

License PyPI Python Version CI codecov

torch-cryoeraser is a Python package for erasing local regions of cryo-EM images.

result of usig torch-cryoeraser

Image data in masked regions are replaced with noise matching local image statistics.

Installation

pip install torch-cryoeraser

Usage

import torch
import tifffile
from torch_cryoeraser import erase_region_2d

# load image and mask
image = tifffile.imread("image.tif")
mask = tifffile.imread("mask.tif")

# to torch tensor
image = torch.tensor(image)
mask = torch.tensor(mask)

# erase masked regions
erased_image = erase_region_2d(image=image, mask=mask)

for more info, please check the documentation.

Project details


Download files

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

Source Distribution

torch_cryoeraser-0.1.0.tar.gz (396.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torch_cryoeraser-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file torch_cryoeraser-0.1.0.tar.gz.

File metadata

  • Download URL: torch_cryoeraser-0.1.0.tar.gz
  • Upload date:
  • Size: 396.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for torch_cryoeraser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c45a700a0529ab0ac36e4d36f62014c1c15e6576244587ef8f5b32b70eab2dba
MD5 d52186b47c0cb26cff7b24070846c7fd
BLAKE2b-256 3a117f530874045e759cf8136cf1f7ac279ccaf5d0891f0690be0205d44a81a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_cryoeraser-0.1.0.tar.gz:

Publisher: ci.yml on teamtomo/torch-cryoeraser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file torch_cryoeraser-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for torch_cryoeraser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c7595be419b8dbcaa2554b22acaaf9445cfaf9175a0c7f5b102f7a723ba6557
MD5 6705236e4f59a9681564ee7887ab30f1
BLAKE2b-256 fff61023c19cf286a799e38bfa9c3208ad5d266aef4c50900cc32e20e955a484

See more details on using hashes here.

Provenance

The following attestation bundles were made for torch_cryoeraser-0.1.0-py3-none-any.whl:

Publisher: ci.yml on teamtomo/torch-cryoeraser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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