All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added attributes at the SpatialData object level (
.attrs
)
- Added
set_channel_names
method toSpatialData
to change the channel names of an image element inSpatialData
#786 - Added
write_channel_names
method toSpatialData
to overwrite channel metadata on disk without overwriting the image array itself. #786
- Argument
c_coords
is moved out of kwargs for theImageModel
s. #779 get_channels
is marked for deprecation inSpatialData
v0.3.0. Function is replaced byget_channel_names
#786- Updated dependency of
multiscale-spatial-image
#792 - Adjust to new version of
xarray
withDataTree
# 752
- Updated deprecated default stages of
pre-commit
#771 - Preserve points
feature_key
during queries #794
- Incompatibility issues due to newest release of
multiscale-spatial-image
#760
- Enable vectorization of
bounding_box_query
for allSpatialData
elements. #699
- Added
shortest_path
parameter toget_transformation_between_coordinate_systems
#714 - Added
get_pyramid_levels()
utils API #719 - Improved ergonomics of
concatenate()
when element names are non-unique #720 - Improved performance of writing images with multiscales #577
- Added
clip: bool = False
parameter topolygon_query()
#670 - Add
sort
parameter toPointsModel.parse()
#672
- Fix interpolation artifact multiscale computation for labels #697
- New disk format for shapes using
GeoParquet
(the change is backward compatible) #542
- Add
return_background
as argument toget_centroids
andget_element_instances
#621 - Ability to save data using older disk formats #542
- Circles validation now checks for inf or nan radii #653
- Bug with table name in torch dataset #654 @LLehner
- Relaxing
spatial-image
package requirement #616
- Using
DataArray
directly instead of the subclassSpatialImage
(removed install constraint for thespatial_image
package) #587 - Using
DataTree
directly instead of the subclassMultiscaleSpatialImage
(removed install constraint for themultiscale_spatial_image
package) #587 - Changed
element
parameter (deprecation in v0.3.0) oftransform_element_to_coordinate_system
to a stringelement_name
#611
- Added operation:
to_polygons()
@quentinblampey #560 - Extended
rasterize()
to support all the data types @quentinblampey #566 - Added operation:
rasterize_bins()
@quentinblampey #578 - Added operation:
map_raster()
to apply functions block-wise to raster data @ArneDefauw #588
- Removed
pygeos
dependency @omsai #545 - Channel coordinate annotations on images now persist through
rasterize()
@clwgg #544 - Added
datasets
module - Extended
get_values()
toAnnData
tables #579 - Added
get_element_instances()
(replaces_get_unique_label_values_as_index()
) #582 - Added
get_element_annotators()
, retrieving the tables that annotate a particular SpatialElement #595
- Preserve channel names of multi-scale images in
transform
(#379) - Fix
filter_by_coordinate_system
with SpatialData object having a table not annotating an element (#619)
- Made
get_channels()
public. - Added utils
force_2d()
to force 3D shapes to 2D (this is a temporary solution until.force_2d()
is available ingeopandas
).
- Added method
update_annotated_regions_metadata() which updates the
regionvalue automatically from the
region_key` columns
- Renamed
join_sdata_spatialelement_table
tojoin_spatialelement_table
, and made it work also withoutSpatialData
objects.
-
Implemented support in
SpatialData
for storing multiple tables. -
These tables can annotate a
SpatialElement
but now not necessarily so. -
Deprecated
.table
attribute in favor of.tables
dict-like accessor. -
Added join operations
-
Added SQL like joins that can be executed by calling one public function
join_sdata_spatialelement_table
. The following joins are supported:left
,left_exclusive
,right
,right_exclusive
andinner
. The function has an option to match rows. Forleft
only matchingleft
is supported and forright
join onlyright
matching of rows is supported. Not all joins are supported forLabels
elements. -
Added function
match_element_to_table
which allows the user to perform a right join ofSpatialElement
(s) with a table with rows matching the row order in the table. -
Incremental IO of data and metadata:
-
Increased in-memory vs on-disk control: changes performed in-memory (e.g. adding a new image) are not automatically performed on-disk.
-
Deprecated
add_image()
,add_labels()
,add_shapes()
,add_points()
in favor of.images
,.labels
,.shapes
,.points
dict-like accessors. -
new methods
write_element()
,write_transformations()
,write_metadata()
,remove_element_from_disk()
-
new methods
write_consolidated_metadata()
andhas_consolidated_metadata()
-
deprecated
save_transformations()
-
improved
__repr__()
with information on Zarr storage and Dask-backed files -
new utils
is_self_contained()
,describe_elements_are_self_contained()
-
new utils
element_paths_in_memory()
,element_paths_on_disk()
-
Multiple table helper functions
-
Added public helper function
get_table_keys()
inspatialdata.models
to retrieve annotation information of a given table. -
Added public helper function
check_target_region_column_symmetry()
inspatialdata.models
to check whether annotation metadata intable.uns['spatialdata_attrs']
corresponds with respective columns intable.obs
. -
Added function
validate_table_in_spatialdata()
in SpatialData to validate the annotation target of a table being present in theSpatialData
object. -
Added method
get_annotated_regions()
inSpatialData
to get the regions annotated by a given table. -
Added method
get_region_key_column()
inSpatialData
to get the region_key column in table.obs. -
Added method
get_instance_key_column()
inSpatialData
to get the instance_key column in table.obs. -
Added method
set_table_annotates_spatialelement()
inSpatialData
to either set or change the annotation metadata of a table in a givenSpatialData
object. - Addedtable_name
parameter to theaggregate()
function to allow users to give a custom table name to table resulting from aggregation. -
Added
table_name
parameter to theget_values()
function. -
Utils
-
Added
gen_spatial_elements()
generator in SpatialData to generate theSpatialElements
in a givenSpatialData
object. -
Added
gen_elements
generator inSpatialData
to generate elements of aSpatialData
object including tables. -
added
SpatialData.subset()
API -
added
SpatialData.locate_element()
API -
added utils function:
get_centroids()
-
added utils function:
deepcopy()
-
added operation:
to_circles()
-
documented previously-added
get_channels()
to retrieve the channel names of a raster element indepently of it being single or multi-scale -
Transformations-related
- added utils function:
transform_to_data_extent()
- added utils function:
are_extents_equal()
- added utils function:
postpone_transformation()
- added utils function:
remove_transformations_to_coordinate_system()
- added utils function:
-
added testing utilities:
assert_spatial_data_objects_are_identical()
,assert_elements_are_identical()
,assert_elements_dict_are_identical()
- refactored data loader for deep learning
- refactored
SpatialData.write()
to be more robust - generalized spatial queries to any combination of 2D/3D data and 2D/3D query region #409
- Changed the string representation of
SpatialData
to reflect the changes in regard to multiple tables and incremental IO. - improved usability and robustness of
sdata.write()
whenoverwrite=True
@aeisenbarth - fixed warnings for categorical dtypes in tables in
TableModel
andPointsModel
- fixed wrong order of points after spatial queries
- new API: sdata.rename_coordinate_systems()
- decompose affine transformation into simpler transformations
- remove padding for blobs()
- get_extent() function to compute bounding box of the data
- testing against pre-release packages
- Fixed bug with get_values(): ignoring background channel in labels
- polygon_query() support for images #358
- Fix missing c_coords argument in blobs multiscale #342
- Replaced hardcoded string with instance_key #346
- Add multichannel blobs sample data (by @melonora)
- Aggregation APIs.
- Fix blobs (#282)
- Update napari-spatialdata pin (#279)
- pin typing-extensions
- Merge pull request #271 from scverse/fix/aggregation
- Update readme
- This release adds polygon spatial query.
- fix tests badge (#242)
- This release tests distribution via pypi
- This is an alpha release to test the release process.
- make version dynamic
- Dev version, not official release yet