From 26cf718b4d585dc61c58e55b10d91f2835d0372e Mon Sep 17 00:00:00 2001 From: rhoadesScholar Date: Mon, 4 Nov 2024 19:44:24 +0000 Subject: [PATCH] deploy: 59dde48c4aa07f69b1216904f99d6e774e315c05 --- _modules/cellmap_data/dataloader.html | 8 +- _modules/cellmap_data/dataset.html | 4 +- _modules/cellmap_data/dataset_writer.html | 874 ++++++++++++++++++++++ _modules/cellmap_data/image.html | 435 ++++++++++- _modules/cellmap_data/subdataset.html | 5 +- _modules/cellmap_data/utils/metadata.html | 425 +++++++++++ _modules/index.html | 2 + _sources/cellmap_data.dataset_writer.rst | 18 + _sources/cellmap_data.image.rst | 1 + _sources/cellmap_data.rst | 1 + _sources/cellmap_data.utils.figs.rst | 2 +- _sources/cellmap_data.utils.metadata.rst | 15 + _sources/cellmap_data.utils.rst | 1 + cellmap_data.CellMapDataLoader.html | 4 +- cellmap_data.dataloader.html | 2 +- cellmap_data.dataset_writer.html | 733 ++++++++++++++++++ cellmap_data.html | 15 +- cellmap_data.image.html | 117 +++ cellmap_data.utils.html | 3 + cellmap_data.utils.metadata.html | 461 ++++++++++++ genindex.html | 126 +++- modules.html | 48 ++ objects.inv | Bin 2568 -> 2886 bytes py-modindex.html | 10 + searchindex.js | 2 +- 25 files changed, 3250 insertions(+), 62 deletions(-) create mode 100644 _modules/cellmap_data/dataset_writer.html create mode 100644 _modules/cellmap_data/utils/metadata.html create mode 100644 _sources/cellmap_data.dataset_writer.rst create mode 100644 _sources/cellmap_data.utils.metadata.rst create mode 100644 cellmap_data.dataset_writer.html create mode 100644 cellmap_data.utils.metadata.html diff --git a/_modules/cellmap_data/dataloader.html b/_modules/cellmap_data/dataloader.html index a81f0bc..f99f299 100644 --- a/_modules/cellmap_data/dataloader.html +++ b/_modules/cellmap_data/dataloader.html @@ -246,10 +246,10 @@

Source code for cellmap_data.dataloader

 import torch
-from torch.utils.data import DataLoader, Sampler
+from torch.utils.data import DataLoader, Sampler, Subset
 from .dataset import CellMapDataset
 from .multidataset import CellMapMultiDataset
-from .subdataset import CellMapSubset
+from .dataset_writer import CellMapDatasetWriter
 from typing import Callable, Iterable, Optional, Sequence
 
 
@@ -281,7 +281,7 @@ 

Source code for cellmap_data.dataloader

 [docs]
     def __init__(
         self,
-        dataset: CellMapMultiDataset | CellMapDataset | CellMapSubset,
+        dataset: CellMapMultiDataset | CellMapDataset | Subset | CellMapDatasetWriter,
         classes: Iterable[str],
         batch_size: int = 1,
         num_workers: int = 0,
@@ -373,7 +373,7 @@ 

Source code for cellmap_data.dataloader

 [docs]
     def collate_fn(self, batch: list[dict]) -> dict[str, torch.Tensor]:
         """Combine a list of dictionaries from different sources into a single dictionary for output."""
-        outputs: dict[str, torch.Tensor] = {}
+        outputs = {}
         for b in batch:
             for key, value in b.items():
                 if key not in outputs:
diff --git a/_modules/cellmap_data/dataset.html b/_modules/cellmap_data/dataset.html
index 66ca8d3..1dcd75a 100644
--- a/_modules/cellmap_data/dataset.html
+++ b/_modules/cellmap_data/dataset.html
@@ -663,16 +663,18 @@ 

Source code for cellmap_data.dataset

 [docs]
     def __getitem__(self, idx: int) -> dict[str, torch.Tensor]:
         """Returns a crop of the input and target data as PyTorch tensors, corresponding to the coordinate of the unwrapped index."""
+        idx = np.array(idx)
+        idx[idx < 0] = len(self) + idx[idx < 0]
         try:
             center = np.unravel_index(
                 idx, [self.sampling_box_shape[c] for c in self.axis_order]
             )
         except ValueError:
+            # TODO: This is a hacky temprorary fix. Need to figure out why this is happening
             logger.error(
                 f"Index {idx} out of bounds for dataset {self} of length {len(self)}"
             )
             logger.warning(f"Returning closest index in bounds")
-            # TODO: This is a hacky temprorary fix. Need to figure out why this is happening
             center = [self.sampling_box_shape[c] - 1 for c in self.axis_order]
         center = {
             c: center[i] * self.largest_voxel_sizes[c] + self.sampling_box[c][0]
diff --git a/_modules/cellmap_data/dataset_writer.html b/_modules/cellmap_data/dataset_writer.html
new file mode 100644
index 0000000..84e7048
--- /dev/null
+++ b/_modules/cellmap_data/dataset_writer.html
@@ -0,0 +1,874 @@
+
+
+
+
+
+
+  
+    
+    
+    cellmap_data.dataset_writer — CellMap-Data
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+
+    
+    
+  
+  
+  
+  
+  
+
+
+    
+    
+    
+    
+    
+    
+    
+    
+  
+  
+  
+  
+  
+  
+  
+
+  
+  
+  
+  
+  
+ + + + + + + + + +
+ +
+ + + + + +
+
+ + + + + + +
+ + + + + + + + + + + + + +
+ +
+ + + +
+ +
+
+ +
+
+ +
+ +
+ +
+ + +
+ +
+ +
+ + + + + + + + + + + + +
+ +
+ +
+
+ + + +
+

+ +
+
+ +
+
+
+ + + + +
+ +

Source code for cellmap_data.dataset_writer

+# %%
+import os
+from typing import Callable, Mapping, Sequence, Optional
+import numpy as np
+import torch
+from torch.utils.data import Dataset, Subset, DataLoader
+import tensorstore
+from upath import UPath
+
+from .image import CellMapImage, ImageWriter
+import logging
+
+logger = logging.getLogger(__name__)
+
+
+
+[docs] +def split_target_path(path: str) -> tuple[str, list[str]]: + """Splits a path to groundtruth data into the main path string, and the classes supplied for it.""" + try: + path_prefix, path_rem = path.split("[") + classes, path_suffix = path_rem.split("]") + classes = classes.split(",") + path_string = path_prefix + "{label}" + path_suffix + except ValueError: + path_string = path + classes = [path.split(os.path.sep)[-1]] + return path_string, classes
+ + + +# %% +
+[docs] +class CellMapDatasetWriter(Dataset): + """ + This class is used to write a dataset to disk in a format that can be read by the CellMapDataset class. It is useful, for instance, for writing predictions from a model to disk. + """ + + def __init__( + self, + raw_path: str, # TODO: Switch "raw_path" to "input_path" + target_path: str, + classes: Sequence[str], + input_arrays: Mapping[str, Mapping[str, Sequence[int | float]]], + target_arrays: Mapping[str, Mapping[str, Sequence[int | float]]], + target_bounds: Mapping[str, Mapping[str, list[float]]], + raw_value_transforms: Optional[Callable] = None, + axis_order: str = "zyx", + context: Optional[tensorstore.Context] = None, # type: ignore + rng: Optional[torch.Generator] = None, + empty_value: float | int = 0, + overwrite: bool = False, + ) -> None: + """Initializes the CellMapDatasetWriter. + + Args: + + raw_path (str): The full path to the raw data zarr, excluding the mulstiscale level. + target_path (str): The full path to the ground truth data zarr, excluding the mulstiscale level and the class name. + classes (Sequence[str]): The classes in the dataset. + input_arrays (Mapping[str, Mapping[str, Sequence[int | float]]]): The input arrays to return for processing. The dictionary should have the following structure:: + + { + "array_name": { + "shape": tuple[int], + "scale": Sequence[float], + + and optionally: + "scale_level": int, + }, + ... + } + + where 'array_name' is the name of the array, 'shape' is the shape of the array in voxels, and 'scale' is the scale of the array in world units. The 'scale_level' is the multiscale level to use for the array, otherwise set to 0 if not supplied. + target_arrays (Mapping[str, Mapping[str, Sequence[int | float]]]): The target arrays to write to disk, with format matching that for input_arrays. + target_bounds (Mapping[str, Mapping[str, list[float]]]): The bounding boxes for each target array, in world units. Example: {"array_1": {"x": [12.0, 102.0], "y": [12.0, 102.0], "z": [12.0, 102.0]}}. + raw_value_transforms (Optional[Callable]): The value transforms to apply to the raw data. + axis_order (str): The order of the axes in the data. + context (Optional[tensorstore.Context]): The context to use for the tensorstore. + rng (Optional[torch.Generator]): The random number generator to use. + empty_value (float | int): The value to use for empty data in an array. + overwrite (bool): Whether to overwrite existing data. + """ + self.raw_path = raw_path + self.target_path = target_path + self.classes = classes + self.input_arrays = input_arrays + self.target_arrays = target_arrays + self.target_bounds = target_bounds + self.raw_value_transforms = raw_value_transforms + self.axis_order = axis_order + self.context = context + self._rng = rng + self.empty_value = empty_value + self.overwrite = overwrite + self._current_center = None + self._current_idx = None + self.input_sources: dict[str, CellMapImage] = {} + for array_name, array_info in self.input_arrays.items(): + self.input_sources[array_name] = CellMapImage( + self.raw_path, + "raw", + array_info["scale"], + array_info["shape"], # type: ignore + value_transform=self.raw_value_transforms, + context=self.context, + pad=True, + pad_value=0, # inputs to the network should be padded with 0 + interpolation="linear", + ) + self.target_array_writers: dict[str, dict[str, ImageWriter]] = {} + for array_name, array_info in self.target_arrays.items(): + self.target_array_writers[array_name] = self.get_target_array_writer( + array_name, array_info + ) + + @property + def center(self) -> Mapping[str, float] | None: + """Returns the center of the dataset in world units.""" + try: + return self._center + except AttributeError: + if self.bounding_box is None: + self._center = None + else: + center = {} + for c, (start, stop) in self.bounding_box.items(): + center[c] = start + (stop - start) / 2 + self._center = center + return self._center + + @property + def smallest_voxel_sizes(self) -> Mapping[str, float]: + """Returns the smallest voxel size of the dataset.""" + try: + return self._smallest_voxel_sizes + except AttributeError: + smallest_voxel_size = {c: np.inf for c in self.axis_order} + for source in list(self.input_sources.values()) + list( + self.target_array_writers.values() + ): + if isinstance(source, dict): + for _, source in source.items(): + if not hasattr(source, "scale") or source.scale is None: # type: ignore + continue + for c, size in source.scale.items(): # type: ignore + smallest_voxel_size[c] = min(smallest_voxel_size[c], size) + else: + if not hasattr(source, "scale") or source.scale is None: + continue + for c, size in source.scale.items(): + smallest_voxel_size[c] = min(smallest_voxel_size[c], size) + self._smallest_voxel_sizes = smallest_voxel_size + + return self._smallest_voxel_sizes + + @property + def smallest_target_array(self) -> Mapping[str, float]: + """Returns the smallest target array in world units.""" + try: + return self._smallest_target_array + except AttributeError: + smallest_target_array = {c: np.inf for c in self.axis_order} + for writer in self.target_array_writers.values(): + for _, writer in writer.items(): + for c, size in writer.write_world_shape.items(): + smallest_target_array[c] = min(smallest_target_array[c], size) + self._smallest_target_array = smallest_target_array + return self._smallest_target_array + + @property + def bounding_box(self) -> Mapping[str, list[float]]: + """Returns the bounding box inclusive of all the target images.""" + try: + return self._bounding_box + except AttributeError: + bounding_box = None + for current_box in self.target_bounds.values(): + bounding_box = self._get_box_union(current_box, bounding_box) + if bounding_box is None: + logger.warning( + "Bounding box is None. This may result in errors when trying to sample from the dataset." + ) + bounding_box = {c: [-np.inf, np.inf] for c in self.axis_order} + self._bounding_box = bounding_box + return self._bounding_box + + @property + def bounding_box_shape(self) -> Mapping[str, int]: + """Returns the shape of the bounding box of the dataset in voxels of the smallest voxel size requested.""" + try: + return self._bounding_box_shape + except AttributeError: + self._bounding_box_shape = self._get_box_shape(self.bounding_box) + return self._bounding_box_shape + + @property + def sampling_box(self) -> Mapping[str, list[float]]: + """Returns the sampling box of the dataset (i.e. where centers should be drawn from and to fully sample within the bounding box).""" + try: + return self._sampling_box + except AttributeError: + sampling_box = None + for array_name, array_info in self.target_arrays.items(): + padding = {c: np.ceil((shape * scale) / 2) for c, shape, scale in zip(self.axis_order, array_info["shape"], array_info["scale"])} # type: ignore + this_box = { + c: [bounds[0] + padding[c], bounds[1] - padding[c]] + for c, bounds in self.target_bounds[array_name].items() + } + sampling_box = self._get_box_union(this_box, sampling_box) + if sampling_box is None: + logger.warning( + "Sampling box is None. This may result in errors when trying to sample from the dataset." + ) + sampling_box = {c: [-np.inf, np.inf] for c in self.axis_order} + self._sampling_box = sampling_box + return self._sampling_box + + @property + def sampling_box_shape(self) -> dict[str, int]: + """Returns the shape of the sampling box of the dataset in voxels of the smallest voxel size requested.""" + try: + return self._sampling_box_shape + except AttributeError: + self._sampling_box_shape = self._get_box_shape(self.sampling_box) + for c, size in self._sampling_box_shape.items(): + if size <= 0: + logger.warning( + f"Sampling box shape is <= 0 for axis {c} with size {size}. Setting to 1" + ) + self._sampling_box_shape[c] = 1 + return self._sampling_box_shape + + @property + def size(self) -> int: + """Returns the size of the dataset in voxels of the smallest voxel size requested.""" + try: + return self._size + except AttributeError: + self._size = np.prod( + [stop - start for start, stop in self.bounding_box.values()] + ).astype(int) + return self._size + + @property + def writer_indices(self) -> Sequence[int]: + """Returns the indices of the dataset that will produce non-overlapping tiles for use in writer, based on the smallest requested target array.""" + try: + return self._writer_indices + except AttributeError: + self._writer_indices = self.get_indices(self.smallest_target_array) + return self._writer_indices + + @property + def blocks(self) -> Subset: + """A subset of the validation datasets, tiling the validation datasets with non-overlapping blocks.""" + try: + return self._blocks + except AttributeError: + self._blocks = Subset( + self, + self.writer_indices, + ) + return self._blocks + +
+[docs] + def loader( + self, + batch_size: int = 1, + num_workers: int = 0, + **kwargs, + ): + """Returns a DataLoader for the dataset.""" + return DataLoader( + self.blocks, + batch_size=batch_size, + num_workers=num_workers, + collate_fn=self.collate_fn, + **kwargs, + )
+ + +
+[docs] + def collate_fn(self, batch: list[dict]) -> dict[str, torch.Tensor]: + """Combine a list of dictionaries from different sources into a single dictionary for output.""" + outputs = {} + for b in batch: + for key, value in b.items(): + if key not in outputs: + outputs[key] = [] + outputs[key].append(value) + for key, value in outputs.items(): + outputs[key] = torch.stack(value) + return outputs
+ + + @property + def device(self) -> torch.device: + """Returns the device for the dataset.""" + try: + return self._device + except AttributeError: + if torch.cuda.is_available(): + self._device = torch.device("cuda") + elif torch.backends.mps.is_available(): + self._device = torch.device("mps") + else: + self._device = torch.device("cpu") + self.to(self._device) + return self._device + +
+[docs] + def __len__(self) -> int: + """Returns the length of the dataset, determined by the number of coordinates that could be sampled as the center for an array request.""" + try: + return self._len + except AttributeError: + size = np.prod([self.sampling_box_shape[c] for c in self.axis_order]) + self._len = int(size) + return self._len
+ + +
+[docs] + def get_center(self, idx: int) -> dict[str, float]: + idx = np.array(idx) + idx[idx < 0] = len(self) + idx[idx < 0] + try: + center = np.unravel_index( + idx, [self.sampling_box_shape[c] for c in self.axis_order] + ) + except ValueError: + logger.error( + f"Index {idx} out of bounds for dataset {self} of length {len(self)}" + ) + logger.warning(f"Returning closest index in bounds") + # TODO: This is a hacky temprorary fix. Need to figure out why this is happening + center = [self.sampling_box_shape[c] - 1 for c in self.axis_order] + center = { + c: center[i] * self.smallest_voxel_sizes[c] + self.sampling_box[c][0] + for i, c in enumerate(self.axis_order) + } + return center
+ + +
+[docs] + def __getitem__(self, idx: int) -> dict[str, torch.Tensor]: + """Returns a crop of the input and target data as PyTorch tensors, corresponding to the coordinate of the unwrapped index.""" + + self._current_idx = idx + self._current_center = self.get_center(idx) + outputs = {} + for array_name in self.input_arrays.keys(): + array = self.input_sources[array_name][self._current_center] # type: ignore + # TODO: Assumes 1 channel (i.e. grayscale) + if array.shape[0] != 1: + outputs[array_name] = array[None, ...] + else: + outputs[array_name] = array + outputs["idx"] = torch.tensor(idx) + + return outputs
+ + + def __setitem__( + self, + idx: int | torch.Tensor | np.ndarray | Sequence[int], + arrays: dict[str, torch.Tensor | np.ndarray], + ) -> None: + """ + Writes the values for the given arrays at the given index. + + Args: + idx (int | torch.Tensor | np.ndarray | Sequence[int]): The index or indices to write the arrays to. + arrays (dict[str, torch.Tensor | np.ndarray]): The arrays to write to disk, with data either split by label class into a dictionary, or divided by class along the channel dimension of an array/tensor. The dictionary should have the following structure:: + + { + "array_name": torch.Tensor | np.ndarray | dict[str, torch.Tensor | np.ndarray], + ... + } + """ + self._current_idx = idx + self._current_center = self.get_center(self._current_idx) + for array_name, array in arrays.items(): + if isinstance(array, int) or isinstance(array, float): + for c, label in enumerate(self.classes): + self.target_array_writers[array_name][label][ + self._current_center + ] = array + elif isinstance(array, dict): + for label, label_array in array.items(): + self.target_array_writers[array_name][label][ + self._current_center + ] = label_array + else: + for c, label in enumerate(self.classes): + self.target_array_writers[array_name][label][ + self._current_center + ] = array[c] + + def __repr__(self) -> str: + """Returns a string representation of the dataset.""" + return f"CellMapDatasetWriter(\n\tRaw path: {self.raw_path}\n\tOutput path(s): {self.target_path}\n\tClasses: {self.classes})" + +
+[docs] + def get_target_array_writer( + self, array_name: str, array_info: Mapping[str, Sequence[int | float]] + ) -> dict[str, ImageWriter]: + """Returns a dictionary of ImageWriter for the target images (per class) for a given array.""" + target_image_writers = {} + for label in self.classes: + target_image_writers[label] = self.get_image_writer( + array_name, label, array_info + ) + + return target_image_writers
+ + +
+[docs] + def get_image_writer( + self, + array_name: str, + label: str, + array_info: Mapping[str, Sequence[int | float] | int], + ) -> ImageWriter: + return ImageWriter( + path=str(UPath(self.target_path) / label), + label_class=label, + scale=array_info["scale"], # type: ignore + bounding_box=self.target_bounds[array_name], + write_voxel_shape=array_info["shape"], # type: ignore + scale_level=array_info.get("scale_level", 0), # type: ignore + axis_order=self.axis_order, + context=self.context, + fill_value=self.empty_value, + overwrite=self.overwrite, + )
+ + + def _get_box_shape(self, source_box: Mapping[str, list[float]]) -> dict[str, int]: + """Returns the shape of the box in voxels of the smallest voxel size requested.""" + box_shape = {} + for c, (start, stop) in source_box.items(): + size = stop - start + size /= self.smallest_voxel_sizes[c] + box_shape[c] = int(np.floor(size)) + return box_shape + + def _get_box_union( + self, + source_box: Mapping[str, list[float]] | None, + current_box: Mapping[str, list[float]] | None, + ) -> Mapping[str, list[float]] | None: + """Returns the union of the source and current boxes.""" + if source_box is not None: + if current_box is None: + return source_box + for c, (start, stop) in source_box.items(): + assert stop > start, f"Invalid box: {start} to {stop}" + current_box[c][0] = min(current_box[c][0], start) + current_box[c][1] = max(current_box[c][1], stop) + return current_box + + def _get_box_intersection( + self, + source_box: Mapping[str, list[float]] | None, + current_box: Mapping[str, list[float]] | None, + ) -> Mapping[str, list[float]] | None: + """Returns the intersection of the source and current boxes.""" + if source_box is not None: + if current_box is None: + return source_box + for c, (start, stop) in source_box.items(): + assert stop > start, f"Invalid box: {start} to {stop}" + current_box[c][0] = max(current_box[c][0], start) + current_box[c][1] = min(current_box[c][1], stop) + return current_box + +
+[docs] + def verify(self) -> bool: + """Verifies that the dataset is valid to draw samples from.""" + # TODO: make more robust + try: + return len(self) > 0 + except Exception as e: + print(f"Error: {e}") + return False
+ + +
+[docs] + def get_indices(self, chunk_size: Mapping[str, float]) -> Sequence[int]: + """Returns the indices of the dataset that will tile the dataset according to the chunk_size (supplied in world units).""" + # TODO: ADD TEST + + # Convert the target chunk size in world units to voxel units + chunk_size = { + c: int(size // self.smallest_voxel_sizes[c]) + for c, size in chunk_size.items() + } + + indices_dict = {} + for c, size in chunk_size.items(): + indices_dict[c] = np.arange(0, self.sampling_box_shape[c], size, dtype=int) + + # Make sure the last index is included + if indices_dict[c][-1] != self.sampling_box_shape[c] - 1: + indices_dict[c] = np.append( + indices_dict[c], self.sampling_box_shape[c] - 1 + ) + + indices = [] + # Generate linear indices by unraveling all combinations of axes indices + for i in np.ndindex(*[len(indices_dict[c]) for c in self.axis_order]): + index = [indices_dict[c][j] for c, j in zip(self.axis_order, i)] + index = np.ravel_multi_index(index, list(self.sampling_box_shape.values())) + indices.append(index) + return indices
+ + +
+[docs] + def to(self, device: str | torch.device) -> "CellMapDatasetWriter": + """Sets the device for the dataset.""" + self._device = torch.device(device) + for source in self.input_sources.values(): + if isinstance(source, dict): + for source in source.values(): + if not hasattr(source, "to"): + continue + source.to(device) + else: + if not hasattr(source, "to"): + continue + source.to(device) + return self
+ + +
+[docs] + def set_raw_value_transforms(self, transforms: Callable) -> None: + """Sets the raw value transforms for the dataset.""" + self.raw_value_transforms = transforms + for source in self.input_sources.values(): + source.value_transform = transforms
+
+ + + +# %% +
+ +
+ + + + + + +
+ +
+
+
+ +
+ + + + +
+
+ + +
+ + +
+
+
+ + + + + +
+
+ + \ No newline at end of file diff --git a/_modules/cellmap_data/image.html b/_modules/cellmap_data/image.html index a0fdcb9..2c2a530 100644 --- a/_modules/cellmap_data/image.html +++ b/_modules/cellmap_data/image.html @@ -247,19 +247,26 @@

Source code for cellmap_data.image

 import os
 from typing import Any, Callable, Mapping, Optional, Sequence
-import torch
 
-from xarray_ome_ngff.v04.multiscale import coords_from_transforms
-from pydantic_ome_ngff.v04.multiscale import GroupAttrs, MultiscaleMetadata
-from pydantic_ome_ngff.v04.transform import Scale, Translation
-
-import xarray
+import numpy as np
 import tensorstore
+import torch
+import xarray
 import xarray_tensorstore as xt
-import numpy as np
 import zarr
-
+from pydantic_ome_ngff.v04.axis import Axis
+from pydantic_ome_ngff.v04.multiscale import GroupAttrs, MultiscaleMetadata
+from pydantic_ome_ngff.v04.transform import (
+    Scale,
+    Translation,
+    VectorScale,
+    VectorTranslation,
+)
 from scipy.spatial.transform import Rotation as rot
+from upath import UPath
+from xarray_ome_ngff.v04.multiscale import coords_from_transforms
+
+from cellmap_data.utils import create_multiscale_metadata
 
 
 
@@ -357,36 +364,49 @@

Source code for cellmap_data.image

         self.context = context
         self._current_spatial_transforms = None
         self._current_coords = None
-        self.device = "cuda" if torch.cuda.is_available() else "cpu"
+ self._current_center = None + if torch.cuda.is_available(): + self.device = "cuda" + elif torch.backends.mps.is_available(): + self.device = "mps" + else: + self.device = "cpu"
[docs] def __getitem__(self, center: Mapping[str, float]) -> torch.Tensor: """Returns image data centered around the given point, based on the scale and shape of the target output image.""" - # Find vectors of coordinates in world space to pull data from - coords = {} - for c in self.axes: - if center[c] - self.output_size[c] / 2 < self.bounding_box[c][0]: - # raise ValueError( - UserWarning( - f"Center {center[c]} is out of bounds for axis {c} in image {self.path}. {center[c] - self.output_size[c] / 2} would be less than {self.bounding_box[c][0]}" - ) - # center[c] = self.bounding_box[c][0] + self.output_size[c] / 2 - if center[c] + self.output_size[c] / 2 > self.bounding_box[c][1]: - # raise ValueError( - UserWarning( - f"Center {center[c]} is out of bounds for axis {c} in image {self.path}. {center[c] + self.output_size[c] / 2} would be greater than {self.bounding_box[c][1]}" + if isinstance(list(center.values())[0], int | float): + self._current_center = center + + # Find vectors of coordinates in world space to pull data from + coords = {} + for c in self.axes: + if center[c] - self.output_size[c] / 2 < self.bounding_box[c][0]: + # raise ValueError( + UserWarning( + f"Center {center[c]} is out of bounds for axis {c} in image {self.path}. {center[c] - self.output_size[c] / 2} would be less than {self.bounding_box[c][0]}" + ) + # center[c] = self.bounding_box[c][0] + self.output_size[c] / 2 + if center[c] + self.output_size[c] / 2 > self.bounding_box[c][1]: + # raise ValueError( + UserWarning( + f"Center {center[c]} is out of bounds for axis {c} in image {self.path}. {center[c] + self.output_size[c] / 2} would be greater than {self.bounding_box[c][1]}" + ) + # center[c] = self.bounding_box[c][1] - self.output_size[c] / 2 + coords[c] = np.linspace( + center[c] - self.output_size[c] / 2, + center[c] + self.output_size[c] / 2, + self.output_shape[c], ) - # center[c] = self.bounding_box[c][1] - self.output_size[c] / 2 - coords[c] = np.linspace( - center[c] - self.output_size[c] / 2, - center[c] + self.output_size[c] / 2, - self.output_shape[c], - ) - # Apply any spatial transformations to the coordinates and return the image data as a PyTorch tensor - data = self.apply_spatial_transforms(coords) + # Apply any spatial transformations to the coordinates and return the image data as a PyTorch tensor + data = self.apply_spatial_transforms(coords) + else: + self._current_center = None + self._current_coords = center + data = torch.tensor(self.return_data(self._current_coords).values) # type: ignore # Apply any value transformations to the data if self.value_transform is not None: @@ -747,23 +767,17 @@

Source code for cellmap_data.image

         ),
     ) -> xarray.DataArray:
         """Pulls data from the image based on the given coordinates, applying interpolation if necessary, and returns the data as an xarray DataArray."""
-        if not isinstance(coords[list(coords.keys())[0]][0], float | int):
+        if not isinstance(list(coords.values())[0][0], float | int):
             data = self.array.interp(
                 coords=coords,
                 method=self.interpolation,  # type: ignore
             )
         elif self.pad:
-            try:
-                tolerance = self._tolerance
-            except AttributeError:
-                self._tolerance = np.ones(coords[self.axes[0]].shape) * np.max(
-                    list(self.scale.values())
-                )
-                tolerance = self._tolerance
             data = self.array.reindex(
                 **coords,
                 method="nearest",
-                tolerance=tolerance,
+                tolerance=np.ones(coords[self.axes[0]].shape)
+                * np.max(list(self.scale.values())),
                 fill_value=self.pad_value,
             )
         else:
@@ -891,6 +905,349 @@ 

Source code for cellmap_data.image

         pass
+ + +
+[docs] +class ImageWriter: + """ + This class is used to write image data to a single-resolution zarr. + + Attributes: + path (str): The path to the image file. + label_class (str): The label class of the image. + scale (Mapping[str, float]): The scale of the image in physical space. + write_voxel_shape (Mapping[str, int]): The shape of data written to the image in voxels. + axes (str): The order of the axes in the image. + context (Optional[tensorstore.Context]): The context for the TensorStore. + + Methods: + __setitem__(center: Mapping[str, float], data: torch.Tensor): Writes the given data to the image at the given center. + __repr__() -> str: Returns a string representation of the ImageWriter object. + + Properties: + + shape (Mapping[str, int]): Returns the shape of the image in voxels. + center (Mapping[str, float]): Returns the center of the image in world units. + full_coords: Returns the full coordinates of the image in world units. + array_path (str): Returns the path to the single-scale image array. + translation (Mapping[str, float]): Returns the translation of the image in world units. + bounding_box (Mapping[str, list[float]]): Returns the bounding box of the dataset in world units. + sampling_box (Mapping[str, list[float]]): Returns the sampling box of the dataset in world units. + """ + + def __init__( + self, + path: str | UPath, + label_class: str, + scale: Mapping[str, float] | Sequence[float], + bounding_box: Mapping[str, list[float]], + write_voxel_shape: Mapping[str, int] | Sequence[int], + scale_level: int = 0, + axis_order: str = "zyx", + context: Optional[tensorstore.Context] = None, + overwrite: bool = False, + dtype: np.dtype = np.float32, + fill_value: float | int = 0, + ) -> None: + """Initializes an ImageWriter object. + + Args: + path (str): The path to the base folder of the multiscale image file. + label_class (str): The label class of the image. + scale_level (int): The multiscale level of the image. Defaults to 0. + scale (Mapping[str, float]): The scale of the image in physical space. + bounding_box (Mapping[str, list[float]]): The total region of interest for the image in world units. Example: {"x": [12.0, 102.0], "y": [12.0, 102.0], "z": [12.0, 102.0]}. + write_voxel_shape (Mapping[str, int]): The shape of data written to the image in voxels. + axis_order (str, optional): The order of the axes in the image. Defaults to "zyx". + context (Optional[tensorstore.Context], optional): The context for the TensorStore. Defaults to None. + overwrite (bool, optional): Whether to overwrite the image if it already exists. Defaults to False. + dtype (np.dtype, optional): The data type of the image. Defaults to np.float32. + fill_value (float | int, optional): The value to fill the empty image with before values are written. Defaults to 0. + """ + self.base_path = path + self.path = UPath(path) / f"s{scale_level}" + self.label_class = label_class + if isinstance(scale, Sequence): + if len(axis_order) > len(scale): + scale = [scale[0]] * (len(axis_order) - len(scale)) + list(scale) + scale = {c: s for c, s in zip(axis_order, scale)} + if isinstance(write_voxel_shape, Sequence): + if len(axis_order) > len(write_voxel_shape): + write_voxel_shape = [1] * ( + len(axis_order) - len(write_voxel_shape) + ) + list(write_voxel_shape) + write_voxel_shape = {c: t for c, t in zip(axis_order, write_voxel_shape)} + self.scale = scale + self.bounding_box = bounding_box + self.write_voxel_shape = write_voxel_shape + self.write_world_shape = { + c: write_voxel_shape[c] * scale[c] for c in axis_order + } + self.axes = axis_order[: len(write_voxel_shape)] + self.scale_level = scale_level + self.context = context + self.overwrite = overwrite + self.dtype = dtype + self.fill_value = fill_value + + # Create the new zarr's metadata + dims = [c for c in axis_order] + self.metadata = { + "offset": list(self.offset.values()), + "axes": dims, + "voxel_size": list(self.scale.values()), + "shape": list(self.shape.values()), + "units": "nanometer", + "chunk_shape": list(write_voxel_shape.values()), + } + + @property + def array(self) -> xarray.DataArray: + """Returns the image data as an xarray DataArray.""" + try: + return self._array + except AttributeError: + # Write multi-scale metadata + os.makedirs(UPath(self.base_path), exist_ok=True) + # Add .zgroup files + group_path = str(self.base_path).split(".zarr")[0] + ".zarr" + # print(group_path) + for group in [""] + list( + UPath(str(self.base_path).split(".zarr")[-1]).parts + )[1:]: + group_path = UPath(group_path) / group + # print(group_path) + with open(group_path / ".zgroup", "w") as f: + f.write('{"zarr_format": 2}') + create_multiscale_metadata( + ds_name=str(self.base_path), + voxel_size=self.metadata["voxel_size"], + translation=self.metadata["offset"], + units=self.metadata["units"], + axes=self.metadata["axes"], + base_scale_level=self.scale_level, + levels_to_add=0, + out_path=str(UPath(self.base_path) / ".zattrs"), + ) + + # Construct an xarray with Tensorstore backend + # spec = xt._zarr_spec_from_path(self.path) + spec = { + "driver": "zarr", + "kvstore": {"driver": "file", "path": str(self.path)}, + # "transform": { + # "input_labels": self.metadata["axes"], + # # "scale": self.metadata["voxel_size"], + # "input_inclusive_min": self.metadata["offset"], + # "input_shape": self.metadata["shape"], + # # "units": self.metadata["units"], + # }, + } + open_kwargs = { + "read": True, + "write": True, + "create": True, + "delete_existing": self.overwrite, + "dtype": self.dtype, + "shape": list(self.shape.values()), + "fill_value": self.fill_value, + "chunk_layout": tensorstore.ChunkLayout( + write_chunk_shape=self.chunk_shape + ), + # "metadata": self.metadata, + # "transaction": tensorstore.Transaction(atomic=True), + "context": self.context, + } + array_future = tensorstore.open( + spec, + **open_kwargs, + ) + try: + array = array_future.result() + except ValueError as e: + Warning(e) + UserWarning("Falling back to zarr3 driver") + spec["driver"] = "zarr3" + array_future = tensorstore.open(spec, **open_kwargs) + array = array_future.result() + data = xt._TensorStoreAdapter(array) + self._array = xarray.DataArray(data=data, coords=self.full_coords) + + # Add .zattrs file + with open(UPath(self.path) / ".zattrs", "w") as f: + f.write("{}") + # Set the metadata for the Zarr array + # ds = zarr.open_array(self.path) + # for key, value in self.metadata.items(): + # ds.attrs[key] = value + # ds.attrs["_ARRAY_DIMENSIONS"] = self.metadata["axes"] + # ds.attrs["dimension_units"] = [ + # f"{s} {u}" + # for s, u in zip(self.metadata["voxel_size"], self.metadata["units"]) + # ] + + return self._array + + @property + def chunk_shape(self) -> Sequence[int]: + """Returns the shape of the chunks for the image.""" + try: + return self._chunk_shape + except AttributeError: + self._chunk_shape = list(self.write_voxel_shape.values()) + return self._chunk_shape + + @property + def world_shape(self) -> Mapping[str, float]: + """Returns the shape of the image in world units.""" + try: + return self._world_shape + except AttributeError: + self._world_shape = { + c: self.bounding_box[c][1] - self.bounding_box[c][0] for c in self.axes + } + return self._world_shape + + @property + def shape(self) -> Mapping[str, int]: + """Returns the shape of the image in voxels.""" + try: + return self._shape + except AttributeError: + self._shape = { + c: int(np.ceil(self.world_shape[c] / self.scale[c])) for c in self.axes + } + return self._shape + + @property + def center(self) -> Mapping[str, float]: + """Returns the center of the image in world units.""" + try: + return self._center + except AttributeError: + center = {} + for c, (start, stop) in self.bounding_box.items(): + center[c] = start + (stop - start) / 2 + self._center = center + return self._center + + @property + def offset(self) -> Mapping[str, float]: + """Returns the offset of the image in world units.""" + try: + return self._offset + except AttributeError: + self._offset = {c: self.bounding_box[c][0] for c in self.axes} + return self._offset + + @property + def full_coords(self) -> tuple[xarray.DataArray, ...]: + """Returns the full coordinates of the image in world units.""" + try: + return self._full_coords + except AttributeError: + self._full_coords = coords_from_transforms( + axes=[ + Axis( + name=c, + type="space" if c != "c" else "channel", + unit="nm" if c != "c" else "", + ) + for c in self.axes + ], + transforms=( + VectorScale(scale=tuple(self.scale.values())), + VectorTranslation(translation=tuple(self.offset.values())), + ), + shape=tuple(self.shape.values()), + ) + return self._full_coords + +
+[docs] + def align_coords( + self, coords: Mapping[str, tuple[Sequence, np.ndarray]] + ) -> Mapping[str, tuple[Sequence, np.ndarray]]: + # TODO: Deprecate this function? + """Aligns the given coordinates to the image's coordinates.""" + aligned_coords = {} + for c in self.axes: + # Find the nearest coordinate in the image's actual coordinate grid + aligned_coords[c] = np.array( + self.array.coords[c][ + np.abs(np.array(self.array.coords[c])[:, None] - coords[c]).argmin( + axis=0 + ) + ] + ).squeeze() + return aligned_coords
+ + +
+[docs] + def aligned_coords_from_center(self, center: Mapping[str, float]): + """Returns the aligned coordinates for the given center with linear sequential coordinates aligned to the image's reference frame.""" + coords = {} + for c in self.axes: + # Get index of closest start voxel to the edge of the write space, based on the center + start_requested = center[c] - self.write_world_shape[c] / 2 + start_aligned_idx = int( + np.abs(self.array.coords[c] - start_requested).argmin() + ) + + # Get the aligned range of coordinates + coords[c] = self.array.coords[c][ + start_aligned_idx : start_aligned_idx + self.write_voxel_shape[c] + ] + + return coords
+ + + def __setitem__( + self, + coords: Mapping[str, float] | Mapping[str, tuple[Sequence, np.ndarray]], + data: torch.Tensor | np.typing.ArrayLike | float | int, # type: ignore + ) -> None: + """Writes the given data to the image at the given center (in world units). Supports writing torch.Tensor, numpy.ndarray, and scalar data types, including for batches.""" + if not isinstance(data, (int, float)): + if any(data.shape[i] > self.shape[c] for i, c in enumerate(self.axes)): + raise ValueError( + f"Image {self.path} is too small to write data of shape {data.shape}. Image shape is {self.shape}." + ) + # Find vectors of coordinates in world space to write data to if necessary + if isinstance(list(coords.values())[0], int | float): + center = coords + coords = self.aligned_coords_from_center(center) # type: ignore + if isinstance(data, torch.Tensor): + data = data.cpu() + + data = np.array(data).squeeze().astype(self.dtype) + + try: + self.array.loc[coords] = data + except ValueError as e: + print( + f"Writing to center {center} in image {self.path} failed. Coordinates: are not all within the image's bounds. Will drop out of bounds data." + ) + # Crop data to match the number of coordinates matched in the image + slices = [slice(None, len(coord)) for coord in coords.values()] + data = data[*slices] + self.array.loc[coords] = data + + else: + # Write batches + for i in range(len(coords[self.axes[0]])): + if isinstance(data, (int, float)): + this_data = data + else: + this_data = data[i] + self[{c: coords[c][i] for c in self.axes}] = this_data + + def __repr__(self) -> str: + """Returns a string representation of the ImageWriter object.""" + return f"ImageWriter({self.path}: {self.label_class} @ {list(self.scale.values())} {self.metadata['units']})"
+
diff --git a/_modules/cellmap_data/subdataset.html b/_modules/cellmap_data/subdataset.html index d777b11..37d9114 100644 --- a/_modules/cellmap_data/subdataset.html +++ b/_modules/cellmap_data/subdataset.html @@ -248,6 +248,7 @@

Source code for cellmap_data.subdataset

 from typing import Callable, Sequence
 from torch.utils.data import Subset
 from .dataset import CellMapDataset
+
 from .multidataset import CellMapMultiDataset
 
 
@@ -261,7 +262,9 @@ 

Source code for cellmap_data.subdataset

 
[docs] def __init__( - self, dataset: CellMapDataset | CellMapMultiDataset, indices: Sequence[int] + self, + dataset: CellMapDataset | CellMapMultiDataset, + indices: Sequence[int], ) -> None: """ Args: diff --git a/_modules/cellmap_data/utils/metadata.html b/_modules/cellmap_data/utils/metadata.html new file mode 100644 index 0000000..01b0d2b --- /dev/null +++ b/_modules/cellmap_data/utils/metadata.html @@ -0,0 +1,425 @@ + + + + + + + + + + cellmap_data.utils.metadata — CellMap-Data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ +
+ + + + + +
+
+ + + + + + +
+ + + + + + + + + + + + + +
+ +
+ + + +
+ +
+
+ +
+
+ +
+ +
+ +
+ + +
+ +
+ +
+ + + + + + + + + + + + +
+ +
+ +
+
+ + + +
+

+ +
+
+ +
+
+
+ + + + +
+ +

Source code for cellmap_data.utils.metadata

+import json
+from typing import Optional
+
+
+
+[docs] +def generate_base_multiscales_metadata( + ds_name: str, + scale_level: int, + voxel_size: list, + translation: list, + units: str, + axes: list, +): + if ".zarr" in ds_name: + ds_name = ds_name.split(".zarr")[-1] + z_attrs: dict = {"multiscales": [{}]} + z_attrs["multiscales"][0]["axes"] = [ + {"name": axis, "type": "space", "unit": units} for axis in axes + ] + z_attrs["multiscales"][0]["coordinateTransformations"] = [ + {"scale": [1.0, 1.0, 1.0], "type": "scale"} + ] + z_attrs["multiscales"][0]["datasets"] = [ + { + "coordinateTransformations": [ + {"scale": voxel_size, "type": "scale"}, + {"translation": translation, "type": "translation"}, + ], + "path": f"s{scale_level}", + } + ] + + z_attrs["multiscales"][0]["name"] = ds_name + z_attrs["multiscales"][0]["version"] = "0.4" + + return z_attrs
+ + + +
+[docs] +def add_multiscale_metadata_levels(multsc, base_scale_level, levels_to_add): + # store original array in a new .zarr file as an arr_name scale + z_attrs = multsc + # print(z_attrs) + base_scale = z_attrs["multiscales"][0]["datasets"][0]["coordinateTransformations"][ + 0 + ]["scale"] + base_trans = z_attrs["multiscales"][0]["datasets"][0]["coordinateTransformations"][ + 1 + ]["translation"] + for level in range(base_scale_level, base_scale_level + levels_to_add): + # print(f"{level=}") + + # break the slices up into batches, to make things easier for the dask scheduler + sn = [dim * pow(2, level) for dim in base_scale] + trn = [ + (dim * (pow(2, level - 1) - 0.5)) + tr + for (dim, tr) in zip(base_scale, base_trans) + ] + + z_attrs["multiscales"][0]["datasets"].append( + { + "coordinateTransformations": [ + {"type": "scale", "scale": sn}, + {"type": "translation", "translation": trn}, + ], + "path": f"s{level + 1}", + } + ) + + return z_attrs
+ + + +
+[docs] +def create_multiscale_metadata( + ds_name: str, + voxel_size: list, + translation: list, + units: str, + axes: list, + base_scale_level: int = 0, + levels_to_add: int = 0, + out_path: Optional[str] = None, +): + z_attrs = generate_base_multiscales_metadata( + ds_name, base_scale_level, voxel_size, translation, units, axes + ) + if levels_to_add > 0: + z_attrs = add_multiscale_metadata_levels( + z_attrs, base_scale_level, levels_to_add + ) + + if out_path is not None: + write_metadata(z_attrs, out_path) + else: + return z_attrs
+ + + +
+[docs] +def write_metadata(z_attrs, out_path): + with open(out_path, "w") as f: + f.write(json.dumps(z_attrs, indent=4))
+ +
+ +
+ + + + + + +
+ +
+
+
+ +
+ + + + +
+
+ + +
+ + +
+
+
+ + + + + +
+
+ + \ No newline at end of file diff --git a/_modules/index.html b/_modules/index.html index 57177e6..96b22ee 100644 --- a/_modules/index.html +++ b/_modules/index.html @@ -247,6 +247,7 @@

All modules for which code is available

diff --git a/_sources/cellmap_data.dataset_writer.rst b/_sources/cellmap_data.dataset_writer.rst new file mode 100644 index 0000000..e518081 --- /dev/null +++ b/_sources/cellmap_data.dataset_writer.rst @@ -0,0 +1,18 @@ +cellmap\_data.dataset\_writer +============================= + +.. automodule:: cellmap_data.dataset_writer + + + .. rubric:: Functions + + .. autosummary:: + + split_target_path + + .. rubric:: Classes + + .. autosummary:: + + CellMapDatasetWriter + \ No newline at end of file diff --git a/_sources/cellmap_data.image.rst b/_sources/cellmap_data.image.rst index a698cbe..eb754b9 100644 --- a/_sources/cellmap_data.image.rst +++ b/_sources/cellmap_data.image.rst @@ -10,4 +10,5 @@ cellmap\_data.image CellMapImage EmptyImage + ImageWriter \ No newline at end of file diff --git a/_sources/cellmap_data.rst b/_sources/cellmap_data.rst index 8d332ac..b98b372 100644 --- a/_sources/cellmap_data.rst +++ b/_sources/cellmap_data.rst @@ -12,6 +12,7 @@ dataloader dataset + dataset_writer datasplit image multidataset diff --git a/_sources/cellmap_data.utils.figs.rst b/_sources/cellmap_data.utils.figs.rst index bd02c7a..ffe3345 100644 --- a/_sources/cellmap_data.utils.figs.rst +++ b/_sources/cellmap_data.utils.figs.rst @@ -1,4 +1,4 @@ -cellmap\_data.utils.figs +cellmap\_data.utils.figs ======================== .. automodule:: cellmap_data.utils.figs diff --git a/_sources/cellmap_data.utils.metadata.rst b/_sources/cellmap_data.utils.metadata.rst new file mode 100644 index 0000000..cf7f300 --- /dev/null +++ b/_sources/cellmap_data.utils.metadata.rst @@ -0,0 +1,15 @@ +cellmap\_data.utils.metadata +============================ + +.. automodule:: cellmap_data.utils.metadata + + + .. rubric:: Functions + + .. autosummary:: + + add_multiscale_metadata_levels + create_multiscale_metadata + generate_base_multiscales_metadata + write_metadata + \ No newline at end of file diff --git a/_sources/cellmap_data.utils.rst b/_sources/cellmap_data.utils.rst index c770d51..bd1b7b3 100644 --- a/_sources/cellmap_data.utils.rst +++ b/_sources/cellmap_data.utils.rst @@ -12,3 +12,4 @@ cellmap\_data.utils dtype figs + metadata diff --git a/cellmap_data.CellMapDataLoader.html b/cellmap_data.CellMapDataLoader.html index 70a6602..21c7651 100644 --- a/cellmap_data.CellMapDataLoader.html +++ b/cellmap_data.CellMapDataLoader.html @@ -313,7 +313,7 @@

Contents

cellmap_data.CellMapDataLoader#

-class cellmap_data.CellMapDataLoader(dataset: CellMapMultiDataset | CellMapDataset | CellMapSubset, classes: Iterable[str], batch_size: int = 1, num_workers: int = 0, weighted_sampler: bool = False, sampler: Sampler | Callable | None = None, is_train: bool = True, rng: Generator | None = None, **kwargs)[source]#
+class cellmap_data.CellMapDataLoader(dataset: CellMapMultiDataset | CellMapDataset | Subset | CellMapDatasetWriter, classes: Iterable[str], batch_size: int = 1, num_workers: int = 0, weighted_sampler: bool = False, sampler: Sampler | Callable | None = None, is_train: bool = True, rng: Generator | None = None, **kwargs)[source]#

Initialize the CellMapDataLoader

Parameters:
@@ -332,7 +332,7 @@

cellmap_data.CellMapDataLoader
-__init__(dataset: CellMapMultiDataset | CellMapDataset | CellMapSubset, classes: Iterable[str], batch_size: int = 1, num_workers: int = 0, weighted_sampler: bool = False, sampler: Sampler | Callable | None = None, is_train: bool = True, rng: Generator | None = None, **kwargs)[source]#
+__init__(dataset: CellMapMultiDataset | CellMapDataset | Subset | CellMapDatasetWriter, classes: Iterable[str], batch_size: int = 1, num_workers: int = 0, weighted_sampler: bool = False, sampler: Sampler | Callable | None = None, is_train: bool = True, rng: Generator | None = None, **kwargs)[source]#

Initialize the CellMapDataLoader

Parameters:
diff --git a/cellmap_data.dataloader.html b/cellmap_data.dataloader.html index 2b85735..a32a19c 100644 --- a/cellmap_data.dataloader.html +++ b/cellmap_data.dataloader.html @@ -319,7 +319,7 @@

Contents

-class cellmap_data.dataloader.CellMapDataLoader(dataset: CellMapMultiDataset | CellMapDataset | CellMapSubset, classes: Iterable[str], batch_size: int = 1, num_workers: int = 0, weighted_sampler: bool = False, sampler: Sampler | Callable | None = None, is_train: bool = True, rng: Generator | None = None, **kwargs)[source]#
+class cellmap_data.dataloader.CellMapDataLoader(dataset: CellMapMultiDataset | CellMapDataset | Subset | CellMapDatasetWriter, classes: Iterable[str], batch_size: int = 1, num_workers: int = 0, weighted_sampler: bool = False, sampler: Sampler | Callable | None = None, is_train: bool = True, rng: Generator | None = None, **kwargs)[source]#

Initialize the CellMapDataLoader

Parameters:
diff --git a/cellmap_data.dataset_writer.html b/cellmap_data.dataset_writer.html new file mode 100644 index 0000000..2f4df6e --- /dev/null +++ b/cellmap_data.dataset_writer.html @@ -0,0 +1,733 @@ + + + + + + + + + + + cellmap_data.dataset_writer — CellMap-Data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
+ +
+ + + + + +
+
+ + + + +
+ + + + + + + + + + + + + +
+ +
+ + + +
+ +
+
+ +
+
+ +
+ +
+ +
+ + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ + + + + + + + +
+ +
+

cellmap_data.dataset_writer#

+

Functions

+
+ + + + + +

split_target_path(path)

Splits a path to groundtruth data into the main path string, and the classes supplied for it.

+
+

Classes

+
+ + + + + +

CellMapDatasetWriter(raw_path, target_path, ...)

Initializes the CellMapDatasetWriter.

+
+
+
+cellmap_data.dataset_writer.split_target_path(path: str) tuple[str, list[str]][source]#
+

Splits a path to groundtruth data into the main path string, and the classes supplied for it.

+
+
Parameters:
+

path (str)

+
+
Return type:
+

tuple[str, list[str]]

+
+
+
+ +
+
+class cellmap_data.dataset_writer.CellMapDatasetWriter(raw_path: str, target_path: str, classes: Sequence[str], input_arrays: Mapping[str, Mapping[str, Sequence[int | float]]], target_arrays: Mapping[str, Mapping[str, Sequence[int | float]]], target_bounds: Mapping[str, Mapping[str, list[float]]], raw_value_transforms: Callable | None = None, axis_order: str = 'zyx', context: Context | None = None, rng: Generator | None = None, empty_value: float | int = 0, overwrite: bool = False)[source]#
+

Initializes the CellMapDatasetWriter.

+
+
Parameters:
+
    +
  • raw_path (str) – The full path to the raw data zarr, excluding the mulstiscale level.

  • +
  • target_path (str) – The full path to the ground truth data zarr, excluding the mulstiscale level and the class name.

  • +
  • classes (Sequence[str]) – The classes in the dataset.

  • +
  • input_arrays (Mapping[str, Mapping[str, Sequence[int | float]]]) –

    The input arrays to return for processing. The dictionary should have the following structure:

    +
    {
    +    "array_name": {
    +        "shape": tuple[int],
    +        "scale": Sequence[float],
    +
    +        and optionally:
    +        "scale_level": int,
    +    },
    +    ...
    +}
    +
    +
    +

  • +
  • array (and 'scale' is the scale of the array in world units. The 'scale_level' is the multiscale level to use for the)

  • +
  • voxels ('shape' is the shape of the array in)

  • +
  • array

  • +
  • supplied. (otherwise set to 0 if not)

  • +
  • target_arrays (Mapping[str, Mapping[str, Sequence[int | float]]]) – The target arrays to write to disk, with format matching that for input_arrays.

  • +
  • target_bounds (Mapping[str, Mapping[str, list[float]]]) – The bounding boxes for each target array, in world units. Example: {“array_1”: {“x”: [12.0, 102.0], “y”: [12.0, 102.0], “z”: [12.0, 102.0]}}.

  • +
  • raw_value_transforms (Optional[Callable]) – The value transforms to apply to the raw data.

  • +
  • axis_order (str) – The order of the axes in the data.

  • +
  • context (Optional[tensorstore.Context]) – The context to use for the tensorstore.

  • +
  • rng (Optional[torch.Generator]) – The random number generator to use.

  • +
  • empty_value (float | int) – The value to use for empty data in an array.

  • +
  • overwrite (bool) – Whether to overwrite existing data.

  • +
+
+
+
+
+property center: Mapping[str, float] | None#
+

Returns the center of the dataset in world units.

+
+ +
+
+property smallest_voxel_sizes: Mapping[str, float]#
+

Returns the smallest voxel size of the dataset.

+
+ +
+
+property smallest_target_array: Mapping[str, float]#
+

Returns the smallest target array in world units.

+
+ +
+
+property bounding_box: Mapping[str, list[float]]#
+

Returns the bounding box inclusive of all the target images.

+
+ +
+
+property bounding_box_shape: Mapping[str, int]#
+

Returns the shape of the bounding box of the dataset in voxels of the smallest voxel size requested.

+
+ +
+
+property sampling_box: Mapping[str, list[float]]#
+

Returns the sampling box of the dataset (i.e. where centers should be drawn from and to fully sample within the bounding box).

+
+ +
+
+property sampling_box_shape: dict[str, int]#
+

Returns the shape of the sampling box of the dataset in voxels of the smallest voxel size requested.

+
+ +
+
+property size: int#
+

Returns the size of the dataset in voxels of the smallest voxel size requested.

+
+ +
+
+property writer_indices: Sequence[int]#
+

Returns the indices of the dataset that will produce non-overlapping tiles for use in writer, based on the smallest requested target array.

+
+ +
+
+property blocks: Subset#
+

A subset of the validation datasets, tiling the validation datasets with non-overlapping blocks.

+
+ +
+
+loader(batch_size: int = 1, num_workers: int = 0, **kwargs)[source]#
+

Returns a DataLoader for the dataset.

+
+
Parameters:
+
    +
  • batch_size (int)

  • +
  • num_workers (int)

  • +
+
+
+
+ +
+
+collate_fn(batch: list[dict]) dict[str, Tensor][source]#
+

Combine a list of dictionaries from different sources into a single dictionary for output.

+
+
Parameters:
+

batch (list[dict])

+
+
Return type:
+

dict[str, Tensor]

+
+
+
+ +
+
+property device: device#
+

Returns the device for the dataset.

+
+ +
+
+__len__() int[source]#
+

Returns the length of the dataset, determined by the number of coordinates that could be sampled as the center for an array request.

+
+
Return type:
+

int

+
+
+
+ +
+
+get_center(idx: int) dict[str, float][source]#
+
+
Parameters:
+

idx (int)

+
+
Return type:
+

dict[str, float]

+
+
+
+ +
+
+__getitem__(idx: int) dict[str, Tensor][source]#
+

Returns a crop of the input and target data as PyTorch tensors, corresponding to the coordinate of the unwrapped index.

+
+
Parameters:
+

idx (int)

+
+
Return type:
+

dict[str, Tensor]

+
+
+
+ +
+
+get_target_array_writer(array_name: str, array_info: Mapping[str, Sequence[int | float]]) dict[str, ImageWriter][source]#
+

Returns a dictionary of ImageWriter for the target images (per class) for a given array.

+
+
Parameters:
+
    +
  • array_name (str)

  • +
  • array_info (Mapping[str, Sequence[int | float]])

  • +
+
+
Return type:
+

dict[str, ImageWriter]

+
+
+
+ +
+
+get_image_writer(array_name: str, label: str, array_info: Mapping[str, Sequence[int | float] | int]) ImageWriter[source]#
+
+
Parameters:
+
    +
  • array_name (str)

  • +
  • label (str)

  • +
  • array_info (Mapping[str, Sequence[int | float] | int])

  • +
+
+
Return type:
+

ImageWriter

+
+
+
+ +
+
+verify() bool[source]#
+

Verifies that the dataset is valid to draw samples from.

+
+
Return type:
+

bool

+
+
+
+ +
+
+get_indices(chunk_size: Mapping[str, float]) Sequence[int][source]#
+

Returns the indices of the dataset that will tile the dataset according to the chunk_size (supplied in world units).

+
+
Parameters:
+

chunk_size (Mapping[str, float])

+
+
Return type:
+

Sequence[int]

+
+
+
+ +
+
+to(device: str | device) CellMapDatasetWriter[source]#
+

Sets the device for the dataset.

+
+
Parameters:
+

device (str | device)

+
+
Return type:
+

CellMapDatasetWriter

+
+
+
+ +
+
+set_raw_value_transforms(transforms: Callable) None[source]#
+

Sets the raw value transforms for the dataset.

+
+
Parameters:
+

transforms (Callable)

+
+
Return type:
+

None

+
+
+
+ +
+ +
+ + +
+ + + + + + +
+ +
+
+
+ +
+ + + + + + + +
+
+ + +
+ + +
+
+
+ + + + + +
+
+ + \ No newline at end of file diff --git a/cellmap_data.html b/cellmap_data.html index 2817c26..97eefdf 100644 --- a/cellmap_data.html +++ b/cellmap_data.html @@ -305,22 +305,25 @@

cellmap_data

dataset

-

datasplit

+

dataset_writer

-

image

+

datasplit

-

multidataset

+

image

-

subdataset

+

multidataset

-

transforms

+

subdataset

-

utils

+

transforms

+

+ +

utils

diff --git a/cellmap_data.image.html b/cellmap_data.image.html index afa1ddf..b8753b4 100644 --- a/cellmap_data.image.html +++ b/cellmap_data.image.html @@ -323,6 +323,18 @@

Contents

  • EmptyImage.set_spatial_transforms()
  • +
  • ImageWriter +
  • @@ -345,6 +357,9 @@

    Contents

    EmptyImage(target_class, target_scale, ...)

    Initializes an empty image object.

    +

    ImageWriter(path, label_class, scale, ...)

    +

    Initializes an ImageWriter object.

    +
    @@ -636,6 +651,96 @@

    Contents

    +
    +
    +class cellmap_data.image.ImageWriter(path: str | ~upath.core.UPath, label_class: str, scale: ~typing.Mapping[str, float] | ~typing.Sequence[float], bounding_box: ~typing.Mapping[str, list[float]], write_voxel_shape: ~typing.Mapping[str, int] | ~typing.Sequence[int], scale_level: int = 0, axis_order: str = 'zyx', context: ~tensorstore.Context | None = None, overwrite: bool = False, dtype: ~numpy.dtype = <class 'numpy.float32'>, fill_value: float | int = 0)[source]#
    +

    Initializes an ImageWriter object.

    +
    +
    Parameters:
    +
      +
    • path (str) – The path to the base folder of the multiscale image file.

    • +
    • label_class (str) – The label class of the image.

    • +
    • scale_level (int) – The multiscale level of the image. Defaults to 0.

    • +
    • scale (Mapping[str, float]) – The scale of the image in physical space.

    • +
    • bounding_box (Mapping[str, list[float]]) – The total region of interest for the image in world units. Example: {“x”: [12.0, 102.0], “y”: [12.0, 102.0], “z”: [12.0, 102.0]}.

    • +
    • write_voxel_shape (Mapping[str, int]) – The shape of data written to the image in voxels.

    • +
    • axis_order (str, optional) – The order of the axes in the image. Defaults to “zyx”.

    • +
    • context (Optional[tensorstore.Context], optional) – The context for the TensorStore. Defaults to None.

    • +
    • overwrite (bool, optional) – Whether to overwrite the image if it already exists. Defaults to False.

    • +
    • dtype (np.dtype, optional) – The data type of the image. Defaults to np.float32.

    • +
    • fill_value (float | int, optional) – The value to fill the empty image with before values are written. Defaults to 0.

    • +
    +
    +
    +
    +
    +property array: DataArray#
    +

    Returns the image data as an xarray DataArray.

    +
    + +
    +
    +property chunk_shape: Sequence[int]#
    +

    Returns the shape of the chunks for the image.

    +
    + +
    +
    +property world_shape: Mapping[str, float]#
    +

    Returns the shape of the image in world units.

    +
    + +
    +
    +property shape: Mapping[str, int]#
    +

    Returns the shape of the image in voxels.

    +
    + +
    +
    +property center: Mapping[str, float]#
    +

    Returns the center of the image in world units.

    +
    + +
    +
    +property offset: Mapping[str, float]#
    +

    Returns the offset of the image in world units.

    +
    + +
    +
    +property full_coords: tuple[DataArray, ...]#
    +

    Returns the full coordinates of the image in world units.

    +
    + +
    +
    +align_coords(coords: Mapping[str, tuple[Sequence, ndarray]]) Mapping[str, tuple[Sequence, ndarray]][source]#
    +

    Aligns the given coordinates to the image’s coordinates.

    +
    +
    Parameters:
    +

    coords (Mapping[str, tuple[Sequence, ndarray]])

    +
    +
    Return type:
    +

    Mapping[str, tuple[Sequence, ndarray]]

    +
    +
    +
    + +
    +
    +aligned_coords_from_center(center: Mapping[str, float])[source]#
    +

    Returns the aligned coordinates for the given center with linear sequential coordinates aligned to the image’s reference frame.

    +
    +
    Parameters:
    +

    center (Mapping[str, float])

    +
    +
    +
    + +
    + @@ -700,6 +805,18 @@

    Contents

  • EmptyImage.set_spatial_transforms()
  • +
  • ImageWriter +
  • diff --git a/cellmap_data.utils.html b/cellmap_data.utils.html index ea19fd3..f4dfc79 100644 --- a/cellmap_data.utils.html +++ b/cellmap_data.utils.html @@ -302,6 +302,9 @@

    cellmap_data.utils

    figs

    +

    metadata

    +

    +
    diff --git a/cellmap_data.utils.metadata.html b/cellmap_data.utils.metadata.html new file mode 100644 index 0000000..e13b572 --- /dev/null +++ b/cellmap_data.utils.metadata.html @@ -0,0 +1,461 @@ + + + + + + + + + + + cellmap_data.utils.metadata — CellMap-Data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    + +
    + + + + + +
    +
    + + + + +
    + + + + + + + + + + + + + +
    + +
    + + + +
    + +
    +
    + +
    +
    + +
    + +
    + +
    + + +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    +
    + + + +
    +

    cellmap_data.utils.metadata

    + +
    + +
    +
    + + + + +
    + +
    +

    cellmap_data.utils.metadata#

    +

    Functions

    +
    + + + + + + + + + + + + + + +

    add_multiscale_metadata_levels(multsc, ...)

    create_multiscale_metadata(ds_name, ...[, ...])

    generate_base_multiscales_metadata(ds_name, ...)

    write_metadata(z_attrs, out_path)

    +
    +
    +
    +cellmap_data.utils.metadata.generate_base_multiscales_metadata(ds_name: str, scale_level: int, voxel_size: list, translation: list, units: str, axes: list)[source]#
    +
    +
    Parameters:
    +
      +
    • ds_name (str)

    • +
    • scale_level (int)

    • +
    • voxel_size (list)

    • +
    • translation (list)

    • +
    • units (str)

    • +
    • axes (list)

    • +
    +
    +
    +
    + +
    +
    +cellmap_data.utils.metadata.add_multiscale_metadata_levels(multsc, base_scale_level, levels_to_add)[source]#
    +
    + +
    +
    +cellmap_data.utils.metadata.create_multiscale_metadata(ds_name: str, voxel_size: list, translation: list, units: str, axes: list, base_scale_level: int = 0, levels_to_add: int = 0, out_path: str | None = None)[source]#
    +
    +
    Parameters:
    +
      +
    • ds_name (str)

    • +
    • voxel_size (list)

    • +
    • translation (list)

    • +
    • units (str)

    • +
    • axes (list)

    • +
    • base_scale_level (int)

    • +
    • levels_to_add (int)

    • +
    • out_path (str | None)

    • +
    +
    +
    +
    + +
    +
    +cellmap_data.utils.metadata.write_metadata(z_attrs, out_path)[source]#
    +
    + +
    + + +
    + + + + + + +
    + +
    +
    +
    + +
    + + + + + + + +
    +
    + + +
    + + +
    +
    +
    + + + + + +
    +
    + + \ No newline at end of file diff --git a/genindex.html b/genindex.html index 8d444bc..42f4c60 100644 --- a/genindex.html +++ b/genindex.html @@ -260,10 +260,12 @@

    Index

    | L | M | N + | O | R | S | T | V + | W

    _

    @@ -279,6 +281,8 @@

    _

  • (cellmap_data.dataloader.CellMapDataLoader method)
  • (cellmap_data.dataset.CellMapDataset method) +
  • +
  • (cellmap_data.dataset_writer.CellMapDatasetWriter method)
  • (cellmap_data.image.CellMapImage method)
  • @@ -305,6 +309,8 @@

    _

    @@ -313,20 +319,28 @@

    _

    A

    + - @@ -392,6 +412,13 @@

    C

    +
  • + cellmap_data.dataset_writer + +
  • @@ -511,6 +538,13 @@

    C

  • +
  • + cellmap_data.utils.metadata + +
  • CellMapDataLoader (class in cellmap_data) @@ -519,14 +553,16 @@

    C

  • (class in cellmap_data.dataloader)
  • - - + @@ -657,6 +703,8 @@

    D

  • DistanceTransform (class in cellmap_data.transforms.targets.distance) @@ -717,6 +765,8 @@

    F

  • @@ -726,6 +776,8 @@

    G

    @@ -889,6 +959,14 @@

    N

    +
  • get_center() (cellmap_data.dataset_writer.CellMapDatasetWriter method) +
  • get_empty_store() (cellmap_data.CellMapDataset method)
  • +
  • get_target_array_writer() (cellmap_data.dataset_writer.CellMapDatasetWriter method) +
  • get_weighted_sampler() (cellmap_data.CellMapMultiDataset method)
  • +

    O

    + + +
    +

    R

    - +
    -
    @@ -1056,6 +1152,8 @@

    T

  • (cellmap_data.CellMapSubset method)
  • (cellmap_data.dataset.CellMapDataset method) +
  • +
  • (cellmap_data.dataset_writer.CellMapDatasetWriter method)
  • (cellmap_data.image.CellMapImage method)
  • @@ -1122,6 +1220,8 @@

    V

  • verify_datasets() (cellmap_data.CellMapDataSplit method) @@ -1133,6 +1233,20 @@

    V

    +

    W

    + + + +
    + diff --git a/modules.html b/modules.html index c888e3c..8da9fb9 100644 --- a/modules.html +++ b/modules.html @@ -338,6 +338,35 @@

    src#

  • +
  • cellmap_data.dataset_writer +
  • cellmap_data.datasplit
  • cellmap_data.multidataset
  • +
  • cellmap_data.utils.metadata +
  • diff --git a/objects.inv b/objects.inv index fba6566988e36c785c36b82fee9e4bce81200b1c..95351689bbc7d9c41d8a7445d2e4fd1f9c6bbe50 100644 GIT binary patch delta 2791 zcmV6vh^idw*R^kK8s4zVELXpuO&*z2=&gC|jmTit?nqC`xusGA7vJdizk;Sy%AGFNaiXc)EzP_(?TA z{(N|RST%l>|M|+UpXA?v)GXsokCPUxZ4bX5+>#2|kNA`%XMZko!OJ8WwB+JaXO!@H zm5Y6_)4C{_;K`}l1HIv=hPM||=x^5|7m$ZI2mV4seroD6N!wR?xhB=0jQ-sGp-%tiTtBp$@@ zNih%>dfh?*BdjR`wcr&s=usNxEU(VVvHk&^4nf#Sdtp~j&5-g+D3^v56~AO5vEO)p zzR-hb{54O>Z!#~h5{Puxoq5HZ-tP)rJ`hAA8T3zDQGYj_9z2&bJmouRU9clBl#@UY zKCY%apcg%ID;Mhehg84K|K;SfT)Naa_X&*LvQn-@`xrwVdmm#M<@ljkVw^EJk(@i! zw@B2qI%>|9W(X)XR_+vy)?Z3?<~|Q<5CY(!ye9-G&~pMKvg@_Dg{(7hhRKS0o;waO zks4npQGbtT<1_N1zwo4UJF0+wAN@-}4!PnZx5sj>|hT~jUTRgxRq)S~xnms?8%i}X$4xWlcT zCl?uPSZ)Z85A>kGfB@G3j@1vi80-LzieLMe0DqVQ(PiPN@Rc_ZA8CN2Sm5Dx42^R3 zdZUydJHcrg#{Aj-L(vm;JBgxv{ikzq5FEi5u+BxWg$Cb&lzOUY&j|upe*=+&f^<07x4|;_R%ImxL4vQu z2!BlE>WfB(zt>o3P7E4sAdnoPuPK5C@X8?2f?g9Re*aG~7oC`kR~8v}9g8LhFKO9= zqflW9t~d%v`AHmuw*&juBb+CJ>-qIU!0p`3X?e|H@CO!v?Adw^LWO3}qQU+9 z4M7zCEL|8ZaIJ~}2P{`X=>84ZAXrZT6@P>ov;`Z;1l)rSM)$^l!N{Op*kE+nHf#_) zavwH`1GW(x1P#r0MuYEU8u4CcFb&$#3}f=_#s-199M~X0oDUmD;n|Rdfwq0c+w|zB zoxW37r9;j*1TuMRa^dr|7deo(Hp#AU!9O#R%XM4vgb<+IISMwIixJ8Cy8+RVp;I#GIUb@wK2TGuyNW-Rkckee&E#a~+ z5zKUzCj{ z@HsFcc;1q1Bq*dJ8w&{x_>r*w_!BC^*eK9x^&lQqkp)kp%SeWJ z?@ouK@NQOkm#+Gr5LibYlz+@e&_V0dX{^Gc!6P2?Tip~{+>IQZ7H4fOhF7k3Pi$I?|(ZQT&);@QCbkM zqp`@i-3(0*cFbrC3`PVy6|oEeI}l01cLLX*s&&SPqid6I2XwqyjN?KZrf@o!fe1&% znFTM;<`x)@!Xo1~3Yr}2&Lyt|2y>LhVn3Z(*S0yUlB&*Ij-pz3jbwiMJpT82(!*#0 zfojC^KS|Ly)@1g%M}MeDCA)|^sk#z%`^m!x@CYXfl{+(o0gZA1ZWl4g3z@0({EP-qH3l z5G4n><r)Jb)J*eH@1qPMJs z<8%H)bJR zc3>5y#$jLl1gQET0IneQL;Z-N5V~vMEn* z{4kE`qJNp~WjY4vWi_4BcAffmw3$@#yoctaH>WEWz1PsNhC>m65XRd7qLpB(&}?nOMfGm5=K_ZDmb>*&2-O zLw_>LM}C)$vSqa_*Nx0`7Qn}D%-OhdK#sOmc4A=8>eLwE`+qRk*4rGudw;qW0Jj9c zo?k-*U`<}8^EZJ!I7=i9`F#Qp*j-TT{;skIO^Zk!pP#jXY(h)hr%zqoUF=$b=7G@T zJ^Qy3oFLXYlRF=AZhf|Q(UhtCT`c9Oihr|VY~mqD35^Y56W0I=X8=fge1b2RK@b?i z3S4anf@|aMqslWdG%JTZphN<}W%8M^l>m6U#gzqYfdk-mM-#L0jeuS`h?u=+1jova zGj9Oe&=zOQwe9Eby|_<~JvleT>;!pspxh`cXQoGzvy)fCzJu}e;o~UsaOTy}uwa&* zt}4VY{htqu*rb8Etw_nv=HOec8D!71&R_Pm&YmjDOQ2Nu-yQpQ|h;o|TMm z!%nL_C!8k7atnGxj}2|lQPIzJ&N$>HN<$zI_l!|w>1L8vUCG;?UN==u8-9t#ugaD; zUCQITer&2DN!!=>ZSV^-jhOX!g6L(luCWpLAf43Wpd`zck!;Y7$R?HV9c#w%tn1NX6 zbqfJT%%%uxPRrQPgP52zR-TeW^$r{kLF}YGlbXg>NNLGcNE4NcU$T(wH_A@u`0$Lr zvNZZbrbR74QAgd0mbB^PuE6C3A;c5uf70@*q4D8NjDPTyZs2uJ4m4LmLVWnJnr=YP zdvYrl>grv%-?D#c^ieKCYFzjPCby&zE73NSq0ZiBGF%n-p;XocV{jocc49vwUd8oM z3$C<@Ag0GEoQmW1kAj@2FM^Ur01hg8LO_9$6PQTqI=_UhGjN4*7WKS$954|cpJP%F zCl%5}Wq;zLM=%#0*TIRnm=4aZszy8k5zG8D4lOw!L=`!T$wdVJuQZQ0YL8u>C(`?< zuAZ8zt78I-F6XRGNlp{Oc@x#yhVrf{r}S!+2isJHZ8o*h7hjTd(#BuSl{}2FEAi6D_3V&aD1Nq1ac$Er#d%Z?R1$+IZ#10*& zaTSLA+4f!06LlN)1(rYvgkv`0Dm361@rZ*Y` zsu$Z2=ip873cY}JZiQOt<~vYQPZe!BKmhA+AUSB04%d2?GlOqcR#p%ad?iLOk*hD7 z41fPzW6?A+G}41yN)F>&(yfAVY5iMe=XvT@h3Xm;?DmL(iTg(bMw zNkGa^)+u;PP(b)$g0sKE>mYEwzupLVoSQjkUNa2-!UD*iqt_rRG<&uh?muq`lJIBg z!mz-#Y6TpyTm{kn2e3g{&ju=p8FU02sDA`JgAJy8_kY1;&?#&%9d-;Ggh!sk25GsCK8&CRE`Jp^ zA%^J%R12?ALlq3i(fP2hLCc1H8f+|bF;9hTI&8B|gUSR{Gs7H5cefbW1{KM~*SBB= zeB~`6Ja2Ui5(+79!6JdXb0pTkX~qJ9>nIi*QrLpjfYh~Mk+8BBB-LBhg5+U}T99Z^ zO$(L@D``Pep?f?m7FN)Lr6OY(EPvj&3q|r=J1Z;-R?On3{@Le%)~=@$B-U!G5#y{P zIxyNAqCw+L_!>0chf#+{|Ildg&>=48UhkoXZsiUaXO@_Hty>8+8$1@`X#rB_(ZoCz zR#9|1VIoH8E1i<0n+hTdyCTYA`^B=)XerMrMU38nlKruSkR@NSWZ{KhF@F@nlH&7UK|!ht=hIXxYGlGqL@LvfyQLx4l^`6SmD_c3?_nu zinR)Wd0?dk-3YF|RqKckr)z_613G?MT&IPen8M{;6GS)_H!XN|7LULIj)98nB1_ZjXR{vg@zL6%gkG+VF zl%ff*lCmpMkAG^0e)L+?C-TIrCnXJi;!9B`_P&V?b0 z!=@swN^!HreQFnN(Y;-^|6Bh4O>+g>aib^eT?qO>t@Y(Zih_i^2Y=Zx^d+dqs{7wZ z50H;vb6}0~nx_tQL4^Xab#Jf*KiJW}zh76t)oIx%SWSiu{SSZT)f?m;nw24v8EZKy zQ(OnfM(7S+8$Jv_Tu%cry`0Oh(?yNb2o5~6Q%SS`tNRx9kA4VT@3yT@4KLYomOG{c zdD}f?l}W}gHT7|%5r3E_HWN*HP73m_wl1!Y-|#KqBRhF}+uJ~#ly)*7+MjhKVqe1j zE>3V5_0+Iz8)_dA)|Wu`zBl-~<7c|ds${uLW!v5T^O_lK*w zOTBfz@cG`x{D)k&w#@oQZgw7~<~REeN9m4@vDiB}&iQSG#U21~x(^`fu{{1vA0c1} z!Ep!J2(3kEj5p>ajbPj=@1yh&@{{fv|T^-ZgwZs4b diff --git a/py-modindex.html b/py-modindex.html index 666afb9..1e60f3b 100644 --- a/py-modindex.html +++ b/py-modindex.html @@ -274,6 +274,11 @@

    Python Module Index

        cellmap_data.dataset + + +     + cellmap_data.dataset_writer +     @@ -359,6 +364,11 @@

    Python Module Index

        cellmap_data.utils.figs + + +     + cellmap_data.utils.metadata + diff --git a/searchindex.js b/searchindex.js index bd3546d..54f1686 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles": {"CellMap-Data: the Docs": [[26, null]], "Contents": [[26, "contents"]], "Links": [[26, "links"]], "cellmap_data": [[0, null]], "cellmap_data.CellMapDataLoader": [[1, null]], "cellmap_data.CellMapDataSplit": [[2, null]], "cellmap_data.CellMapDataset": [[3, null]], "cellmap_data.CellMapImage": [[4, null]], "cellmap_data.CellMapMultiDataset": [[5, null]], "cellmap_data.CellMapSubset": [[6, null]], "cellmap_data.dataloader": [[7, null]], "cellmap_data.dataset": [[8, null]], "cellmap_data.datasplit": [[9, null]], "cellmap_data.image": [[10, null]], "cellmap_data.multidataset": [[11, null]], "cellmap_data.subdataset": [[12, null]], "cellmap_data.transforms": [[13, null]], "cellmap_data.transforms.augment": [[14, null]], "cellmap_data.transforms.augment.gaussian_noise": [[15, null]], "cellmap_data.transforms.augment.nan_to_num": [[16, null]], "cellmap_data.transforms.augment.normalize": [[17, null]], "cellmap_data.transforms.augment.random_contrast": [[18, null]], "cellmap_data.transforms.augment.random_gamma": [[19, null]], "cellmap_data.transforms.targets": [[20, null]], "cellmap_data.transforms.targets.cellpose": [[21, null]], "cellmap_data.transforms.targets.distance": [[22, null]], "cellmap_data.utils": [[23, null]], "cellmap_data.utils.dtype": [[24, null]], "cellmap_data.utils.figs": [[25, null]], "src": [[27, null]]}, "docnames": ["cellmap_data", "cellmap_data.CellMapDataLoader", "cellmap_data.CellMapDataSplit", "cellmap_data.CellMapDataset", "cellmap_data.CellMapImage", "cellmap_data.CellMapMultiDataset", "cellmap_data.CellMapSubset", "cellmap_data.dataloader", "cellmap_data.dataset", "cellmap_data.datasplit", "cellmap_data.image", "cellmap_data.multidataset", "cellmap_data.subdataset", "cellmap_data.transforms", "cellmap_data.transforms.augment", "cellmap_data.transforms.augment.gaussian_noise", "cellmap_data.transforms.augment.nan_to_num", "cellmap_data.transforms.augment.normalize", "cellmap_data.transforms.augment.random_contrast", "cellmap_data.transforms.augment.random_gamma", "cellmap_data.transforms.targets", "cellmap_data.transforms.targets.cellpose", "cellmap_data.transforms.targets.distance", "cellmap_data.utils", "cellmap_data.utils.dtype", "cellmap_data.utils.figs", "index", "modules"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1}, "filenames": ["cellmap_data.rst", "cellmap_data.CellMapDataLoader.rst", "cellmap_data.CellMapDataSplit.rst", "cellmap_data.CellMapDataset.rst", "cellmap_data.CellMapImage.rst", "cellmap_data.CellMapMultiDataset.rst", "cellmap_data.CellMapSubset.rst", "cellmap_data.dataloader.rst", "cellmap_data.dataset.rst", "cellmap_data.datasplit.rst", "cellmap_data.image.rst", "cellmap_data.multidataset.rst", "cellmap_data.subdataset.rst", "cellmap_data.transforms.rst", "cellmap_data.transforms.augment.rst", "cellmap_data.transforms.augment.gaussian_noise.rst", "cellmap_data.transforms.augment.nan_to_num.rst", "cellmap_data.transforms.augment.normalize.rst", "cellmap_data.transforms.augment.random_contrast.rst", "cellmap_data.transforms.augment.random_gamma.rst", "cellmap_data.transforms.targets.rst", "cellmap_data.transforms.targets.cellpose.rst", "cellmap_data.transforms.targets.distance.rst", "cellmap_data.utils.rst", "cellmap_data.utils.dtype.rst", "cellmap_data.utils.figs.rst", "index.rst", "modules.rst"], "indexentries": {"__getitem__() (cellmap_data.cellmapdataloader method)": [[1, "cellmap_data.CellMapDataLoader.__getitem__", false]], "__getitem__() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.__getitem__", false]], "__getitem__() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.__getitem__", false]], "__getitem__() (cellmap_data.dataloader.cellmapdataloader method)": [[7, "cellmap_data.dataloader.CellMapDataLoader.__getitem__", false]], "__getitem__() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.__getitem__", false]], "__getitem__() (cellmap_data.image.cellmapimage method)": [[10, "cellmap_data.image.CellMapImage.__getitem__", false]], "__getitem__() (cellmap_data.image.emptyimage method)": [[10, "cellmap_data.image.EmptyImage.__getitem__", false]], "__init__() (cellmap_data.cellmapdataloader method)": [[1, "cellmap_data.CellMapDataLoader.__init__", false]], "__init__() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.__init__", false]], "__init__() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.__init__", false]], "__init__() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.__init__", false]], "__init__() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.__init__", false]], "__init__() (cellmap_data.cellmapsubset method)": [[6, "cellmap_data.CellMapSubset.__init__", false]], "__len__() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.__len__", false]], "__len__() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.__len__", false]], "apply_spatial_transforms() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.apply_spatial_transforms", false]], "apply_spatial_transforms() (cellmap_data.image.cellmapimage method)": [[10, "cellmap_data.image.CellMapImage.apply_spatial_transforms", false]], "array (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.array", false]], "array (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.array", false]], "array_path (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.array_path", false]], "array_path (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.array_path", false]], "bg_count (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.bg_count", false]], "bg_count (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.bg_count", false]], "bg_count (cellmap_data.image.emptyimage property)": [[10, "cellmap_data.image.EmptyImage.bg_count", false]], "bounding_box (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.bounding_box", false]], "bounding_box (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.bounding_box", false]], "bounding_box (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.bounding_box", false]], "bounding_box (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.bounding_box", false]], "bounding_box (cellmap_data.image.emptyimage property)": [[10, "cellmap_data.image.EmptyImage.bounding_box", false]], "bounding_box_shape (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.bounding_box_shape", false]], "bounding_box_shape (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.bounding_box_shape", false]], "cellmap_data": [[0, "module-cellmap_data", false]], "cellmap_data.dataloader": [[7, "module-cellmap_data.dataloader", false]], "cellmap_data.dataset": [[8, "module-cellmap_data.dataset", false]], "cellmap_data.datasplit": [[9, "module-cellmap_data.datasplit", false]], "cellmap_data.image": [[10, "module-cellmap_data.image", false]], "cellmap_data.multidataset": [[11, "module-cellmap_data.multidataset", false]], "cellmap_data.subdataset": [[12, "module-cellmap_data.subdataset", false]], "cellmap_data.transforms": [[13, "module-cellmap_data.transforms", false]], "cellmap_data.transforms.augment": [[14, "module-cellmap_data.transforms.augment", false]], "cellmap_data.transforms.augment.gaussian_noise": [[15, "module-cellmap_data.transforms.augment.gaussian_noise", false]], "cellmap_data.transforms.augment.nan_to_num": [[16, "module-cellmap_data.transforms.augment.nan_to_num", false]], "cellmap_data.transforms.augment.normalize": [[17, "module-cellmap_data.transforms.augment.normalize", false]], "cellmap_data.transforms.augment.random_contrast": [[18, "module-cellmap_data.transforms.augment.random_contrast", false]], "cellmap_data.transforms.augment.random_gamma": [[19, "module-cellmap_data.transforms.augment.random_gamma", false]], "cellmap_data.transforms.targets": [[20, "module-cellmap_data.transforms.targets", false]], "cellmap_data.transforms.targets.cellpose": [[21, "module-cellmap_data.transforms.targets.cellpose", false]], "cellmap_data.transforms.targets.distance": [[22, "module-cellmap_data.transforms.targets.distance", false]], "cellmap_data.utils": [[23, "module-cellmap_data.utils", false]], "cellmap_data.utils.dtype": [[24, "module-cellmap_data.utils.dtype", false]], "cellmap_data.utils.figs": [[25, "module-cellmap_data.utils.figs", false]], "cellmapdataloader (class in cellmap_data)": [[1, "cellmap_data.CellMapDataLoader", false]], "cellmapdataloader (class in cellmap_data.dataloader)": [[7, "cellmap_data.dataloader.CellMapDataLoader", false]], "cellmapdataset (class in cellmap_data)": [[3, "cellmap_data.CellMapDataset", false]], "cellmapdataset (class in cellmap_data.dataset)": [[8, "cellmap_data.dataset.CellMapDataset", false]], "cellmapdatasplit (class in cellmap_data)": [[2, "cellmap_data.CellMapDataSplit", false]], "cellmapdatasplit (class in cellmap_data.datasplit)": [[9, "cellmap_data.datasplit.CellMapDataSplit", false]], "cellmapimage (class in cellmap_data)": [[4, "cellmap_data.CellMapImage", false]], "cellmapimage (class in cellmap_data.image)": [[10, "cellmap_data.image.CellMapImage", false]], "cellmapmultidataset (class in cellmap_data)": [[5, "cellmap_data.CellMapMultiDataset", false]], "cellmapmultidataset (class in cellmap_data.multidataset)": [[11, "cellmap_data.multidataset.CellMapMultiDataset", false]], "cellmapsubset (class in cellmap_data)": [[6, "cellmap_data.CellMapSubset", false]], "cellmapsubset (class in cellmap_data.subdataset)": [[12, "cellmap_data.subdataset.CellMapSubset", false]], "cellposeflow (class in cellmap_data.transforms.targets.cellpose)": [[21, "cellmap_data.transforms.targets.cellpose.CellposeFlow", false]], "center (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.center", false]], "center (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.center", false]], "center (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.center", false]], "center (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.center", false]], "class_counts (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.class_counts", false]], "class_counts (cellmap_data.cellmapdatasplit property)": [[2, "cellmap_data.CellMapDataSplit.class_counts", false]], "class_counts (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.class_counts", false]], "class_counts (cellmap_data.cellmapmultidataset property)": [[5, "cellmap_data.CellMapMultiDataset.class_counts", false]], "class_counts (cellmap_data.cellmapsubset property)": [[6, "cellmap_data.CellMapSubset.class_counts", false]], "class_counts (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.class_counts", false]], "class_counts (cellmap_data.datasplit.cellmapdatasplit property)": [[9, "cellmap_data.datasplit.CellMapDataSplit.class_counts", false]], "class_counts (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.class_counts", false]], "class_counts (cellmap_data.image.emptyimage property)": [[10, "cellmap_data.image.EmptyImage.class_counts", false]], "class_counts (cellmap_data.multidataset.cellmapmultidataset property)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.class_counts", false]], "class_counts (cellmap_data.subdataset.cellmapsubset property)": [[12, "cellmap_data.subdataset.CellMapSubset.class_counts", false]], "class_weights (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.class_weights", false]], "class_weights (cellmap_data.cellmapmultidataset property)": [[5, "cellmap_data.CellMapMultiDataset.class_weights", false]], "class_weights (cellmap_data.cellmapsubset property)": [[6, "cellmap_data.CellMapSubset.class_weights", false]], "class_weights (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.class_weights", false]], "class_weights (cellmap_data.multidataset.cellmapmultidataset property)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.class_weights", false]], "class_weights (cellmap_data.subdataset.cellmapsubset property)": [[12, "cellmap_data.subdataset.CellMapSubset.class_weights", false]], "classes (cellmap_data.cellmapmultidataset attribute)": [[5, "cellmap_data.CellMapMultiDataset.classes", false]], "classes (cellmap_data.cellmapsubset property)": [[6, "cellmap_data.CellMapSubset.classes", false]], "classes (cellmap_data.multidataset.cellmapmultidataset attribute)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.classes", false]], "classes (cellmap_data.subdataset.cellmapsubset property)": [[12, "cellmap_data.subdataset.CellMapSubset.classes", false]], "collate_fn() (cellmap_data.cellmapdataloader method)": [[1, "cellmap_data.CellMapDataLoader.collate_fn", false]], "collate_fn() (cellmap_data.dataloader.cellmapdataloader method)": [[7, "cellmap_data.dataloader.CellMapDataLoader.collate_fn", false]], "construct() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.construct", false]], "construct() (cellmap_data.datasplit.cellmapdatasplit method)": [[9, "cellmap_data.datasplit.CellMapDataSplit.construct", false]], "coordinatetransformations (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.coordinateTransformations", false]], "coordinatetransformations (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.coordinateTransformations", false]], "cumulative_sizes (cellmap_data.multidataset.cellmapmultidataset attribute)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.cumulative_sizes", false]], "dataset (cellmap_data.subdataset.cellmapsubset attribute)": [[12, "cellmap_data.subdataset.CellMapSubset.dataset", false]], "dataset_weights (cellmap_data.cellmapmultidataset property)": [[5, "cellmap_data.CellMapMultiDataset.dataset_weights", false]], "dataset_weights (cellmap_data.multidataset.cellmapmultidataset property)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.dataset_weights", false]], "datasets (cellmap_data.cellmapmultidataset attribute)": [[5, "cellmap_data.CellMapMultiDataset.datasets", false]], "datasets (cellmap_data.multidataset.cellmapmultidataset attribute)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.datasets", false], [11, "id0", false]], "device (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.device", false]], "device (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.device", false]], "distancetransform (class in cellmap_data.transforms.targets.distance)": [[22, "cellmap_data.transforms.targets.distance.DistanceTransform", false]], "empty() (cellmap_data.cellmapdataset static method)": [[3, "cellmap_data.CellMapDataset.empty", false]], "empty() (cellmap_data.cellmapmultidataset static method)": [[5, "cellmap_data.CellMapMultiDataset.empty", false]], "empty() (cellmap_data.dataset.cellmapdataset static method)": [[8, "cellmap_data.dataset.CellMapDataset.empty", false]], "empty() (cellmap_data.multidataset.cellmapmultidataset static method)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.empty", false]], "emptyimage (class in cellmap_data.image)": [[10, "cellmap_data.image.EmptyImage", false]], "find_level() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.find_level", false]], "find_level() (cellmap_data.image.cellmapimage method)": [[10, "cellmap_data.image.CellMapImage.find_level", false]], "forward() (cellmap_data.transforms.augment.gaussian_noise.gaussiannoise method)": [[15, "cellmap_data.transforms.augment.gaussian_noise.GaussianNoise.forward", false]], "forward() (cellmap_data.transforms.augment.random_contrast.randomcontrast method)": [[18, "cellmap_data.transforms.augment.random_contrast.RandomContrast.forward", false]], "forward() (cellmap_data.transforms.augment.random_gamma.randomgamma method)": [[19, "cellmap_data.transforms.augment.random_gamma.RandomGamma.forward", false]], "forward() (cellmap_data.transforms.targets.distance.distancetransform method)": [[22, "cellmap_data.transforms.targets.distance.DistanceTransform.forward", false]], "forward() (cellmap_data.transforms.targets.distance.signeddistancetransform method)": [[22, "cellmap_data.transforms.targets.distance.SignedDistanceTransform.forward", false]], "from_csv() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.from_csv", false]], "from_csv() (cellmap_data.datasplit.cellmapdatasplit method)": [[9, "cellmap_data.datasplit.CellMapDataSplit.from_csv", false]], "full_coords (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.full_coords", false]], "full_coords (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.full_coords", false]], "gaussiannoise (class in cellmap_data.transforms.augment.gaussian_noise)": [[15, "cellmap_data.transforms.augment.gaussian_noise.GaussianNoise", false]], "generate_spatial_transforms() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.generate_spatial_transforms", false]], "generate_spatial_transforms() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.generate_spatial_transforms", false]], "get_empty_store() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.get_empty_store", false]], "get_empty_store() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.get_empty_store", false]], "get_image_dict() (in module cellmap_data.utils.figs)": [[25, "cellmap_data.utils.figs.get_image_dict", false]], "get_image_grid() (in module cellmap_data.utils.figs)": [[25, "cellmap_data.utils.figs.get_image_grid", false]], "get_image_grid_numpy() (in module cellmap_data.utils.figs)": [[25, "cellmap_data.utils.figs.get_image_grid_numpy", false]], "get_indices() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.get_indices", false]], "get_indices() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.get_indices", false]], "get_indices() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.get_indices", false]], "get_indices() (cellmap_data.multidataset.cellmapmultidataset method)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.get_indices", false]], "get_label_array() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.get_label_array", false]], "get_label_array() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.get_label_array", false]], "get_subset_random_sampler() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.get_subset_random_sampler", false]], "get_subset_random_sampler() (cellmap_data.multidataset.cellmapmultidataset method)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.get_subset_random_sampler", false]], "get_target_array() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.get_target_array", false]], "get_target_array() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.get_target_array", false]], "get_weighted_sampler() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.get_weighted_sampler", false]], "get_weighted_sampler() (cellmap_data.multidataset.cellmapmultidataset method)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.get_weighted_sampler", false]], "group (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.group", false]], "group (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.group", false]], "indices (cellmap_data.subdataset.cellmapsubset attribute)": [[12, "cellmap_data.subdataset.CellMapSubset.indices", false]], "input_arrays (cellmap_data.cellmapmultidataset attribute)": [[5, "cellmap_data.CellMapMultiDataset.input_arrays", false]], "input_arrays (cellmap_data.multidataset.cellmapmultidataset attribute)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.input_arrays", false]], "largest_voxel_sizes (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.largest_voxel_sizes", false]], "largest_voxel_sizes (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.largest_voxel_sizes", false]], "module": [[0, "module-cellmap_data", false], [7, "module-cellmap_data.dataloader", false], [8, "module-cellmap_data.dataset", false], [9, "module-cellmap_data.datasplit", false], [10, "module-cellmap_data.image", false], [11, "module-cellmap_data.multidataset", false], [12, "module-cellmap_data.subdataset", false], [13, "module-cellmap_data.transforms", false], [14, "module-cellmap_data.transforms.augment", false], [15, "module-cellmap_data.transforms.augment.gaussian_noise", false], [16, "module-cellmap_data.transforms.augment.nan_to_num", false], [17, "module-cellmap_data.transforms.augment.normalize", false], [18, "module-cellmap_data.transforms.augment.random_contrast", false], [19, "module-cellmap_data.transforms.augment.random_gamma", false], [20, "module-cellmap_data.transforms.targets", false], [21, "module-cellmap_data.transforms.targets.cellpose", false], [22, "module-cellmap_data.transforms.targets.distance", false], [23, "module-cellmap_data.utils", false], [24, "module-cellmap_data.utils.dtype", false], [25, "module-cellmap_data.utils.figs", false]], "multiscale_attrs (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.multiscale_attrs", false]], "multiscale_attrs (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.multiscale_attrs", false]], "nantonum (class in cellmap_data.transforms.augment.nan_to_num)": [[16, "cellmap_data.transforms.augment.nan_to_num.NaNtoNum", false]], "normalize (class in cellmap_data.transforms.augment.normalize)": [[17, "cellmap_data.transforms.augment.normalize.Normalize", false]], "randomcontrast (class in cellmap_data.transforms.augment.random_contrast)": [[18, "cellmap_data.transforms.augment.random_contrast.RandomContrast", false]], "randomgamma (class in cellmap_data.transforms.augment.random_gamma)": [[19, "cellmap_data.transforms.augment.random_gamma.RandomGamma", false]], "refresh() (cellmap_data.cellmapdataloader method)": [[1, "cellmap_data.CellMapDataLoader.refresh", false]], "refresh() (cellmap_data.dataloader.cellmapdataloader method)": [[7, "cellmap_data.dataloader.CellMapDataLoader.refresh", false]], "reset_arrays() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.reset_arrays", false]], "reset_arrays() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.reset_arrays", false]], "return_data() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.return_data", false]], "return_data() (cellmap_data.image.cellmapimage method)": [[10, "cellmap_data.image.CellMapImage.return_data", false]], "rotate_coords() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.rotate_coords", false]], "rotate_coords() (cellmap_data.image.cellmapimage method)": [[10, "cellmap_data.image.CellMapImage.rotate_coords", false]], "sample_weights (cellmap_data.cellmapmultidataset property)": [[5, "cellmap_data.CellMapMultiDataset.sample_weights", false]], "sample_weights (cellmap_data.multidataset.cellmapmultidataset property)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.sample_weights", false]], "sampling_box (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.sampling_box", false]], "sampling_box (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.sampling_box", false]], "sampling_box (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.sampling_box", false]], "sampling_box (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.sampling_box", false]], "sampling_box (cellmap_data.image.emptyimage property)": [[10, "cellmap_data.image.EmptyImage.sampling_box", false]], "sampling_box_shape (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.sampling_box_shape", false]], "sampling_box_shape (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.sampling_box_shape", false]], "scale_level (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.scale_level", false]], "scale_level (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.scale_level", false]], "set_arrays() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.set_arrays", false]], "set_arrays() (cellmap_data.datasplit.cellmapdatasplit method)": [[9, "cellmap_data.datasplit.CellMapDataSplit.set_arrays", false]], "set_raw_value_transforms() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.cellmapsubset method)": [[6, "cellmap_data.CellMapSubset.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.datasplit.cellmapdatasplit method)": [[9, "cellmap_data.datasplit.CellMapDataSplit.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.multidataset.cellmapmultidataset method)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.subdataset.cellmapsubset method)": [[12, "cellmap_data.subdataset.CellMapSubset.set_raw_value_transforms", false]], "set_spatial_transforms() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.datasplit.cellmapdatasplit method)": [[9, "cellmap_data.datasplit.CellMapDataSplit.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.image.cellmapimage method)": [[10, "cellmap_data.image.CellMapImage.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.image.emptyimage method)": [[10, "cellmap_data.image.EmptyImage.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.multidataset.cellmapmultidataset method)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.set_spatial_transforms", false]], "set_target_value_transforms() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.cellmapsubset method)": [[6, "cellmap_data.CellMapSubset.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.datasplit.cellmapdatasplit method)": [[9, "cellmap_data.datasplit.CellMapDataSplit.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.multidataset.cellmapmultidataset method)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.subdataset.cellmapsubset method)": [[12, "cellmap_data.subdataset.CellMapSubset.set_target_value_transforms", false]], "shape (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.shape", false]], "shape (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.shape", false]], "signeddistancetransform (class in cellmap_data.transforms.targets.distance)": [[22, "cellmap_data.transforms.targets.distance.SignedDistanceTransform", false]], "size (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.size", false]], "size (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.size", false]], "split_target_path() (in module cellmap_data.dataset)": [[8, "cellmap_data.dataset.split_target_path", false]], "target_arrays (cellmap_data.cellmapmultidataset attribute)": [[5, "cellmap_data.CellMapMultiDataset.target_arrays", false]], "target_arrays (cellmap_data.multidataset.cellmapmultidataset attribute)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.target_arrays", false]], "to() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.to", false]], "to() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.to", false]], "to() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.to", false]], "to() (cellmap_data.cellmapsubset method)": [[6, "cellmap_data.CellMapSubset.to", false]], "to() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.to", false]], "to() (cellmap_data.image.cellmapimage method)": [[10, "cellmap_data.image.CellMapImage.to", false]], "to() (cellmap_data.image.emptyimage method)": [[10, "cellmap_data.image.EmptyImage.to", false]], "to() (cellmap_data.multidataset.cellmapmultidataset method)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.to", false]], "to() (cellmap_data.subdataset.cellmapsubset method)": [[12, "cellmap_data.subdataset.CellMapSubset.to", false]], "torch_max_value() (in module cellmap_data.utils.dtype)": [[24, "cellmap_data.utils.dtype.torch_max_value", false]], "train_datasets_combined (cellmap_data.cellmapdatasplit property)": [[2, "cellmap_data.CellMapDataSplit.train_datasets_combined", false]], "train_datasets_combined (cellmap_data.datasplit.cellmapdatasplit property)": [[9, "cellmap_data.datasplit.CellMapDataSplit.train_datasets_combined", false]], "transform() (in module cellmap_data.transforms.targets.distance)": [[22, "cellmap_data.transforms.targets.distance.transform", false]], "translation (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.translation", false]], "translation (cellmap_data.image.cellmapimage property)": [[10, "cellmap_data.image.CellMapImage.translation", false]], "validation_blocks (cellmap_data.cellmapdatasplit property)": [[2, "cellmap_data.CellMapDataSplit.validation_blocks", false]], "validation_blocks (cellmap_data.datasplit.cellmapdatasplit property)": [[9, "cellmap_data.datasplit.CellMapDataSplit.validation_blocks", false]], "validation_datasets_combined (cellmap_data.cellmapdatasplit property)": [[2, "cellmap_data.CellMapDataSplit.validation_datasets_combined", false]], "validation_datasets_combined (cellmap_data.datasplit.cellmapdatasplit property)": [[9, "cellmap_data.datasplit.CellMapDataSplit.validation_datasets_combined", false]], "validation_indices (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.validation_indices", false]], "validation_indices (cellmap_data.cellmapmultidataset property)": [[5, "cellmap_data.CellMapMultiDataset.validation_indices", false]], "validation_indices (cellmap_data.cellmapsubset property)": [[6, "cellmap_data.CellMapSubset.validation_indices", false]], "validation_indices (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.validation_indices", false]], "validation_indices (cellmap_data.multidataset.cellmapmultidataset property)": [[11, "cellmap_data.multidataset.CellMapMultiDataset.validation_indices", false]], "validation_indices (cellmap_data.subdataset.cellmapsubset property)": [[12, "cellmap_data.subdataset.CellMapSubset.validation_indices", false]], "verify() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.verify", false]], "verify() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.verify", false]], "verify_datasets() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.verify_datasets", false]], "verify_datasets() (cellmap_data.datasplit.cellmapdatasplit method)": [[9, "cellmap_data.datasplit.CellMapDataSplit.verify_datasets", false]]}, "objects": {"": [[0, 0, 0, "-", "cellmap_data"]], "cellmap_data": [[1, 1, 1, "", "CellMapDataLoader"], [2, 1, 1, "", "CellMapDataSplit"], [3, 1, 1, "", "CellMapDataset"], [4, 1, 1, "", "CellMapImage"], [5, 1, 1, "", "CellMapMultiDataset"], [6, 1, 1, "", "CellMapSubset"], [7, 0, 0, "-", "dataloader"], [8, 0, 0, "-", "dataset"], [9, 0, 0, "-", "datasplit"], [10, 0, 0, "-", "image"], [11, 0, 0, "-", "multidataset"], [12, 0, 0, "-", "subdataset"], [13, 0, 0, "-", "transforms"], [23, 0, 0, "-", "utils"]], "cellmap_data.CellMapDataLoader": [[1, 2, 1, "", "__getitem__"], [1, 2, 1, "", "__init__"], [1, 2, 1, "", "collate_fn"], [1, 2, 1, "", "refresh"]], "cellmap_data.CellMapDataSplit": [[2, 2, 1, "", "__init__"], [2, 3, 1, "", "class_counts"], [2, 2, 1, "", "construct"], [2, 2, 1, "", "from_csv"], [2, 2, 1, "", "set_arrays"], [2, 2, 1, "", "set_raw_value_transforms"], [2, 2, 1, "", "set_spatial_transforms"], [2, 2, 1, "", "set_target_value_transforms"], [2, 3, 1, "", "train_datasets_combined"], [2, 3, 1, "", "validation_blocks"], [2, 3, 1, "", "validation_datasets_combined"], [2, 2, 1, "", "verify_datasets"]], "cellmap_data.CellMapDataset": [[3, 2, 1, "", "__getitem__"], [3, 2, 1, "", "__init__"], [3, 2, 1, "", "__len__"], [3, 3, 1, "", "bounding_box"], [3, 3, 1, "", "bounding_box_shape"], [3, 3, 1, "", "center"], [3, 3, 1, "", "class_counts"], [3, 3, 1, "", "class_weights"], [3, 3, 1, "", "device"], [3, 2, 1, "", "empty"], [3, 2, 1, "", "generate_spatial_transforms"], [3, 2, 1, "", "get_empty_store"], [3, 2, 1, "", "get_indices"], [3, 2, 1, "", "get_label_array"], [3, 2, 1, "", "get_target_array"], [3, 3, 1, "", "largest_voxel_sizes"], [3, 2, 1, "", "reset_arrays"], [3, 3, 1, "", "sampling_box"], [3, 3, 1, "", "sampling_box_shape"], [3, 2, 1, "", "set_raw_value_transforms"], [3, 2, 1, "", "set_target_value_transforms"], [3, 3, 1, "", "size"], [3, 2, 1, "", "to"], [3, 3, 1, "", "validation_indices"], [3, 2, 1, "", "verify"]], "cellmap_data.CellMapImage": [[4, 2, 1, "", "__getitem__"], [4, 2, 1, "", "__init__"], [4, 2, 1, "", "apply_spatial_transforms"], [4, 3, 1, "", "array"], [4, 3, 1, "", "array_path"], [4, 3, 1, "", "bg_count"], [4, 3, 1, "", "bounding_box"], [4, 3, 1, "", "center"], [4, 3, 1, "", "class_counts"], [4, 3, 1, "", "coordinateTransformations"], [4, 2, 1, "", "find_level"], [4, 3, 1, "", "full_coords"], [4, 3, 1, "", "group"], [4, 3, 1, "", "multiscale_attrs"], [4, 2, 1, "", "return_data"], [4, 2, 1, "", "rotate_coords"], [4, 3, 1, "", "sampling_box"], [4, 3, 1, "", "scale_level"], [4, 2, 1, "", "set_spatial_transforms"], [4, 3, 1, "", "shape"], [4, 2, 1, "", "to"], [4, 3, 1, "", "translation"]], "cellmap_data.CellMapMultiDataset": [[5, 2, 1, "", "__init__"], [5, 3, 1, "", "class_counts"], [5, 3, 1, "", "class_weights"], [5, 4, 1, "", "classes"], [5, 3, 1, "", "dataset_weights"], [5, 4, 1, "", "datasets"], [5, 2, 1, "", "empty"], [5, 2, 1, "", "get_indices"], [5, 2, 1, "", "get_subset_random_sampler"], [5, 2, 1, "", "get_weighted_sampler"], [5, 4, 1, "", "input_arrays"], [5, 3, 1, "", "sample_weights"], [5, 2, 1, "", "set_raw_value_transforms"], [5, 2, 1, "", "set_spatial_transforms"], [5, 2, 1, "", "set_target_value_transforms"], [5, 4, 1, "", "target_arrays"], [5, 2, 1, "", "to"], [5, 3, 1, "", "validation_indices"]], "cellmap_data.CellMapSubset": [[6, 2, 1, "", "__init__"], [6, 3, 1, "", "class_counts"], [6, 3, 1, "", "class_weights"], [6, 3, 1, "", "classes"], [6, 2, 1, "", "set_raw_value_transforms"], [6, 2, 1, "", "set_target_value_transforms"], [6, 2, 1, "", "to"], [6, 3, 1, "", "validation_indices"]], "cellmap_data.dataloader": [[7, 1, 1, "", "CellMapDataLoader"]], "cellmap_data.dataloader.CellMapDataLoader": [[7, 2, 1, "", "__getitem__"], [7, 2, 1, "", "collate_fn"], [7, 2, 1, "", "refresh"]], "cellmap_data.dataset": [[8, 1, 1, "", "CellMapDataset"], [8, 5, 1, "", "split_target_path"]], "cellmap_data.dataset.CellMapDataset": [[8, 2, 1, "", "__getitem__"], [8, 2, 1, "", "__len__"], [8, 3, 1, "", "bounding_box"], [8, 3, 1, "", "bounding_box_shape"], [8, 3, 1, "", "center"], [8, 3, 1, "", "class_counts"], [8, 3, 1, "", "class_weights"], [8, 3, 1, "", "device"], [8, 2, 1, "", "empty"], [8, 2, 1, "", "generate_spatial_transforms"], [8, 2, 1, "", "get_empty_store"], [8, 2, 1, "", "get_indices"], [8, 2, 1, "", "get_label_array"], [8, 2, 1, "", "get_target_array"], [8, 3, 1, "", "largest_voxel_sizes"], [8, 2, 1, "", "reset_arrays"], [8, 3, 1, "", "sampling_box"], [8, 3, 1, "", "sampling_box_shape"], [8, 2, 1, "", "set_raw_value_transforms"], [8, 2, 1, "", "set_target_value_transforms"], [8, 3, 1, "", "size"], [8, 2, 1, "", "to"], [8, 3, 1, "", "validation_indices"], [8, 2, 1, "", "verify"]], "cellmap_data.datasplit": [[9, 1, 1, "", "CellMapDataSplit"]], "cellmap_data.datasplit.CellMapDataSplit": [[9, 3, 1, "", "class_counts"], [9, 2, 1, "", "construct"], [9, 2, 1, "", "from_csv"], [9, 2, 1, "", "set_arrays"], [9, 2, 1, "", "set_raw_value_transforms"], [9, 2, 1, "", "set_spatial_transforms"], [9, 2, 1, "", "set_target_value_transforms"], [9, 3, 1, "", "train_datasets_combined"], [9, 3, 1, "", "validation_blocks"], [9, 3, 1, "", "validation_datasets_combined"], [9, 2, 1, "", "verify_datasets"]], "cellmap_data.image": [[10, 1, 1, "", "CellMapImage"], [10, 1, 1, "", "EmptyImage"]], "cellmap_data.image.CellMapImage": [[10, 2, 1, "", "__getitem__"], [10, 2, 1, "", "apply_spatial_transforms"], [10, 3, 1, "", "array"], [10, 3, 1, "", "array_path"], [10, 3, 1, "", "bg_count"], [10, 3, 1, "", "bounding_box"], [10, 3, 1, "", "center"], [10, 3, 1, "", "class_counts"], [10, 3, 1, "", "coordinateTransformations"], [10, 2, 1, "", "find_level"], [10, 3, 1, "", "full_coords"], [10, 3, 1, "", "group"], [10, 3, 1, "", "multiscale_attrs"], [10, 2, 1, "", "return_data"], [10, 2, 1, "", "rotate_coords"], [10, 3, 1, "", "sampling_box"], [10, 3, 1, "", "scale_level"], [10, 2, 1, "", "set_spatial_transforms"], [10, 3, 1, "", "shape"], [10, 2, 1, "", "to"], [10, 3, 1, "", "translation"]], "cellmap_data.image.EmptyImage": [[10, 2, 1, "", "__getitem__"], [10, 3, 1, "", "bg_count"], [10, 3, 1, "", "bounding_box"], [10, 3, 1, "", "class_counts"], [10, 3, 1, "", "sampling_box"], [10, 2, 1, "", "set_spatial_transforms"], [10, 2, 1, "", "to"]], "cellmap_data.multidataset": [[11, 1, 1, "", "CellMapMultiDataset"]], "cellmap_data.multidataset.CellMapMultiDataset": [[11, 3, 1, "", "class_counts"], [11, 3, 1, "", "class_weights"], [11, 4, 1, "", "classes"], [11, 4, 1, "", "cumulative_sizes"], [11, 3, 1, "", "dataset_weights"], [11, 4, 1, "id0", "datasets"], [11, 2, 1, "", "empty"], [11, 2, 1, "", "get_indices"], [11, 2, 1, "", "get_subset_random_sampler"], [11, 2, 1, "", "get_weighted_sampler"], [11, 4, 1, "", "input_arrays"], [11, 3, 1, "", "sample_weights"], [11, 2, 1, "", "set_raw_value_transforms"], [11, 2, 1, "", "set_spatial_transforms"], [11, 2, 1, "", "set_target_value_transforms"], [11, 4, 1, "", "target_arrays"], [11, 2, 1, "", "to"], [11, 3, 1, "", "validation_indices"]], "cellmap_data.subdataset": [[12, 1, 1, "", "CellMapSubset"]], "cellmap_data.subdataset.CellMapSubset": [[12, 3, 1, "", "class_counts"], [12, 3, 1, "", "class_weights"], [12, 3, 1, "", "classes"], [12, 4, 1, "", "dataset"], [12, 4, 1, "", "indices"], [12, 2, 1, "", "set_raw_value_transforms"], [12, 2, 1, "", "set_target_value_transforms"], [12, 2, 1, "", "to"], [12, 3, 1, "", "validation_indices"]], "cellmap_data.transforms": [[14, 0, 0, "-", "augment"], [20, 0, 0, "-", "targets"]], "cellmap_data.transforms.augment": [[15, 0, 0, "-", "gaussian_noise"], [16, 0, 0, "-", "nan_to_num"], [17, 0, 0, "-", "normalize"], [18, 0, 0, "-", "random_contrast"], [19, 0, 0, "-", "random_gamma"]], "cellmap_data.transforms.augment.gaussian_noise": [[15, 1, 1, "", "GaussianNoise"]], "cellmap_data.transforms.augment.gaussian_noise.GaussianNoise": [[15, 2, 1, "", "forward"]], "cellmap_data.transforms.augment.nan_to_num": [[16, 1, 1, "", "NaNtoNum"]], "cellmap_data.transforms.augment.normalize": [[17, 1, 1, "", "Normalize"]], "cellmap_data.transforms.augment.random_contrast": [[18, 1, 1, "", "RandomContrast"]], "cellmap_data.transforms.augment.random_contrast.RandomContrast": [[18, 2, 1, "", "forward"]], "cellmap_data.transforms.augment.random_gamma": [[19, 1, 1, "", "RandomGamma"]], "cellmap_data.transforms.augment.random_gamma.RandomGamma": [[19, 2, 1, "", "forward"]], "cellmap_data.transforms.targets": [[21, 0, 0, "-", "cellpose"], [22, 0, 0, "-", "distance"]], "cellmap_data.transforms.targets.cellpose": [[21, 1, 1, "", "CellposeFlow"]], "cellmap_data.transforms.targets.distance": [[22, 1, 1, "", "DistanceTransform"], [22, 1, 1, "", "SignedDistanceTransform"], [22, 5, 1, "", "transform"]], "cellmap_data.transforms.targets.distance.DistanceTransform": [[22, 2, 1, "", "forward"]], "cellmap_data.transforms.targets.distance.SignedDistanceTransform": [[22, 2, 1, "", "forward"]], "cellmap_data.utils": [[24, 0, 0, "-", "dtype"], [25, 0, 0, "-", "figs"]], "cellmap_data.utils.dtype": [[24, 5, 1, "", "torch_max_value"]], "cellmap_data.utils.figs": [[25, 5, 1, "", "get_image_dict"], [25, 5, 1, "", "get_image_grid"], [25, 5, 1, "", "get_image_grid_numpy"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "property", "Python property"], "4": ["py", "attribute", "Python attribute"], "5": ["py", "function", "Python function"]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:property", "4": "py:attribute", "5": "py:function"}, "terms": {"": [4, 5, 10, 11, 25], "0": [1, 3, 7, 8, 15, 18, 19], "1": [1, 3, 5, 7, 8, 11, 15, 18, 19], "10": [3, 8], "100": 10, "180": [3, 8], "3": 25, "5": [3, 8, 18, 19], "50": [3, 8], "A": [2, 3, 4, 8, 9, 10], "For": [3, 8], "If": [1, 2, 3, 7, 8, 9], "In": [2, 3, 8, 9], "It": [5, 11], "The": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 26], "__getitem__": [1, 3, 4, 7, 8, 10, 27], "__init__": [1, 2, 3, 4, 5, 6], "__len__": [3, 8, 27], "_t_co": [5, 6, 11, 12], "accord": [3, 5, 8, 11], "add": [2, 9], "addit": [1, 7], "all": [2, 5, 9, 11], "along": [3, 8], "an": [1, 3, 4, 5, 7, 8, 10, 11], "angl": [3, 4, 8, 10], "ani": [2, 3, 4, 5, 8, 9, 10, 11, 16], "api": [5, 11], "appli": [2, 3, 4, 8, 9, 10], "apply_spatial_transform": [4, 10, 27], "ar": [2, 3, 8, 9], "argument": [1, 2, 7, 9], "around": [3, 4, 8, 10], "arrai": [2, 3, 4, 5, 8, 9, 10, 11, 25, 27], "array_info": [3, 8], "array_nam": [2, 3, 8, 9], "array_path": [4, 10, 27], "assum": [2, 3, 8, 9], "attribut": [2, 3, 4, 5, 6], "augment": 27, "avail": [3, 8, 21], "ax": [3, 4, 8, 10], "axi": [3, 8, 25], "axis_ord": [3, 4, 8, 10], "background": [4, 10], "base": [3, 4, 5, 6, 8, 10, 11, 12], "batch": [1, 7], "batch_siz": [1, 5, 7, 11, 25], "bg_count": [4, 10, 27], "block": [2, 9], "bool": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 22, 25], "bound": [3, 4, 8, 10], "bounding_box": [3, 4, 8, 10, 27], "bounding_box_shap": [3, 8, 27], "box": [3, 4, 8, 10], "callabl": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "can": [3, 4, 8, 10], "capabl": 26, "case": [2, 3, 8, 9], "cellmap": 0, "cellmap_data": 27, "cellmapdataload": [7, 27], "cellmapdataset": [1, 2, 5, 6, 7, 8, 9, 11, 12, 27], "cellmapdatasplit": [9, 27], "cellmapimag": [3, 8, 10, 27], "cellmapmultidataset": [1, 2, 6, 7, 9, 11, 12, 27], "cellmapsubset": [1, 2, 7, 9, 12, 27], "cellpos": 27, "cellposeflow": 21, "center": [3, 4, 8, 10, 27], "chunk_siz": [3, 5, 8, 11], "class": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17, 18, 19, 21, 22, 25, 26, 27], "class_count": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 27], "class_nam": [2, 9], "class_relation_dict": [2, 3, 8, 9], "class_relations_dict": [3, 8], "class_weight": [3, 5, 6, 8, 11, 12, 27], "clim": 25, "closest": [4, 10], "cmap": 25, "collate_fn": [1, 7, 27], "collect": 26, "color": 25, "colorbar": 25, "colormap": 25, "combin": [1, 2, 5, 7, 9, 11], "concatdataset": [5, 11], "construct": [2, 9, 27], "contain": [2, 3, 4, 8, 9, 10], "context": [2, 3, 4, 8, 9, 10], "contrast": 18, "contrast_rang": 18, "convert": [2, 3, 8, 9, 25], "coord": [4, 10], "coordin": [3, 4, 8, 10], "coordinatetransform": [4, 10, 27], "correspond": [2, 3, 8, 9], "could": [3, 8], "count": [2, 9], "cpu": 21, "creat": [3, 5, 8, 11, 25], "crop": [3, 8], "csv": [2, 9], "csv_path": [2, 9], "cuda": 22, "cumulative_s": [11, 27], "current": [1, 7], "data": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 24, 25], "dataarrai": [4, 10], "dataload": [1, 27], "dataset": [1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 27], "dataset_dict": [2, 9], "dataset_weight": [5, 11, 27], "datasplit": 27, "default": [1, 2, 3, 4, 7, 8, 9, 10, 15, 16, 18, 19, 21, 22, 25], "degre": [3, 8], "detail": 16, "determin": [3, 8], "deviat": 15, "devic": [3, 4, 5, 6, 8, 10, 11, 12, 21, 27], "dict": [1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 16, 25], "dictionari": [1, 2, 3, 7, 8, 9, 25], "differ": [1, 7], "dimens": 21, "displai": 25, "distanc": [2, 3, 8, 9, 27], "distancetransform": 22, "doc": 16, "doe": 10, "don": [2, 9], "draw": [3, 8], "drawn": [3, 4, 8, 10], "dtype": 27, "e": [3, 4, 8, 10], "each": [2, 3, 5, 6, 8, 9, 11, 12], "either": [2, 9], "els": 21, "empti": [2, 3, 5, 8, 9, 10, 11, 27], "empty_stor": [3, 8], "empty_valu": [2, 3, 8, 9, 10], "emptyimag": [3, 8, 10, 27], "even": [2, 9], "exampl": [2, 3, 8, 9], "exclus": [2, 3, 8, 9], "fals": [1, 2, 3, 4, 7, 8, 9, 10, 22], "fig": 27, "fig_siz": 25, "figur": 25, "file": [2, 4, 9, 10], "fill": [3, 8, 10], "find": [4, 10], "find_level": [4, 10, 27], "first": 25, "float": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 15, 18, 19], "flow": 21, "follow": [2, 3, 8, 9], "forc": [2, 3, 8, 9], "force_has_data": [2, 3, 8, 9], "format": [3, 8], "forward": [15, 18, 19, 22], "found": [2, 9], "from": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 26], "from_csv": [2, 9, 27], "full": [3, 4, 8, 10], "full_coord": [4, 10, 27], "function": [2, 3, 4, 8, 9, 10, 22, 24, 25, 26], "gamma": 19, "gamma_rang": 19, "gaussian": [2, 9, 15], "gaussian_nois": 27, "gaussiannois": 15, "gener": [1, 3, 5, 7, 8, 11, 16], "generate_spatial_transform": [3, 8, 27], "get": [1, 7, 24], "get_empty_stor": [3, 8, 27], "get_image_dict": [25, 27], "get_image_grid": [25, 27], "get_image_grid_numpi": [25, 27], "get_indic": [3, 5, 8, 11, 27], "get_label_arrai": [3, 8, 27], "get_subset_random_sampl": [5, 11, 27], "get_target_arrai": [3, 8, 27], "get_weighted_sampl": [5, 11, 27], "given": [4, 10, 24], "global": [4, 10], "gpu": 21, "grid": 25, "ground": [2, 3, 4, 8, 9, 10], "groundtruth": [5, 8, 11], "group": [4, 10, 27], "gt": [2, 9], "ha": [3, 8], "have": [2, 3, 4, 8, 9, 10], "html": 16, "http": 16, "i": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 22, 26], "idx": [3, 8], "imag": [2, 3, 4, 8, 9, 25, 27], "image_dict": 25, "imit": 10, "includ": 26, "index": [3, 8, 26], "indic": [1, 3, 5, 6, 7, 8, 11, 12, 27], "infer": [3, 8], "inform": [5, 11], "initi": [1, 2, 3, 4, 7, 8, 9, 10, 15, 16, 17, 18, 19, 22], "input": [2, 3, 5, 8, 9, 11, 25], "input_arrai": [2, 3, 5, 8, 9, 11, 27], "input_data": 25, "int": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 24, 25], "intend": 10, "intens": 25, "interpol": [4, 10], "is_train": [1, 3, 7, 8], "item": [1, 7], "iter": [1, 2, 7, 9], "kei": [3, 8], "kwarg": [1, 7], "label": [3, 4, 8, 10, 25], "largest": [3, 8], "largest_voxel_s": [3, 8, 27], "learn": [0, 26], "length": [3, 8, 25], "level": [4, 10], "librari": 26, "limit": 25, "list": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 25], "load": [0, 1, 2, 4, 7, 9, 10, 26], "machin": [0, 26], "mai": [2, 3, 8, 9], "main": 8, "maintain": [5, 11], "map": [2, 3, 4, 5, 8, 9, 10, 11], "match": [3, 8], "matplotlib": 25, "max_angl": [3, 8], "maximum": 24, "mean": 15, "metadata": [4, 10], "method": [1, 2, 3, 4, 5, 6, 10], "min_angl": [3, 8], "mirror": [3, 8], "model": [25, 26], "modul": [0, 13, 14, 20, 23, 26], "more": [5, 11], "move": [5, 6, 10, 11, 12], "multi": [2, 5, 9, 11], "multidataset": 27, "multipl": [5, 11], "multiscal": [4, 10], "multiscale_attr": [4, 10, 27], "multiscalemetadata": [4, 10], "must": [2, 9], "mutual": [2, 3, 8, 9], "mutually_exclusive_class_nam": [2, 9], "name": [3, 8], "nan": [2, 3, 4, 8, 9, 10, 16], "nan_to_num": 27, "nantonum": 16, "ndarrai": [4, 10, 25], "ndim": 21, "nearest": [4, 10], "necessari": [4, 10], "neg": [3, 8], "network": [2, 3, 8, 9], "nois": [2, 9, 15], "non": [2, 3, 8, 9], "none": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 25], "normal": [2, 3, 4, 6, 8, 9, 10, 12, 27], "note": [3, 8], "noth": 10, "notimplementederror": 22, "num_sampl": [5, 11], "num_work": [1, 7], "number": [1, 3, 4, 5, 6, 7, 8, 10, 11, 12, 16, 21, 25], "numpi": 25, "object": [2, 4, 5, 9, 10, 11, 25], "one": [2, 9], "ones": [2, 9], "onli": [2, 9], "onto": [4, 10], "option": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 15, 18, 19, 21, 22, 25], "order": [2, 3, 4, 8, 9, 10], "org": 16, "other": [3, 8], "output": [1, 2, 3, 4, 7, 8, 9, 10, 25], "overlap": [2, 3, 8, 9], "pad": [2, 3, 4, 8, 9, 10], "pad_valu": [4, 10], "page": 26, "pair": [3, 8], "param": [16, 25], "paramet": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 18, 19, 21, 22, 24, 25], "pass": [1, 7, 15, 18, 19, 22], "path": [2, 3, 4, 8, 9, 10], "pathscal": [4, 10], "pathtransl": [4, 10], "physic": [4, 10], "pixel": [3, 4, 8, 10], "point": [4, 10], "present": [3, 8], "preserv": [2, 3, 8, 9], "probabl": [3, 8], "produc": [3, 8], "project": 26, "properti": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12], "provid": 26, "pull": [4, 10], "pydant": 0, "pytorch": [0, 3, 5, 8, 11, 16], "rais": 22, "random": [1, 3, 5, 7, 8, 11, 18, 19], "random_contrast": 27, "random_gamma": 27, "randomcontrast": 18, "randomgamma": 19, "randomli": [3, 8], "rang": [3, 8, 18, 19], "raw": [2, 3, 5, 6, 8, 9, 11, 12], "raw_path": [3, 8], "raw_value_transform": [3, 8], "refresh": [1, 7, 27], "relat": [2, 9], "remov": [2, 9], "report": [3, 8], "request": [3, 5, 8, 11], "reset_arrai": [3, 8, 27], "resolut": [3, 4, 6, 8, 10, 12], "retriev": [5, 11], "return": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 18, 19, 22, 24, 25], "return_data": [4, 10, 27], "rng": [1, 3, 5, 7, 8, 11], "rotat": [3, 4, 8, 10], "rotate_coord": [4, 10, 27], "row": [2, 9], "same": [2, 3, 5, 8, 9, 11], "sampl": [3, 4, 5, 6, 8, 10, 11, 12], "sample_weight": [5, 11, 27], "sampler": [1, 5, 7, 11], "sampling_box": [3, 4, 8, 10, 27], "sampling_box_shap": [3, 8, 27], "scale": [2, 3, 4, 8, 9, 10, 25], "scale_level": [4, 10, 27], "search": 26, "see": [5, 11, 16], "segment": [2, 3, 8, 9], "self": [2, 3, 8, 9], "sequenc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 18, 19, 25], "set": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 26], "set_arrai": [2, 9, 27], "set_raw_value_transform": [2, 3, 5, 6, 8, 9, 11, 12, 27], "set_spatial_transform": [2, 4, 5, 9, 10, 11, 27], "set_target_value_transform": [2, 3, 5, 6, 8, 9, 11, 12, 27], "shape": [2, 3, 4, 8, 9, 10, 27], "should": [1, 2, 3, 7, 8, 9], "shuffl": [1, 7], "sign": [2, 3, 8, 9, 22], "signeddistancetransform": 22, "singl": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11], "size": [1, 3, 7, 8, 25, 27], "sourc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17, 18, 19, 21, 22, 24, 25], "space": [4, 10], "spatial": [2, 3, 4, 5, 8, 9, 10, 11], "spatial_transform": [2, 3, 5, 8, 9, 11], "specif": [3, 8, 26], "specifi": [3, 5, 6, 8, 11, 12], "split": [8, 26], "split_target_path": [8, 27], "stabl": 16, "standard": 15, "static": [3, 5, 8, 11], "std": 15, "still": [3, 4, 8, 10], "store": [3, 8, 10], "str": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 16, 21, 25], "string": [2, 8, 9], "structur": [2, 3, 8, 9], "subclass": [5, 11], "subdataset": 27, "subset": [2, 6, 9, 12], "subsetrandomsampl": [5, 11], "suppli": [2, 8, 9], "support": 22, "t": [2, 9], "target": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 25, 27], "target_arrai": [2, 3, 5, 8, 9, 11, 27], "target_class": [4, 10], "target_data": 25, "target_path": [3, 8], "target_scal": [4, 10], "target_value_transform": [2, 3, 8, 9], "target_voxel_shap": [4, 10], "team": 26, "tensor": [1, 3, 4, 7, 8, 10, 15, 18, 19, 22, 25], "tensorstor": [0, 2, 3, 4, 8, 9, 10], "thi": [3, 5, 8, 11, 26], "thu": [1, 7], "tile": [2, 3, 5, 8, 9, 11], "torch": [1, 2, 3, 5, 7, 8, 9, 10, 11, 16, 24, 25], "torch_max_valu": [24, 27], "total": [5, 11], "train": [0, 1, 2, 3, 5, 7, 8, 9, 11, 26], "train_dataset": [2, 9], "train_datasets_combin": [2, 9, 27], "train_raw_value_transform": [2, 9], "train_transform": [2, 9], "transform": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 26, 27], "transform_arg": [2, 3, 8, 9], "transform_nam": [2, 3, 8, 9], "translat": [4, 10, 27], "transpos": [3, 8], "true": [1, 3, 5, 7, 8, 11, 25], "truth": [2, 3, 4, 8, 9, 10], "tupl": [2, 3, 4, 8, 9, 10, 18, 19, 25], "type": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 18, 19, 22, 24, 25], "unit": [3, 4, 8, 10], "unwrap": [3, 8], "us": [1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 21, 22, 25], "usag": [2, 9], "use_cuda": 22, "user": [3, 8], "util": [0, 5, 11, 27], "val_raw_value_transform": [2, 9], "val_transform": [2, 9], "valid": [2, 3, 5, 6, 8, 9, 11, 12, 26], "validation_block": [2, 9, 27], "validation_dataset": [2, 9], "validation_datasets_combin": [2, 9, 27], "validation_indic": [3, 5, 6, 8, 11, 12, 27], "valu": [2, 3, 5, 6, 8, 9, 10, 11, 12, 24], "value_transform": [4, 10], "vectorscal": [4, 10], "vectortransl": [4, 10], "verifi": [2, 3, 8, 9, 27], "verify_dataset": [2, 9, 27], "voxel": [3, 4, 8, 10], "weight": [1, 3, 5, 6, 7, 8, 11, 12], "weighted_sampl": [1, 7], "weightedrandomsampl": [5, 11], "well": [5, 11], "what": [4, 10], "when": [3, 8], "where": [3, 4, 8, 10], "whether": [1, 2, 3, 7, 8, 9, 25], "within": [3, 4, 8, 10], "without": [3, 8], "work": 26, "worker": [1, 7], "world": [3, 4, 8, 10], "write": 26, "x": [3, 8, 15, 18, 19, 22], "xarrai": [4, 10], "y": [3, 8], "yet": 22, "z": [3, 8], "zarr": [4, 10], "zarrdataset": 26, "zero": [3, 8, 10], "zyx": [3, 4, 8, 10]}, "titles": ["cellmap_data", "cellmap_data.CellMapDataLoader", "cellmap_data.CellMapDataSplit", "cellmap_data.CellMapDataset", "cellmap_data.CellMapImage", "cellmap_data.CellMapMultiDataset", "cellmap_data.CellMapSubset", "cellmap_data.dataloader", "cellmap_data.dataset", "cellmap_data.datasplit", "cellmap_data.image", "cellmap_data.multidataset", "cellmap_data.subdataset", "cellmap_data.transforms", "cellmap_data.transforms.augment", "cellmap_data.transforms.augment.gaussian_noise", "cellmap_data.transforms.augment.nan_to_num", "cellmap_data.transforms.augment.normalize", "cellmap_data.transforms.augment.random_contrast", "cellmap_data.transforms.augment.random_gamma", "cellmap_data.transforms.targets", "cellmap_data.transforms.targets.cellpose", "cellmap_data.transforms.targets.distance", "cellmap_data.utils", "cellmap_data.utils.dtype", "cellmap_data.utils.figs", "CellMap-Data: the Docs", "src"], "titleterms": {"augment": [14, 15, 16, 17, 18, 19], "cellmap": 26, "cellmap_data": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], "cellmapdataload": 1, "cellmapdataset": 3, "cellmapdatasplit": 2, "cellmapimag": 4, "cellmapmultidataset": 5, "cellmapsubset": 6, "cellpos": 21, "content": 26, "data": 26, "dataload": 7, "dataset": 8, "datasplit": 9, "distanc": 22, "doc": 26, "dtype": 24, "fig": 25, "gaussian_nois": 15, "imag": 10, "link": 26, "multidataset": 11, "nan_to_num": 16, "normal": 17, "random_contrast": 18, "random_gamma": 19, "src": 27, "subdataset": 12, "target": [20, 21, 22], "transform": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22], "util": [23, 24, 25]}}) \ No newline at end of file +Search.setIndex({"alltitles": {"CellMap-Data: the Docs": [[28, null]], "Contents": [[28, "contents"]], "Links": [[28, "links"]], "cellmap_data": [[0, null]], "cellmap_data.CellMapDataLoader": [[1, null]], "cellmap_data.CellMapDataSplit": [[2, null]], "cellmap_data.CellMapDataset": [[3, null]], "cellmap_data.CellMapImage": [[4, null]], "cellmap_data.CellMapMultiDataset": [[5, null]], "cellmap_data.CellMapSubset": [[6, null]], "cellmap_data.dataloader": [[7, null]], "cellmap_data.dataset": [[8, null]], "cellmap_data.dataset_writer": [[9, null]], "cellmap_data.datasplit": [[10, null]], "cellmap_data.image": [[11, null]], "cellmap_data.multidataset": [[12, null]], "cellmap_data.subdataset": [[13, null]], "cellmap_data.transforms": [[14, null]], "cellmap_data.transforms.augment": [[15, null]], "cellmap_data.transforms.augment.gaussian_noise": [[16, null]], "cellmap_data.transforms.augment.nan_to_num": [[17, null]], "cellmap_data.transforms.augment.normalize": [[18, null]], "cellmap_data.transforms.augment.random_contrast": [[19, null]], "cellmap_data.transforms.augment.random_gamma": [[20, null]], "cellmap_data.transforms.targets": [[21, null]], "cellmap_data.transforms.targets.cellpose": [[22, null]], "cellmap_data.transforms.targets.distance": [[23, null]], "cellmap_data.utils": [[24, null]], "cellmap_data.utils.dtype": [[25, null]], "cellmap_data.utils.figs": [[26, null]], "cellmap_data.utils.metadata": [[27, null]], "src": [[29, null]]}, "docnames": ["cellmap_data", "cellmap_data.CellMapDataLoader", "cellmap_data.CellMapDataSplit", "cellmap_data.CellMapDataset", "cellmap_data.CellMapImage", "cellmap_data.CellMapMultiDataset", "cellmap_data.CellMapSubset", "cellmap_data.dataloader", "cellmap_data.dataset", "cellmap_data.dataset_writer", "cellmap_data.datasplit", "cellmap_data.image", "cellmap_data.multidataset", "cellmap_data.subdataset", "cellmap_data.transforms", "cellmap_data.transforms.augment", "cellmap_data.transforms.augment.gaussian_noise", "cellmap_data.transforms.augment.nan_to_num", "cellmap_data.transforms.augment.normalize", "cellmap_data.transforms.augment.random_contrast", "cellmap_data.transforms.augment.random_gamma", "cellmap_data.transforms.targets", "cellmap_data.transforms.targets.cellpose", "cellmap_data.transforms.targets.distance", "cellmap_data.utils", "cellmap_data.utils.dtype", "cellmap_data.utils.figs", "cellmap_data.utils.metadata", "index", "modules"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1}, "filenames": ["cellmap_data.rst", "cellmap_data.CellMapDataLoader.rst", "cellmap_data.CellMapDataSplit.rst", "cellmap_data.CellMapDataset.rst", "cellmap_data.CellMapImage.rst", "cellmap_data.CellMapMultiDataset.rst", "cellmap_data.CellMapSubset.rst", "cellmap_data.dataloader.rst", "cellmap_data.dataset.rst", "cellmap_data.dataset_writer.rst", "cellmap_data.datasplit.rst", "cellmap_data.image.rst", "cellmap_data.multidataset.rst", "cellmap_data.subdataset.rst", "cellmap_data.transforms.rst", "cellmap_data.transforms.augment.rst", "cellmap_data.transforms.augment.gaussian_noise.rst", "cellmap_data.transforms.augment.nan_to_num.rst", "cellmap_data.transforms.augment.normalize.rst", "cellmap_data.transforms.augment.random_contrast.rst", "cellmap_data.transforms.augment.random_gamma.rst", "cellmap_data.transforms.targets.rst", "cellmap_data.transforms.targets.cellpose.rst", "cellmap_data.transforms.targets.distance.rst", "cellmap_data.utils.rst", "cellmap_data.utils.dtype.rst", "cellmap_data.utils.figs.rst", "cellmap_data.utils.metadata.rst", "index.rst", "modules.rst"], "indexentries": {"__getitem__() (cellmap_data.cellmapdataloader method)": [[1, "cellmap_data.CellMapDataLoader.__getitem__", false]], "__getitem__() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.__getitem__", false]], "__getitem__() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.__getitem__", false]], "__getitem__() (cellmap_data.dataloader.cellmapdataloader method)": [[7, "cellmap_data.dataloader.CellMapDataLoader.__getitem__", false]], "__getitem__() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.__getitem__", false]], "__getitem__() (cellmap_data.dataset_writer.cellmapdatasetwriter method)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.__getitem__", false]], "__getitem__() (cellmap_data.image.cellmapimage method)": [[11, "cellmap_data.image.CellMapImage.__getitem__", false]], "__getitem__() (cellmap_data.image.emptyimage method)": [[11, "cellmap_data.image.EmptyImage.__getitem__", false]], "__init__() (cellmap_data.cellmapdataloader method)": [[1, "cellmap_data.CellMapDataLoader.__init__", false]], "__init__() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.__init__", false]], "__init__() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.__init__", false]], "__init__() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.__init__", false]], "__init__() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.__init__", false]], "__init__() (cellmap_data.cellmapsubset method)": [[6, "cellmap_data.CellMapSubset.__init__", false]], "__len__() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.__len__", false]], "__len__() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.__len__", false]], "__len__() (cellmap_data.dataset_writer.cellmapdatasetwriter method)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.__len__", false]], "add_multiscale_metadata_levels() (in module cellmap_data.utils.metadata)": [[27, "cellmap_data.utils.metadata.add_multiscale_metadata_levels", false]], "align_coords() (cellmap_data.image.imagewriter method)": [[11, "cellmap_data.image.ImageWriter.align_coords", false]], "aligned_coords_from_center() (cellmap_data.image.imagewriter method)": [[11, "cellmap_data.image.ImageWriter.aligned_coords_from_center", false]], "apply_spatial_transforms() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.apply_spatial_transforms", false]], "apply_spatial_transforms() (cellmap_data.image.cellmapimage method)": [[11, "cellmap_data.image.CellMapImage.apply_spatial_transforms", false]], "array (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.array", false]], "array (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.array", false]], "array (cellmap_data.image.imagewriter property)": [[11, "cellmap_data.image.ImageWriter.array", false]], "array_path (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.array_path", false]], "array_path (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.array_path", false]], "bg_count (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.bg_count", false]], "bg_count (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.bg_count", false]], "bg_count (cellmap_data.image.emptyimage property)": [[11, "cellmap_data.image.EmptyImage.bg_count", false]], "blocks (cellmap_data.dataset_writer.cellmapdatasetwriter property)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.blocks", false]], "bounding_box (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.bounding_box", false]], "bounding_box (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.bounding_box", false]], "bounding_box (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.bounding_box", false]], "bounding_box (cellmap_data.dataset_writer.cellmapdatasetwriter property)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.bounding_box", false]], "bounding_box (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.bounding_box", false]], "bounding_box (cellmap_data.image.emptyimage property)": [[11, "cellmap_data.image.EmptyImage.bounding_box", false]], "bounding_box_shape (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.bounding_box_shape", false]], "bounding_box_shape (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.bounding_box_shape", false]], "bounding_box_shape (cellmap_data.dataset_writer.cellmapdatasetwriter property)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.bounding_box_shape", false]], "cellmap_data": [[0, "module-cellmap_data", false]], "cellmap_data.dataloader": [[7, "module-cellmap_data.dataloader", false]], "cellmap_data.dataset": [[8, "module-cellmap_data.dataset", false]], "cellmap_data.dataset_writer": [[9, "module-cellmap_data.dataset_writer", false]], "cellmap_data.datasplit": [[10, "module-cellmap_data.datasplit", false]], "cellmap_data.image": [[11, "module-cellmap_data.image", false]], "cellmap_data.multidataset": [[12, "module-cellmap_data.multidataset", false]], "cellmap_data.subdataset": [[13, "module-cellmap_data.subdataset", false]], "cellmap_data.transforms": [[14, "module-cellmap_data.transforms", false]], "cellmap_data.transforms.augment": [[15, "module-cellmap_data.transforms.augment", false]], "cellmap_data.transforms.augment.gaussian_noise": [[16, "module-cellmap_data.transforms.augment.gaussian_noise", false]], "cellmap_data.transforms.augment.nan_to_num": [[17, "module-cellmap_data.transforms.augment.nan_to_num", false]], "cellmap_data.transforms.augment.normalize": [[18, "module-cellmap_data.transforms.augment.normalize", false]], "cellmap_data.transforms.augment.random_contrast": [[19, "module-cellmap_data.transforms.augment.random_contrast", false]], "cellmap_data.transforms.augment.random_gamma": [[20, "module-cellmap_data.transforms.augment.random_gamma", false]], "cellmap_data.transforms.targets": [[21, "module-cellmap_data.transforms.targets", false]], "cellmap_data.transforms.targets.cellpose": [[22, "module-cellmap_data.transforms.targets.cellpose", false]], "cellmap_data.transforms.targets.distance": [[23, "module-cellmap_data.transforms.targets.distance", false]], "cellmap_data.utils": [[24, "module-cellmap_data.utils", false]], "cellmap_data.utils.dtype": [[25, "module-cellmap_data.utils.dtype", false]], "cellmap_data.utils.figs": [[26, "module-cellmap_data.utils.figs", false]], "cellmap_data.utils.metadata": [[27, "module-cellmap_data.utils.metadata", false]], "cellmapdataloader (class in cellmap_data)": [[1, "cellmap_data.CellMapDataLoader", false]], "cellmapdataloader (class in cellmap_data.dataloader)": [[7, "cellmap_data.dataloader.CellMapDataLoader", false]], "cellmapdataset (class in cellmap_data)": [[3, "cellmap_data.CellMapDataset", false]], "cellmapdataset (class in cellmap_data.dataset)": [[8, "cellmap_data.dataset.CellMapDataset", false]], "cellmapdatasetwriter (class in cellmap_data.dataset_writer)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter", false]], "cellmapdatasplit (class in cellmap_data)": [[2, "cellmap_data.CellMapDataSplit", false]], "cellmapdatasplit (class in cellmap_data.datasplit)": [[10, "cellmap_data.datasplit.CellMapDataSplit", false]], "cellmapimage (class in cellmap_data)": [[4, "cellmap_data.CellMapImage", false]], "cellmapimage (class in cellmap_data.image)": [[11, "cellmap_data.image.CellMapImage", false]], "cellmapmultidataset (class in cellmap_data)": [[5, "cellmap_data.CellMapMultiDataset", false]], "cellmapmultidataset (class in cellmap_data.multidataset)": [[12, "cellmap_data.multidataset.CellMapMultiDataset", false]], "cellmapsubset (class in cellmap_data)": [[6, "cellmap_data.CellMapSubset", false]], "cellmapsubset (class in cellmap_data.subdataset)": [[13, "cellmap_data.subdataset.CellMapSubset", false]], "cellposeflow (class in cellmap_data.transforms.targets.cellpose)": [[22, "cellmap_data.transforms.targets.cellpose.CellposeFlow", false]], "center (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.center", false]], "center (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.center", false]], "center (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.center", false]], "center (cellmap_data.dataset_writer.cellmapdatasetwriter property)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.center", false]], "center (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.center", false]], "center (cellmap_data.image.imagewriter property)": [[11, "cellmap_data.image.ImageWriter.center", false]], "chunk_shape (cellmap_data.image.imagewriter property)": [[11, "cellmap_data.image.ImageWriter.chunk_shape", false]], "class_counts (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.class_counts", false]], "class_counts (cellmap_data.cellmapdatasplit property)": [[2, "cellmap_data.CellMapDataSplit.class_counts", false]], "class_counts (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.class_counts", false]], "class_counts (cellmap_data.cellmapmultidataset property)": [[5, "cellmap_data.CellMapMultiDataset.class_counts", false]], "class_counts (cellmap_data.cellmapsubset property)": [[6, "cellmap_data.CellMapSubset.class_counts", false]], "class_counts (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.class_counts", false]], "class_counts (cellmap_data.datasplit.cellmapdatasplit property)": [[10, "cellmap_data.datasplit.CellMapDataSplit.class_counts", false]], "class_counts (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.class_counts", false]], "class_counts (cellmap_data.image.emptyimage property)": [[11, "cellmap_data.image.EmptyImage.class_counts", false]], "class_counts (cellmap_data.multidataset.cellmapmultidataset property)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.class_counts", false]], "class_counts (cellmap_data.subdataset.cellmapsubset property)": [[13, "cellmap_data.subdataset.CellMapSubset.class_counts", false]], "class_weights (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.class_weights", false]], "class_weights (cellmap_data.cellmapmultidataset property)": [[5, "cellmap_data.CellMapMultiDataset.class_weights", false]], "class_weights (cellmap_data.cellmapsubset property)": [[6, "cellmap_data.CellMapSubset.class_weights", false]], "class_weights (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.class_weights", false]], "class_weights (cellmap_data.multidataset.cellmapmultidataset property)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.class_weights", false]], "class_weights (cellmap_data.subdataset.cellmapsubset property)": [[13, "cellmap_data.subdataset.CellMapSubset.class_weights", false]], "classes (cellmap_data.cellmapmultidataset attribute)": [[5, "cellmap_data.CellMapMultiDataset.classes", false]], "classes (cellmap_data.cellmapsubset property)": [[6, "cellmap_data.CellMapSubset.classes", false]], "classes (cellmap_data.multidataset.cellmapmultidataset attribute)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.classes", false]], "classes (cellmap_data.subdataset.cellmapsubset property)": [[13, "cellmap_data.subdataset.CellMapSubset.classes", false]], "collate_fn() (cellmap_data.cellmapdataloader method)": [[1, "cellmap_data.CellMapDataLoader.collate_fn", false]], "collate_fn() (cellmap_data.dataloader.cellmapdataloader method)": [[7, "cellmap_data.dataloader.CellMapDataLoader.collate_fn", false]], "collate_fn() (cellmap_data.dataset_writer.cellmapdatasetwriter method)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.collate_fn", false]], "construct() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.construct", false]], "construct() (cellmap_data.datasplit.cellmapdatasplit method)": [[10, "cellmap_data.datasplit.CellMapDataSplit.construct", false]], "coordinatetransformations (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.coordinateTransformations", false]], "coordinatetransformations (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.coordinateTransformations", false]], "create_multiscale_metadata() (in module cellmap_data.utils.metadata)": [[27, "cellmap_data.utils.metadata.create_multiscale_metadata", false]], "cumulative_sizes (cellmap_data.multidataset.cellmapmultidataset attribute)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.cumulative_sizes", false]], "dataset (cellmap_data.subdataset.cellmapsubset attribute)": [[13, "cellmap_data.subdataset.CellMapSubset.dataset", false]], "dataset_weights (cellmap_data.cellmapmultidataset property)": [[5, "cellmap_data.CellMapMultiDataset.dataset_weights", false]], "dataset_weights (cellmap_data.multidataset.cellmapmultidataset property)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.dataset_weights", false]], "datasets (cellmap_data.cellmapmultidataset attribute)": [[5, "cellmap_data.CellMapMultiDataset.datasets", false]], "datasets (cellmap_data.multidataset.cellmapmultidataset attribute)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.datasets", false], [12, "id0", false]], "device (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.device", false]], "device (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.device", false]], "device (cellmap_data.dataset_writer.cellmapdatasetwriter property)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.device", false]], "distancetransform (class in cellmap_data.transforms.targets.distance)": [[23, "cellmap_data.transforms.targets.distance.DistanceTransform", false]], "empty() (cellmap_data.cellmapdataset static method)": [[3, "cellmap_data.CellMapDataset.empty", false]], "empty() (cellmap_data.cellmapmultidataset static method)": [[5, "cellmap_data.CellMapMultiDataset.empty", false]], "empty() (cellmap_data.dataset.cellmapdataset static method)": [[8, "cellmap_data.dataset.CellMapDataset.empty", false]], "empty() (cellmap_data.multidataset.cellmapmultidataset static method)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.empty", false]], "emptyimage (class in cellmap_data.image)": [[11, "cellmap_data.image.EmptyImage", false]], "find_level() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.find_level", false]], "find_level() (cellmap_data.image.cellmapimage method)": [[11, "cellmap_data.image.CellMapImage.find_level", false]], "forward() (cellmap_data.transforms.augment.gaussian_noise.gaussiannoise method)": [[16, "cellmap_data.transforms.augment.gaussian_noise.GaussianNoise.forward", false]], "forward() (cellmap_data.transforms.augment.random_contrast.randomcontrast method)": [[19, "cellmap_data.transforms.augment.random_contrast.RandomContrast.forward", false]], "forward() (cellmap_data.transforms.augment.random_gamma.randomgamma method)": [[20, "cellmap_data.transforms.augment.random_gamma.RandomGamma.forward", false]], "forward() (cellmap_data.transforms.targets.distance.distancetransform method)": [[23, "cellmap_data.transforms.targets.distance.DistanceTransform.forward", false]], "forward() (cellmap_data.transforms.targets.distance.signeddistancetransform method)": [[23, "cellmap_data.transforms.targets.distance.SignedDistanceTransform.forward", false]], "from_csv() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.from_csv", false]], "from_csv() (cellmap_data.datasplit.cellmapdatasplit method)": [[10, "cellmap_data.datasplit.CellMapDataSplit.from_csv", false]], "full_coords (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.full_coords", false]], "full_coords (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.full_coords", false]], "full_coords (cellmap_data.image.imagewriter property)": [[11, "cellmap_data.image.ImageWriter.full_coords", false]], "gaussiannoise (class in cellmap_data.transforms.augment.gaussian_noise)": [[16, "cellmap_data.transforms.augment.gaussian_noise.GaussianNoise", false]], "generate_base_multiscales_metadata() (in module cellmap_data.utils.metadata)": [[27, "cellmap_data.utils.metadata.generate_base_multiscales_metadata", false]], "generate_spatial_transforms() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.generate_spatial_transforms", false]], "generate_spatial_transforms() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.generate_spatial_transforms", false]], "get_center() (cellmap_data.dataset_writer.cellmapdatasetwriter method)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.get_center", false]], "get_empty_store() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.get_empty_store", false]], "get_empty_store() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.get_empty_store", false]], "get_image_dict() (in module cellmap_data.utils.figs)": [[26, "cellmap_data.utils.figs.get_image_dict", false]], "get_image_grid() (in module cellmap_data.utils.figs)": [[26, "cellmap_data.utils.figs.get_image_grid", false]], "get_image_grid_numpy() (in module cellmap_data.utils.figs)": [[26, "cellmap_data.utils.figs.get_image_grid_numpy", false]], "get_image_writer() (cellmap_data.dataset_writer.cellmapdatasetwriter method)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.get_image_writer", false]], "get_indices() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.get_indices", false]], "get_indices() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.get_indices", false]], "get_indices() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.get_indices", false]], "get_indices() (cellmap_data.dataset_writer.cellmapdatasetwriter method)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.get_indices", false]], "get_indices() (cellmap_data.multidataset.cellmapmultidataset method)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.get_indices", false]], "get_label_array() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.get_label_array", false]], "get_label_array() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.get_label_array", false]], "get_subset_random_sampler() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.get_subset_random_sampler", false]], "get_subset_random_sampler() (cellmap_data.multidataset.cellmapmultidataset method)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.get_subset_random_sampler", false]], "get_target_array() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.get_target_array", false]], "get_target_array() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.get_target_array", false]], "get_target_array_writer() (cellmap_data.dataset_writer.cellmapdatasetwriter method)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.get_target_array_writer", false]], "get_weighted_sampler() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.get_weighted_sampler", false]], "get_weighted_sampler() (cellmap_data.multidataset.cellmapmultidataset method)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.get_weighted_sampler", false]], "group (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.group", false]], "group (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.group", false]], "imagewriter (class in cellmap_data.image)": [[11, "cellmap_data.image.ImageWriter", false]], "indices (cellmap_data.subdataset.cellmapsubset attribute)": [[13, "cellmap_data.subdataset.CellMapSubset.indices", false]], "input_arrays (cellmap_data.cellmapmultidataset attribute)": [[5, "cellmap_data.CellMapMultiDataset.input_arrays", false]], "input_arrays (cellmap_data.multidataset.cellmapmultidataset attribute)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.input_arrays", false]], "largest_voxel_sizes (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.largest_voxel_sizes", false]], "largest_voxel_sizes (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.largest_voxel_sizes", false]], "loader() (cellmap_data.dataset_writer.cellmapdatasetwriter method)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.loader", false]], "module": [[0, "module-cellmap_data", false], [7, "module-cellmap_data.dataloader", false], [8, "module-cellmap_data.dataset", false], [9, "module-cellmap_data.dataset_writer", false], [10, "module-cellmap_data.datasplit", false], [11, "module-cellmap_data.image", false], [12, "module-cellmap_data.multidataset", false], [13, "module-cellmap_data.subdataset", false], [14, "module-cellmap_data.transforms", false], [15, "module-cellmap_data.transforms.augment", false], [16, "module-cellmap_data.transforms.augment.gaussian_noise", false], [17, "module-cellmap_data.transforms.augment.nan_to_num", false], [18, "module-cellmap_data.transforms.augment.normalize", false], [19, "module-cellmap_data.transforms.augment.random_contrast", false], [20, "module-cellmap_data.transforms.augment.random_gamma", false], [21, "module-cellmap_data.transforms.targets", false], [22, "module-cellmap_data.transforms.targets.cellpose", false], [23, "module-cellmap_data.transforms.targets.distance", false], [24, "module-cellmap_data.utils", false], [25, "module-cellmap_data.utils.dtype", false], [26, "module-cellmap_data.utils.figs", false], [27, "module-cellmap_data.utils.metadata", false]], "multiscale_attrs (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.multiscale_attrs", false]], "multiscale_attrs (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.multiscale_attrs", false]], "nantonum (class in cellmap_data.transforms.augment.nan_to_num)": [[17, "cellmap_data.transforms.augment.nan_to_num.NaNtoNum", false]], "normalize (class in cellmap_data.transforms.augment.normalize)": [[18, "cellmap_data.transforms.augment.normalize.Normalize", false]], "offset (cellmap_data.image.imagewriter property)": [[11, "cellmap_data.image.ImageWriter.offset", false]], "randomcontrast (class in cellmap_data.transforms.augment.random_contrast)": [[19, "cellmap_data.transforms.augment.random_contrast.RandomContrast", false]], "randomgamma (class in cellmap_data.transforms.augment.random_gamma)": [[20, "cellmap_data.transforms.augment.random_gamma.RandomGamma", false]], "refresh() (cellmap_data.cellmapdataloader method)": [[1, "cellmap_data.CellMapDataLoader.refresh", false]], "refresh() (cellmap_data.dataloader.cellmapdataloader method)": [[7, "cellmap_data.dataloader.CellMapDataLoader.refresh", false]], "reset_arrays() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.reset_arrays", false]], "reset_arrays() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.reset_arrays", false]], "return_data() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.return_data", false]], "return_data() (cellmap_data.image.cellmapimage method)": [[11, "cellmap_data.image.CellMapImage.return_data", false]], "rotate_coords() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.rotate_coords", false]], "rotate_coords() (cellmap_data.image.cellmapimage method)": [[11, "cellmap_data.image.CellMapImage.rotate_coords", false]], "sample_weights (cellmap_data.cellmapmultidataset property)": [[5, "cellmap_data.CellMapMultiDataset.sample_weights", false]], "sample_weights (cellmap_data.multidataset.cellmapmultidataset property)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.sample_weights", false]], "sampling_box (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.sampling_box", false]], "sampling_box (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.sampling_box", false]], "sampling_box (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.sampling_box", false]], "sampling_box (cellmap_data.dataset_writer.cellmapdatasetwriter property)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.sampling_box", false]], "sampling_box (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.sampling_box", false]], "sampling_box (cellmap_data.image.emptyimage property)": [[11, "cellmap_data.image.EmptyImage.sampling_box", false]], "sampling_box_shape (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.sampling_box_shape", false]], "sampling_box_shape (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.sampling_box_shape", false]], "sampling_box_shape (cellmap_data.dataset_writer.cellmapdatasetwriter property)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.sampling_box_shape", false]], "scale_level (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.scale_level", false]], "scale_level (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.scale_level", false]], "set_arrays() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.set_arrays", false]], "set_arrays() (cellmap_data.datasplit.cellmapdatasplit method)": [[10, "cellmap_data.datasplit.CellMapDataSplit.set_arrays", false]], "set_raw_value_transforms() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.cellmapsubset method)": [[6, "cellmap_data.CellMapSubset.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.dataset_writer.cellmapdatasetwriter method)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.datasplit.cellmapdatasplit method)": [[10, "cellmap_data.datasplit.CellMapDataSplit.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.multidataset.cellmapmultidataset method)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.set_raw_value_transforms", false]], "set_raw_value_transforms() (cellmap_data.subdataset.cellmapsubset method)": [[13, "cellmap_data.subdataset.CellMapSubset.set_raw_value_transforms", false]], "set_spatial_transforms() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.datasplit.cellmapdatasplit method)": [[10, "cellmap_data.datasplit.CellMapDataSplit.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.image.cellmapimage method)": [[11, "cellmap_data.image.CellMapImage.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.image.emptyimage method)": [[11, "cellmap_data.image.EmptyImage.set_spatial_transforms", false]], "set_spatial_transforms() (cellmap_data.multidataset.cellmapmultidataset method)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.set_spatial_transforms", false]], "set_target_value_transforms() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.cellmapsubset method)": [[6, "cellmap_data.CellMapSubset.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.datasplit.cellmapdatasplit method)": [[10, "cellmap_data.datasplit.CellMapDataSplit.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.multidataset.cellmapmultidataset method)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.set_target_value_transforms", false]], "set_target_value_transforms() (cellmap_data.subdataset.cellmapsubset method)": [[13, "cellmap_data.subdataset.CellMapSubset.set_target_value_transforms", false]], "shape (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.shape", false]], "shape (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.shape", false]], "shape (cellmap_data.image.imagewriter property)": [[11, "cellmap_data.image.ImageWriter.shape", false]], "signeddistancetransform (class in cellmap_data.transforms.targets.distance)": [[23, "cellmap_data.transforms.targets.distance.SignedDistanceTransform", false]], "size (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.size", false]], "size (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.size", false]], "size (cellmap_data.dataset_writer.cellmapdatasetwriter property)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.size", false]], "smallest_target_array (cellmap_data.dataset_writer.cellmapdatasetwriter property)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.smallest_target_array", false]], "smallest_voxel_sizes (cellmap_data.dataset_writer.cellmapdatasetwriter property)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.smallest_voxel_sizes", false]], "split_target_path() (in module cellmap_data.dataset)": [[8, "cellmap_data.dataset.split_target_path", false]], "split_target_path() (in module cellmap_data.dataset_writer)": [[9, "cellmap_data.dataset_writer.split_target_path", false]], "target_arrays (cellmap_data.cellmapmultidataset attribute)": [[5, "cellmap_data.CellMapMultiDataset.target_arrays", false]], "target_arrays (cellmap_data.multidataset.cellmapmultidataset attribute)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.target_arrays", false]], "to() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.to", false]], "to() (cellmap_data.cellmapimage method)": [[4, "cellmap_data.CellMapImage.to", false]], "to() (cellmap_data.cellmapmultidataset method)": [[5, "cellmap_data.CellMapMultiDataset.to", false]], "to() (cellmap_data.cellmapsubset method)": [[6, "cellmap_data.CellMapSubset.to", false]], "to() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.to", false]], "to() (cellmap_data.dataset_writer.cellmapdatasetwriter method)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.to", false]], "to() (cellmap_data.image.cellmapimage method)": [[11, "cellmap_data.image.CellMapImage.to", false]], "to() (cellmap_data.image.emptyimage method)": [[11, "cellmap_data.image.EmptyImage.to", false]], "to() (cellmap_data.multidataset.cellmapmultidataset method)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.to", false]], "to() (cellmap_data.subdataset.cellmapsubset method)": [[13, "cellmap_data.subdataset.CellMapSubset.to", false]], "torch_max_value() (in module cellmap_data.utils.dtype)": [[25, "cellmap_data.utils.dtype.torch_max_value", false]], "train_datasets_combined (cellmap_data.cellmapdatasplit property)": [[2, "cellmap_data.CellMapDataSplit.train_datasets_combined", false]], "train_datasets_combined (cellmap_data.datasplit.cellmapdatasplit property)": [[10, "cellmap_data.datasplit.CellMapDataSplit.train_datasets_combined", false]], "transform() (in module cellmap_data.transforms.targets.distance)": [[23, "cellmap_data.transforms.targets.distance.transform", false]], "translation (cellmap_data.cellmapimage property)": [[4, "cellmap_data.CellMapImage.translation", false]], "translation (cellmap_data.image.cellmapimage property)": [[11, "cellmap_data.image.CellMapImage.translation", false]], "validation_blocks (cellmap_data.cellmapdatasplit property)": [[2, "cellmap_data.CellMapDataSplit.validation_blocks", false]], "validation_blocks (cellmap_data.datasplit.cellmapdatasplit property)": [[10, "cellmap_data.datasplit.CellMapDataSplit.validation_blocks", false]], "validation_datasets_combined (cellmap_data.cellmapdatasplit property)": [[2, "cellmap_data.CellMapDataSplit.validation_datasets_combined", false]], "validation_datasets_combined (cellmap_data.datasplit.cellmapdatasplit property)": [[10, "cellmap_data.datasplit.CellMapDataSplit.validation_datasets_combined", false]], "validation_indices (cellmap_data.cellmapdataset property)": [[3, "cellmap_data.CellMapDataset.validation_indices", false]], "validation_indices (cellmap_data.cellmapmultidataset property)": [[5, "cellmap_data.CellMapMultiDataset.validation_indices", false]], "validation_indices (cellmap_data.cellmapsubset property)": [[6, "cellmap_data.CellMapSubset.validation_indices", false]], "validation_indices (cellmap_data.dataset.cellmapdataset property)": [[8, "cellmap_data.dataset.CellMapDataset.validation_indices", false]], "validation_indices (cellmap_data.multidataset.cellmapmultidataset property)": [[12, "cellmap_data.multidataset.CellMapMultiDataset.validation_indices", false]], "validation_indices (cellmap_data.subdataset.cellmapsubset property)": [[13, "cellmap_data.subdataset.CellMapSubset.validation_indices", false]], "verify() (cellmap_data.cellmapdataset method)": [[3, "cellmap_data.CellMapDataset.verify", false]], "verify() (cellmap_data.dataset.cellmapdataset method)": [[8, "cellmap_data.dataset.CellMapDataset.verify", false]], "verify() (cellmap_data.dataset_writer.cellmapdatasetwriter method)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.verify", false]], "verify_datasets() (cellmap_data.cellmapdatasplit method)": [[2, "cellmap_data.CellMapDataSplit.verify_datasets", false]], "verify_datasets() (cellmap_data.datasplit.cellmapdatasplit method)": [[10, "cellmap_data.datasplit.CellMapDataSplit.verify_datasets", false]], "world_shape (cellmap_data.image.imagewriter property)": [[11, "cellmap_data.image.ImageWriter.world_shape", false]], "write_metadata() (in module cellmap_data.utils.metadata)": [[27, "cellmap_data.utils.metadata.write_metadata", false]], "writer_indices (cellmap_data.dataset_writer.cellmapdatasetwriter property)": [[9, "cellmap_data.dataset_writer.CellMapDatasetWriter.writer_indices", false]]}, "objects": {"": [[0, 0, 0, "-", "cellmap_data"]], "cellmap_data": [[1, 1, 1, "", "CellMapDataLoader"], [2, 1, 1, "", "CellMapDataSplit"], [3, 1, 1, "", "CellMapDataset"], [4, 1, 1, "", "CellMapImage"], [5, 1, 1, "", "CellMapMultiDataset"], [6, 1, 1, "", "CellMapSubset"], [7, 0, 0, "-", "dataloader"], [8, 0, 0, "-", "dataset"], [9, 0, 0, "-", "dataset_writer"], [10, 0, 0, "-", "datasplit"], [11, 0, 0, "-", "image"], [12, 0, 0, "-", "multidataset"], [13, 0, 0, "-", "subdataset"], [14, 0, 0, "-", "transforms"], [24, 0, 0, "-", "utils"]], "cellmap_data.CellMapDataLoader": [[1, 2, 1, "", "__getitem__"], [1, 2, 1, "", "__init__"], [1, 2, 1, "", "collate_fn"], [1, 2, 1, "", "refresh"]], "cellmap_data.CellMapDataSplit": [[2, 2, 1, "", "__init__"], [2, 3, 1, "", "class_counts"], [2, 2, 1, "", "construct"], [2, 2, 1, "", "from_csv"], [2, 2, 1, "", "set_arrays"], [2, 2, 1, "", "set_raw_value_transforms"], [2, 2, 1, "", "set_spatial_transforms"], [2, 2, 1, "", "set_target_value_transforms"], [2, 3, 1, "", "train_datasets_combined"], [2, 3, 1, "", "validation_blocks"], [2, 3, 1, "", "validation_datasets_combined"], [2, 2, 1, "", "verify_datasets"]], "cellmap_data.CellMapDataset": [[3, 2, 1, "", "__getitem__"], [3, 2, 1, "", "__init__"], [3, 2, 1, "", "__len__"], [3, 3, 1, "", "bounding_box"], [3, 3, 1, "", "bounding_box_shape"], [3, 3, 1, "", "center"], [3, 3, 1, "", "class_counts"], [3, 3, 1, "", "class_weights"], [3, 3, 1, "", "device"], [3, 2, 1, "", "empty"], [3, 2, 1, "", "generate_spatial_transforms"], [3, 2, 1, "", "get_empty_store"], [3, 2, 1, "", "get_indices"], [3, 2, 1, "", "get_label_array"], [3, 2, 1, "", "get_target_array"], [3, 3, 1, "", "largest_voxel_sizes"], [3, 2, 1, "", "reset_arrays"], [3, 3, 1, "", "sampling_box"], [3, 3, 1, "", "sampling_box_shape"], [3, 2, 1, "", "set_raw_value_transforms"], [3, 2, 1, "", "set_target_value_transforms"], [3, 3, 1, "", "size"], [3, 2, 1, "", "to"], [3, 3, 1, "", "validation_indices"], [3, 2, 1, "", "verify"]], "cellmap_data.CellMapImage": [[4, 2, 1, "", "__getitem__"], [4, 2, 1, "", "__init__"], [4, 2, 1, "", "apply_spatial_transforms"], [4, 3, 1, "", "array"], [4, 3, 1, "", "array_path"], [4, 3, 1, "", "bg_count"], [4, 3, 1, "", "bounding_box"], [4, 3, 1, "", "center"], [4, 3, 1, "", "class_counts"], [4, 3, 1, "", "coordinateTransformations"], [4, 2, 1, "", "find_level"], [4, 3, 1, "", "full_coords"], [4, 3, 1, "", "group"], [4, 3, 1, "", "multiscale_attrs"], [4, 2, 1, "", "return_data"], [4, 2, 1, "", "rotate_coords"], [4, 3, 1, "", "sampling_box"], [4, 3, 1, "", "scale_level"], [4, 2, 1, "", "set_spatial_transforms"], [4, 3, 1, "", "shape"], [4, 2, 1, "", "to"], [4, 3, 1, "", "translation"]], "cellmap_data.CellMapMultiDataset": [[5, 2, 1, "", "__init__"], [5, 3, 1, "", "class_counts"], [5, 3, 1, "", "class_weights"], [5, 4, 1, "", "classes"], [5, 3, 1, "", "dataset_weights"], [5, 4, 1, "", "datasets"], [5, 2, 1, "", "empty"], [5, 2, 1, "", "get_indices"], [5, 2, 1, "", "get_subset_random_sampler"], [5, 2, 1, "", "get_weighted_sampler"], [5, 4, 1, "", "input_arrays"], [5, 3, 1, "", "sample_weights"], [5, 2, 1, "", "set_raw_value_transforms"], [5, 2, 1, "", "set_spatial_transforms"], [5, 2, 1, "", "set_target_value_transforms"], [5, 4, 1, "", "target_arrays"], [5, 2, 1, "", "to"], [5, 3, 1, "", "validation_indices"]], "cellmap_data.CellMapSubset": [[6, 2, 1, "", "__init__"], [6, 3, 1, "", "class_counts"], [6, 3, 1, "", "class_weights"], [6, 3, 1, "", "classes"], [6, 2, 1, "", "set_raw_value_transforms"], [6, 2, 1, "", "set_target_value_transforms"], [6, 2, 1, "", "to"], [6, 3, 1, "", "validation_indices"]], "cellmap_data.dataloader": [[7, 1, 1, "", "CellMapDataLoader"]], "cellmap_data.dataloader.CellMapDataLoader": [[7, 2, 1, "", "__getitem__"], [7, 2, 1, "", "collate_fn"], [7, 2, 1, "", "refresh"]], "cellmap_data.dataset": [[8, 1, 1, "", "CellMapDataset"], [8, 5, 1, "", "split_target_path"]], "cellmap_data.dataset.CellMapDataset": [[8, 2, 1, "", "__getitem__"], [8, 2, 1, "", "__len__"], [8, 3, 1, "", "bounding_box"], [8, 3, 1, "", "bounding_box_shape"], [8, 3, 1, "", "center"], [8, 3, 1, "", "class_counts"], [8, 3, 1, "", "class_weights"], [8, 3, 1, "", "device"], [8, 2, 1, "", "empty"], [8, 2, 1, "", "generate_spatial_transforms"], [8, 2, 1, "", "get_empty_store"], [8, 2, 1, "", "get_indices"], [8, 2, 1, "", "get_label_array"], [8, 2, 1, "", "get_target_array"], [8, 3, 1, "", "largest_voxel_sizes"], [8, 2, 1, "", "reset_arrays"], [8, 3, 1, "", "sampling_box"], [8, 3, 1, "", "sampling_box_shape"], [8, 2, 1, "", "set_raw_value_transforms"], [8, 2, 1, "", "set_target_value_transforms"], [8, 3, 1, "", "size"], [8, 2, 1, "", "to"], [8, 3, 1, "", "validation_indices"], [8, 2, 1, "", "verify"]], "cellmap_data.dataset_writer": [[9, 1, 1, "", "CellMapDatasetWriter"], [9, 5, 1, "", "split_target_path"]], "cellmap_data.dataset_writer.CellMapDatasetWriter": [[9, 2, 1, "", "__getitem__"], [9, 2, 1, "", "__len__"], [9, 3, 1, "", "blocks"], [9, 3, 1, "", "bounding_box"], [9, 3, 1, "", "bounding_box_shape"], [9, 3, 1, "", "center"], [9, 2, 1, "", "collate_fn"], [9, 3, 1, "", "device"], [9, 2, 1, "", "get_center"], [9, 2, 1, "", "get_image_writer"], [9, 2, 1, "", "get_indices"], [9, 2, 1, "", "get_target_array_writer"], [9, 2, 1, "", "loader"], [9, 3, 1, "", "sampling_box"], [9, 3, 1, "", "sampling_box_shape"], [9, 2, 1, "", "set_raw_value_transforms"], [9, 3, 1, "", "size"], [9, 3, 1, "", "smallest_target_array"], [9, 3, 1, "", "smallest_voxel_sizes"], [9, 2, 1, "", "to"], [9, 2, 1, "", "verify"], [9, 3, 1, "", "writer_indices"]], "cellmap_data.datasplit": [[10, 1, 1, "", "CellMapDataSplit"]], "cellmap_data.datasplit.CellMapDataSplit": [[10, 3, 1, "", "class_counts"], [10, 2, 1, "", "construct"], [10, 2, 1, "", "from_csv"], [10, 2, 1, "", "set_arrays"], [10, 2, 1, "", "set_raw_value_transforms"], [10, 2, 1, "", "set_spatial_transforms"], [10, 2, 1, "", "set_target_value_transforms"], [10, 3, 1, "", "train_datasets_combined"], [10, 3, 1, "", "validation_blocks"], [10, 3, 1, "", "validation_datasets_combined"], [10, 2, 1, "", "verify_datasets"]], "cellmap_data.image": [[11, 1, 1, "", "CellMapImage"], [11, 1, 1, "", "EmptyImage"], [11, 1, 1, "", "ImageWriter"]], "cellmap_data.image.CellMapImage": [[11, 2, 1, "", "__getitem__"], [11, 2, 1, "", "apply_spatial_transforms"], [11, 3, 1, "", "array"], [11, 3, 1, "", "array_path"], [11, 3, 1, "", "bg_count"], [11, 3, 1, "", "bounding_box"], [11, 3, 1, "", "center"], [11, 3, 1, "", "class_counts"], [11, 3, 1, "", "coordinateTransformations"], [11, 2, 1, "", "find_level"], [11, 3, 1, "", "full_coords"], [11, 3, 1, "", "group"], [11, 3, 1, "", "multiscale_attrs"], [11, 2, 1, "", "return_data"], [11, 2, 1, "", "rotate_coords"], [11, 3, 1, "", "sampling_box"], [11, 3, 1, "", "scale_level"], [11, 2, 1, "", "set_spatial_transforms"], [11, 3, 1, "", "shape"], [11, 2, 1, "", "to"], [11, 3, 1, "", "translation"]], "cellmap_data.image.EmptyImage": [[11, 2, 1, "", "__getitem__"], [11, 3, 1, "", "bg_count"], [11, 3, 1, "", "bounding_box"], [11, 3, 1, "", "class_counts"], [11, 3, 1, "", "sampling_box"], [11, 2, 1, "", "set_spatial_transforms"], [11, 2, 1, "", "to"]], "cellmap_data.image.ImageWriter": [[11, 2, 1, "", "align_coords"], [11, 2, 1, "", "aligned_coords_from_center"], [11, 3, 1, "", "array"], [11, 3, 1, "", "center"], [11, 3, 1, "", "chunk_shape"], [11, 3, 1, "", "full_coords"], [11, 3, 1, "", "offset"], [11, 3, 1, "", "shape"], [11, 3, 1, "", "world_shape"]], "cellmap_data.multidataset": [[12, 1, 1, "", "CellMapMultiDataset"]], "cellmap_data.multidataset.CellMapMultiDataset": [[12, 3, 1, "", "class_counts"], [12, 3, 1, "", "class_weights"], [12, 4, 1, "", "classes"], [12, 4, 1, "", "cumulative_sizes"], [12, 3, 1, "", "dataset_weights"], [12, 4, 1, "id0", "datasets"], [12, 2, 1, "", "empty"], [12, 2, 1, "", "get_indices"], [12, 2, 1, "", "get_subset_random_sampler"], [12, 2, 1, "", "get_weighted_sampler"], [12, 4, 1, "", "input_arrays"], [12, 3, 1, "", "sample_weights"], [12, 2, 1, "", "set_raw_value_transforms"], [12, 2, 1, "", "set_spatial_transforms"], [12, 2, 1, "", "set_target_value_transforms"], [12, 4, 1, "", "target_arrays"], [12, 2, 1, "", "to"], [12, 3, 1, "", "validation_indices"]], "cellmap_data.subdataset": [[13, 1, 1, "", "CellMapSubset"]], "cellmap_data.subdataset.CellMapSubset": [[13, 3, 1, "", "class_counts"], [13, 3, 1, "", "class_weights"], [13, 3, 1, "", "classes"], [13, 4, 1, "", "dataset"], [13, 4, 1, "", "indices"], [13, 2, 1, "", "set_raw_value_transforms"], [13, 2, 1, "", "set_target_value_transforms"], [13, 2, 1, "", "to"], [13, 3, 1, "", "validation_indices"]], "cellmap_data.transforms": [[15, 0, 0, "-", "augment"], [21, 0, 0, "-", "targets"]], "cellmap_data.transforms.augment": [[16, 0, 0, "-", "gaussian_noise"], [17, 0, 0, "-", "nan_to_num"], [18, 0, 0, "-", "normalize"], [19, 0, 0, "-", "random_contrast"], [20, 0, 0, "-", "random_gamma"]], "cellmap_data.transforms.augment.gaussian_noise": [[16, 1, 1, "", "GaussianNoise"]], "cellmap_data.transforms.augment.gaussian_noise.GaussianNoise": [[16, 2, 1, "", "forward"]], "cellmap_data.transforms.augment.nan_to_num": [[17, 1, 1, "", "NaNtoNum"]], "cellmap_data.transforms.augment.normalize": [[18, 1, 1, "", "Normalize"]], "cellmap_data.transforms.augment.random_contrast": [[19, 1, 1, "", "RandomContrast"]], "cellmap_data.transforms.augment.random_contrast.RandomContrast": [[19, 2, 1, "", "forward"]], "cellmap_data.transforms.augment.random_gamma": [[20, 1, 1, "", "RandomGamma"]], "cellmap_data.transforms.augment.random_gamma.RandomGamma": [[20, 2, 1, "", "forward"]], "cellmap_data.transforms.targets": [[22, 0, 0, "-", "cellpose"], [23, 0, 0, "-", "distance"]], "cellmap_data.transforms.targets.cellpose": [[22, 1, 1, "", "CellposeFlow"]], "cellmap_data.transforms.targets.distance": [[23, 1, 1, "", "DistanceTransform"], [23, 1, 1, "", "SignedDistanceTransform"], [23, 5, 1, "", "transform"]], "cellmap_data.transforms.targets.distance.DistanceTransform": [[23, 2, 1, "", "forward"]], "cellmap_data.transforms.targets.distance.SignedDistanceTransform": [[23, 2, 1, "", "forward"]], "cellmap_data.utils": [[25, 0, 0, "-", "dtype"], [26, 0, 0, "-", "figs"], [27, 0, 0, "-", "metadata"]], "cellmap_data.utils.dtype": [[25, 5, 1, "", "torch_max_value"]], "cellmap_data.utils.figs": [[26, 5, 1, "", "get_image_dict"], [26, 5, 1, "", "get_image_grid"], [26, 5, 1, "", "get_image_grid_numpy"]], "cellmap_data.utils.metadata": [[27, 5, 1, "", "add_multiscale_metadata_levels"], [27, 5, 1, "", "create_multiscale_metadata"], [27, 5, 1, "", "generate_base_multiscales_metadata"], [27, 5, 1, "", "write_metadata"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "property", "Python property"], "4": ["py", "attribute", "Python attribute"], "5": ["py", "function", "Python function"]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:property", "4": "py:attribute", "5": "py:function"}, "terms": {"": [4, 5, 11, 12, 26], "0": [1, 3, 7, 8, 9, 11, 16, 19, 20, 27], "1": [1, 3, 5, 7, 8, 9, 12, 16, 19, 20], "10": [3, 8], "100": 11, "102": [9, 11], "12": [9, 11], "180": [3, 8], "3": 26, "5": [3, 8, 19, 20], "50": [3, 8], "A": [2, 3, 4, 8, 9, 10, 11], "For": [3, 8], "If": [1, 2, 3, 7, 8, 10], "In": [2, 3, 8, 10], "It": [5, 12], "The": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 28], "__getitem__": [1, 3, 4, 7, 8, 9, 11, 29], "__init__": [1, 2, 3, 4, 5, 6], "__len__": [3, 8, 9, 29], "_t_co": [5, 6, 12, 13], "accord": [3, 5, 8, 9, 12], "add": [2, 10], "add_multiscale_metadata_level": [27, 29], "addit": [1, 7], "align": 11, "align_coord": [11, 29], "aligned_coords_from_cent": [11, 29], "all": [2, 5, 9, 10, 12], "along": [3, 8], "alreadi": 11, "an": [1, 3, 4, 5, 7, 8, 9, 11, 12], "angl": [3, 4, 8, 11], "ani": [2, 3, 4, 5, 8, 10, 11, 12, 17], "api": [5, 12], "appli": [2, 3, 4, 8, 9, 10, 11], "apply_spatial_transform": [4, 11, 29], "ar": [2, 3, 8, 10, 11], "argument": [1, 2, 7, 10], "around": [3, 4, 8, 11], "arrai": [2, 3, 4, 5, 8, 9, 10, 11, 12, 26, 29], "array_1": 9, "array_info": [3, 8, 9], "array_nam": [2, 3, 8, 9, 10], "array_path": [4, 11, 29], "assum": [2, 3, 8, 10], "attribut": [2, 3, 4, 5, 6], "augment": 29, "avail": [3, 8, 22], "ax": [3, 4, 8, 9, 11, 27], "axi": [3, 8, 26], "axis_ord": [3, 4, 8, 9, 11], "background": [4, 11], "base": [3, 4, 5, 6, 8, 9, 11, 12, 13], "base_scale_level": 27, "batch": [1, 7, 9], "batch_siz": [1, 5, 7, 9, 12, 26], "befor": 11, "bg_count": [4, 11, 29], "block": [2, 9, 10, 29], "bool": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 23, 26], "bound": [3, 4, 8, 9, 11], "bounding_box": [3, 4, 8, 9, 11, 29], "bounding_box_shap": [3, 8, 9, 29], "box": [3, 4, 8, 9, 11], "callabl": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "can": [3, 4, 8, 11], "capabl": 28, "case": [2, 3, 8, 10], "cellmap": 0, "cellmap_data": 29, "cellmapdataload": [7, 29], "cellmapdataset": [1, 2, 5, 6, 7, 8, 10, 12, 13, 29], "cellmapdatasetwrit": [1, 7, 9, 29], "cellmapdatasplit": [10, 29], "cellmapimag": [3, 8, 11, 29], "cellmapmultidataset": [1, 2, 6, 7, 10, 12, 13, 29], "cellmapsubset": [1, 2, 7, 10, 13, 29], "cellpos": 29, "cellposeflow": 22, "center": [3, 4, 8, 9, 11, 29], "chunk": 11, "chunk_shap": [11, 29], "chunk_siz": [3, 5, 8, 9, 12], "class": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 22, 23, 26, 28, 29], "class_count": [2, 3, 4, 5, 6, 8, 10, 11, 12, 13, 29], "class_nam": [2, 10], "class_relation_dict": [2, 3, 8, 10], "class_relations_dict": [3, 8], "class_weight": [3, 5, 6, 8, 12, 13, 29], "clim": 26, "closest": [4, 11], "cmap": 26, "collate_fn": [1, 7, 9, 29], "collect": 28, "color": 26, "colorbar": 26, "colormap": 26, "combin": [1, 2, 5, 7, 9, 10, 12], "concatdataset": [5, 12], "construct": [2, 10, 29], "contain": [2, 3, 4, 8, 10, 11], "context": [2, 3, 4, 8, 9, 10, 11], "contrast": 19, "contrast_rang": 19, "convert": [2, 3, 8, 10, 26], "coord": [4, 11], "coordin": [3, 4, 8, 9, 11], "coordinatetransform": [4, 11, 29], "core": 11, "correspond": [2, 3, 8, 9, 10], "could": [3, 8, 9], "count": [2, 10], "cpu": 22, "creat": [3, 5, 8, 12, 26], "create_multiscale_metadata": [27, 29], "crop": [3, 8, 9], "csv": [2, 10], "csv_path": [2, 10], "cuda": 23, "cumulative_s": [12, 29], "current": [1, 7], "data": [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 25, 26], "dataarrai": [4, 11], "dataload": [1, 9, 29], "dataset": [1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 29], "dataset_dict": [2, 10], "dataset_weight": [5, 12, 29], "dataset_writ": 29, "datasplit": 29, "default": [1, 2, 3, 4, 7, 8, 10, 11, 16, 17, 19, 20, 22, 23, 26], "degre": [3, 8], "detail": 17, "determin": [3, 8, 9], "deviat": 16, "devic": [3, 4, 5, 6, 8, 9, 11, 12, 13, 22, 29], "dict": [1, 2, 3, 5, 6, 7, 8, 9, 10, 12, 13, 17, 26], "dictionari": [1, 2, 3, 7, 8, 9, 10, 26], "differ": [1, 7, 9], "dimens": 22, "disk": 9, "displai": 26, "distanc": [2, 3, 8, 10, 29], "distancetransform": 23, "doc": 17, "doe": 11, "don": [2, 10], "draw": [3, 8, 9], "drawn": [3, 4, 8, 9, 11], "ds_name": 27, "dtype": [11, 29], "e": [3, 4, 8, 9, 11], "each": [2, 3, 5, 6, 8, 9, 10, 12, 13], "either": [2, 10], "els": 22, "empti": [2, 3, 5, 8, 9, 10, 11, 12, 29], "empty_stor": [3, 8], "empty_valu": [2, 3, 8, 9, 10, 11], "emptyimag": [3, 8, 11, 29], "even": [2, 10], "exampl": [2, 3, 8, 9, 10, 11], "exclud": 9, "exclus": [2, 3, 8, 10], "exist": [9, 11], "fals": [1, 2, 3, 4, 7, 8, 9, 10, 11, 23], "fig": 29, "fig_siz": 26, "figur": 26, "file": [2, 4, 10, 11], "fill": [3, 8, 11], "fill_valu": 11, "find": [4, 11], "find_level": [4, 11, 29], "first": 26, "float": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 16, 19, 20], "float32": 11, "flow": 22, "folder": 11, "follow": [2, 3, 8, 9, 10], "forc": [2, 3, 8, 10], "force_has_data": [2, 3, 8, 10], "format": [3, 8, 9], "forward": [16, 19, 20, 23], "found": [2, 10], "frame": 11, "from": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 28], "from_csv": [2, 10, 29], "full": [3, 4, 8, 9, 11], "full_coord": [4, 11, 29], "fulli": 9, "function": [2, 3, 4, 8, 9, 10, 11, 23, 25, 26, 27, 28], "gamma": 20, "gamma_rang": 20, "gaussian": [2, 10, 16], "gaussian_nois": 29, "gaussiannois": 16, "gener": [1, 3, 5, 7, 8, 9, 12, 17], "generate_base_multiscales_metadata": [27, 29], "generate_spatial_transform": [3, 8, 29], "get": [1, 7, 25], "get_cent": [9, 29], "get_empty_stor": [3, 8, 29], "get_image_dict": [26, 29], "get_image_grid": [26, 29], "get_image_grid_numpi": [26, 29], "get_image_writ": [9, 29], "get_indic": [3, 5, 8, 9, 12, 29], "get_label_arrai": [3, 8, 29], "get_subset_random_sampl": [5, 12, 29], "get_target_arrai": [3, 8, 29], "get_target_array_writ": [9, 29], "get_weighted_sampl": [5, 12, 29], "given": [4, 9, 11, 25], "global": [4, 11], "gpu": 22, "grid": 26, "ground": [2, 3, 4, 8, 9, 10, 11], "groundtruth": [5, 8, 9, 12], "group": [4, 11, 29], "gt": [2, 10], "ha": [3, 8], "have": [2, 3, 4, 8, 9, 10, 11], "html": 17, "http": 17, "i": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 23, 28], "idx": [3, 8, 9], "imag": [2, 3, 4, 8, 9, 10, 26, 29], "image_dict": 26, "imagewrit": [9, 11, 29], "imit": 11, "includ": 28, "inclus": 9, "index": [3, 8, 9, 28], "indic": [1, 3, 5, 6, 7, 8, 9, 12, 13, 29], "infer": [3, 8], "inform": [5, 12], "initi": [1, 2, 3, 4, 7, 8, 9, 10, 11, 16, 17, 18, 19, 20, 23], "input": [2, 3, 5, 8, 9, 10, 12, 26], "input_arrai": [2, 3, 5, 8, 9, 10, 12, 29], "input_data": 26, "int": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 22, 25, 26, 27], "intend": 11, "intens": 26, "interest": 11, "interpol": [4, 11], "is_train": [1, 3, 7, 8], "item": [1, 7], "iter": [1, 2, 7, 10], "kei": [3, 8], "kwarg": [1, 7, 9], "label": [3, 4, 8, 9, 11, 26], "label_class": 11, "largest": [3, 8], "largest_voxel_s": [3, 8, 29], "learn": [0, 28], "length": [3, 8, 9, 26], "level": [4, 9, 11], "levels_to_add": 27, "librari": 28, "limit": 26, "linear": 11, "list": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 26, 27], "load": [0, 1, 2, 4, 7, 10, 11, 28], "loader": [9, 29], "machin": [0, 28], "mai": [2, 3, 8, 10], "main": [8, 9], "maintain": [5, 12], "map": [2, 3, 4, 5, 8, 9, 10, 11, 12], "match": [3, 8, 9], "matplotlib": 26, "max_angl": [3, 8], "maximum": 25, "mean": 16, "metadata": [4, 11, 29], "method": [1, 2, 3, 4, 5, 6, 11], "min_angl": [3, 8], "mirror": [3, 8], "model": [26, 28], "modul": [0, 14, 15, 21, 24, 28], "more": [5, 12], "move": [5, 6, 11, 12, 13], "mulstiscal": 9, "multi": [2, 5, 10, 12], "multidataset": 29, "multipl": [5, 12], "multiscal": [4, 9, 11], "multiscale_attr": [4, 11, 29], "multiscalemetadata": [4, 11], "multsc": 27, "must": [2, 10], "mutual": [2, 3, 8, 10], "mutually_exclusive_class_nam": [2, 10], "name": [3, 8, 9], "nan": [2, 3, 4, 8, 10, 11, 17], "nan_to_num": 29, "nantonum": 17, "ndarrai": [4, 11, 26], "ndim": 22, "nearest": [4, 11], "necessari": [4, 11], "neg": [3, 8], "network": [2, 3, 8, 10], "nois": [2, 10, 16], "non": [2, 3, 8, 9, 10], "none": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 22, 26, 27], "normal": [2, 3, 4, 6, 8, 10, 11, 13, 29], "note": [3, 8], "noth": 11, "notimplementederror": 23, "np": 11, "num_sampl": [5, 12], "num_work": [1, 7, 9], "number": [1, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 17, 22, 26], "numpi": [11, 26], "object": [2, 4, 5, 10, 11, 12, 26], "offset": [11, 29], "one": [2, 10], "ones": [2, 10], "onli": [2, 10], "onto": [4, 11], "option": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 16, 19, 20, 22, 23, 26], "order": [2, 3, 4, 8, 9, 10, 11], "org": 17, "other": [3, 8], "otherwis": 9, "out_path": 27, "output": [1, 2, 3, 4, 7, 8, 9, 10, 11, 26], "overlap": [2, 3, 8, 9, 10], "overwrit": [9, 11], "pad": [2, 3, 4, 8, 10, 11], "pad_valu": [4, 11], "page": 28, "pair": [3, 8], "param": [17, 26], "paramet": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17, 19, 20, 22, 23, 25, 26, 27], "pass": [1, 7, 16, 19, 20, 23], "path": [2, 3, 4, 8, 9, 10, 11], "pathscal": [4, 11], "pathtransl": [4, 11], "per": 9, "physic": [4, 11], "pixel": [3, 4, 8, 11], "point": [4, 11], "present": [3, 8], "preserv": [2, 3, 8, 10], "probabl": [3, 8], "process": 9, "produc": [3, 8, 9], "project": 28, "properti": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13], "provid": 28, "pull": [4, 11], "pydant": 0, "pytorch": [0, 3, 5, 8, 9, 12, 17], "rais": 23, "random": [1, 3, 5, 7, 8, 9, 12, 19, 20], "random_contrast": 29, "random_gamma": 29, "randomcontrast": 19, "randomgamma": 20, "randomli": [3, 8], "rang": [3, 8, 19, 20], "raw": [2, 3, 5, 6, 8, 9, 10, 12, 13], "raw_path": [3, 8, 9], "raw_value_transform": [3, 8, 9], "refer": 11, "refresh": [1, 7, 29], "region": 11, "relat": [2, 10], "remov": [2, 10], "report": [3, 8], "request": [3, 5, 8, 9, 12], "reset_arrai": [3, 8, 29], "resolut": [3, 4, 6, 8, 11, 13], "retriev": [5, 12], "return": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 19, 20, 23, 25, 26], "return_data": [4, 11, 29], "rng": [1, 3, 5, 7, 8, 9, 12], "rotat": [3, 4, 8, 11], "rotate_coord": [4, 11, 29], "row": [2, 10], "same": [2, 3, 5, 8, 10, 12], "sampl": [3, 4, 5, 6, 8, 9, 11, 12, 13], "sample_weight": [5, 12, 29], "sampler": [1, 5, 7, 12], "sampling_box": [3, 4, 8, 9, 11, 29], "sampling_box_shap": [3, 8, 9, 29], "scale": [2, 3, 4, 8, 9, 10, 11, 26], "scale_level": [4, 9, 11, 27, 29], "search": 28, "see": [5, 12, 17], "segment": [2, 3, 8, 10], "self": [2, 3, 8, 10], "sequenc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 19, 20, 26], "sequenti": 11, "set": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 28], "set_arrai": [2, 10, 29], "set_raw_value_transform": [2, 3, 5, 6, 8, 9, 10, 12, 13, 29], "set_spatial_transform": [2, 4, 5, 10, 11, 12, 29], "set_target_value_transform": [2, 3, 5, 6, 8, 10, 12, 13, 29], "shape": [2, 3, 4, 8, 9, 10, 11, 29], "should": [1, 2, 3, 7, 8, 9, 10], "shuffl": [1, 7], "sign": [2, 3, 8, 10, 23], "signeddistancetransform": 23, "singl": [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12], "size": [1, 3, 7, 8, 9, 26, 29], "smallest": 9, "smallest_target_arrai": [9, 29], "smallest_voxel_s": [9, 29], "sourc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 22, 23, 25, 26, 27], "space": [4, 11], "spatial": [2, 3, 4, 5, 8, 10, 11, 12], "spatial_transform": [2, 3, 5, 8, 10, 12], "specif": [3, 8, 28], "specifi": [3, 5, 6, 8, 12, 13], "split": [8, 9, 28], "split_target_path": [8, 9, 29], "stabl": 17, "standard": 16, "static": [3, 5, 8, 12], "std": 16, "still": [3, 4, 8, 11], "store": [3, 8, 11], "str": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 17, 22, 26, 27], "string": [2, 8, 9, 10], "structur": [2, 3, 8, 9, 10], "subclass": [5, 12], "subdataset": 29, "subset": [1, 2, 6, 7, 9, 10, 13], "subsetrandomsampl": [5, 12], "suppli": [2, 8, 9, 10], "support": 23, "t": [2, 10], "target": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 26, 29], "target_arrai": [2, 3, 5, 8, 9, 10, 12, 29], "target_bound": 9, "target_class": [4, 11], "target_data": 26, "target_path": [3, 8, 9], "target_scal": [4, 11], "target_value_transform": [2, 3, 8, 10], "target_voxel_shap": [4, 11], "team": 28, "tensor": [1, 3, 4, 7, 8, 9, 11, 16, 19, 20, 23, 26], "tensorstor": [0, 2, 3, 4, 8, 9, 10, 11], "thi": [3, 5, 8, 12, 28], "thu": [1, 7], "tile": [2, 3, 5, 8, 9, 10, 12], "torch": [1, 2, 3, 5, 7, 8, 9, 10, 11, 12, 17, 25, 26], "torch_max_valu": [25, 29], "total": [5, 11, 12], "train": [0, 1, 2, 3, 5, 7, 8, 10, 12, 28], "train_dataset": [2, 10], "train_datasets_combin": [2, 10, 29], "train_raw_value_transform": [2, 10], "train_transform": [2, 10], "transform": [2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 28, 29], "transform_arg": [2, 3, 8, 10], "transform_nam": [2, 3, 8, 10], "translat": [4, 11, 27, 29], "transpos": [3, 8], "true": [1, 3, 5, 7, 8, 12, 26], "truth": [2, 3, 4, 8, 9, 10, 11], "tupl": [2, 3, 4, 8, 9, 10, 11, 19, 20, 26], "type": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 19, 20, 23, 25, 26], "unit": [3, 4, 8, 9, 11, 27], "unwrap": [3, 8, 9], "upath": 11, "us": [1, 2, 3, 5, 6, 7, 8, 9, 10, 12, 13, 22, 23, 26], "usag": [2, 10], "use_cuda": 23, "user": [3, 8], "util": [0, 5, 12, 29], "val_raw_value_transform": [2, 10], "val_transform": [2, 10], "valid": [2, 3, 5, 6, 8, 9, 10, 12, 13, 28], "validation_block": [2, 10, 29], "validation_dataset": [2, 10], "validation_datasets_combin": [2, 10, 29], "validation_indic": [3, 5, 6, 8, 12, 13, 29], "valu": [2, 3, 5, 6, 8, 9, 10, 11, 12, 13, 25], "value_transform": [4, 11], "vectorscal": [4, 11], "vectortransl": [4, 11], "verifi": [2, 3, 8, 9, 10, 29], "verify_dataset": [2, 10, 29], "voxel": [3, 4, 8, 9, 11], "voxel_s": 27, "weight": [1, 3, 5, 6, 7, 8, 12, 13], "weighted_sampl": [1, 7], "weightedrandomsampl": [5, 12], "well": [5, 12], "what": [4, 11], "when": [3, 8], "where": [3, 4, 8, 9, 11], "whether": [1, 2, 3, 7, 8, 9, 10, 11, 26], "within": [3, 4, 8, 9, 11], "without": [3, 8], "work": 28, "worker": [1, 7], "world": [3, 4, 8, 9, 11], "world_shap": [11, 29], "write": [9, 28], "write_metadata": [27, 29], "write_voxel_shap": 11, "writer": 9, "writer_indic": [9, 29], "written": 11, "x": [3, 8, 9, 11, 16, 19, 20, 23], "xarrai": [4, 11], "y": [3, 8, 9, 11], "yet": 23, "z": [3, 8, 9, 11], "z_attr": 27, "zarr": [4, 9, 11], "zarrdataset": 28, "zero": [3, 8, 11], "zyx": [3, 4, 8, 9, 11]}, "titles": ["cellmap_data", "cellmap_data.CellMapDataLoader", "cellmap_data.CellMapDataSplit", "cellmap_data.CellMapDataset", "cellmap_data.CellMapImage", "cellmap_data.CellMapMultiDataset", "cellmap_data.CellMapSubset", "cellmap_data.dataloader", "cellmap_data.dataset", "cellmap_data.dataset_writer", "cellmap_data.datasplit", "cellmap_data.image", "cellmap_data.multidataset", "cellmap_data.subdataset", "cellmap_data.transforms", "cellmap_data.transforms.augment", "cellmap_data.transforms.augment.gaussian_noise", "cellmap_data.transforms.augment.nan_to_num", "cellmap_data.transforms.augment.normalize", "cellmap_data.transforms.augment.random_contrast", "cellmap_data.transforms.augment.random_gamma", "cellmap_data.transforms.targets", "cellmap_data.transforms.targets.cellpose", "cellmap_data.transforms.targets.distance", "cellmap_data.utils", "cellmap_data.utils.dtype", "cellmap_data.utils.figs", "cellmap_data.utils.metadata", "CellMap-Data: the Docs", "src"], "titleterms": {"augment": [15, 16, 17, 18, 19, 20], "cellmap": 28, "cellmap_data": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], "cellmapdataload": 1, "cellmapdataset": 3, "cellmapdatasplit": 2, "cellmapimag": 4, "cellmapmultidataset": 5, "cellmapsubset": 6, "cellpos": 22, "content": 28, "data": 28, "dataload": 7, "dataset": 8, "dataset_writ": 9, "datasplit": 10, "distanc": 23, "doc": 28, "dtype": 25, "fig": 26, "gaussian_nois": 16, "imag": 11, "link": 28, "metadata": 27, "multidataset": 12, "nan_to_num": 17, "normal": 18, "random_contrast": 19, "random_gamma": 20, "src": 29, "subdataset": 13, "target": [21, 22, 23], "transform": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23], "util": [24, 25, 26, 27]}}) \ No newline at end of file