class_docstr: torch.autograd.Function for the TrainableBilateralFilter layer.
  
  See:
      F. Wagner, et al., Ultralow-parameter denoising: Trainable bilateral filter layers in
      computed tomography, Medical Physics (2022), https://doi.org/10.1002/mp.15718
  
  Args:
      input: input tensor to be filtered.
      sigma x: trainable standard deviation of the spatial filter kernel in x direction.
      sigma y: trainable standard deviation of the spatial filter kernel in y direction.
      sigma z: trainable standard deviation of the spatial filter kernel in z direction.
      color sigma: trainable standard deviation of the intensity range kernel. This filter
          parameter determines the degree of edge preservation.
  
  Returns:
      output (torch.Tensor): filtered tensor.
class_docstr_tok: ["torch.autograd.Function","for","the","TrainableBilateralFilter","layer",".","See",":","F.","Wagner",",","et","al.",",","Ultralow-parameter","denoising",":","Trainable","bilateral","filter","layers","in","computed","tomography",",","Medical","Physics","(","2022",")",",","https",":","\/\/doi.org\/10.1002\/mp.15718","Args",":","input",":","input","tensor","to","be","filtered",".","sigma","x",":","trainable","standard","deviation","of","the","spatial","filter","kernel","in","x","direction",".","sigma","y",":","trainable","standard","deviation","of","the","spatial","filter","kernel","in","y","direction",".","sigma","z",":","trainable","standard","deviation","of","the","spatial","filter","kernel","in","z","direction",".","color","sigma",":","trainable","standard","deviation","of","the","intensity","range","kernel",".","This","filter","parameter","determines","the","degree","of","edge","preservation",".","Returns",":","output","(","torch.Tensor",")",":","filtered","tensor","."]
code: def forward(ctx, input_img, sigma_x, sigma_y, sigma_z, color_sigma):
      (
          output_tensor,
          output_weights_tensor,
          do_dx_ki,
          do_dsig_r,
          do_dsig_x,
          do_dsig_y,
          do_dsig_z,
      ) = _C.tbf_forward(
          input_img, sigma_x, sigma_y, sigma_z, color_sigma
      )
  
      ctx.save_for_backward(
          input_img,
          sigma_x,
          sigma_y,
          sigma_z,
          color_sigma,
          output_tensor,
          output_weights_tensor,
          do_dx_ki,
          do_dsig_r,
          do_dsig_x,
          do_dsig_y,
          do_dsig_z,
      )
  
      return output_tensor
  
imports: from __future__ import annotations
  import torch
  from monai.utils.module import optional_import
label_desc: Use image node_id 1 for calling the TrainableBilateralFilterFunction obj's underlying member method code with example usage: obj.forward(ctx, input_img, sigma_x, sigma_y, sigma_z, color_sigma) and returns: output_tensor