dacapo.experiments.arraytypes

Submodules

Classes

AnnotationArray

An AnnotationArray is a uint8, uint16, uint32 or uint64 Array where each

IntensitiesArray

An IntensitiesArray is an Array of measured intensities. Each voxel has a value in the range [min, max].

DistanceArray

An array containing signed distances to the nearest boundary voxel for a particular label class.

Mask

A class that inherits the ArrayType class. This is a representation of a Mask in the system.

EmbeddingArray

A generic output of a model that could represent almost anything. Assumed to be

ProbabilityArray

Class to represent an array containing probability distributions for each voxel pointed by its coordinate.

Package Contents

class dacapo.experiments.arraytypes.AnnotationArray

An AnnotationArray is a uint8, uint16, uint32 or uint64 Array where each voxel has a value associated with its class. The class of each voxel can be determined by simply taking the value.

classes

A mapping from class label to class name.

Type:

Dict[int, str]

interpolatable(self) bool

It is a method that returns False.

Note

This class is used to create an AnnotationArray object which is used to represent an array of class labels.

classes: Dict[int, str]
property interpolatable

Method to return False.

Returns:

bool

Returns a boolean value of False representing that the values are not interpolatable.

Raises:

NotImplementedError – This method is not implemented in this class.

Examples

>>> annotation_array = AnnotationArray(classes={1: "mitochondria", 2: "membrane"})
>>> annotation_array.interpolatable
False

Note

This method is used to check if the array is interpolatable.

class dacapo.experiments.arraytypes.IntensitiesArray

An IntensitiesArray is an Array of measured intensities. Each voxel has a value in the range [min, max].

channels

A mapping from channel to a name describing that channel.

Type:

Dict[int, str]

min

The minimum possible value of your intensities.

Type:

float

max

The maximum possible value of your intensities.

Type:

float

__attrs_post_init__(self)

This method is called after the instance has been initialized by the constructor.

interpolatable(self) bool

It is a method that returns True.

Note

This class is used to create an IntensitiesArray object which is used to represent an array of measured intensities.

channels: Dict[int, str]
min: float
max: float
property interpolatable: bool

Method to return True.

Returns:

bool

Returns a boolean value of True representing that the values are interpolatable.

Raises:

NotImplementedError – This method is not implemented in this class.

Examples

>>> intensities_array = IntensitiesArray(channels={1: "channel1"}, min=0, max=1)
>>> intensities_array.interpolatable
True

Note

This method is used to check if the array is interpolatable.

class dacapo.experiments.arraytypes.DistanceArray

An array containing signed distances to the nearest boundary voxel for a particular label class. Distances should be positive outside an object and negative inside an object. The distance should be 0 on the boundary. The class of each voxel can be determined by simply taking the argmin. The distance should be in the range [-max, max].

classes

A mapping from channel to class on which distances were calculated.

Type:

Dict[int, str]

max

The maximum possible distance value of your distances.

Type:

float

interpolatable(self) bool

It is a method that returns True.

Note

This class is used to create a DistanceArray object which is used to represent an array containing signed distances to the nearest boundary voxel for a particular label class. The class of each voxel can be determined by simply taking the argmin.

classes: Dict[int, str]
property interpolatable: bool

Checks if the array is interpolatable. Returns True for this class.

Returns:

True indicating that the data can be interpolated.

Return type:

bool

Raises:

NotImplementedError – This method is not implemented in this class

Examples

>>> distance_array = DistanceArray(classes={1: "class1"})
>>> distance_array.interpolatable
True

Note

This method is used to check if the array is interpolatable.

class dacapo.experiments.arraytypes.Mask

A class that inherits the ArrayType class. This is a representation of a Mask in the system.

interpolatable()

It is a method that returns False.

Note

This class is used to represent a Mask object in the system.

property interpolatable: bool

Method to return False.

Returns:

bool

Returns a boolean value of False representing that the values are not interpolatable.

Raises:

NotImplementedError – This method is not implemented in this class.

Examples

>>> mask = Mask()
>>> mask.interpolatable
False

Note

This method is used to check if the array is interpolatable.

class dacapo.experiments.arraytypes.EmbeddingArray

A generic output of a model that could represent almost anything. Assumed to be float, interpolatable, and have sum number of channels. The channels are not specified, and the array can be of any shape.

embedding_dims

The dimension of your embedding.

Type:

int

interpolatable()

It is a method that returns True.

Note

This class is used to represent an EmbeddingArray object in the system.

embedding_dims: int
property interpolatable: bool

Method to return True.

Returns:

bool

Returns a boolean value of True representing that the values are interpolatable.

Raises:

NotImplementedError – This method is not implemented in this class.

Examples

>>> embedding_array = EmbeddingArray(embedding_dims=10)
>>> embedding_array.interpolatable
True

Note

This method is used to check if the array is interpolatable.

class dacapo.experiments.arraytypes.ProbabilityArray

Class to represent an array containing probability distributions for each voxel pointed by its coordinate.

The class defines a ProbabilityArray object with each voxel having a vector of length c, where c is the number of classes. The l1 norm of this vector should always be 1. The class of each voxel can be determined by simply taking the argmax.

classes

A mapping from channel to class on which distances were calculated.

Type:

List[str]

Note

This class is used to create a ProbabilityArray object which is used to represent an array containing probability distributions for each voxel pointed by its coordinate. The class of each voxel can be determined by simply taking the argmax.

classes: List[str]
property interpolatable: bool

Checks if the array is interpolatable. Returns True for this class.

Returns:

True indicating that the data can be interpolated.

Return type:

bool

Raises:

NotImplementedError – This method is not implemented in this class

Examples

>>> probability_array = ProbabilityArray(classes=["class1", "class2"])
>>> probability_array.interpolatable
True

Note

This method is used to check if the array is interpolatable.