class_docstr: creates a test generator that iterates over entire given dataset returning 1 patient per batch.
  Can be used for monitoring if cf.val_mode = 'patient_val' for a monitoring closer to actualy evaluation (done in 3D),
  if willing to accept speed-loss during training.
  :return: out_batch: dictionary containing one patient with batch_size = n_3D_patches in 3D or
  batch_size = n_2D_patches in 2D .
code: def preprocess_patient(self, path):
      x = sitk.ReadImage(os.path.join(path, "lsa_ct.nii.gz"))
      p = sitk.ReadImage(os.path.join(path, "lsa_pet.nii.gz"))
  
      x_spacing = x.GetSpacing()
      if x_spacing[0] < 0.95 or x_spacing[2] < 3:
          new_spacing = (0.976562, 0.976562, 3.27)
          new_size = [
              int(x.GetSize()[ii] * x_spacing[ii] / new_spacing[ii])
              for ii in range(3)
          ]
          reference_image = sitk.Image(new_size, x.GetPixelIDValue())
          reference_image.SetOrigin(x.GetOrigin())
          reference_image.SetDirection(x.GetDirection())
          reference_image.SetSpacing(new_spacing)
  
          # Resample without any smoothing.
          x = sitk.Resample(x, reference_image)
  
      resampler = sitk.ResampleImageFilter()
      resampler.SetReferenceImage(x)
      # §resampler.SetInterpolator()  # default linear
      rp = resampler.Execute(p)
      pi = sitk.GetArrayFromImage(rp)
      xi = sitk.GetArrayFromImage(x)
  
      zmin, zmax = pp.get_z_crops(xi, 0)
      x = xi[zmin:zmax]
      p = pi[zmin:zmax]
      x = np.clip(x, -1200, 600)
      x = (1200 + x) / (600 + 1200)  # (x-a) / (b-a) * (c-d)
      x = (x - np.mean(x)) / np.std(x)
      p = np.clip(p, 0, 2)
      p = (p) / (2)
      p = p - np.mean(p) / np.std(p)
      return np.concatenate((x[None], p[None])).astype(np.float32)
  
imports: import numpy
  import os
  from collections import OrderedDict
  import pandas
  import pickle
  import time
  import subprocess
  import utils.dataloader_utils
  import preprocessing
  from batchgenerators.dataloading.data_loader import SlimDataLoaderBase
  from batchgenerators.transforms.spatial_transforms import MirrorTransform
  from batchgenerators.transforms.abstract_transforms import Compose
  from batchgenerators.dataloading.multi_threaded_augmenter import MultiThreadedAugmenter
  from batchgenerators.dataloading import SingleThreadedAugmenter
  from batchgenerators.transforms.spatial_transforms import SpatialTransform
  from batchgenerators.transforms.crop_and_pad_transforms import CenterCropTransform
  from batchgenerators.transforms.utility_transforms import ConvertSegToBoundingBoxCoordinates
  import SimpleITK
label_desc: Use image node_id 2 for calling the PatientBatchIterator obj's underlying member method code with example usage: obj.preprocess_patient(path) and returns: np