docstr: xform cls testing itk consistency
docstr_tok: ["xform","cls","testing","itk","consistency"]
code: def test_linear_consistent(self, xform_cls, input_dict, atol):
      """xform cls testing itk consistency"""
      img = LoadImage(image_only=True, simple_keys=True)(FILE_PATH)
      img = EnsureChannelFirst()(img)
      ref_1 = _create_itk_obj(img[0], img.affine)
      output = self.run_transform(img, xform_cls, input_dict)
      ref_2 = _create_itk_obj(output[0], output.affine)
      assert_allclose(
          output.pixdim, np.asarray(ref_2.GetSpacing()), type_test=False
      )
      expected = _resample_to_affine(ref_1, ref_2)
      # compare ref_2 and expected results from itk
      diff = np.abs(
          itk.GetArrayFromImage(ref_2) - itk.GetArrayFromImage(expected)
      )
      avg_diff = np.mean(diff)
  
      self.assertTrue(
          avg_diff < atol,
          f"{xform_cls} avg_diff: {avg_diff}, tol: {atol}",
      )
  
file_path: MONAI/tests/test_meta_affine.py
imports: from __future__ import annotations
  import os
  import unittest
  from copy import deepcopy
  import numpy
  from parameterized import parameterized
  from monai.data.image_writer import ITKWriter
  from monai.transforms import Compose, EnsureChannelFirst, EnsureChannelFirstd, LoadImage, LoadImaged, MapTransform, Orientation, Orientationd, Randomizable, Spacing, Spacingd, Transform
  from monai.utils import convert_data_type, optional_import
  from tests.utils import assert_allclose, download_url_or_skip_test, testing_data_config
label_desc: Use image node_id 3 for calling the TestAffineConsistencyITK obj's underlying member method code with example usage: obj.test_linear_consistent(xform_cls, input_dict, atol) without return types