|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcbr.service.ExtractingIterator
This iterator wraps around an iterator that returns raw
images, and extracts features from the images by means
of an FeatureExtractor. This iterator returns
picture entries.
| Field Summary | |
private int |
count_
The number of pictures returned so far. |
private boolean |
embed_
This flag determines whether or not thumbnails are embedded into the picture entries returned by this iterator. |
private FeatureExtractor |
extractor_
The FeatureExtractor that is used in
order to extract image features. |
private Iterator |
i_
The iterator retrieved from the PicsSource. |
private Image |
im_
The next picture. |
private String |
name_
The next picture's name. |
private PicsSource |
pics_
The source of the pictures. |
private String |
url_
The URL string that is put into iterated picture entries. |
| Constructor Summary | |
ExtractingIterator(PicsSource pics,
FeatureExtractor extractor)
Creates an iterator that wraps around the given iterator and retrieves image features using the given FeatureExtractor. |
|
| Method Summary | |
int |
getCount()
Returns the number of picture entries returned so far. |
boolean |
hasNext()
Returns true if there are more picture entries. |
Object |
next()
Returns the next PictureEntry. |
void |
remove()
Not supported. |
void |
setEmbedding(boolean embed)
Sets whether thumbnails are embedded into iterated picture entries or not. |
void |
setURL(String url)
Sets the URL string that is put into the iterated picture entries. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private FeatureExtractor extractor_
FeatureExtractor that is used in
order to extract image features.
private PicsSource pics_
private Iterator i_
PicsSource.
private String url_
private boolean embed_
true.
private int count_
private Image im_
private String name_
| Constructor Detail |
public ExtractingIterator(PicsSource pics,
FeatureExtractor extractor)
FeatureExtractor. The given iterator must
return raw images (byte arrays). If no raw image is returned
then a ClassCastException is thrown. By default, thumbnails
are embedded into the picture entries returned by this
instance.
pics - The PicsSource whose pictures
are iterated.extractor - The feature extractor that is used for retrieving
significant image features.| Method Detail |
public void setURL(String url)
url - The URL string.public void setEmbedding(boolean embed)
true.
embed - if true then thumbnails are
embedded.public int getCount()
public boolean hasNext()
true if there are more picture entries.
hasNext in interface Iteratortrue if the re are more entries.
IllegalStateException - if the image fetching
was interrupted.
public Object next()
throws NoSuchElementException
PictureEntry. If
something goes wrong during extraction or this method
cannot complete due to some other error condition then
an IllegalStateException is thrown.
next in interface IteratorIllegalStateException - if this method cannot
complete successfully.
NoSuchElementException - if there are no more
elements.public void remove()
remove in interface IteratorUnsupportedOperationException - Always.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||