def setUp(self):
     super(AlphaModulatedImageSourceTest, self).setUp()
     self.raw = numpy.load(
         os.path.join(volumina._testing.__path__[0],
                      'lena.npy')).astype(numpy.uint32)
     self.ars = _ArraySource2d(self.raw)
     self.ims = AlphaModulatedImageSource(
         self.ars, AlphaModulatedLayer(self.ars, QColor(1, 2, 3)))
Beispiel #2
0
    def setUp(self):
        super(AlphaModulatedImageSourceTest2, self).setUp()
        self.raw = numpy.load(os.path.join(volumina._testing.__path__[0], "lena.npy")).astype(numpy.uint32)

        self.raw = numpy.ma.masked_array(self.raw, mask=numpy.zeros(self.raw.shape, dtype=bool), shrink=False)
        self.raw[:1, :] = numpy.ma.masked
        self.raw[-1:, :] = numpy.ma.masked
        self.raw[:, :1] = numpy.ma.masked
        self.raw[:, -1:] = numpy.ma.masked

        self.ars = _ArraySource2d(self.raw)
        self.ims = AlphaModulatedImageSource(self.ars, AlphaModulatedLayer(self.ars, QColor(1, 2, 3)))