angelolab / ark-analysis

Integrated pipeline for multiplexed image analysis
https://ark-analysis.readthedocs.io/en/latest/
MIT License
72 stars 25 forks source link

Fix pixel and cell cluster mask generation index for rectangular images #983

Closed alex-l-kong closed 1 year ago

alex-l-kong commented 1 year ago

What is the purpose of this PR?

A while back we worked with someone from UCSF and implemented a new mask indexing scheme for rectangular images. This seemed compatible with UCSF images, but they don't work for MIBI data. We need to update the coordinate multiplier

How did you implement your changes

Change coordinates = x_coords * img_data.shape[0] + y_coords to coordinates = x_coords * img_data.shape[1] + y_coords. I confirmed this on Patricia's MALDI dataset.

Remaining issues

More rectangular image testing needed.

alex-l-kong commented 1 year ago

Tested on Patricia's rectangular MALDI images.

ngreenwald commented 1 year ago

@srivarra not sure which status check is failing with merge queue, can you take a look?