-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not clear how to update a tile #300
Comments
The update function takes a Tile object https://pathml.readthedocs.io/en/latest/api_core_reference.html?highlight=Tiles#pathml.core.Tile Internally tile.coords is the key. You can simplify by iterating over SlideData.tiles: pipeline = Pipeline([
CollapseRunsVectra(),
SegmentMIF(model='mesmer', nuclear_channel=0, cytoplasm_channel=2, image_resolution=0.5,
postprocess_kwargs_whole_cell=None,
postprocess_kwargs_nuclear=None),
QuantifyMIF('nuclear_segmentation')
])
for h5_path in h5s:
#Create slide object
h5 = SlideData(h5_path)
for tile in h5.tiles:
pipeline.apply(tile)
h5.tiles.update(tile) I agree that documentation can be improved. We should say |
Thanks Surya!
It seems like this is trying to make a list holding all tiles - which could be a problem if the tiles don't all fit in memory. Perhaps you could try turning it into a generator expression (i.e. |
Yes. I used Ryan's suggestion to get it working. Thanks. |
Following instructions in #281, I want to update tiles with outputs of a new transform.
My code is as follows.
I am not able to follow the documentation and the code
pathml/pathml/core/tiles.py
Line 82 in acaef6c
I am looking for an update function that takes two arguments, a key and a value, and updates the h5's tiles at the key, with the value. Now, it seems to only take a key object. I am not sure what it updates the tile with.
This would require me to make a new
Tile()
object before updating theh5
, is that right?If I am wrong, please tell me how to update the h5 data with the new tile.
The text was updated successfully, but these errors were encountered: