Skip to content
Snippets Groups Projects

Docstrings

1 file
+ 7
2
Compare changes
  • Side-by-side
  • Inline
  • 8e8dd2ef
    fix · 8e8dd2ef
    s214735 authored
+ 13
4
@@ -570,6 +570,10 @@ class DataLoader:
Args:
path (str): Directory path
returns:
numpy.ndarray, numpy.memmap or tuple: The loaded volume.
If 'self.return_metadata' is True, returns a tuple (volume, metadata).
"""
import pydicom
@@ -795,8 +799,13 @@ def load(
force_load (bool, optional): If the file size exceeds available memory, a MemoryError is raised.
If force_load is True, the error is changed to warning and the loader tries to load it anyway. Default is False.
dim_order (tuple, optional): The order of the dimensions in the volume for .vol files. Default is (2,1,0) which corresponds to (z,y,x)
**kwargs: Additional keyword arguments to be passed
to the DataLoader constructor.
**kwargs (Any): Additional keyword arguments supported by `DataLoader`:
- `virtual_stack` (bool)
- `dataset_name` (str)
- `return_metadata` (bool)
- `contains` (str)
- `force_load` (bool)
- `dim_order` (tuple)
Returns:
vol (numpy.ndarray, numpy.memmap, h5py._hl.dataset.Dataset, nibabel.arrayproxy.ArrayProxy or tuple): The loaded volume
@@ -861,10 +870,10 @@ def load_mesh(filename: str) -> trimesh.Trimesh:
Load a mesh from an .obj file using trimesh.
Args:
filename: The path to the .obj file.
filename (str or os.PathLike): The path to the .obj file.
Returns:
mesh: A trimesh object containing the mesh data (vertices and faces).
mesh (trimesh.Trimesh): A trimesh object containing the mesh data (vertices and faces).
Example:
```python
Loading