|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object IndexManager.WindsurfImgMtreeWrapper
public class WindsurfImgMtreeWrapper
Class implementing operations for invoking native functions for managing the image M-tree.
Constructor Summary | |
---|---|
WindsurfImgMtreeWrapper()
|
Method Summary | |
---|---|
static boolean |
close()
Closes the image M-tree. |
static boolean |
closeCursor()
Deletes the previously created image cursor for sorted access. |
static boolean |
create(java.lang.String featureFile)
Creates a new M-tree index from a file containing image features. |
static boolean |
createCursor(int id,
int size,
int regions,
double[] sizes,
double[] centroids,
double[] covariance)
Creates a cursor for performing sorted access on the index using a given image. |
static boolean |
delete(int id,
int size,
int regions,
double[] sizes,
double[] centroids,
double[] covariance)
Deletes an image from the M-tree index. |
static int |
getCount()
Gets the distance counter for the image index. |
static double[] |
getNext()
Performs a sorted access on the existing image cursor. |
static boolean |
init(java.lang.String indexFile)
Initializes the image M-tree. |
static boolean |
insert(int id,
int size,
int regions,
double[] sizes,
double[] centroids,
double[] covariance)
Inserts a new image in the M-tree index. |
static double[] |
queryKnn(int k,
int size,
int regions,
double[] sizes,
double[] centroids,
double[] covariance)
Creates a new k-NN query based on the given image using this index. |
static double[] |
queryRange(double r,
int size,
int regions,
double[] sizes,
double[] centroids,
double[] covariance)
Creates a new range query based on the given image using this index. |
static boolean |
resetCount()
Resets the distance counter for the image index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WindsurfImgMtreeWrapper()
Method Detail |
---|
public static boolean init(java.lang.String indexFile)
indexFile
- Absolute path of the file containing the M-tree index.
true
if the index was successfully initialized, false
otherwise.public static boolean create(java.lang.String featureFile)
featureFile
- Absolute path of the features file.
true
if the index was successfully created, false
otherwise.public static boolean close()
true
if the index was successfully closed, false
otherwise.public static boolean insert(int id, int size, int regions, double[] sizes, double[] centroids, double[] covariance)
id
- Image ID.size
- Number of pixels in the image.regions
- Number of image regions.sizes
- Array of regions sizes.centroids
- Array of regions centroids.covariance
- Array of regions covariance matrices.
true
if the image was successfully inserted, false
otherwise.public static boolean delete(int id, int size, int regions, double[] sizes, double[] centroids, double[] covariance)
id
- Image ID.size
- Number of pixels in the image.regions
- Number of image regions.sizes
- Array of regions sizes.centroids
- Array of regions centroids.covariance
- Array of regions covariance matrices.
true
if the image was successfully deleted, false
otherwise.public static double[] queryKnn(int k, int size, int regions, double[] sizes, double[] centroids, double[] covariance)
k
- Number of requested results.size
- Number of pixels in the query image.regions
- Number of query image regions.sizes
- Array of query regions sizes.centroids
- Array of query regions centroids.covariance
- Array of query regions covariance matrices.
public static double[] queryRange(double r, int size, int regions, double[] sizes, double[] centroids, double[] covariance)
r
- Radius of the query.size
- Number of pixels in the query image.regions
- Number of query image regions.sizes
- Array of query regions sizes.centroids
- Array of query regions centroids.covariance
- Array of query regions covariance matrices.
public static boolean createCursor(int id, int size, int regions, double[] sizes, double[] centroids, double[] covariance)
id
- Image ID.size
- Number of pixels in the image.regions
- Number of image regions.sizes
- Array of regions sizes.centroids
- Array of regions centroids.covariance
- Array of regions covariance matrices.
true
if the cursors were successfully created, false
otherwise.public static boolean closeCursor()
true
if the cursors were successfully deleted, false
otherwise.public static double[] getNext()
public static boolean resetCount()
true
if the counter was successfully reset, false
otherwise.public static int getCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |