FIX IMAGING BUG
In imaging the routine setupRandomSequence was not checking if the number of threads
was less or equal than the size of the rand state array