# Image Registration with Pseudo-Random Sampling throws exception randomly (maybe bug)

**URL:** <https://discourse.itk.org/t/image-registration-with-pseudo-random-sampling-throws-exception-randomly-maybe-bug/1513>\
**Category:** Engineering\
**Tags:** registration\
**Created:** [January 10, 2019, 8:37am UTC](https://discourse.itk.org/t/image-registration-with-pseudo-random-sampling-throws-exception-randomly-maybe-bug/1513 "2019-01-10T08:37:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [January 10, 2019, 4:27pm UTC](https://discourse.itk.org/t/image-registration-with-pseudo-random-sampling-throws-exception-randomly-maybe-bug/1513/2 "2019-01-10T16:27:36Z")

</div>

Which version of ITK are you using, 4.13.1 or some recent master?@blowekamp made some changes to virtual image part of registration framework, so he might know more. See the [discussion](https://discourse.itk.org/t/imageregistrationmethodv4-virtualimage-with-sparsesampling/1159).

Since you are dividing your overall video by frames, it is possible that the crashing can occur in each segment of frames, and which one is encountered first depends on operating system’s scheduling of threads. For example, if the crash is on index 5, it means thread 0 reached its crashing point first. If the crash is on index 1605, it means thread 2 reached its crashing point first.

---

_[View the full topic](https://discourse.itk.org/t/image-registration-with-pseudo-random-sampling-throws-exception-randomly-maybe-bug/1513)._
