Skip to main content

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


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.

sdp3_generation-1.0.0-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

File details

Details for the file sdp3_generation-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sdp3_generation-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7f1ff915e7e33f31af775f1854757681fa5867871ee27deab08b55318886579c
MD5 d8a9393efe6132065085641b9986bced
BLAKE2b-256 cefb19bba997dbe9c9aac34785065982d463cffcab07ed4136894027e577bc69

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