ImageMaskSaverOptions
ImageMaskSaverOptions
Options for saving 2D MaskData to binary image files. More…
#include <Mask_Data_Image.hpp>
Public Attributes
| Name | |
|---|---|
| std::string | parent_dir |
| std::string | image_format |
| std::string | filename_prefix |
| int | frame_number_padding |
| int | image_width |
| int | image_height |
| int | background_value |
| int | mask_value |
| bool | overwrite_existing |
Detailed Description
struct ImageMaskSaverOptions;Options for saving 2D MaskData to binary image files.
This saver creates a directory containing binary (black and white) image files where each file represents a mask for a specific frame. The filename will contain the frame number, optionally with a prefix.
Public Attributes Documentation
variable parent_dir
std::string parent_dir = ".";The directory where binary image files will be saved.
variable image_format
std::string image_format = "PNG";Image format to save (e.g., “PNG”, “BMP”, “TIFF”).
variable filename_prefix
std::string filename_prefix = "";Optional prefix before the frame number in filenames (e.g., “mask_” for “mask_0001.png”).
variable frame_number_padding
int frame_number_padding = 4;Number of digits for zero-padding frame numbers (e.g., 4 for “0001”).
variable image_width
int image_width = 640;Width of the output images in pixels.
variable image_height
int image_height = 480;Height of the output images in pixels.
variable background_value
int background_value = 0;Pixel value for background (non-mask) pixels (0-255).
variable mask_value
int mask_value = 255;Pixel value for mask pixels (0-255).
variable overwrite_existing
bool overwrite_existing = false;If true, overwrite existing files. If false, skip existing files and continue with next file.
Updated on 2026-11-13 at 20:25:39 +0000