Why is the output overlay not visible or incorrectly placed on the input image?ΒΆ

For proper placement of the overlay, it is important to specify the correct voxel spacing, origin, and direction for image outputs that should be shown as overlays on the input images. When using
output_sitk_img = SimpleITK.GetImageFromArray(numpy_array)
SimpleITK will set default values that might not correspond with the input image resulting in an incorrectly placed overlay.

Use
output_sitk_img.CopyInformation(input_sitk_img)
to copy the origin, spacing and direction values from the input image to the output image to ensure they correspond.