org.neuroph.easyneurons.imgrec
Class ImagesIterator

java.lang.Object
  extended by org.neuroph.easyneurons.imgrec.ImagesIterator
All Implemented Interfaces:
java.util.Iterator<java.awt.image.BufferedImage>

public class ImagesIterator
extends java.lang.Object
implements java.util.Iterator<java.awt.image.BufferedImage>

This class provides Iterator for the image files (jpg and png) in the specified directory next() method loads and returns BufferedImage objects


Constructor Summary
ImagesIterator(java.io.File dir)
          Creates image Iterator for the specified dir
 
Method Summary
 java.lang.String getFilenameOfCurrentImage()
           
 boolean hasNext()
           
 java.awt.image.BufferedImage next()
          Loads and returns next image
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImagesIterator

public ImagesIterator(java.io.File dir)
               throws java.io.IOException
Creates image Iterator for the specified dir

Parameters:
dir -
Throws:
java.io.IOException
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<java.awt.image.BufferedImage>

next

public java.awt.image.BufferedImage next()
Loads and returns next image

Specified by:
next in interface java.util.Iterator<java.awt.image.BufferedImage>
Returns:
Retruns next image from directory as BufferedImage object

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<java.awt.image.BufferedImage>

getFilenameOfCurrentImage

public java.lang.String getFilenameOfCurrentImage()