class_docstr: generate randomised bias field transformation for data augmentation
class_docstr_tok: ["generate","randomised","bias","field","transformation","for","data","augmentation"]
docstr: Sampling of the appropriate number of coefficients for the creation
  of the bias field map
  :param spatial_rank: spatial rank of the image to modify
  :return:
docstr_tok: ["Sampling","of","the","appropriate","number","of","coefficients","for","the","creation","of","the","bias","field","map",":","param","spatial_rank",":","spatial","rank","of","the","image","to","modify",":","return",":"]
code: def _generate_bias_field_coeffs(self, spatial_rank):
      """
      Sampling of the appropriate number of coefficients for the creation
      of the bias field map
      :param spatial_rank: spatial rank of the image to modify
      :return:
      """
      rand_coeffs = []
      if spatial_rank == 3:
          for order_x in range(0, self.order + 1):
              for order_y in range(0, self.order + 1 - order_x):
                  for order_z in range(
                      0, self.order + 1 - (order_x + order_y)
                  ):
                      rand_coeff_new = np.random.uniform(
                          self.min_coeff, self.max_coeff
                      )
                      rand_coeffs.append(rand_coeff_new)
      else:
          for order_x in range(0, self.order + 1):
              for order_y in range(0, self.order + 1 - order_x):
                  rand_coeff_new = np.random.uniform(
                      self.min_coeff, self.max_coeff
                  )
                  rand_coeffs.append(rand_coeff_new)
      self._bf_coeffs = rand_coeffs
  
file_path: NiftyNet/niftynet/layer/rand_bias_field.py
imports: from __future__ import absolute_import, print_function
  import numpy
  from niftynet.layer.base_layer import RandomisedLayer
label_desc: Use image node_id 5 for calling the RandomBiasFieldLayer obj's underlying member method code with example usage: obj._generate_bias_field_coeffs(spatial_rank) without return types