# Using LandmarkBasedTransformInitializer for BSpline registrations

**URL:** https://discourse.itk.org/t/using-landmarkbasedtransforminitializer-for-bspline-registrations/4096
**Category:** Algorithms
**Tags:** registration, python, simpleitk
**Created:** [May 4, 2021, 7:57pm UTC](https://discourse.itk.org/t/using-landmarkbasedtransforminitializer-for-bspline-registrations/4096 "2021-05-04T19:57:17Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [July 19, 2021, 5:00pm UTC](https://discourse.itk.org/t/using-landmarkbasedtransforminitializer-for-bspline-registrations/4096/13 "2021-07-19T17:00:47Z")

</div>

Hi Yoav,

Yes, defining an arbitrary finite domain is different from using the whole image. Because the toolkit’s focus is on images, we implicitly assume that there is an image and that we are interested in its whole domain (the image’s physical extent).

To define an arbitrary domain, just create an appropriate image (defaults to all zeros) and feed that to the initializer:

```auto
x_size = 256
y_size = 128
z_size = 64
dummy = sitk.Image([x_size, y_size_, z_size], sitk.sitkUInt8)
dummy.SetOrigin([2,4,8])
dummy.SetSpacing((0.5,0.5,2)) 

```

Documentation that introduces the [toolkit fundamental concepts](https://simpleitk.readthedocs.io/en/master/fundamentalConcepts.html), common conventions, installation instructions, and short examples can be found on [read-the-docs](https://simpleitk.readthedocs.io/en/master/index.html). Hopefully these are easier to digest than the C++ docs or the notebooks.

---

_[View the full topic](https://discourse.itk.org/t/using-landmarkbasedtransforminitializer-for-bspline-registrations/4096)._
