Class AbstractImageTransformer<T extends AbstractImageContainer>

    • Field Detail

      • m_FlowContext

        protected Actor m_FlowContext
        the flow context.
    • Constructor Detail

      • AbstractImageTransformer

        public AbstractImageTransformer()
    • Method Detail

      • getFlowContext

        public Actor getFlowContext()
        Returns the flow context, if any.
        Specified by:
        getFlowContext in interface FlowContextHandler
        Returns:
        the actor, null if none available
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.

        Default implementation returns null.
        Specified by:
        getQuickInfo in interface QuickInfoSupporter
        Returns:
        null if no info available, otherwise short string
      • checkImage

        protected void checkImage​(T img)
        Optional checks of the image.

        Default implementation only checks whether image is null.
        Parameters:
        img - the image to check
      • doTransform

        protected abstract T[] doTransform​(T img)
        Performs the actual transforming of the image.
        Parameters:
        img - the image to transform (can be modified, since it is a copy)
        Returns:
        the generated image(s)
      • compareTo

        public int compareTo​(Object o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

        Only compares the commandlines of the two objects.
        Specified by:
        compareTo in interface Comparable<T extends AbstractImageContainer>
        Parameters:
        o - the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Throws:
        ClassCastException - if the specified object's type prevents it from being compared to this object.
      • equals

        public boolean equals​(Object o)
        Returns whether the two objects are the same.

        Only compares the commandlines of the two objects.
        Overrides:
        equals in class Object
        Parameters:
        o - the object to be compared
        Returns:
        true if the object is the same as this one
      • shallowCopy

        public T shallowCopy()
        Returns a shallow copy of itself, i.e., based on the commandline options.
        Returns:
        the shallow copy
      • shallowCopy

        public T shallowCopy​(boolean expand)
        Returns a shallow copy of itself, i.e., based on the commandline options.
        Parameters:
        expand - whether to expand variables to their current values
        Returns:
        the shallow copy
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory.

        The default implementation does nothing.
        Specified by:
        cleanUp in interface CleanUpHandler