zIndex = axiskeys.index("z")
indices = [tIndex, cIndex, zIndex]
indices = sorted(indices, reverse=True)
for ind in indices:
if ind:
spatialRoi[0].pop(ind)
spatialRoi[1].pop(ind)
inputSpatialRoi = extendSlice(spatialRoi[0], spatialRoi[1], inputSpatialShape.values(), sigma, window=2.0)
// Determine the roi within the input data we"re going to request
inputRoiOffset = spatialRoi[0] - inputSpatialRoi[0]
computeRoi = (inputRoiOffset, inputRoiOffset + spatialRoi[1] - spatialRoi[0])
// For some reason, vigra.filters.gaussianSmoothing will raise an exception if this parameter doesn"t have the correct integer type.
// (for example, if we give it as a numpy.ndarray with dtype=int64, we get an error)
computeRoi = ( tuple(map(int, computeRoi[0])),
tuple(map(int, computeRoi[1])) )
inputRoi = (list(inputSpatialRoi[0]), list(inputSpatialRoi[1]))
for ind in reversed(indices):
if ind:
inputRoi[0].insert( ind, 0 )
inputRoi[1].insert( ind, 1 )
return inputRoi, computeRoi
def propagateDirty(self, slot, subindex, roi):
if slot == self.Input: