RoiSubsetStateNd#

class glue.core.subset.RoiSubsetStateNd(atts=[], roi=None, pretransform=None)[source]#

Bases: SubsetState

A subset defined as the set of points in N dimensions that lie inside a region of interest (ROI).

The dimensions are defined as numerical data attributes.

Parameters:
attslist of ComponentID

The data attributes that define the dimensions of the region.

roiRoi

The region of interest.

pretransformcallable, optional

A function that can be optionally applied to the data before checking points against the region.

Attributes Summary

attributes

The attributes that the subset state depends on.

pretransform

An optional transformation function to apply before checking if points are in the ROI.

roi

The region of interest.

Methods Summary

center()

Return center of underlying ROI, if any.

move_to(*args)

Move any underlying ROI to the new given center.

to_mask(data[, view])

Compute the mask for this subset state.

Attributes Documentation

attributes[source]#
pretransform[source]#

An optional transformation function to apply before checking if points are in the ROI.

roi[source]#

The region of interest.

Methods Documentation

center()[source]#

Return center of underlying ROI, if any.

move_to(*args)[source]#

Move any underlying ROI to the new given center.

to_mask(data, view=None)[source]#

Compute the mask for this subset state.

Parameters:
dataData

The dataset to compute the mask for.

view

Any object that returns a valid view for a Numpy array.