class documentation

A heatmap for an image.

Provide either the map or map_path argument to define the heatmap.

Parameters
mapa 2D numpy array
map_paththe absolute path to the heatmap image on disk
rangean optional [min, max] range of the map's values. If None is provided, [0, 1] will be assumed if map contains floating point values, [0, 255] will be assumed if map contains integer values, and the dtype of the image will be assumed if map_path is used
Method export_map Exports this instance's map to the given path.
Method get_map Returns the map array for this instance.
Method import_map Imports this instance's map from disk to its map attribute.
Class Variable range Undocumented
Instance Variable map Undocumented
Instance Variable map_path Undocumented
Property has_map Whether this instance has a map.
Constant _MEDIA_FIELD Undocumented

Inherited from _HasID:

Class Variable tags Undocumented
Instance Variable id Undocumented
Method _id.setter Undocumented
Property _id Undocumented

Inherited from Label (via _HasID, _HasMedia):

Method delete_attribute Deletes the attribute with the given name.
Method get_attribute_value Gets the value of the attribute with the given name.
Method has_attribute Determines whether the label has an attribute with the given name.
Method iter_attributes Returns an iterator over the custom attributes of the label.
Method set_attribute_value Sets the value of the attribute with the given name.
def export_map(self, outpath, update=False): (source)

Exports this instance's map to the given path.

Parameters
outpaththe path to write the map
update:Falsewhether to clear this instance's map and range attributes and set its map_path attribute when exporting in-database heatmaps
def get_map(self): (source)

Returns the map array for this instance.

Returns
a numpy array, or None
def import_map(self, update=False): (source)

Imports this instance's map from disk to its map attribute.

Parameters
update:Falsewhether to clear this instance's map_path attribute after importing
outpaththe path to write the map

Undocumented

Undocumented

map_path: None = (source)

Undocumented

Whether this instance has a map.

_MEDIA_FIELD: str = (source)

Undocumented

Value
'map_path'