ICSV - Image Color Similarity Visualization
Vienna Technical University - Course 'Visualization 2'. Author: Stefan Spelitz (0925601)
ICSV.Server.PrepareImages Class Reference

Class responsible for chaining together the different stages of an image search. Chain: PrepareImages -> ImageProvider -> DistanceProvider -> CoordinateProvider -> PrepareImages More...

Inheritance diagram for ICSV.Server.PrepareImages:
ICSV.Server.CoordinateCallback

Public Member Functions

 PrepareImages (SearchImages request, Interface.EMDConfig config)
 Creates a new instance for the given search request and the given server config. More...
 
void Start ()
 Start a new search asynchronously for the search request (previously defined). This method must be called ONLY ONCE! More...
 
void Cancel ()
 Sends a cancellation signal to the whole processing chain. More...
 
void SendStillAliveSignal (object state)
 Send a still alive signal to the client (if it is listening) to avoid connection timeouts. More...
 
StatusData[] GetStatus (int minCount)
 Returns all current status objects if at least 'minCount' objects are available. Otherwise this method blocks until the count is available or the search has finished. If the search has finished all status objects are returned, regardless of 'minCount'. More...
 
void GetResults (out bool finished, out ImageData[] images, out AxisUpdate[] axes2D, out AxisUpdate[] axes3D)
 Returns new results if available. This method blocks if no results are available. A maximum count of 50 results will be returned blockwise in order to keep the data traffic low for one request. More...
 
void coordinatesUpdated (Dictionary< ImageContainer, CoordinateContainer > items)
 Will be called by the CoordinatesProvider. This will trigger a rebuild of the axes and the results will be made available for the client. More...
 
void finished ()
 The provider has finished. No more updates will be sent after this method is called. More...
 
void erroneous (String message)
 An error occurred. More...
 
void info (String message)
 Status information by the provider More...
 

Public Attributes

readonly SearchImages Request
 The request containing search query and image count for the current search. More...
 
readonly Interface.EMDConfig config
 The server config. More...
 

Detailed Description

Class responsible for chaining together the different stages of an image search. Chain: PrepareImages -> ImageProvider -> DistanceProvider -> CoordinateProvider -> PrepareImages

Constructor & Destructor Documentation

ICSV.Server.PrepareImages.PrepareImages ( SearchImages  request,
Interface.EMDConfig  config 
)

Creates a new instance for the given search request and the given server config.

Parameters
requestthe request
configthe configuration

Member Function Documentation

void ICSV.Server.PrepareImages.Cancel ( )

Sends a cancellation signal to the whole processing chain.

void ICSV.Server.PrepareImages.coordinatesUpdated ( Dictionary< ImageContainer, CoordinateContainer items)

Will be called by the CoordinatesProvider. This will trigger a rebuild of the axes and the results will be made available for the client.

Parameters
itemsall images with coordinates so far

Implements ICSV.Server.CoordinateCallback.

void ICSV.Server.PrepareImages.erroneous ( String  message)

An error occurred.

Parameters
messagethe error message

Implements ICSV.Server.CoordinateCallback.

void ICSV.Server.PrepareImages.finished ( )

The provider has finished. No more updates will be sent after this method is called.

Implements ICSV.Server.CoordinateCallback.

void ICSV.Server.PrepareImages.GetResults ( out bool  finished,
out ImageData[]  images,
out AxisUpdate[]  axes2D,
out AxisUpdate[]  axes3D 
)

Returns new results if available. This method blocks if no results are available. A maximum count of 50 results will be returned blockwise in order to keep the data traffic low for one request.

Parameters
finishedreturns true if the search has finished and all remaining results are included in the current request
imagesthe image results. Contain data and locations.
axes2Dthe 2D axes for this result
axes3Dthe 3D axes for this result
StatusData [] ICSV.Server.PrepareImages.GetStatus ( int  minCount)

Returns all current status objects if at least 'minCount' objects are available. Otherwise this method blocks until the count is available or the search has finished. If the search has finished all status objects are returned, regardless of 'minCount'.

Parameters
minCountthe minimal count of status objects necessary for this method to succeed
Returns
a list of status objects
void ICSV.Server.PrepareImages.info ( String  message)

Status information by the provider

Parameters
messagethe information message

Implements ICSV.Server.CoordinateCallback.

void ICSV.Server.PrepareImages.SendStillAliveSignal ( object  state)

Send a still alive signal to the client (if it is listening) to avoid connection timeouts.

Parameters
state
void ICSV.Server.PrepareImages.Start ( )

Start a new search asynchronously for the search request (previously defined). This method must be called ONLY ONCE!

Member Data Documentation

readonly Interface.EMDConfig ICSV.Server.PrepareImages.config

The server config.

readonly SearchImages ICSV.Server.PrepareImages.Request

The request containing search query and image count for the current search.