class OpFillMissingSlicesNoCache(Operator): Input = InputSlot() DetectionMethod = InputSlot(value='classic') Output = OutputSlot() Missing = OutputSlot() def __init__(self, *args, **kwargs): super( OpFillMissingSlicesNoCache, self ).__init__(*args, **kwargs) # Set up interpolation self._opInterp = OpInterpMissingData( parent=self ) self._opInterp.InputVolume.connect( self.Input ) self._opInterp.InputSearchDepth.setValue(100) self._opInterp.DetectionMethod.connect(self.DetectionMethod) self.Output.connect( self._opInterp.Output ) self.Missing.connect( self._opInterp.Missing ) def execute(self, slot, subindex, roi, result): assert False, "Shouldn't get here" def propagateDirty(self, slot, subindex, roi): pass # Nothing to do here. def isDirty(self): #FIXME return True def dumps(self): return self._opInterp.dumps() def loads(self, s): self._opInterp.loads(s)
class OpFillMissingSlicesNoCache(Operator): Missing = OutputSlot() Input = InputSlot() Output = OutputSlot() DetectionMethod = InputSlot(value='classic') OverloadDetector = InputSlot(value='') PatchSize = InputSlot(value=128) HaloSize = InputSlot(value=30) Detector = OutputSlot(stype=Opaque) def __init__(self, *args, **kwargs): super(OpFillMissingSlicesNoCache, self).__init__(*args, **kwargs) # Set up interpolation self._opInterp = OpInterpMissingData(parent=self) self._opInterp.InputVolume.connect(self.Input) self._opInterp.InputSearchDepth.setValue(100) self._opInterp.DetectionMethod.connect(self.DetectionMethod) self._opInterp.PatchSize.connect(self.PatchSize) self._opInterp.HaloSize.connect(self.HaloSize) self._opInterp.OverloadDetector.connect(self.OverloadDetector) self.Output.connect(self._opInterp.Output) self.Missing.connect(self._opInterp.Missing) self.Detector.connect(self._opInterp.Detector) def execute(self, slot, subindex, roi, result): assert False, "Shouldn't get here" def propagateDirty(self, slot, subindex, roi): pass # Nothing to do here. def isDirty(self): return self._opInterp.isDirty() def resetDirty(self): self._opInterp.resetDirty() def dumps(self): return self._opInterp.dumps() def loads(self, s): self._opInterp.loads(s) def setPrecomputedHistograms(self, histos): self._opInterp.detector.TrainingHistograms.setValue(histos) def train(self): self._opInterp.train()
class OpFillMissingSlicesNoCache(Operator): Missing = OutputSlot() Input = InputSlot() Output = OutputSlot() DetectionMethod = InputSlot(value="classic") OverloadDetector = InputSlot(value="") PatchSize = InputSlot(value=128) HaloSize = InputSlot(value=30) Detector = OutputSlot(stype=Opaque) def __init__(self, *args, **kwargs): super(OpFillMissingSlicesNoCache, self).__init__(*args, **kwargs) # Set up interpolation self._opInterp = OpInterpMissingData(parent=self) self._opInterp.InputVolume.connect(self.Input) self._opInterp.InputSearchDepth.setValue(100) self._opInterp.DetectionMethod.connect(self.DetectionMethod) self._opInterp.PatchSize.connect(self.PatchSize) self._opInterp.HaloSize.connect(self.HaloSize) self._opInterp.OverloadDetector.connect(self.OverloadDetector) self.Output.connect(self._opInterp.Output) self.Missing.connect(self._opInterp.Missing) self.Detector.connect(self._opInterp.Detector) def execute(self, slot, subindex, roi, result): assert False, "Shouldn't get here" def propagateDirty(self, slot, subindex, roi): pass # Nothing to do here. def isDirty(self): return self._opInterp.isDirty() def resetDirty(self): self._opInterp.resetDirty() def dumps(self): return self._opInterp.dumps() def loads(self, s): self._opInterp.loads(s) def setPrecomputedHistograms(self, histos): self._opInterp.detector.TrainingHistograms.setValue(histos) def train(self): self._opInterp.train()
def __init__(self, *args, **kwargs): super(OpFillMissingSlicesNoCache, self).__init__(*args, **kwargs) # Set up interpolation self._opInterp = OpInterpMissingData(parent=self) self._opInterp.InputVolume.connect(self.Input) self._opInterp.InputSearchDepth.setValue(100) self._opInterp.DetectionMethod.connect(self.DetectionMethod) self._opInterp.PatchSize.connect(self.PatchSize) self._opInterp.HaloSize.connect(self.HaloSize) self._opInterp.OverloadDetector.connect(self.OverloadDetector) self.Output.connect(self._opInterp.Output) self.Missing.connect(self._opInterp.Missing) self.Detector.connect(self._opInterp.Detector)
def __init__(self, *args, **kwargs): super( OpFillMissingSlicesNoCache, self ).__init__(*args, **kwargs) # Set up interpolation self._opInterp = OpInterpMissingData( parent=self ) self._opInterp.InputVolume.connect( self.Input ) self._opInterp.InputSearchDepth.setValue(100) self._opInterp.DetectionMethod.connect(self.DetectionMethod) self.Output.connect( self._opInterp.Output ) self.Missing.connect( self._opInterp.Missing )