class_docstr: Basic wrapper around DICOM `DataLoaders` with factory methods for segmentation problems
docstr: Create from list of `fnames` in `path`s with `label_func`.
docstr_tok: ["Create","from","list","of","`","fnames","`","in","`","path","`","s","with","`","label_func","`","."]
code: def from_label_func(
      cls,
      path,
      fnames,
      label_func,
      valid_pct=0.2,
      seed=None,
      codes=None,
      item_tfms=None,
      batch_tfms=None,
      **kwargs,
  ):
      "Create from list of `fnames` in `path`s with `label_func`."
      dblock = DataBlock(
          blocks=(ImageBlock(cls=PILDicom), MaskBlock(codes=codes)),
          splitter=RandomSplitter(valid_pct, seed=seed),
          get_y=label_func,
          item_tfms=item_tfms,
          batch_tfms=batch_tfms,
      )
      res = cls.from_dblock(dblock, fnames, path=path, **kwargs)
      return res
  
imports: from __future__ import annotations
  from ..basics import *
  from ..vision.all import *
  from ..data.transforms import *
  import pydicom, kornia, skimage
  from pydicom.dataset import Dataset
  from pydicom.tag import BaseTag
  from pydicom.multival import MultiValue
  from PIL import Image
label_desc: Use image node_id 1 for calling the DicomSegmentationDataLoaders obj's underlying member method code with example usage: obj.from_label_func(cls, path, fnames, label_func, valid_pct, seed, codes, item_tfms, batch_tfms) and returns: res