Python library for generating training data for the SDP3 deep learning reconstruction model
Project description
SDP3 CIRFLDSSvDL Documentation
This document describes the functions available through the SDP3 libraries for data augmentation and model training.
Translation
int translations(input_file, translation_amount) This method is used to create translated augmentations of a sinogram whose file path is passed through the input_file parameter. The amount translated is passed through the translation_amount parameter, note this amount must be an integer value. Upon successful completion, the method returns a value of 0, otherwise a value of 1 is returned to signify an error occurred. Given an error is not raised, the method performs vertical and horizontal translations in both positive and negative directions, saving the four new augmented sinograms in the same path as input_file.
Subresolution
int subresolution(file) This method is used to create upscaled augmentations by splicing the original sinogram whose file path is passed through the file parameter, and then upscaling these spliced images. The four augmented sinograms produced are saved in the same directory as file. The method returns a 0 upon successful completion, and returns a 1 otherwise.
Poisson Noise
poisson_noise(image_path, seed=None) This method applies poisson noise to the sinogram whose path is given through the image_path parameter, and the single augmented sinogram is saved in the same directory as image_path. The optional seed parameter allows the user to set a seed for the random number generation used, otherwise no seed is explicitly set. The method does not return anything.
Poisson Noise for Subresolution
subres_poisson_noise(image_path) This method combines the functionality of both the subresolution and poisson noise methods. It takes the sinogram whose path is passed through the image_path parameter, and splices it into four quarter-resolution sinograms, which are then all upscaled back up to the original’s resolution. Then, all four have poisson noise applied to them before being saved in the same directory as image_path. This method does not return anything.
Z-Axis Rotation
z_rotate(image_path, frames) This method produces an augmented sinogram that is rotated around the z-axis. The sinogram that is augmented has its path passed through the image_path parameter, and the number of frames the sinogram is rotated is passed through the frames parameter. Note that an integer must be passed through frames, and that for a 120-frame sinogram, 1 frame is equal to 3 degrees of rotation. The augmented sinogram is saved in the same directory as image_path. This method does not return anything.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sdp3_generation-1.0.1-py3-none-any.whl.
File metadata
- Download URL: sdp3_generation-1.0.1-py3-none-any.whl
- Upload date:
- Size: 41.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a8139b43182d3c9861b8bd61fa2d7ae43f06bc7e51a083b39eb5b20d7275966
|
|
| MD5 |
57fa100f567deee90c64f506c9c60d5a
|
|
| BLAKE2b-256 |
fb8f52bfa752955d6fe44dca0f6f62ad52bb3e8f0c0f3d64b6286e49f5ceb3cc
|