3.10.1.2.1.6. opengate.actors.dataitems

3.10.1.2.1.6.1. Attributes

available_data_container_classes

3.10.1.2.1.6.2. Classes

DataItem

MeanValueDataItemMixin

This class cannot be instantiated on its own.

ArithmeticDataItem

Base class for data items where the data component already has implemented arithmetic operators.

ArrayDataItem

Base class for data items where the data component already has implemented arithmetic operators.

ScalarDataItem

Base class for data items where the data component already has implemented arithmetic operators.

ItkImageDataItem

MeanItkImageDataItem

This class represents an ITK image which is meant to hold mean values per voxel.

DataContainer

Common base class for all containers. Nothing implemented here for now.

DataDictionary

Common base class for all containers. Nothing implemented here for now.

DataItemContainer

This is a base class. Inherit from it to implement specific containers.

SingleArray

This is a base class. Inherit from it to implement specific containers.

DoubleArray

This is a base class. Inherit from it to implement specific containers.

SingleItkImage

This is a base class. Inherit from it to implement specific containers.

SingleMeanItkImage

This is a base class. Inherit from it to implement specific containers.

SingleItkImageWithVariance

This is a base class. Inherit from it to implement specific containers.

QuotientItkImage

This is a base class. Inherit from it to implement specific containers.

QuotientMeanItkImage

This is a base class. Inherit from it to implement specific containers.

3.10.1.2.1.6.3. Functions

merge_data(list_of_data)

3.10.1.2.1.6.4. Module Contents

class opengate.actors.dataitems.DataItem(*args, data=None, meta_data=None, **kwargs)[source]
data = None[source]
meta_data[source]
set_data(data, **kwargs)[source]
property data_is_none[source]
_assert_data_is_not_none()[source]
__add__(other)[source]
__iadd__(other)[source]
__mul__(other)[source]
__imul__(other)[source]
__truediv__(other)[source]
__getattr__(item)[source]
merge_with(other)[source]

The base class implements merging as summation. Specific classes can override this, e.g. to merge mean values.

inplace_merge_with(other)[source]

The base class implements merging as summation. Specific classes can override this, e.g. to merge mean values.

abstract write(*args, **kwargs)[source]
property number_of_samples[source]
class opengate.actors.dataitems.MeanValueDataItemMixin[source]

This class cannot be instantiated on its own. It is solely meant to be mixed into a class that inherits from DataItem (or daughters). Important: It must appear before the main base class in the inheritance order so that the overloaded methods take priority.

number_of_samples: int[source]
merge_with(other)[source]
inplace_merge_with(other)[source]
class opengate.actors.dataitems.ArithmeticDataItem(*args, data=None, meta_data=None, **kwargs)[source]

Bases: DataItem

Base class for data items where the data component already has implemented arithmetic operators. Examples: Scalars, Numpy arrays, etc.

__iadd__(other)[source]
__add__(other)[source]
__mul__(other)[source]
__imul__(other)[source]
__truediv__(other)[source]
__itruediv__(other)[source]
write(path, **kwargs)[source]
class opengate.actors.dataitems.ArrayDataItem(*args, data=None, meta_data=None, **kwargs)[source]

Bases: ArithmeticDataItem

Base class for data items where the data component already has implemented arithmetic operators. Examples: Scalars, Numpy arrays, etc.

set_data(data)[source]
class opengate.actors.dataitems.ScalarDataItem(*args, data=None, meta_data=None, **kwargs)[source]

Bases: ArithmeticDataItem

Base class for data items where the data component already has implemented arithmetic operators. Examples: Scalars, Numpy arrays, etc.

abstract write(*args, **kwargs)[source]
class opengate.actors.dataitems.ItkImageDataItem(*args, data=None, meta_data=None, **kwargs)[source]

Bases: DataItem

property image[source]
__iadd__(other)[source]
__add__(other)[source]
__mul__(other)[source]
__imul__(other)[source]
__truediv__(other)[source]
__itruediv__(other)[source]
set_image_properties(**properties)[source]
get_image_properties()[source]
copy_image_properties(other_image)[source]
create_empty_image(size, spacing, origin=None, pixel_type='float', allocate=True, fill_value=0)[source]
write(path)[source]
class opengate.actors.dataitems.MeanItkImageDataItem(*args, data=None, meta_data=None, **kwargs)[source]

Bases: MeanValueDataItemMixin, ItkImageDataItem

This class represents an ITK image which is meant to hold mean values per voxel. The class MeanValueDataItemMixin therefore overloads the merge_with and inplace_merge_with methods.

class opengate.actors.dataitems.DataContainer(belongs_to, *args, **kwargs)[source]

Common base class for all containers. Nothing implemented here for now.

belongs_to[source]
class opengate.actors.dataitems.DataDictionary(initial_dict, *args, encoder='json', **kwargs)[source]

Bases: DataContainer

Common base class for all containers. Nothing implemented here for now.

data[source]
write(path)[source]
class opengate.actors.dataitems.DataItemContainer(*args, data=None, **kwargs)[source]

Bases: DataContainer

This is a base class. Inherit from it to implement specific containers.

_data_item_classes = ()[source]
data[source]
classmethod get_default_data_item_config()[source]
property data_item_config[source]
property _tuple_length[source]
property meta_data[source]
update_meta_data(meta_data)[source]
set_data(*data, item=None)[source]
get_data_item_object(item)[source]
get_data(item=0)[source]
property data_is_none[source]
_assert_data_is_not_none()[source]
propagate_operator(other, operator)[source]
propagate_operator_inplace(other, operator)[source]
__iadd__(other)[source]
__add__(other)[source]
__imul__(other)[source]
__mul__(other)[source]
__itruediv__(other)[source]
__truediv__(other)[source]
inplace_merge_with(other)[source]
merge_with(other)[source]
write(path, item, **kwargs)[source]
__getattr__(item)[source]
class opengate.actors.dataitems.SingleArray(*args, **kwargs)[source]

Bases: DataItemContainer

This is a base class. Inherit from it to implement specific containers.

_data_item_classes[source]
class opengate.actors.dataitems.DoubleArray(*args, **kwargs)[source]

Bases: DataItemContainer

This is a base class. Inherit from it to implement specific containers.

_data_item_classes[source]
class opengate.actors.dataitems.SingleItkImage(*args, data=None, **kwargs)[source]

Bases: DataItemContainer

This is a base class. Inherit from it to implement specific containers.

_data_item_classes[source]
property image[source]
class opengate.actors.dataitems.SingleMeanItkImage(*args, data=None, **kwargs)[source]

Bases: DataItemContainer

This is a base class. Inherit from it to implement specific containers.

_data_item_classes[source]
class opengate.actors.dataitems.SingleItkImageWithVariance(*args, data=None, **kwargs)[source]

Bases: DataItemContainer

This is a base class. Inherit from it to implement specific containers.

_data_item_classes[source]
default_data_item_config[source]
get_variance_or_uncertainty(which_quantity)[source]
property variance[source]
property std[source]
property uncertainty[source]
class opengate.actors.dataitems.QuotientItkImage(*args, data=None, **kwargs)[source]

Bases: DataItemContainer

This is a base class. Inherit from it to implement specific containers.

_data_item_classes[source]
default_data_item_config[source]
property quotient[source]
class opengate.actors.dataitems.QuotientMeanItkImage(*args, data=None, **kwargs)[source]

Bases: QuotientItkImage

This is a base class. Inherit from it to implement specific containers.

_data_item_classes[source]
opengate.actors.dataitems.merge_data(list_of_data)[source]
opengate.actors.dataitems.available_data_container_classes[source]