Skip to content

Commit bbb457d

Browse files
Rename grid_spacing_in_um to pixel_size_in_um and voxel_size_in_um for clarity in imaging space definitions
1 parent e121ae1 commit bbb457d

12 files changed

+28
-27
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- Modified the YAML specification to include new neurodata type definitions and relationships
2222
- Updated Python implementation files to expose the new classes in the API
2323
- Enhanced test files to verify the new classes work correctly
24+
- Change `grid_spacing_in_um` in `pixel_size_in_um` and `voxel_size_in_um` (and relative doc string) to better represent the physical dimension of the fundamental unit of the image (pixel or voxel).
2425

2526
### Notes
2627

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,15 +344,15 @@ classDiagram
344344
--------------------------------------
345345
datasets
346346
--------------------------------------
347-
grid_spacing_in_um : float64[2], optional
347+
pixel_size_in_um : float64[2], optional
348348
}
349349
350350
class VolumetricImagingSpace {
351351
<<ImagingSpace>>
352352
--------------------------------------
353353
datasets
354354
--------------------------------------
355-
grid_spacing_in_um : float64[3], optional
355+
voxel_size_in_um : float64[3], optional
356356
}
357357
358358
class Microscope {

docs/source/examples.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Complete example of two-photon calcium imaging with full optical path configurat
160160
imaging_space = PlanarImagingSpace(
161161
name='cortex_plane1',
162162
description='Layer 2/3 of visual cortex',
163-
grid_spacing_in_um=[1.0, 1.0],
163+
pixel_size_in_um=[1.0, 1.0],
164164
origin_coordinates=[-1.2, -0.6, -2.0],
165165
location='Visual cortex, layer 2/3',
166166
reference_frame='bregma',
@@ -432,7 +432,7 @@ Example of volumetric imaging with 3D ROI segmentation:
432432
volume_space = VolumetricImagingSpace(
433433
name='cortex_volume',
434434
description='Visual cortex volume',
435-
grid_spacing_in_um=[1.0, 1.0, 2.0], # Higher spacing in z
435+
voxel_size_in_um=[1.0, 1.0, 2.0], # Higher spacing in z
436436
origin_coordinates=[-1.2, -0.6, -2.0],
437437
location='Visual cortex',
438438
reference_frame='bregma',
@@ -717,7 +717,7 @@ Example of multi-plane imaging with an electrically tunable lens:
717717
plane_space = PlanarImagingSpace(
718718
name=f'plane_depth_{depth}',
719719
description=f'Imaging plane at {depth} µm depth',
720-
grid_spacing_in_um=[1.0, 1.0],
720+
pixel_size_in_um=[1.0, 1.0],
721721
origin_coordinates=[-1.2, -0.6, depth/1000], # Convert to mm
722722
location='Visual cortex',
723723
reference_frame='bregma',

docs/source/format.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,13 @@ For 2D imaging planes.
356356
neurodata_type_inc: ImagingSpace
357357
doc: Metadata about the 2-dimensional slice of physical space that imaging data was recorded from.
358358
datasets:
359-
- name: grid_spacing_in_um
359+
- name: pixel_size_in_um
360360
dtype: float64
361361
dims:
362362
- - x, y
363363
shape:
364364
- - 2
365-
doc: Amount of space between pixels in micrometers.
365+
doc: The physical dimensions of the pixel in micrometers.
366366
quantity: "?"
367367
368368
VolumetricImagingSpace
@@ -376,13 +376,13 @@ For 3D imaging volumes.
376376
neurodata_type_inc: ImagingSpace
377377
doc: Metadata about the 3-dimensional region of physical space that imaging data was recorded from.
378378
datasets:
379-
- name: grid_spacing_in_um
379+
- name: voxel_size_in_um
380380
dtype: float64
381381
dims:
382382
- - x, y, z
383383
shape:
384384
- - 3
385-
doc: Amount of space between voxels in micrometers.
385+
doc: The physical dimensions of the voxel in micrometers.
386386
quantity: "?"
387387
388388
Segmentation Components

docs/source/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Here's a minimal example showing how to create a basic microscopy dataset:
173173
planar_imaging_space = PlanarImagingSpace(
174174
name='cortex_plane',
175175
description='Layer 2/3 of visual cortex',
176-
grid_spacing_in_um=[1.0, 1.0],
176+
pixel_size_in_um=[1.0, 1.0],
177177
origin_coordinates=[-1.2, -0.6, -2.0],
178178
illumination_pattern=line_scan # Include the illumination pattern
179179
)

docs/source/user_guide.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Imaging spaces define the physical region being imaged:
128128
space_2d = PlanarImagingSpace(
129129
name='cortex_plane',
130130
description='Layer 2/3 of visual cortex',
131-
grid_spacing_in_um=[1.0, 1.0], # x, y spacing
131+
pixel_size_in_um=[1.0, 1.0], # x, y spacing
132132
origin_coordinates=[-1.2, -0.6, -2.0], # relative to bregma
133133
location='Visual cortex',
134134
reference_frame='bregma',
@@ -153,7 +153,7 @@ Imaging spaces define the physical region being imaged:
153153
space_3d = VolumetricImagingSpace(
154154
name='cortex_volume',
155155
description='Visual cortex volume',
156-
grid_spacing_in_um=[1.0, 1.0, 2.0], # x, y, z spacing
156+
voxel_size_in_um=[1.0, 1.0, 2.0], # x, y, z spacing
157157
origin_coordinates=[-1.2, -0.6, -2.0],
158158
location='Visual cortex',
159159
reference_frame='bregma',
@@ -194,7 +194,7 @@ Basic workflow for 2D imaging:
194194
planar_imaging_space = PlanarImagingSpace(
195195
name='cortex_plane',
196196
description='Layer 2/3 of visual cortex',
197-
grid_spacing_in_um=[1.0, 1.0], # x, y spacing
197+
pixel_size_in_um=[1.0, 1.0], # x, y spacing
198198
origin_coordinates=[-1.2, -0.6, -2.0], # relative to bregma
199199
location='Visual cortex',
200200
reference_frame='bregma',
@@ -246,7 +246,7 @@ Workflow for one-photon widefield imaging:
246246
planar_imaging_space = PlanarImagingSpace(
247247
name='hippo_plane',
248248
description='CA1 region of hippocampus',
249-
grid_spacing_in_um=[1.0, 1.0],
249+
pixel_size_in_um=[1.0, 1.0],
250250
origin_coordinates=[-1.8, 2.0, 1.2],
251251
location='Hippocampus, CA1 region',
252252
reference_frame='bregma',
@@ -299,7 +299,7 @@ Workflow for volumetric imaging with targeted scanning:
299299
volumetric_imaging_space = VolumetricImagingSpace(
300300
name='cortex_volume',
301301
description='Visual cortex volume',
302-
grid_spacing_in_um=[1.0, 1.0, 2.0], # x, y, z spacing
302+
voxel_size_in_um=[1.0, 1.0, 2.0], # x, y, z spacing
303303
origin_coordinates=[-1.2, -0.6, -2.0],
304304
location='Visual cortex',
305305
reference_frame='bregma',

examples/multi_plane_imaging_example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
" plane_space = PlanarImagingSpace(\n",
277277
" name=f'plane_depth_{depth}',\n",
278278
" description=f'Imaging plane at {depth} µm depth',\n",
279-
" grid_spacing_in_um=[1.0, 1.0],\n",
279+
" pixel_size_in_um=[1.0, 1.0],\n",
280280
" origin_coordinates=[-1.2, -0.6, depth/1000], # Convert to mm\n",
281281
" location='Visual cortex',\n",
282282
" reference_frame='bregma',\n",

examples/one-photon_calcium_imaging_example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@
245245
"imaging_space = PlanarImagingSpace(\n",
246246
" name=\"hippo_plane1\",\n",
247247
" description=\"CA1 region of hippocampus\",\n",
248-
" grid_spacing_in_um=[1.0, 1.0],\n",
248+
" pixel_size_in_um=[1.0, 1.0],\n",
249249
" origin_coordinates=[-1.8, 2.0, 1.2], # Matches the indicator injection coordinates\n",
250250
" location=\"Hippocampus, CA1 region\",\n",
251251
" reference_frame=\"bregma\",\n",

examples/two-photon_calcium_imaging_example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
"imaging_space = PlanarImagingSpace(\n",
257257
" name=\"cortex_plane1\",\n",
258258
" description=\"Layer 2/3 of visual cortex\",\n",
259-
" grid_spacing_in_um=[1.0, 1.0],\n",
259+
" pixel_size_in_um=[1.0, 1.0],\n",
260260
" origin_coordinates=[-1.2, -0.6, -2.0],\n",
261261
" location=\"Visual cortex, layer 2/3\",\n",
262262
" reference_frame=\"bregma\",\n",

examples/volumetric_imaging_example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@
258258
"volume_space = VolumetricImagingSpace(\n",
259259
" name='cortex_volume',\n",
260260
" description='Visual cortex volume',\n",
261-
" grid_spacing_in_um=[1.0, 1.0, 2.0], # Higher spacing in z\n",
261+
" voxel_size_in_um=[1.0, 1.0, 2.0], # Higher spacing in z\n",
262262
" origin_coordinates=[-1.2, -0.6, -2.0],\n",
263263
" location='Visual cortex',\n",
264264
" reference_frame='bregma',\n",

0 commit comments

Comments
 (0)