Module ctsimu.processing.step

Expand source code
class Step:
    """ An image processing step to be run in the pipeline. """

    def __init__(self, stepIdentifier):
        self.identifier = None   # General description of operation
        self.prepared   = False  # Is step prepared to process first image?
        self.pipe       = None   # Pointer to the processing pipeline to which this step belongs.
        self.setIdentifier(stepIdentifier)

    def setIdentifier(self, identifier):
        self.identifier = identifier

    def setPipeline(self, pipePtr):
        self.pipe = pipePtr

    def getIdentifier(self):
        return self.identifier

    def setPrepared(self, prepared):
        self.prepared = prepared

    def isPrepared(self):
        return self.prepared

    # Virtual methods, implemented in children:
    def prepare(self):
        """ Prepare step before processing an image. """
        # Should be called once by run().
        pass

    def run(self, image):
        """ Run step's specified operation on given image. """
        pass

    def followUp(self):
        """ Follow-up procedures when all images have been processed. """
        pass

Classes

class Step (stepIdentifier)

An image processing step to be run in the pipeline.

Expand source code
class Step:
    """ An image processing step to be run in the pipeline. """

    def __init__(self, stepIdentifier):
        self.identifier = None   # General description of operation
        self.prepared   = False  # Is step prepared to process first image?
        self.pipe       = None   # Pointer to the processing pipeline to which this step belongs.
        self.setIdentifier(stepIdentifier)

    def setIdentifier(self, identifier):
        self.identifier = identifier

    def setPipeline(self, pipePtr):
        self.pipe = pipePtr

    def getIdentifier(self):
        return self.identifier

    def setPrepared(self, prepared):
        self.prepared = prepared

    def isPrepared(self):
        return self.prepared

    # Virtual methods, implemented in children:
    def prepare(self):
        """ Prepare step before processing an image. """
        # Should be called once by run().
        pass

    def run(self, image):
        """ Run step's specified operation on given image. """
        pass

    def followUp(self):
        """ Follow-up procedures when all images have been processed. """
        pass

Subclasses

Methods

def followUp(self)

Follow-up procedures when all images have been processed.

Expand source code
def followUp(self):
    """ Follow-up procedures when all images have been processed. """
    pass
def getIdentifier(self)
Expand source code
def getIdentifier(self):
    return self.identifier
def isPrepared(self)
Expand source code
def isPrepared(self):
    return self.prepared
def prepare(self)

Prepare step before processing an image.

Expand source code
def prepare(self):
    """ Prepare step before processing an image. """
    # Should be called once by run().
    pass
def run(self, image)

Run step's specified operation on given image.

Expand source code
def run(self, image):
    """ Run step's specified operation on given image. """
    pass
def setIdentifier(self, identifier)
Expand source code
def setIdentifier(self, identifier):
    self.identifier = identifier
def setPipeline(self, pipePtr)
Expand source code
def setPipeline(self, pipePtr):
    self.pipe = pipePtr
def setPrepared(self, prepared)
Expand source code
def setPrepared(self, prepared):
    self.prepared = prepared