class_docstr: Class to represent a dataset of rays.
  
  Args:
      cameras: scene cameras: PinholeCamera
      min_depth: sampled rays minimal depth from cameras: float
      max_depth: sampled rays maximal depth from cameras: float
      ndc: convert ray parameters to normalized device coordinates: bool
      device: device for ray tensors: Union[str, torch.device]
      dtype: type of ray tensors: torch.dtype
docstr: Initializes a random ray sampler and calculates dataset ray parameters.
  
  Args:
      num_img_rays: If not None, number of rays to randomly cast from each camers: math: `(B)`.
docstr_tok: ["Initializes","a","random","ray","sampler","and","calculates","dataset","ray","parameters",".","Args",":","num_img_rays",":","If","not","None",",","number","of","rays","to","randomly","cast","from","each","camers",":","math",":","`","(","B",")","`","."]
code: def _init_random_ray_dataset(self, num_img_rays: Tensor) -> None:
      r"""Initializes a random ray sampler and calculates dataset ray parameters.
  
      Args:
          num_img_rays: If not None, number of rays to randomly cast from each camers: math: `(B)`.
      """
      self._ray_sampler = RandomRaySampler(
          self._min_depth,
          self._max_depth,
          self._ndc,
          device=self._device,
          dtype=self._dtype,
      )
      self._ray_sampler.calc_ray_params(self._cameras, num_img_rays)
  
imports: from typing import TYPE_CHECKING, List, Optional, Sequence, Tuple, Union
  import torch
  from torch.utils.data import BatchSampler, DataLoader, Dataset, RandomSampler, SequentialSampler
  from typing_extensions import TypeGuard
  from kornia.core import Device, Tensor, stack
  from kornia.geometry.camera import PinholeCamera
  from kornia.io import ImageLoadType, load_image
  from kornia.nerf.core import Images, ImageTensors
  from kornia.nerf.samplers import RandomRaySampler, RaySampler, UniformRaySampler
label_desc: Use image node_id 4 for calling the RayDataset obj's underlying member method code with example usage: obj._init_random_ray_dataset(num_img_rays) without return types