

def test(self):
    n = GafferImage.ImageReader()
    n['fileName'].setValue(self.imageFile)
    o = GafferImage.LUT()
    o['in'].setInput(n['out'])
    self.assertEqual(n['out'].image(), o['out'].image())
    o['fileName'].setValue(self.lut)
    o['interpolation'].setValue(GafferImage.LUT.Interpolation.Linear)
    forward = o['out'].image()
    self.assertNotEqual(n['out'].image(), forward)
    o['direction'].setValue(GafferImage.LUT.Direction.Inverse)
    inverse = o['out'].image()
    self.assertNotEqual(n['out'].image(), inverse)
    self.assertNotEqual(forward, inverse)
    o['interpolation'].setValue(GafferImage.LUT.Interpolation.Nearest)
    tet = o['out'].image()
    self.assertNotEqual(n['out'].image(), tet)
    self.assertNotEqual(forward, tet)
    self.assertNotEqual(inverse, tet)

dataset/ETHPy150Open ImageEngine/gaffer/python/GafferImageTest/LUTTest.py LUTTest.test/original