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

Method testOrientation

test/IECoreImage/ImageReaderTest.py:195–210  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

193 self.assertTrue( i.channelsValid() )
194
195 def testOrientation( self ) :
196
197 img = IECore.Reader.create( os.path.join( "test", "IECoreImage", "data", "exr", "uvMap.512x256.exr" ) ).read()
198
199 indexedColors = {
200 0 : imath.V3f( 0, 0, 0 ),
201 511 : imath.V3f( 1, 0, 0 ),
202 512 * 255 : imath.V3f( 0, 1, 0 ),
203 512 * 255 + 511 : imath.V3f( 1, 1, 0 ),
204 }
205
206 for index, expectedColor in indexedColors.items() :
207
208 color = imath.V3f( img["R"][index], img["G"][index], img["B"][index] )
209
210 self.assertTrue( ( color - expectedColor).length() < 1.e-6 )
211
212 def testIncompleteImage( self ) :
213

Callers

nothing calls this directly

Calls 4

joinMethod · 0.80
readMethod · 0.45
createMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected