Skip to content

Commit

Permalink
adapt to setDirty change in lazyflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cstraehl committed Apr 25, 2012
1 parent 215f114 commit 5a7eda1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions volumina/pixelpipeline/datasources.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def request( self, slicing ):
"slicing into an array of shape=%r requested, but the slicing object is %r" % (slicing, self._array.shape)
return ArrayRequest(self._array[slicing])

def setDirty( self, slicing ):
def setDirty( self, slot, roi ):
slicing = roi.toSlice()
if not is_pure_slicing(slicing):
raise Exception('dirty region: slicing is not pure')
self.isDirty.emit( slicing )
Expand Down Expand Up @@ -103,7 +104,8 @@ def request( self, slicing ):
a = self._relabeling[a]
return ArrayRequest(a)

def setDirty( self, slicing ):
def setDirty( self, slot, roi ):
slicing = roi.toSlice()
if not is_pure_slicing(slicing):
raise Exception('dirty region: slicing is not pure')
self.isDirty.emit( slicing )
Expand Down Expand Up @@ -146,7 +148,7 @@ def __init__( self, outslot, priority = 0 ):
super(LazyflowSource, self).__init__()
self._outslot = outslot
self._priority = priority
self._outslot.registerDirtyCallback(self.setDirty)
self._outslot.notifyDirty(self.setDirty)

def request( self, slicing ):
if cfg.getboolean('pixelpipeline', 'verbose'):
Expand All @@ -162,7 +164,8 @@ def request( self, slicing ):
reqobj = ArrayRequest( np.zeros(slicing2shape(slicing), dtype=np.uint8 ) )
return LazyflowRequest( reqobj )

def setDirty( self, slicing ):
def setDirty( self, slot, roi ):
slicing = roi.toSlice()
if not is_pure_slicing(slicing):
raise Exception('dirty region: slicing is not pure')
self.isDirty.emit( slicing )
Expand Down Expand Up @@ -239,7 +242,8 @@ def request( self, slicing ):
result[:] = self._constant
return ConstantRequest( result )

def setDirty( self, slicing ):
def setDirty( self, slot, roi ):
slicing = roi.toSlice()
if not is_pure_slicing(slicing):
raise Exception('dirty region: slicing is not pure')
self.isDirty.emit( slicing )
Expand Down

0 comments on commit 5a7eda1

Please sign in to comment.