Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ENH: CoordinateImage API#1090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
effigies wants to merge26 commits intonipy:master
base:master
Choose a base branch
Loading
fromeffigies:enh/coordimage_api
Draft
Changes from1 commit
Commits
Show all changes
26 commits
Select commitHold shift + click to select a range
1b7df51
ENH: Start restoring triangular meshes
effigiesSep 19, 2023
5d25cef
TEST: Test basic TriangularMesh behavior
effigiesSep 20, 2023
e426afe
RF: Use order kwarg for array proxies
effigiesSep 20, 2023
1a46c70
TEST: Rework FreeSurferHemisphere and H5Geometry examples with mixin
effigiesSep 20, 2023
be05f09
TEST: Tag tests that require access to the data directory
effigiesSep 20, 2023
cbb91d1
RF: Allow coordinate names to be set on init
effigiesSep 22, 2023
107ead6
TEST: More fully test mesh and family APIs
effigiesSep 22, 2023
368c145
ENH: Avoid duplicating objects, note that coordinate family mappings …
effigiesSep 22, 2023
9d5361a
ENH: Add copy() method to ArrayProxy
effigiesSep 19, 2023
81b1033
ENH: Copy lock if filehandle is shared, add tests
effigiesSep 22, 2023
b70a4d9
Merge branches 'enh/copyarrayproxy', 'enh/xml-kwargs' and 'enh/triang…
effigiesSep 22, 2023
798f0c6
ENH: Add stubs from BIAP 9
effigiesFeb 18, 2022
7a6d50c
ENH: Implement CoordinateAxis. and Parcel.__getitem__
effigiesFeb 21, 2022
344bfd8
TEST: Add FreeSurferSubject geometry collection, test loading Cifti2 …
effigiesFeb 21, 2022
1138a95
ENH: Add CaretSpecFile type for use with CIFTI-2
effigiesFeb 22, 2022
c7ab610
TEST: Load CaretSpecFile as a GeometryCollection
effigiesFeb 22, 2022
a458ec3
ENH: Hacky mixin to make surface CaretDataFiles implement TriangularMesh
effigiesFeb 23, 2022
921173b
FIX: CoordinateAxis.__getitem__ fix
effigiesFeb 24, 2022
d4d42a0
ENH: Implement CoordinateAxis.get_indices
effigiesFeb 24, 2022
b51ec36
TEST: Add some assertions and smoke tests to exercise methods
effigiesFeb 24, 2022
76b52f5
ENH: Add from_image/from_header methods to bring logic out of tests
effigiesJan 25, 2023
1392a06
TEST: Add fsLR.wb.spec file for interpreting fsLR data
effigiesFeb 24, 2022
5edddd4
ENH: Add CoordinateImage slicing by parcel name
effigiesJan 25, 2023
05ca9fb
RF: Simplify CaretSpecParser slightly
effigiesFeb 25, 2022
6c2407d
TEST: Check SurfaceDataFile retrieval
effigiesAug 20, 2022
20f71df
Merge branch 'master' into enh/coordimage_api
effigiesJan 16, 2025
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
PrevPrevious commit
Merge branch 'master' into enh/coordimage_api
  • Loading branch information
@effigies
effigies authoredJan 16, 2025
commit20f71df76dd6fc75526b2575c2ef915a6d994d75
17 changes: 17 additions & 0 deletionsnibabel/tests/test_arrayproxy.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -587,3 +587,20 @@ def test_copy():
copied = proxy.copy()
assert islock(copied._lock)
assert proxy._lock is copied._lock


def test_copy_with_indexed_gzip_handle(tmp_path):
indexed_gzip = pytest.importorskip('indexed_gzip')

spec = ((50, 50, 50, 50), np.float32, 352, 1, 0)
data = np.arange(np.prod(spec[0]), dtype=spec[1]).reshape(spec[0])
fname = str(tmp_path / 'test.nii.gz')
Nifti1Image(data, np.eye(4)).to_filename(fname)

with indexed_gzip.IndexedGzipFile(fname) as fobj:
proxy = ArrayProxy(fobj, spec)
copied = proxy.copy()

assert proxy.file_like is copied.file_like
assert np.array_equal(proxy[0, 0, 0], copied[0, 0, 0])
assert np.array_equal(proxy[-1, -1, -1], copied[-1, -1, -1])
Loading
You are viewing a condensed version of this merge commit. You can view thefull changes here.

[8]ページ先頭

©2009-2025 Movatter.jp