def testUnloadSet(self): img = ImageI() self.assert_(img.sizeOfPixels() >= 0) img.addPixels(PixelsI()) self.assert_(1 == img.sizeOfPixels()) img.unloadPixels() self.assert_(img.sizeOfPixels() < 0)
def testUnloadSet(self): img = ImageI() assert img.sizeOfPixels() >= 0 img.addPixels(PixelsI()) assert 1 == img.sizeOfPixels() img.unloadPixels() assert img.sizeOfPixels() < 0
def testWrappers(self): image = ImageI() info = image._field_info assert info.name.wrapper == rstring assert info.acquisitionDate.wrapper == rtime assert not info.name.nullable assert info.acquisitionDate.nullable image.setAcquisitionDate("1", wrap=True) assert type(image.acquisitionDate) == type(rtime(0)) # The following causes pytest to fail! # image.setAcquisitionDate("", wrap=True) # Note: collections still don't work well if False: image.addPixels(PixelsI()) image.setPixels(0, "Pixels:1", wrap=True) assert type(image.pixels) == omero.model.PixelsI image.setPixels(0, "Pixels", wrap=True) image.setPixels(0, "Unknown", wrap=True) link = DatasetImageLinkI() link.setParent("Dataset:1") link.setChild("Image:1")
def testClearSet(self): img = ImageI() self.assert_(img.sizeOfPixels() >= 0) img.addPixels(PixelsI()) self.assert_(1 == img.sizeOfPixels()) img.clearPixels() self.assert_(img.sizeOfPixels() >= 0) self.assert_(0 == img.sizeOfPixels())
def testClearSet(self): img = ImageI() assert img.sizeOfPixels() >= 0 img.addPixels(PixelsI()) assert 1 == img.sizeOfPixels() img.clearPixels() assert img.sizeOfPixels() >= 0 assert 0 == img.sizeOfPixels()
def testOrderedCollectionsTicket2547(self): pixels = PixelsI() channels = [ChannelI() for x in range(3)] pixels.addChannel(channels[0]) self.assertEquals(1, pixels.sizeOfChannels()) old = pixels.setChannel(0, channels[1]) self.assertEquals(old, channels[0]) self.assertEquals(1, pixels.sizeOfChannels())
def testOrderedCollectionsTicket2547(self): pixels = PixelsI() channels = [ChannelI() for x in range(3)] pixels.addChannel(channels[0]) assert 1 == pixels.sizeOfChannels() old = pixels.setChannel(0, channels[1]) assert old == channels[0] assert 1 == pixels.sizeOfChannels()
def testRemoveFromSet(self): pix = PixelsI() img = ImageI() self.assert_(img.sizeOfPixels() >= 0) img.addPixels(pix) self.assert_(1 == img.sizeOfPixels()) img.removePixels(pix) self.assert_(0 == img.sizeOfPixels())
def testRemoveFromSet(self): pix = PixelsI() img = ImageI() assert img.sizeOfPixels() >= 0 img.addPixels(pix) assert 1 == img.sizeOfPixels() img.removePixels(pix) assert 0 == img.sizeOfPixels()
def testUnloadCollections(self): pix = PixelsI() assert pix.sizeOfSettings() >= 0 pix.unloadCollections() assert pix.sizeOfSettings() < 0
def testUnloadCollections(self): pix = PixelsI() self.assert_(pix.sizeOfSettings() >= 0) pix.unloadCollections() self.assert_(pix.sizeOfSettings() < 0)
def testUnloadCollections(self): pix = PixelsI() self.assert_( pix.sizeOfSettings() >= 0 ) pix.unloadCollections() self.assert_( pix.sizeOfSettings() < 0 )