Skip to content
Snippets Groups Projects
Commit 2198ae25 authored by fima's avatar fima :beers:
Browse files

Merge branch 'update-save-docs' into 'main'

Update saving docs

See merge request !131
parents 7165415a 71ac056f
No related branches found
No related tags found
1 merge request!131Update saving docs
...@@ -413,7 +413,8 @@ def save( ...@@ -413,7 +413,8 @@ def save(
"""Save data to a specified file path. """Save data to a specified file path.
Args: Args:
path (str): The path to save file to path (str): The path to save file to. File format is chosen based on the extension.
Supported extensions are: <em>'.tif', '.tiff', '.nii', '.nii.gz', '.h5', '.vol', '.vgi', '.dcm', '.DCM', '.zarr', '.jpeg', '.jpg', '.png'</em>
data (numpy.ndarray): The data to be saved data (numpy.ndarray): The data to be saved
replace (bool, optional): Specifies if an existing file with identical path should be replaced. replace (bool, optional): Specifies if an existing file with identical path should be replaced.
Default is False. Default is False.
...@@ -425,6 +426,13 @@ def save( ...@@ -425,6 +426,13 @@ def save(
as several files (only relevant for TIFF stacks). Default is 0, i.e., the first dimension. as several files (only relevant for TIFF stacks). Default is 0, i.e., the first dimension.
**kwargs: Additional keyword arguments to be passed to the DataSaver constructor **kwargs: Additional keyword arguments to be passed to the DataSaver constructor
Raises:
ValueError: If the provided path is an existing directory and self.basename is not provided <strong>OR</strong>
If the file format is not supported <strong>OR</strong>
If the provided path does not exist and self.basename is not provided <strong>OR</strong>
If a file extension is not provided <strong>OR</strong>
if a file with the specified path already exists and replace=False.
Example: Example:
```python ```python
import qim3d import qim3d
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment