def __init__(self, body, vector): Transformation.__init__(self, body) self.vector = tuple(vector) self._info.log(str(self)) return
def setPythonVersion(self, transformWrappers): """ Unwraps the wrapped transformations into this transformation list. """ self._transformations = [] self._dirty = True for wrappedTransformation in transformWrappers: if isinstance(wrappedTransformation, dict): transformType = wrappedTransformation["TransformationType"] transform = wrappedTransformation["Transformation"].originalObject() filename = wrappedTransformation["Filename"] landmarks = wrappedTransformation["Landmarks"] # Create new transformation transformation = Transformation(transform, transformType, filename) transformation.landmarks = landmarks self._transformations.append(transformation) elif isinstance(wrappedTransformation, list): # Get the transform type transformType = wrappedTransformation[0] # Get the wrapped transform and unwrap immediately transform = wrappedTransformation[1].originalObject() # Get the filename filename = wrappedTransformation[2] # Add the transform to the internal transformations self._transformations.append(Transformation(transform, transformType, filename)) self.transformationChanged.emit(self)
def __init__(self, body, scale): Transformation.__init__(self, body) self.scale = scale self._info.log(str(self)) return
def __init__(self, document, attributes): Transformation.__init__(self, attributes) self._scale = None return
def __init__(self, document, attributes): Transformation.__init__(self, attributes) self._angle = None self._vector = None return
class MainEngine: ext_img = ExtractImages() trans_obj = Transformation()
def __init__(self, body): Transformation.__init__(self, body) self._info.log(str(self)) return