Macro for numbering colored patterns

Hello. I would like to ask you for help in creating a macro that will be numbered sequentially colored patterns as I showed in the picture.
I use corel to generate these random patterns and then I use them to create procedural textures in a 3d application.
One of the information I need is the order of the individual stripes, so far I have numbered them by hand, but with more complicated patterns it takes a lot of time, so I thought that maybe it is possible for corel to do it automatically.
Thanks for any suggestions.

Pattern