Hello @reox,
The SimpleITK process object has a method SetGlobalDefaultNumberOfThreads:
import SimpleITK as sitk
MAX_THREADS = 3
sitk.ProcessObject.SetGlobalDefaultNumberOfThreads(MAX_THREADS)
There’s the matching Get method so that you can find out what is the global default number of threads.