EnumerateImages_Random


Scans a disk directory for image files and then returns the images one by one in consecutive iterations sorted randomly.

Applications:Emulates image acquisition with images stored on disk.

Syntax

C++
Python
 
def EnumerateImages_Random(
	state: EnumerateFilesRandomState,
	inDirectory: str,
	outImage: Image,
	/,
	*,
	inFileType: ImageFileFormat | None = None,
	inSeed: int | None = None,
	inRepeat: bool = False,
	inProcessSubdirectories: bool = False,
	inInvert: bool = False,
	inLoadAlphaChannel: bool = False,
	inDelay: int = 0
)
-> (
	outResult: bool,
	outFilePath: str,
	outFileName: str,
	outIsFirst: bool,
	outIsLast: bool
)

Parameters

Name Type Default Description
Input will be modified ioState EnumerateFilesRandomState
Input value inDirectory str Input directory
Input value inFileType ImageFileFormat | None None File format of the images
Input value inSeed int | None None Random seed used to determine random sorting order
Input value inRepeat bool False Determines whether to repeat reading directory after reading all files
Input value inProcessSubdirectories bool False Flag indicating whether to load images from the subdirectories or not
Input value inInvert bool False Flag indicating whether to enumerate images backwards or not
Input value inLoadAlphaChannel bool False Flag indicating whether to load alpha channel of the image or not
Input value inDelay int 0 Minimum time between iterations in milliseconds
Output value outImage Image Output image
Output value outFilePath str Output file path
Output value outFileName str Output file name
Output value outIsFirst bool Flag indicating the first iteration
Output value outIsLast bool Flag indicating the last iteration