Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/neuromaps_prime/transforms/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
"multiLabel": ants.ants_apply_transforms_multi_labelnoparams,
}

_NOT_IMPLEMENTED = frozenset({"BSpline"})


def _get_interp_params(
interp: str, interp_params: dict[str, Any] | None = None
Expand Down Expand Up @@ -61,12 +59,7 @@ def vol_to_vol(

Raises:
ValueError: unsupported interpolator.
NotImplementedError: not yet implemented interpolator.
"""
if interp in _NOT_IMPLEMENTED:
raise NotImplementedError(
f"The '{interp}' interpolation method is not yet implemented"
)
if interp not in INTERP_PARAMS:
raise ValueError(f"Unsupported interpolator '{interp}'.")

Expand Down
17 changes: 2 additions & 15 deletions tests/transforms/test_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

from neuromaps_prime.graph import NeuromapsGraph
from neuromaps_prime.transforms.volume import (
_NOT_IMPLEMENTED,
INTERP_NOPARAMS,
INTERP_PARAMS,
surface_project,
vol_to_vol,
)

# Interpolators that are currently implemented and should work
DEVELOPED_INTERPS = [k for k in INTERP_PARAMS if k not in _NOT_IMPLEMENTED]
DEVELOPED_INTERPS = [*INTERP_PARAMS, *INTERP_NOPARAMS]


class TestVolumetricTransform:
Expand Down Expand Up @@ -71,19 +71,6 @@ def test_vol_to_vol_implemented_interps(
assert result == mock_paths["output"]
assert result.exists()

@pytest.mark.parametrize("interp", _NOT_IMPLEMENTED)
def test_vol_to_vol_not_implemented_interps(
self, mock_paths: dict[str, Path], interp: str
) -> None:
"""Test future interpolators for raising NotImplementedError."""
with pytest.raises(NotImplementedError, match="not yet implemented"):
vol_to_vol(
source=mock_paths["source"],
target=mock_paths["target"],
out_fpath=str(mock_paths["output"]),
interp=interp,
)

@pytest.mark.parametrize("interp", ["foo", "bar", "invalid"])
def test_vol_to_vol_unsupported_interps(
self, mock_paths: dict[str, Path], interp: str
Expand Down