![]() |
ICSV - Image Color Similarity Visualization
Vienna Technical University - Course 'Visualization 2'. Author: Stefan Spelitz (0925601)
|
This class is responsible for searching images on the web (i.e. on Flickr) or loading local images. After loading, signatures are created, which can be then used to calculate the Earth Mover's Distance. More...
Public Member Functions | |
void | searchImages (Flickr flickr, PhotoSearchOptions options, int photoCount, ImageProviderCallback callback, CancellationToken cancelToken) |
Search Flickr with the given options and maximum count. A callback needs to be provided for progress and status report. This method works asynchronously. More... | |
ImageContainer | loadRemoteImage (string remoteURL, WebClient webClient, ImageProviderCallback callback) |
Loads an image from the given remote URL, using the web client and providing status reports to the callback. More... | |
ImageContainer | getLocalImage (string localURL) |
Synchronously loads a local image from the given local server url. More... | |
Static Public Attributes | |
static readonly ImageProvider | Instance |
The singleton instance of this class. More... | |
This class is responsible for searching images on the web (i.e. on Flickr) or loading local images. After loading, signatures are created, which can be then used to calculate the Earth Mover's Distance.
This class uses a cache to allow fast access to previously loaded images. Images are cached according to their unique ids. This class is a singleton. The only instance is available through ImageProvider.Instance.
ImageContainer ICSV.Server.ImageProvider.getLocalImage | ( | string | localURL | ) |
Synchronously loads a local image from the given local server url.
localURL | the URL to load from |
ImageContainer ICSV.Server.ImageProvider.loadRemoteImage | ( | string | remoteURL, |
WebClient | webClient, | ||
ImageProviderCallback | callback | ||
) |
Loads an image from the given remote URL, using the web client and providing status reports to the callback.
remoteURL | from where to load |
webClient | the client to use for loading |
callback | the callback for status updates |
void ICSV.Server.ImageProvider.searchImages | ( | Flickr | flickr, |
PhotoSearchOptions | options, | ||
int | photoCount, | ||
ImageProviderCallback | callback, | ||
CancellationToken | cancelToken | ||
) |
Search Flickr with the given options and maximum count. A callback needs to be provided for progress and status report. This method works asynchronously.
flickr | the Flickr API object |
options | contains all relevant settings for searching. E.g. sort order |
photoCount | the maximum number of photos to retrieve |
callback | the callback for status updates |
cancelToken | the cancellation token, in case the search needs to be cancelled |
|
static |
The singleton instance of this class.