Compute Library
17.10
|
Class to load the content of a PPM file into an Image. More...
#include <Utils.h>
Public Member Functions | |
PPMLoader () | |
void | open (const std::string &ppm_filename) |
Open a PPM file and reads its metadata (Width, height) More... | |
bool | is_open () |
Return true if a PPM file is currently open. More... | |
template<typename T > | |
void | init_image (T &image, arm_compute::Format format) |
Initialise an image's metadata with the dimensions of the PPM file currently open. More... | |
template<typename T > | |
void | fill_image (T &image) |
Fill an image with the content of the currently open PPM file. More... | |
|
inline |
|
inline |
Fill an image with the content of the currently open PPM file.
[in,out] | image | Image to fill (Must be allocated, and of matching dimensions with the opened PPM). |
Definition at line 187 of file Utils.h.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN, ARM_COMPUTE_ERROR_ON_MSG, ARM_COMPUTE_UNUSED, Window::DimX, Window::DimY, arm_compute::execute_window_loop(), PPMLoader::is_open(), arm_compute::utils::map(), Iterator::ptr(), arm_compute::RGB888, Window::set(), arm_compute::U8, and arm_compute::utils::unmap().
Referenced by main_cl_convolution(), main_cl_events(), main_neon_cartoon_effect(), main_neon_convolution(), main_neon_scale(), and main_neoncl_scale_median_gaussian().
|
inline |
Initialise an image's metadata with the dimensions of the PPM file currently open.
[out] | image | Image to initialise |
[in] | format | Format to use for the image (Must be RGB888 or U8) |
Definition at line 170 of file Utils.h.
References ARM_COMPUTE_ERROR_ON, PPMLoader::is_open(), arm_compute::RGB888, and arm_compute::U8.
Referenced by main_cl_convolution(), main_cl_events(), main_neon_cartoon_effect(), main_neon_convolution(), main_neon_scale(), and main_neoncl_scale_median_gaussian().
|
inline |
Return true if a PPM file is currently open.
Definition at line 159 of file Utils.h.
Referenced by PPMLoader::fill_image(), PPMLoader::init_image(), main_cl_convolution(), main_cl_events(), main_neon_cartoon_effect(), main_neon_convolution(), main_neon_scale(), main_neoncl_scale_median_gaussian(), and PPMLoader::open().
|
inline |
Open a PPM file and reads its metadata (Width, height)
[in] | ppm_filename | File to open |
Definition at line 139 of file Utils.h.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_MSG, PPMLoader::is_open(), and arm_compute::utils::parse_ppm_header().
Referenced by main_cl_convolution(), main_cl_events(), main_neon_cartoon_effect(), main_neon_convolution(), main_neon_scale(), and main_neoncl_scale_median_gaussian().