in_memory_pred_dataset
In-memory prediction dataset.
InMemoryPredDataset
#
Bases: Dataset
Simple prediction dataset returning images along the sample axis.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prediction_config | InferenceConfig | Prediction configuration. | required |
inputs | NDArray | Input data. | required |
Source code in src/careamics/dataset/in_memory_pred_dataset.py
__getitem__(index)
#
Return the patch corresponding to the provided index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index | int | Index of the patch to return. | required |
Returns:
Type | Description |
---|---|
NDArray | Transformed patch. |
Source code in src/careamics/dataset/in_memory_pred_dataset.py
__init__(prediction_config, inputs)
#
Constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prediction_config | InferenceConfig | Prediction configuration. | required |
inputs | NDArray | Input data. | required |
Raises:
Type | Description |
---|---|
ValueError | If data_path is not a directory. |
Source code in src/careamics/dataset/in_memory_pred_dataset.py
__len__()
#
Return the length of the dataset.
Returns:
Type | Description |
---|---|
int | Length of the dataset. |