next up previous contents
Next: Fiber level functions Up: SF Interface Functions Previous: Pixel level functions   Contents

Pixel Cluster level functions

Pixel cluster information can be controlled using the IIT_CLUSTER common block and the following functions:


int get_iit_cluster_id(int id); 
int get_iit_cluster_xy(int iit,int x,int y);
int get_nth_iit_cluster(int n); 
void put_iit_cluster(void); 
void add_pix_iit_cluster(int clusterid, float weight); 
void merge_iit_clusters(int cid1, int cid2); 
void clear_iit_clusters(void);

get_iit_cluster_id(), get_nth_iit_cluster(), put_iit_cluster(), and clear_iit_clusters() perform the same tasks for IIT pixel clusters that get_iit_pixel_id(), get_nth_iit_pixel(), put_iit_pixel(), and clear_iit_pixels() do for pixels.

get_iit_cluster_xy() returns fills the common block with the closest cluster to the point passed in as an argument. If there is no cluster near this point, -1 is returned. ``Near'' is currently defined as 100 pixels, but this value may be changed in the future.

add_pix_iit_cluster() does not use the IIT_CLUSTER common block at all. Instead, it searches for the cluster with cluster id number clusterid. If this cluster is not found, it is created. Then, the pixel currently residing in the IIT_PIXEL common block is added to this cluster. The position of the cluster center is adjusted automatically and this pixel is added to the pixel daughter list.

merge_iit_clusters() takes two cluster id's and merges the two clusters into one cluster. The resulting cluster will have a cluster id number which is equal to the lower of cid1 or cid2. Pixel daughter lists are automatically merged, but no care is taken to ensure that the pixels from each of these clusters is unique. If the same pixel is listed in each cluster, it will appear twice in the resulting merged cluster.


next up previous contents
Next: Fiber level functions Up: SF Interface Functions Previous: Pixel level functions   Contents
K2K experimant account
2000-02-22