RoiSubsetStateNd

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

Bases: glue.core.subset.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.

pretransform: callable, 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

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

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.