dacapo.experiments.datasplits.datasets.arrays.zarr_array ======================================================== .. py:module:: dacapo.experiments.datasplits.datasets.arrays.zarr_array Attributes ---------- .. autoapisummary:: dacapo.experiments.datasplits.datasets.arrays.zarr_array.logger Classes ------- .. autoapisummary:: dacapo.experiments.datasplits.datasets.arrays.zarr_array.ZarrArray Module Contents --------------- .. py:data:: logger .. py:class:: ZarrArray(array_config) This is a zarr array. .. attribute:: name The name of the array. :type: str .. attribute:: file_name The file name of the array. :type: Path .. attribute:: dataset The dataset name. :type: str .. attribute:: _axes The axes of the array. :type: Optional[List[str]] .. attribute:: snap_to_grid The snap to grid. :type: Optional[Coordinate] .. method:: __init__(array_config) Initializes the array type 'raw' and name for the DummyDataset instance. .. method:: __str__() Returns the string representation of the ZarrArray. .. method:: __repr__() Returns the string representation of the ZarrArray. .. method:: attrs() Returns the attributes of the array. .. method:: axes() Returns the axes of the array. .. method:: dims() Returns the dimensions of the array. .. method:: _daisy_array() Returns the daisy array. .. method:: voxel_size() Returns the voxel size of the array. .. method:: roi() Returns the region of interest of the array. .. method:: writable() Returns the boolean value of the array. .. method:: dtype() Returns the data type of the array. .. method:: num_channels() Returns the number of channels of the array. .. method:: spatial_axes() Returns the spatial axes of the array. .. method:: data() Returns the data of the array. .. method:: __getitem__(roi) Returns the data of the array for the given region of interest. .. method:: __setitem__(roi, value) Sets the data of the array for the given region of interest. .. method:: create_from_array_identifier(array_identifier, axes, roi, num_channels, voxel_size, dtype, write_size=None, name=None, overwrite=False) Creates a new ZarrArray given an array identifier. .. method:: open_from_array_identifier(array_identifier, name="") Opens a new ZarrArray given an array identifier. .. method:: _can_neuroglance() Returns the boolean value of the array. .. method:: _neuroglancer_source() Returns the neuroglancer source of the array. .. method:: _neuroglancer_layer() Returns the neuroglancer layer of the array. .. method:: _transform_matrix() Returns the transform matrix of the array. .. method:: _output_dimensions() Returns the output dimensions of the array. .. method:: _source_name() Returns the source name of the array. .. method:: add_metadata(metadata) Adds metadata to the array. .. rubric:: Notes This class is used to create a zarr array. .. py:attribute:: name .. py:attribute:: file_name .. py:attribute:: dataset .. py:attribute:: snap_to_grid .. py:property:: mode .. py:property:: attrs Returns the attributes of the array. :param attrs: The attributes of the array. :type attrs: Any :returns: The attributes of the array. :rtype: Any :raises NotImplementedError: .. rubric:: Examples >>> attrs() .. rubric:: Notes This method is used to return the attributes of the array. .. py:property:: axes Returns the axes of the array. :param axes: The axes of the array. :type axes: List[str] :returns: The axes of the array. :rtype: List[str] :raises NotImplementedError: .. rubric:: Examples >>> axes() .. rubric:: Notes This method is used to return the axes of the array. .. py:property:: dims :type: int Returns the dimensions of the array. :param dims: The dimensions of the array. :type dims: int :returns: The dimensions of the array. :rtype: int :raises NotImplementedError: .. rubric:: Examples >>> dims() .. rubric:: Notes This method is used to return the dimensions of the array. .. py:method:: voxel_size() -> funlib.geometry.Coordinate Returns the voxel size of the array. :param voxel_size: The voxel size. :type voxel_size: Coordinate :returns: The voxel size of the array. :rtype: Coordinate :raises NotImplementedError: .. rubric:: Examples >>> voxel_size() .. rubric:: Notes This method is used to return the voxel size of the array. .. py:method:: roi() -> funlib.geometry.Roi Returns the region of interest of the array. :param roi: The region of interest. :type roi: Roi :returns: The region of interest of the array. :rtype: Roi :raises NotImplementedError: .. rubric:: Examples >>> roi() .. rubric:: Notes This method is used to return the region of interest of the array. .. py:property:: writable :type: bool Returns the boolean value of the array. :param writable: The boolean value of the array. :type writable: bool :returns: The boolean value of the array. :rtype: bool :raises NotImplementedError: .. rubric:: Examples >>> writable() .. rubric:: Notes This method is used to return the boolean value of the array. .. py:property:: dtype :type: Any Returns the data type of the array. :param dtype: The data type of the array. :type dtype: Any :returns: The data type of the array. :rtype: Any :raises NotImplementedError: .. rubric:: Examples >>> dtype() .. rubric:: Notes This method is used to return the data type of the array. .. py:property:: num_channels :type: Optional[int] Returns the number of channels of the array. :param num_channels: The number of channels of the array. :type num_channels: Optional[int] :returns: The number of channels of the array. :rtype: Optional[int] :raises NotImplementedError: .. rubric:: Examples >>> num_channels() .. rubric:: Notes This method is used to return the number of channels of the array. .. py:property:: spatial_axes :type: List[str] Returns the spatial axes of the array. :param spatial_axes: The spatial axes of the array. :type spatial_axes: List[str] :returns: The spatial axes of the array. :rtype: List[str] :raises NotImplementedError: .. rubric:: Examples >>> spatial_axes() .. rubric:: Notes This method is used to return the spatial axes of the array. .. py:property:: data :type: Any Returns the data of the array. :param data: The data of the array. :type data: Any :returns: The data of the array. :rtype: Any :raises NotImplementedError: .. rubric:: Examples >>> data() .. rubric:: Notes This method is used to return the data of the array. .. py:method:: create_from_array_identifier(array_identifier, axes, roi, num_channels, voxel_size, dtype, mode='a', write_size=None, name=None, overwrite=False) :classmethod: Create a new ZarrArray given an array identifier. It is assumed that this array_identifier points to a dataset that does not yet exist. :param array_identifier: The array identifier. :type array_identifier: ArrayIdentifier :param axes: The axes of the array. :type axes: List[str] :param roi: The region of interest. :type roi: Roi :param num_channels: The number of channels. :type num_channels: int :param voxel_size: The voxel size. :type voxel_size: Coordinate :param dtype: The data type. :type dtype: Any :param write_size: The write size. :type write_size: Optional[Coordinate] :param name: The name of the array. :type name: Optional[str] :param overwrite: The boolean value to overwrite the array. :type overwrite: bool :returns: The ZarrArray. :rtype: ZarrArray :raises NotImplementedError: .. rubric:: Examples >>> create_from_array_identifier(array_identifier, axes, roi, num_channels, voxel_size, dtype, write_size=None, name=None, overwrite=False) .. rubric:: Notes This method is used to create a new ZarrArray given an array identifier. .. py:method:: open_from_array_identifier(array_identifier, name='') :classmethod: Opens a new ZarrArray given an array identifier. :param array_identifier: The array identifier. :type array_identifier: ArrayIdentifier :param name: The name of the array. :type name: str :returns: The ZarrArray. :rtype: ZarrArray :raises NotImplementedError: .. rubric:: Examples >>> open_from_array_identifier(array_identifier, name="") .. rubric:: Notes This method is used to open a new ZarrArray given an array identifier. .. py:method:: add_metadata(metadata: Dict[str, Any]) -> None Adds metadata to the array. :param metadata: The metadata to add to the array. :type metadata: Dict[str, Any] :raises NotImplementedError: .. rubric:: Examples >>> add_metadata(metadata) .. rubric:: Notes This method is used to add metadata to the array.