Skip to content

Commit

Permalink
Disable tiling for NIFTI (activeloopai#2083)
Browse files Browse the repository at this point in the history
* disable tiling for nifti

* update
  • Loading branch information
FayazRahman authored Jan 3, 2023
1 parent 4383341 commit a8e8ba9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deeplake/core/compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ def _read_3d_data_meta(file: Union[bytes, memoryview, str]):
def _open_nifti(file: Union[bytes, memoryview, str], gz: bool = False):
if not _NIBABEL_INSTALLED:
raise ModuleNotFoundError(
"nibabel is not installed. Please run `pip install deeplake[nifti]`"
"nibabel is not installed. Please run `pip install deeplake[medical]`"
)

if isinstance(file, str):
Expand Down
8 changes: 7 additions & 1 deletion deeplake/core/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
VIDEO_COMPRESSION,
AUDIO_COMPRESSION,
MESH_COMPRESSION,
NIFTI_COMPRESSION,
get_compression_type,
)
from deeplake.core.fast_forwarding import version_compare
Expand Down Expand Up @@ -519,7 +520,12 @@ def serialize_sample_object(

if (
compression_type
not in (VIDEO_COMPRESSION, AUDIO_COMPRESSION, MESH_COMPRESSION)
not in (
VIDEO_COMPRESSION,
AUDIO_COMPRESSION,
MESH_COMPRESSION,
NIFTI_COMPRESSION,
)
and len(compressed_bytes) > min_chunk_size
and break_into_tiles
):
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_static/csv/installation.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Install command, Description, Dependencies installed
"``pip install ""deeplake[av]""``", Audio and video support via PyAV, av
"``pip install ""deeplake[visualizer]""``", Visualize Deep Lake datasets within notebooks. This is required for :meth:`Dataset.visualize <deeplake.core.dataset.Dataset.visualize>` to work., "IPython, flask"
"``pip install ""deeplake[gcp]""``", GCS support, "google-cloud-storage, google-auth, google-auth-oauthlib"
"``pip install ""deeplake[dicom]""``", DICOM data support, pydicom
"``pip install ""deeplake[medical]""``", DICOM and NIfTI data support, "pydicom, nibabel"
"``pip install ""deeplake[gdrive]""``", Google Drive support, "google-api-python-client, oauth2client, google-auth, google-auth-oauthlib"
"``pip install ""deeplake[point_cloud]""``", Support for LiDAR point cloud data, laspy
"``pip install ""deeplake[enterprise]""``", Installs Deep Lake's enterprise features, libdeeplake,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"av": ["av"],
"gcp": ["google-cloud-storage", "google-auth", "google-auth-oauthlib"],
"dicom": ["pydicom", "nibabel"],
"nifti": ["pydicom", "nibabel"],
"medical": ["pydicom", "nibabel"],
"visualizer": ["IPython", "flask"],
"gdrive": [
"google-api-python-client",
Expand Down

0 comments on commit a8e8ba9

Please sign in to comment.