Skip to main content

Open AI library for research and education.

Project description

Kelluwen

Open AI library for research and education designed to be easy to use and develop with.

Installation

pip install kelluwen

Usage

from kelluwen.functions.transforms import generate_affine, apply_affine
from kelluwen.functions.tools import show_midplanes
from torch import rand

# Create image tensor of shape BxCxDxHxW
img = rand(2, 3, 100, 100, 100)

# Define parameters for affine transform. These transforms can be independent for each channel. If there is no channel dimension, the same transform will be applied for all channels.
parameters = dict(
    parameter_translation=rand(2,3),
    parameter_rotation=rand(2,3),
    parameter_scaling=rand(2,3),
    type_rotation="euler_xyz",
    transform_order="trs",
)

# Generate affine transform
transform = generate_affine(**parameters)

# Apply affine transform to image tensor
img_transformed = apply_affine(image=img, **transform)


# Show midplanes of volume. In this example we're using the RAS coordinate system, and we're scaling the features using a min-max method.
show_midplanes(
    image=img_transformed,
    title="Example midplanes",
    show=True,
    type_coordinates="ras",
    type_scaling="min_max")
# ```

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 Distribution

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

kelluwen-0.0.29-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file kelluwen-0.0.29-py3-none-any.whl.

File metadata

  • Download URL: kelluwen-0.0.29-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for kelluwen-0.0.29-py3-none-any.whl
Algorithm Hash digest
SHA256 a442d901573a545128aad91e8c58a878b6335d62cfd22ec8b6eb4a2e2ea30836
MD5 cdca6f280e3d31dcefff666548f914af
BLAKE2b-256 8d25d97775e17c9ce8aef61d71a14b5fba6549f6acd3fe4842beb6a5891e2d4b

See more details on using hashes here.

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