code: def test_set_fov():
      I = make_xyz_image(make_data_int16(), dummy_affine, "scanner")
      J = make_xyz_image(I.get_fdata().copy(), dummy_affine, "scanner")
      R = HistogramRegistration(I, J)
      R.set_fov(npoints=np.prod(I.shape))
      assert R._from_data.shape == I.shape
      half_shape = tuple([I.shape[i] / 2 for i in range(3)])
      R.set_fov(spacing=(2, 2, 2))
      assert R._from_data.shape == half_shape
      R.set_fov(corner=half_shape)
      assert R._from_data.shape == half_shape
      R.set_fov(size=half_shape)
      assert R._from_data.shape == half_shape
  
imports: import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ....core.image.image_spaces import make_xyz_image
  from ....testing import assert_almost_equal
  from .._registration import _joint_histogram
  from ..affine import Affine, Rigid
  from ..histogram_registration import HistogramRegistration
label_desc: Use image node_id 28 for calling a global function with example usage: test_set_fov() without return types