datasources
ngtools.local.datasources
Objects that represent local multidimensional arrays.
BabelVolumeInfo
Bases:
Generic NiBabel metadata.
BabelDataSource
Bases:
A local volume read using nibabel.
output_center
property
Center of the field of view in output dimensions space and units.
input_bbox_size
property
Center of the field of view in input dimensions space and units.
output_bbox_size
property
Center of the field of view in output dimensions space and units.
LocalVolume
Bases:
LocalVolume that knows it is in a BabelDataSource.
MGHDataSource
Bases:
Wrapper for MGH/MGZ volume sources.
output_center
property
Center of the field of view in output dimensions space and units.
input_bbox_size
property
Center of the field of view in input dimensions space and units.
output_bbox_size
property
Center of the field of view in output dimensions space and units.
LocalVolume
Bases:
LocalVolume that knows it is in a MGHDataSource.
TiffVolumeInfo
Bases:
Wrapper for local tiff volumes.
getZoomsOME
staticmethod
Extract zoom factors (i.e., voxel size) from OME metadata.
This function returns the zoom levels at the highest resolution. Zooms at subsequent resolution (in the in-plane direction only) can be obtained by multiplying the zooms at the previous resolution by 2. (This assumes that pyramid levels are built using a sliding window).
If more than one series is requested, the returned variables are wrapped in a tuple E.g.:
>>> zooms, units, axes = ome_zooms(omexml)
>>> zooms_series1 = zooms[1]
>>> zooms_series1
(10., 10., 5.)
>>> units_series1 = units[1]
>>> units_series1
('mm', 'mm', 'mm')
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
omexml
|
|
OME-XML metadata |
required |
series
|
|
Series ID(s) |
all
|
Returns:
| Name | Type | Description |
|---|---|---|
zooms |
|
|
units |
|
|
axes |
|
|
TiffDataSource
Bases:
A local tiff volume, read with tifffile.
output_center
property
Center of the field of view in output dimensions space and units.
input_bbox_size
property
Center of the field of view in input dimensions space and units.
output_bbox_size
property
Center of the field of view in output dimensions space and units.
LocalVolume
Bases:
LocalVolume that knows it is in a TiffDataSource.