def METHOD_NAME(self, mergedImage, outputLabelmap):
    import vtkITK
    if not self.growCutFilter:
        self.growCutFilter = vtkITK.vtkITKGrowCut()
        self.growCutFilter.SetIntensityVolume(self.clippedMasterImageData)
        self.growCutFilter.SetMaskVolume(self.clippedMaskImageData)
        maskExtent = self.clippedMaskImageData.GetExtent() if self.clippedMaskImageData else None
        if maskExtent is not None and maskExtent[0] <= maskExtent[1] and maskExtent[2] <= maskExtent[3] and maskExtent[4] <= maskExtent[5]:
            # Mask is used.
            # Grow the extent more, as background segment does not surround region of interest.
            self.extentGrowthRatio = 0.50
        else:
            # No masking is used.
            # Background segment is expected to surround region of interest, so narrower margin is enough.
            self.extentGrowthRatio = 0.20
    if self.scriptedEffect.parameterDefined("SeedLocalityFactor"):
        seedLocalityFactor = self.scriptedEffect.doubleParameter("SeedLocalityFactor")
    else:
        seedLocalityFactor = 0.0
    self.growCutFilter.SetDistancePenalty(seedLocalityFactor)
    self.growCutFilter.SetSeedLabelVolume(mergedImage)
    startTime = time.time()
    self.growCutFilter.Update()
    logging.info('Grow-cut operation on volume of {}x{}x{} voxels was completed in {:3.1f} seconds.'.format(
        self.clippedMasterImageData.GetDimensions()[0],
        self.clippedMasterImageData.GetDimensions()[1],
        self.clippedMasterImageData.GetDimensions()[2],
        time.time() - startTime))
    outputLabelmap.DeepCopy(self.growCutFilter.GetOutput())
    imageToWorld = vtk.vtkMatrix4x4()
    mergedImage.GetImageToWorldMatrix(imageToWorld)
    outputLabelmap.SetImageToWorldMatrix(imageToWorld)