Documentation of 'org.joone.io.ImageOutputSynapse' Java class
ImageOutputSynapse
org.joone.io

Class ImageOutputSynapse

  • All Implemented Interfaces:
    java.io.Serializable, InputPatternListener, Learnable, LearnableSynapse, NeuralElement, OutputPatternListener, Inspectable, PlugInListener


    public class ImageOutputSynapse
    extends StreamOutputSynapse
    This class collects the output from the connected layer and places it into an image file. Images can be produced in GIF, JPG and PNG formats.

    Colour Mode In colour mode ImageOutputSynapse expects seperate RGB input values in the range 0 to 1 from the connected layer. So to produce an image of width 10 and height 10 there must be 10x10x3 inputs from the previous layer/s. The red, green and blue components in the final image are set using the individual component values from the input.

    Non Colour Mode / Grey Scale Mode In this mode the synapse treats each input value as a grey scale value for each pixel. In this mode only Width*Height values are required. To produce the final image the Red, Green and Blue components are the set to this same value.

    See Also:
    Serialized Form
    • Constructor Detail

      • ImageOutputSynapse

        public ImageOutputSynapse()
        Creates a new instance of ImageOutputSynapse
    • Method Detail

      • write

        public void write(Pattern pattern)
        Writes the Neural Network pattern to an Image file, the Image type is specified by the ImageFileType property.
        Specified by:
        write in class StreamOutputSynapse
      • getOutputDirectory

        public java.lang.String getOutputDirectory()
        Gets the directory where Image files will be created.
      • setOutputDirectory

        public void setOutputDirectory(java.lang.String OutputDirectory)
        Sets the name of the directory where Image files will be created.
        Parameters:
        OutputDirectory - The directory used to store generated image files.
      • getImageFileType

        public int getImageFileType()
        Obtains the image type JPG = 1, GIF = 2, PNG = 3 of the format of the output files.
      • setImageFileType

        public void setImageFileType(int ImageFileType)
        Sets the image type JPG = 1, GIF = 2, PNG = 3 of the format of the generated image files.
        Parameters:
        ImageFileType - JPG = 1, GIF = 2, PNG = 3.
      • getWidth

        public int getWidth()
        Gets the desired width of the generated image files.
      • setWidth

        public void setWidth(int Width)
        Sets the desired width of the generated image files.
      • getHeight

        public int getHeight()
        Gets the desired height of the generated image files.
      • setHeight

        public void setHeight(int Height)
        Sets the desired height of the generated image files.
      • getColourMode

        public boolean getColourMode()
        Determines if this synapse is in colour mode. false if in grey scale mode.
        Returns:
        The ColourMode if this synapse.
      • setColourMode

        public void setColourMode(boolean ColourMode)
        Sets the colour mode of this synapse.
        Parameters:
        ColourMode - true if in colour mode, false if in grey scale mode.
      • check

        public java.util.TreeSet check()
        Checks and returns any problems found with the settings of this synapse.
        Specified by:
        check in interface NeuralElement
        Overrides:
        check in class StreamOutputSynapse
        Returns:
        A TreeSet of problems or errors found with this synapse.
        See Also:
        InputPaternListener, OutputPaternListener

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.