code: def test_cyclic_conversion(self, filepath):
      image = self.reader.read(os.path.join(self.data_dir, filepath))
      image[:] = self.remove_border(image)
      ndim = image.ndim
  
      # ITK matrix (3x3 affine matrix)
      matrix = np.array(
          [
              [2.90971094, 1.18297296, 2.60008784],
              [0.29416137, 0.10294283, 2.82302616],
              [1.70578374, 1.39706003, 2.54652029],
          ]
      )[:ndim, :ndim]
  
      translation = [-29.05463245, 35.27116398, 48.58759597][:ndim]
  
      # Spatial properties
      center_of_rotation = [-27.84789587, -60.7871084, 42.73501932][
          :ndim
      ]
      origin = [8.10416794, 5.4831944, 0.49211025][:ndim]
      spacing = np.array([0.7, 3.2, 1.3])[:ndim]
  
      direction = np.array(
          [
              [1.02895588, 0.22791448, 0.02429561],
              [0.21927512, 1.28632268, -0.14932226],
              [0.47455613, 0.38534345, 0.98505633],
          ],
          dtype=np.float64,
      )
      image.SetDirection(direction[:ndim, :ndim])
  
      image.SetSpacing(spacing)
      image.SetOrigin(origin)
  
      affine_matrix = itk_to_monai_affine(
          image, matrix, translation, center_of_rotation
      )
      matrix_result, translation_result = monai_to_itk_affine(
          image, affine_matrix, center_of_rotation
      )
  
      meta_tensor = itk_image_to_metatensor(image)
      image_result = metatensor_to_itk_image(meta_tensor)
  
      np.testing.assert_allclose(matrix, matrix_result)
      np.testing.assert_allclose(translation, translation_result)
      np.testing.assert_array_equal(image.shape, image_result.shape)
      np.testing.assert_array_equal(image, image_result)
  
imports: from __future__ import annotations
  import itertools
  import os
  import tempfile
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  import monai
  import monai.transforms
  from monai.apps import download_url
  from monai.data import ITKReader
  from monai.data.itk_torch_bridge import get_itk_image_center, itk_image_to_metatensor, itk_to_monai_affine, metatensor_to_itk_image, monai_to_itk_affine, monai_to_itk_ddf
  from monai.networks.blocks import Warp
  from monai.transforms import Affine
  from monai.utils import optional_import, set_determinism
  from tests.utils import assert_allclose, skip_if_downloading_fails, skip_if_quick, test_is_quick, testing_data_config
label_desc: Use image node_id 12 for calling the TestITKTorchAffineMatrixBridge obj's underlying member method code with example usage: obj.test_cyclic_conversion(filepath) without return types