/// @brief This class encapsulates the raw data of an image.
/// The Image class has a constructor that takes the width, height, and optionally depth of the image, and dynamically allocates a buffer of size width * height * depth to store the image data. The destructor deallocates the buffer to avoid memory leaks.
/// The class provides three accessor methods GetWidth(), GetHeight(), and GetDepth() to query the image dimensions.
/// The GetPixel() method takes the x, y, and z coordinates of the pixel (in row-major order) and returns the corresponding value from the buffer.
/// The SetPixel() method takes the x, y, and z coordinates of the pixel and a value, and sets the corresponding pixel in the buffer to the given value.
/// Note that the GetPixel() and SetPixel() methods use the formula z * width * height + y * width + x to compute the index of the pixel in the buffer. This formula assumes row-major order, where the x coordinate varies fastest, followed by the y coordinate, and then the z coordinate. If the image had a different ordering, the formula would need to be adjusted accordingly.
/// @brief Returns a new image that has been downsampled by a given factor.
/// @param factor Factor by which the image is downsampled. A factor of 2 will halve the width and height, thus reducing the pixel count by a factor of 2^2 = 4.
ImageDownsampled(intfactor)const;
/// @brief Returns a new image that represents the grayscale version of the current image.
/// @return A new image that represents the grayscale version of the current image (average of RGB components).
ImageGrayscale()const;
/// @brief Returns a new image that represents the Luma version of the current image, following the REC709 standard.
/// @return A new image that represents the Luma version of the current image, following the REC709 standard.
/// @brief Performs histrogram normalization on the image (in place). Histogram normalization is a contrast enhancement technique that ensures that the whole range of values is used.
/// All channels are used to compute the histogram, and all channels are normalized using the same global histogram.
/// @param downsampling_factor Downsampling factor to use while computing the histogram.
/// @brief Returns a histrogram-normalized copy of the image. Histogram normalization is a contrast enhancement technique that ensures that the whole range of values is used.
/// All channels are used to compute the histogram, and all channels are normalized using the same global histogram.
/// @param downsampling_factor Downsampling factor to use while computing the histogram.
/// @brief Applies a colormap to the image. After applying the colormap, the image will be 3-channel (RGB). If the image is not single-channel, a unnchanged copy of the image is returned.
/// @param colormap Array of 256*3 values, representing the RGB values of the colormap. Order is R0, G0, B0, R1, G1, B1, etc.
/// All channels are used to compute the histogram. If the downscale factor is a multiple of the number of channels, the histogram will be skewed and will only use the first channel.
/// @param downscale_factor Factor by which the image is downsampled before computing the histogram.