SuperElastix / SimpleElastix

Multi-lingual medical image registration library
http://simpleelastix.github.io
Apache License 2.0
507 stars 149 forks source link

Make SimpleElastix more deterministic by setting RandomSeed #460

Open szatidani opened 2 years ago

szatidani commented 2 years ago

Hi @kaspermarstal

We face an issue when trying to use SimpleElastix in a deterministic and reproducible fashion through the python interface. It is breaking our testing environment and our efforts to make reproducible experiments ran after each other in the same interpreter.

As mentioned before in #122, RandomSeed parameter can't be set / it is ignored in SimpleElastix. A possible approach was mentioned in Elastix:

"[...] my guess is that the library interface should include calls to ElastixBase::BeforeAllBase( void ) to set/reset the seed."

Originally posted by @mstaring in https://github.com/SuperElastix/elastix/issues/25#issuecomment-405201921

Could you please take a look? Thanks!