arrayview 0.43.4__py3-none-any.whl → 0.44.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arrayview/_analysis.py +5 -0
- arrayview/_io.py +3 -1
- arrayview/_viewer.html +1227 -607
- arrayview/_vscode_extension.py +1 -1
- arrayview/arrayview-opener.vsix +0 -0
- {arrayview-0.43.4.dist-info → arrayview-0.44.0.dist-info}/METADATA +1 -1
- {arrayview-0.43.4.dist-info → arrayview-0.44.0.dist-info}/RECORD +10 -10
- {arrayview-0.43.4.dist-info → arrayview-0.44.0.dist-info}/WHEEL +0 -0
- {arrayview-0.43.4.dist-info → arrayview-0.44.0.dist-info}/entry_points.txt +0 -0
- {arrayview-0.43.4.dist-info → arrayview-0.44.0.dist-info}/licenses/LICENSE +0 -0
arrayview/_analysis.py
CHANGED
|
@@ -42,6 +42,11 @@ def _build_metadata(session) -> dict:
|
|
|
42
42
|
# Collection axes are appended after the image dimensions. They
|
|
43
43
|
# select a case; they must not influence the startup plane.
|
|
44
44
|
default_shape = target_shape[:spatial_ndim]
|
|
45
|
+
# NIfTI metadata identifies the first three axes as anatomical.
|
|
46
|
+
# Later axes may be echoes, parameters, or time points, so they
|
|
47
|
+
# must not change which anatomical plane opens first.
|
|
48
|
+
if getattr(session, "spatial_meta", None) is not None:
|
|
49
|
+
default_shape = default_shape[:3]
|
|
45
50
|
default_dims = _session_mod._startup_dims_for_data(session.data, default_shape)
|
|
46
51
|
if default_dims is not None:
|
|
47
52
|
meta["default_dims"] = [int(default_dims[0]), int(default_dims[1])]
|
arrayview/_io.py
CHANGED
|
@@ -172,7 +172,9 @@ def _nifti_header_with_meta(filepath, *, native=False):
|
|
|
172
172
|
(abs(norm_rot[i, j]) for i in range(3) for j in range(3) if i != j),
|
|
173
173
|
default=0.0,
|
|
174
174
|
)
|
|
175
|
-
canonical_shape = tuple(
|
|
175
|
+
canonical_shape = tuple(
|
|
176
|
+
int(img.shape[int(axis)]) for axis in transform[:, 0]
|
|
177
|
+
) + tuple(int(size) for size in img.shape[3:])
|
|
176
178
|
meta = {
|
|
177
179
|
"affine": original_affine,
|
|
178
180
|
"affine_canonical": affine_canonical,
|