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 | |
|---|---|---|---|---|
![]() |
ioState | EnumerateFilesRandomState | ||
![]() |
inDirectory | str | Input directory | |
![]() |
inFileType | ImageFileFormat | None | None | File format of the images |
![]() |
inSeed | int | None | None | Random seed used to determine random sorting order |
![]() |
inRepeat | bool | False | Determines whether to repeat reading directory after reading all files |
![]() |
inProcessSubdirectories | bool | False | Flag indicating whether to load images from the subdirectories or not |
![]() |
inInvert | bool | False | Flag indicating whether to enumerate images backwards or not |
![]() |
inLoadAlphaChannel | bool | False | Flag indicating whether to load alpha channel of the image or not |
![]() |
inDelay | int | 0 | Minimum time between iterations in milliseconds |
![]() |
outImage | Image | Output image | |
![]() |
outFilePath | str | Output file path | |
![]() |
outFileName | str | Output file name | |
![]() |
outIsFirst | bool | Flag indicating the first iteration | |
![]() |
outIsLast | bool | Flag indicating the last iteration |



