[Help wanted] Want to registrate two images and merge them (like tutorial notebook7)

Hello, I’m new to SimpleITK. My goal is to registrate two 2D image and merge them into a bigger one. I noticed that it is similar to the function of Tutorial notebook7, the only difference is that the fixed image is not under the moving image but at the left side of it.
I modified the code to this:

minimal_overlap = np.array(
                (moving_image.GetWidth() - self._min_column_overlap, -self._row_overlap)
        ) - np.array(fixed_image.GetOrigin())
        maximal_overlap = np.array(
                (moving_image.GetWidth() - self._max_column_overlap, self._row_overlap)
        ) - np.array(fixed_image.GetOrigin())


metric_sampling_percentage = 0.5
row_overlap = 0.2 * left_image.GetHeight()
min_column_overlap = 20
max_column_overlap = 0.4 * left_image.GetWidth()
dx_step_num = 15
dy_step_num = 15

But there are just no valid candidate.

This is the sample image.

If your problem is translation-only, you should consider ITK Montage. Here is a code example, and example of TileConfiguration.txt.

Thanks for your reply, it looks good. I’ll have a try next.