High-Level Functions

leapctype.tomographicModels.set_gpus(self, listOfGPUs)

Set which GPUs to use when doing multi-GPU calculations

leapctype.tomographicModels.copy_parameters(self, leapct)

Copies the parameters from another instance of this class

leapctype.tomographicModels.copy_to_device(self, x)

Copies the given argument to a torch tensor on the primary gpu

This function is just provided for convenience and is not necessary for any LEAP process.

Parameters:

x (numpy array or torch tensor) – data to copy to device number defined by get_gpu()

Returns:

torch tensor on the specified GPU

leapctype.tomographicModels.reset(self)

Resets and clears all parameters

leapctype.tomographicModels.about(self)

prints info about LEAP, including the version number

leapctype.tomographicModels.version(self)

Returns version number string

leapctype.tomographicModels.print_parameters(self)

prints all CT geometry and CT volume parameters to the screen

leapctype.tomographicModels.set_log_error(self)

Sets logging level to logERROR

This logging level prints out the fewest statements (only error statements)

leapctype.tomographicModels.set_log_warning(self)

Sets logging level to logWARNING

This logging level prints out the second fewest statements (only error and warning statements) and is the default setting. It includes iterative reconstruction warnings and iteration number.

leapctype.tomographicModels.set_log_status(self)

Sets logging level to logSTATUS

This logging level prints out the second most statements, including iterative reconstruction cost at every iteration (these extra computations will slow down processing)

leapctype.tomographicModels.set_log_debug(self)

Sets logging level to logDEBUG

This logging level prints out the most statements

leapctype.tomographicModels.set_maxSlicesForChunking(self, N)

This function effects how forward and backprojection jobs are divided into multiple processing jobs on the GPU

Smaller numbers use less GPU memory, but may slow down processing. Only use this function if you know what you are doing.

For forward projection it specifies the maximum number of detector rows used per job. For backprojection it specifies the maximum number of CT volume z-slices used per job.

Parameters:

N (int) – the chunk size

leapctype.tomographicModels.display(self, vol)

Uses napari to display the provided 3D data

leapctype.tomographicModels.sketch_system(self, whichView=None)

Uses matplot lib to sketch the CT geometry and CT volume

The CT geometry parameters and the CT volume parameters must be set prior to running this function.

Parameters:

whichView (int) – if provided displays the source and detector at the specified view index