[Insight-users] Missing use of ReinitializeSeed in MutualInfo.
metric?
Erik Harg
Erik.Harg at idi.ntnu.no
Mon May 2 09:59:15 EDT 2005
On Mon, 2 May 2005, Luis Ibanez wrote:
>
> Hi Erik,
>
> The reason why we cannot put the quasi-random initialization
> of the seed directly in the constructor of the Metric is that
> it will then be impossible to have repeatable experiments for
> the testing suite and for people who perform registration in
> a systematic way.
>
I do agree that including the quasi-random init. of the seed in the
constructor of the Metric would make it, by *default*, non-deterministic,
and make it "impossible to have repeatable experiments" (still, by
default).
> The initialization of the seed cannot be enforced in the constructor
> because some applications need it and some others don't. It is then
> up to the application developer to make the decision on whether the
> seed must be initialized or not.
>
Would it not be possible for this situation to be reversed? While, with my
suggestions, the metric would *by default* be non-repeating, wouldn't it
then be possible for those application developers that need a fixed seed
to supply it (right after the metric object is construced, but before the
random no. generator is used)? Or am I missing something entirely here?
I guess this all comes down to whether one believes that the default
behaviour of the metric should be deterministic and repeatable or
quasi-random and non-repeatable?
> We agree in that we must include a more detailed discussion of this issue in
> the next edition of the ITK Software Guide.
>
*That* we do agree on, at least! :-)
I do not wish to press the issue here, and it was really just a minor
thing I noted, that was basically undocumented. In my naïvity I assumed
that metrics that use rand*() calls seed them "nicely", and since it was
not mentioned in either the Software Guide or the Doxygen documentation
that the user was supposed to use the ReinitializeSeed() functions to
ensure seeding, I was a little bit surprised to find that the metric did
not by default seed the rand*() function. Sorry to bother you all so much
with such a small issue.
Well, well, with a line about this in the Doxygen doc and/or the Software
Guide, I'd be more than happy to keep my
metric->ReinitializeSeed();
line in my programs that need it.
Regards,
Erik
--
*----------------------------------------------------------*
| Erik Harg 924 98 541 Erik.Harg at idi.ntnu.no |
| NTNU - Trondheim |
*----------------------------------------------------------*
More information about the Insight-users
mailing list