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

Method testTiff

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

Source from the content-addressed store, hash-verified

290 self.assertFalse( res.value )
291
292 def testTiff( self ) :
293
294 for ( fileName, rawType ) in (
295 ( os.path.join( "test", "IECoreImage", "data", "tiff", "uvMap.200x100.rgba.8bit.tif" ), IECore.UCharVectorData ),
296 ( os.path.join( "test", "IECoreImage", "data", "tiff", "uvMap.200x100.rgba.16bit.tif" ), IECore.UShortVectorData ),
297 ( os.path.join( "test", "IECoreImage", "data", "tiff", "uvMap.200x100.rgba.32bit.tif" ), IECore.FloatVectorData ),
298 ) :
299
300 r = IECore.Reader.create( fileName )
301 self.assertIsInstance( r, IECoreImage.ImageReader )
302
303 img = r.read()
304 r["rawChannels"] = IECore.BoolData( True )
305 imgRaw = r.read()
306
307 self.assertEqual( img.displayWindow, imath.Box2i( imath.V2i( 0, 0 ), imath.V2i( 199, 99 ) ) )
308 self.assertEqual( img.dataWindow, imath.Box2i( imath.V2i( 0, 0 ), imath.V2i( 199, 99 ) ) )
309
310 self.assertTrue( img.channelsValid() )
311 self.assertTrue( imgRaw.channelsValid() )
312
313 self.assertEqual( img.keys(), imgRaw.keys() )
314
315 for c in img.keys() :
316 self.assertEqual( type(img[c]), IECore.FloatVectorData )
317 self.assertEqual( type(imgRaw[c]), rawType )
318
319 def testRawDPX( self ) :
320

Callers

nothing calls this directly

Calls 6

typeFunction · 0.85
joinMethod · 0.80
channelsValidMethod · 0.80
createMethod · 0.45
readMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected