opendefocus
This crate serves as the public interface to OpenDefocus. Bindings to other language should be made here.
Structure
- lib.rs: the public API to the OpenDefocus crate. Includes the struct to invoke rendering and datastructure bindings.
- error.rs: public error struct and alias to result which is globally used for reporting errors.
- abort.rs: thread safe status which is checked to early out of renders
- traits.rs: global trait to work with more datatypes than f32 only
- renders: specific rendering operations except convolution itself
- focal_plane_setup.rs: overlay renderer which makes it clear for the user what is in and out of focus
- resize.rs: mipmap generator, simple resizer to work with more datatypes. Just anything related to actual resizing of images.
- preprocessor.rs: any operations we need to perform on the image before starting convolution
- runners: universal api to invoke the renderer to the GPU or CPU
- runner.rs: trait implemnentation for ConvolveRunner with shared code and required implementaitons by downstream traits
- shared_runner.rs: wrapper trait that represents all runners into a single runner
- cpu.rs: implementation of the ConvolveRunner for CPU based rendering
- wgpu.rs: implementation of the ConvolveRunner for GPU based rendering
- shaders: included wgsl shaders to use for convolution, these are automatically generated by the spirv codegen.
- worker: rendering operator which handles the rendering process and call necessary functions