def setupOutputs(self):
// Can"t make this last connection in __init__ because // opChannelSelector.Slices won"t have any data until its input is ready iflen(self.opChannelSelector.Slices) > 0:
self.opWatershed.InputImage.connect(self.opChannelSelector.Slices[0])//// Cache blocks// Inner and outer block shapes are the same.
After Change
iflen(self.opWatershedCache.InnerOutputs) > 0:
self.WatershedLabels.connect( self.opWatershedCache.InnerOutputs[2] )ifself.SeedThresholdValue.ready():
seedThreshold = self.SeedThresholdValue.value
if not self.opWatershed.SeedImage.connected() or seedThreshold != self._seedThreshold:
self._seedThreshold = seedThreshold