Пример #1
0
    def _createSources( self, layer ):
        def sliceSrcOrNone( datasrc ):
            if datasrc:
                return SliceSource( datasrc, self._projection )
            return None

        slicesrcs = map( sliceSrcOrNone, layer.datasources )
        ims = createImageSource( layer, slicesrcs )
        # remove Nones
        slicesrcs = [ src for src in slicesrcs if src != None]
        return slicesrcs, ims
Пример #2
0
    def _createSources(self, layer):
        def sliceSrcOrNone(datasrc):
            if datasrc:
                return SliceSource(datasrc, self._projection)
            return None

        slicesrcs = list(map(sliceSrcOrNone, layer.datasources))
        ims = createImageSource(layer, slicesrcs)
        # remove Nones
        slicesrcs = [src for src in slicesrcs if src != None]
        return slicesrcs, ims
Пример #3
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)
Пример #4
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)
Пример #5
0
    def setUp( self ):
        self.app = QApplication([], False)

        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(self.app) 
        self.scene.stackedImageSources = self.sims
        self.scene.sceneShape = (310,290)
Пример #6
0
        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)
Пример #7
0
        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)