Skip to main content

A library to convert AIM image files to numpy arrays

Project description

aim2numpy

aim2numpy is a Python library designed to convert AIM files, specifically CT scan data from Scanco, into numpy arrays.

Installation

You can install the library using pip:

pip install aim2numpy

Usage

Here's a basic example of how to use the library:

import aim2numpy

mynumpy = aim2numpy.extract("myaimfile.aim")

AIM File Format

The AIM file format is used by Scanco Medical for storing CT scan data. These files contain volumetric data that can be used for various analyses in medical imaging and research.

Features

  • Easy Conversion: Convert AIM files to numpy arrays with a single function call.
  • Compatibility: Works with CT scan data from Scanco.
  • Extensible: Easily integrate with other Python libraries for further data processing and analysis.

Example

import aim2numpy
import matplotlib.pyplot as plt

# Extract the numpy array from the AIM file
ct_scan_data = aim2numpy.extract("myaimfile.aim")

# Display a slice of the CT scan data
plt.imshow(ct_scan_data[:, :, ct_scan_data.shape[2] // 2], cmap='gray')
plt.title('CT Scan Slice')
plt.show()

Requirements

  • numpy
  • struct
  • matplotlib

Installation for Development

If you want to install the library for development purposes, you can clone the repository and install it locally:

git clone https://github.com/Alexhal9000/aim2numpy.git
cd aim2numpy
pip install -e .

Running Tests

To run the tests, use the following command:

python -m unittest discover tests

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or inquiries, please contact your.email@example.com.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

aim2numpy-0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

aim2numpy-0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file aim2numpy-0.1.tar.gz.

File metadata

  • Download URL: aim2numpy-0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for aim2numpy-0.1.tar.gz
Algorithm Hash digest
SHA256 dbf03d51160c2cd46b4325b3a892ee666db2f1891fb8ebb5b66439b3527a2399
MD5 21582c0e6408a2f205777d876a8dd228
BLAKE2b-256 a7fe7be6b11afeee6ab0f4d5afc6f68074753f17b1a5cb1643c7eb2864d6e497

See more details on using hashes here.

File details

Details for the file aim2numpy-0.1-py3-none-any.whl.

File metadata

  • Download URL: aim2numpy-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for aim2numpy-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b0782efa716470faa2936b5e9e4193851c2f2df468911824e2cb0660403469a
MD5 8fec89e506ec6b3f9166e72ab13f389a
BLAKE2b-256 5f7c0c6ce1e929573f47f29028aef9ba658f6a836674a3d670ed1f8e5dc576ac

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