class_docstr: group of user specified constraints for choosing window samples
class_docstr_tok: ["group","of","user","specified","constraints","for","choosing","window","samples"]
code: def __init__(
      self,
      compulsory_labels=(0, 1),
      min_ratio=0.000001,
      min_num_labels=2,
      flag_proba_uniform=False,
  ):
      self.list_labels = compulsory_labels
      self.min_ratio = min_ratio
      self.num_labels = min_num_labels
      self.proba_connected = flag_proba_uniform
  
file_path: NiftyNet/niftynet/contrib/segmentation_selective_sampler/sampler_selective.py
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import tensorflow
  from scipy import ndimage
  from scipy.signal import fftconvolve
  from niftynet.engine.image_window import N_SPATIAL
  from niftynet.engine.sampler_uniform_v2 import UniformSampler
label_desc: Use image node_id 1 to create a new Constraint object from inherited base classes: object with example: obj = Constraint(compulsory_labels, min_ratio, min_num_labels, flag_proba_uniform)