getPreferredInputForConnection(): masks are sorted after optional inputs
checkForNaNs() : bug fix
Trimap: bug fix in halveRoiForDepth :we can’t convert pixels being
rendered to pixels already rendered because the caller would then have
to wait for the full-scale image to be rendered and then downscale
again; This is easier to just render the pixels needed in the
downscaled image