67821786e77fdfe3e907971f6fb18ae652fa11d4,ilastik/applets/pixelClassification/pixelClassificationSerializer.py,PixelClassificationSerializer,__init__,#PixelClassificationSerializer#Any#Any#,32

Before Change


    def __init__(self, mainOperator, projectFileGroupName):
        with Tracer(traceLogger):
            super( PixelClassificationSerializer, self ).__init__( projectFileGroupName, self.SerializerVersion )
            self.mainOperator = mainOperator
            self._initDirtyFlags()
   
            // Set up handlers for dirty detection
            def handleDirty(section):
                self._dirtyFlags[section] = True
    
            self.mainOperator.Classifier.notifyDirty( bind(handleDirty, Section.Classifier) )
    
            def handleNewImage(section, slot, index):
                slot[index].notifyDirty( bind(handleDirty, section) )
                // New label images need to be "serialized" as an empty group.
                if section == Section.Labels:
                    handleDirty(Section.Labels)
    
            // These are multi-slots, so subscribe to dirty callbacks on each of their subslots as they are created
            self.mainOperator.LabelImages.notifyInserted( bind(handleNewImage, Section.Labels) )
            self.mainOperator.PredictionProbabilities.notifyInserted( bind(handleNewImage, Section.Predictions) )

            self._predictionStorageEnabled = False
            self._predictionStorageRequest = None
            self._predictionsPresent = False

After Change


        self.predictionSlot = SerialPredictionSlot(operator.PredictionProbabilities,
                                                   operator,
                                                   name=("Predictions", "predictions{:04d}"))
        slots = [SerialClassifierSlot(operator.Classifier,
                                      operator.classifier_cache,
                                      name=("ClassifierForests", "Forest{:04d}")),
                 SerialListSlot(operator.LabelNames,
                                transform=str),
                 SerialListSlot(operator.LabelColors),
                 SerialBlockSlot(operator.LabelInputs,
                                 operator.LabelImages,
                                 operator.NonzeroLabelBlocks,
                                 name=("LabelSets", "labels{:03d}"),
                                 autodepends=False),
                 self.predictionSlot]


        super(PixelClassificationSerializer, self).__init__(projectFileGroupName,
                                                            self.SerializerVersion,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: ilastik/ilastik
Commit Name: 67821786e77fdfe3e907971f6fb18ae652fa11d4
Time: 2012-11-27
Author: kemal.eren@iwr.uni-heidelberg.de
File Name: ilastik/applets/pixelClassification/pixelClassificationSerializer.py
Class Name: PixelClassificationSerializer
Method Name: __init__


Project Name: ilastik/ilastik
Commit Name: 67821786e77fdfe3e907971f6fb18ae652fa11d4
Time: 2012-11-27
Author: kemal.eren@iwr.uni-heidelberg.de
File Name: ilastik/applets/batchIo/batchIoSerializer.py
Class Name: BatchIoSerializer
Method Name: __init__


Project Name: ilastik/ilastik
Commit Name: 67821786e77fdfe3e907971f6fb18ae652fa11d4
Time: 2012-11-27
Author: kemal.eren@iwr.uni-heidelberg.de
File Name: ilastik/applets/pixelClassification/pixelClassificationSerializer.py
Class Name: PixelClassificationSerializer
Method Name: __init__


Project Name: ilastik/ilastik
Commit Name: 67821786e77fdfe3e907971f6fb18ae652fa11d4
Time: 2012-11-27
Author: kemal.eren@iwr.uni-heidelberg.de
File Name: ilastik/applets/labeling/labelingSerializer.py
Class Name: LabelingSerializer
Method Name: __init__