class_docstr: Defines histogram-based GraphCut task for Generic segmentation from the following paper:
  
  Wang, Guotai, et al. "Interactive medical image segmentation using deep learning with image-specific fine tuning."
  IEEE transactions on medical imaging 37.7 (2018): 1562-1573. (preprint: https://arxiv.org/pdf/1710.04043.pdf)
  
  This task takes as input 1) original image volume and 2) scribbles from user
  indicating foreground and background regions. A likelihood volume is generated using histogram method.
  User-scribbles are incorporated using Equation 7 on page 4 of the paper.
  
  numpymaxflow's GraphCut layer is used to optimise Equation 5 from the paper, where unaries come from Equation 7
  and pairwise is the original input volume.
class_docstr_tok: ["Defines","histogram-based","GraphCut","task","for","Generic","segmentation","from","the","following","paper",":","Wang",",","Guotai",",","et","al",".","``","Interactive","medical","image","segmentation","using","deep","learning","with","image-specific","fine","tuning",".","''","IEEE","transactions","on","medical","imaging","37.7","(","2018",")",":","1562-1573",".","(","preprint",":","https",":","\/\/arxiv.org\/pdf\/1710.04043.pdf",")","This","task","takes","as","input","1",")","original","image","volume","and","2",")","scribbles","from","user","indicating","foreground","and","background","regions",".","A","likelihood","volume","is","generated","using","histogram","method",".","User-scribbles","are","incorporated","using","Equation","7","on","page","4","of","the","paper",".","numpymaxflow","'s","GraphCut","layer","is","used","to","optimise","Equation","5","from","the","paper",",","where","unaries","come","from","Equation","7","and","pairwise","is","the","original","input","volume","."]
code: def inferer(self, data):
      return Compose(
          [
              MakeLikelihoodFromScribblesHistogramd(
                  image="image",
                  scribbles="label",
                  post_proc_label="prob",
                  scribbles_bg_label=self.scribbles_bg_label,
                  scribbles_fg_label=self.scribbles_fg_label,
                  num_bins=self.num_bins,
                  normalise=True,
              ),
          ]
      )
  
file_path: MONAILabel/monailabel/scribbles/infer.py
imports: from monai.transforms import Compose, EnsureChannelFirstd, LoadImaged, ScaleIntensityRanged, Spacingd
  from monailabel.interfaces.tasks.infer_v2 import InferType
  from monailabel.scribbles.transforms import AddBackgroundScribblesFromROId, ApplyGraphCutOptimisationd, MakeISegUnaryd, MakeLikelihoodFromScribblesGMMd, MakeLikelihoodFromScribblesHistogramd
  from monailabel.tasks.infer.basic_infer import BasicInferTask
  from monailabel.transform.post import BoundingBoxd, Restored
label_desc: Use image node_id 2 for calling the HistogramBasedGraphCut obj's underlying member method code with example usage: obj.inferer(data) and returns: Compose