Code base obscuration (for images) 1.0
It implements different obscuration methods on portable images (.pgm and .ppm)
Loading...
Searching...
No Matches
filesystemPGM Class Reference

Utility class for handling .pgm image files. More...

#include <filesystemPGM.hpp>

Static Public Member Functions

static bool is_pgm (const std::string &extension)
 Check if the file extension is .pgm.
 
static void getFilePathsOfPGMFilesFromFolder (std::vector< std::string > &imagePaths, std::string folderPath)
 Get the file paths of all .pgm images in a folder.
 

Detailed Description

Utility class for handling .pgm image files.

This class provides functions for checking if a file extension is .pgm and for retrieving the file paths of all .pgm images in a folder. It is inspired by Norman Hutte's Functions.h.

Author
Katia Auxilien

Member Function Documentation

◆ getFilePathsOfPGMFilesFromFolder()

void filesystemPGM::getFilePathsOfPGMFilesFromFolder ( std::vector< std::string > & imagePaths,
std::string folderPath )
static

Get the file paths of all .pgm images in a folder.

Parameters
imagePathsVector to store the file paths of the .pgm images
folderPathPath of the folder to search for .pgm images

This function clears the imagePaths vector and then iterates through all the files in the folder specified by folderPath. If a file is a regular file (not a directory) and its extension is .pgm, the file path is added to the imagePaths vector.

Authors
Norman Hutte, Katia Auxilien
Date
11 April 2024

◆ is_pgm()

bool filesystemPGM::is_pgm ( const std::string & extension)
static

Check if the file extension is .pgm.

Parameters
extensionThe file extension to check
Returns
True if the extension is .pgm, false otherwise
Authors
Norman Hutte, Katia Auxilien
Date
11 April 2024