NKI-AI / ahcore

Ahcore is the AI for Oncology core computational pathology toolkit
Apache License 2.0
15 stars 1 forks source link

Feature/h5 tile feature writer #69

Closed AjeyPaiK closed 5 months ago

AjeyPaiK commented 6 months ago

This PR adds the following features to ahcore:

  1. Adds H5TileFeatureWriter which can write tile features to an H5 file. (Fixes #66)
  2. Makes appropriate modifications to H5FileImageReader so that The feature vectors can be read in such a way that they can be reorganised corresponding to their original spatial coordinates.
AjeyPaiK commented 5 months ago

This isn't necessary since the existing writer initializes a dataset with variable length. So, when writing feature vectors to the H5 file, the writer is initialised automatically with the feature dimension.

Check below:

  1. We have a feature extractor that outputs a feature vector of length 768. There are 18042 tiles in the WSI I chose to test this. The dataset initialised by the writer has the right dimensions.

image