( self )
| 71 | self.assertAlmostEqual( ii["Y"][2], 42 ) |
| 72 | |
| 73 | def testCs( self ) : |
| 74 | |
| 75 | i = IECoreImage.ImagePrimitive() |
| 76 | i["Cs"] = IECore.Color3fVectorData( [ imath.Color3f( 1, 2, 3 ), imath.Color3f( 10, 11, 12 ) ] ) |
| 77 | |
| 78 | ii = IECoreImage.LuminanceOp()( input=i, weights=imath.Color3f( 1, 2, 3 ), removeColorChannels=False ) |
| 79 | |
| 80 | self.assertTrue( "Cs" in ii ) |
| 81 | self.assertTrue( "Y" in ii ) |
| 82 | |
| 83 | self.assertAlmostEqual( ii["Y"][0], 14 ) |
| 84 | self.assertAlmostEqual( ii["Y"][1], 68 ) |
| 85 | |
| 86 | if __name__ == "__main__": |
| 87 | unittest.main() |
nothing calls this directly
no test coverage detected