Package schrodinger :: Package analysis :: Package visanalysis :: Module volumedatautils :: Class DataPointLocator
[hide private]
[frames] | no frames]

Class DataPointLocator

object --+
         |
        DataPointLocator

The DataPointLocator class is a simple utility class that allows data-points that are 'close' to a given position in space to be located easily. This class uses spatial partitioning (k-d tree) to ensure that the search for data-points is carried out in a computationally efficient manner.

The class is designed to be used in the following manner:

1) Instantiate a new DataPointLocator object. This sets up the instance ready to carry out the search. At this point the results list is empty. 2) Execute the various SearchForDataPointsWithinX methods to fill the internal results list with array-coordinates that are within the specified world-distance of the various search origins. 3) Optionally 'uniquify' the results list. 4) Examine the results list to find those points that were within the specified distances of the search origins.

Instance Methods [hide private]
 
__init__(self, volumeData)
This function creates a new DataPointLocator instance.
 
SearchForDataPointsWithin(self, world, distance)
This function searches for valid array-coordinates whose corresponding world-coordinate lies within distance of the specified world-coordinate.
 
SearchForDataPointsWithinL(self, worldCoordinates, distances)
This function is similar to SearchForDataPointsWith, however this function accepts a list of world-coordinate search origins and a corresponding list of distances.
 
UniquifyResults(self)
This function uniquifies the result list so that each array-coordinate appears only once.
 
ClearResults(self)
This function clears the current result list.
iterable< iterable< int, 3 > >
_getResults(self)
This function and the synonymous property Results allows access to the result list.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
iterable< iterable< int, 3 > > Results
This property allows access to the result list.

Inherited from object: __class__

Method Details [hide private]

__init__(self, volumeData)
(Constructor)

 

This function creates a new DataPointLocator instance.

Parameters:
  • volumeData (VolumeData) - The VolumeData instance to run the queries against
Overrides: object.__init__

SearchForDataPointsWithin(self, world, distance)

 

This function searches for valid array-coordinates whose corresponding world-coordinate lies within distance of the specified world-coordinate. The array-coordinates are appended to the internal results list.

Parameters:
  • world (iterable< float, 3 >) - The search origin, specified in world-coordinates
  • distance (float) - Locate all valid array-coordinates whose corresponding world-coordinate lies with distance of world

SearchForDataPointsWithinL(self, worldCoordinates, distances)

 

This function is similar to SearchForDataPointsWith, however this function accepts a list of world-coordinate search origins and a corresponding list of distances.

Parameters:
  • worldCoordinates (iterable< iterable< float, 3 > >) - The world-coordinates to act as search origins. len( worldCoordinates ) must be the same as len( distances )
  • distances (iterable< float >) - The corresponding distances. len( worldCoordinates ) must be the same as len( distances )

_getResults(self)

 

This function and the synonymous property Results allows access to the result list.

Returns: iterable< iterable< int, 3 > >
The array-coordinates located by the various calls to SearchForDataPointsWithinX

Property Details [hide private]

Results

This property allows access to the result list.

Get Method:
_getResults(self) - This function and the synonymous property Results allows access to the result list.
Type:
iterable< iterable< int, 3 > >