MCPcopy Create free account
hub / github.com/ImageEngine/cortex / testCs

Method testCs

test/IECoreImage/LuminanceOpTest.py:73–84  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

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
86if __name__ == "__main__":
87 unittest.main()

Callers

nothing calls this directly

Calls 2

ImagePrimitiveMethod · 0.80
LuminanceOpMethod · 0.80

Tested by

no test coverage detected