ARM Compute Library
17.04
|
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, 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 142 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(), Iterator::ptr(), arm_compute::RGB888, Window::set(), and arm_compute::U8.
Referenced by main_cl_convolution(), main_cl_events(), 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 125 of file Utils.h.
References ARM_COMPUTE_ERROR_ON, arm_compute::RGB888, and arm_compute::U8.
Referenced by main_cl_convolution(), main_cl_events(), 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 114 of file Utils.h.
Referenced by main_cl_convolution(), main_cl_events(), main_neon_convolution(), main_neon_scale(), and main_neoncl_scale_median_gaussian().
|
inline |
Open a PPM file and reads its metadata (Width, height)
[in] | ppm_filename | File to open |
Definition at line 94 of file Utils.h.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_MSG, and test_helpers::parse_ppm_header().
Referenced by main_cl_convolution(), main_cl_events(), main_neon_convolution(), main_neon_scale(), and main_neoncl_scale_median_gaussian().