コード例 #1
0
    def testStackedImageSourcesProperty(self):
        s = ImageScene2D(PositionModel(), (0, 3, 4), preemptive_fetch_number=0)
        self.assertEqual(len(s.stackedImageSources), 0)

        sims = StackedImageSources(LayerStackModel())
        s.stackedImageSources = sims
        self.assertEqual(id(s.stackedImageSources), id(sims))
コード例 #2
0
    def setUp(self):
        self.layerstack = LayerStackModel()
        self.sims = StackedImageSources(self.layerstack)

        self.GRAY = 201
        self.ds = ConstantSource(self.GRAY)
        self.layer = GrayscaleLayer(self.ds)
        self.layerstack.append(self.layer)
        self.ims = imsfac.createImageSource(self.layer, [self.ds])
        self.sims.register(self.layer, self.ims)

        self.scene = ImageScene2D(PositionModel(), (0, 3, 4),
                                  preemptive_fetch_number=0)

        self.scene.stackedImageSources = self.sims
        self.scene.dataShape = (310, 290)
コード例 #3
0
ファイル: lazy_test.py プロジェクト: Tomaz-Vieira/volumina
        def setUp(self):
            self.layerstack = LayerStackModel()
            self.sims = StackedImageSources(self.layerstack)

            self.g = Graph()
            self.op = OpLazy(self.g)
            self.ds = LazyflowSource(self.op.Output)

            self.ss = SliceSource(self.ds, projectionAlongTZC)

            self.layer = GrayscaleLayer(self.ds, normalize=False)
            self.layerstack.append(self.layer)
            self.ims = imsfac.createImageSource(self.layer, [self.ss])
            self.sims.register(self.layer, self.ims)

            self.scene = ImageScene2D(PositionModel(), (0, 0, 0), preemptive_fetch_number=0)
            self.scene.setCacheSize(1)

            self.scene.stackedImageSources = self.sims
            self.scene.dataShape = (30, 30)