Skip to content

Commit

Permalink
Epic builder channels fixed`
Browse files Browse the repository at this point in the history
  • Loading branch information
tkakar committed Nov 5, 2024
1 parent 73a69e4 commit 7628817
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/portal_visualization/builders/epic_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ def read_segmentation_scale(self): # pragma: no cover


def create_segmentation_objects(base_url, mask_names): # pragma: no cover
spatialTargetCMapping = {
'arteries-arterioles': 4,
'glomeruli': 2,
'tubules': 3,
}
segmentation_objects = []
segmentations_CL = []
for index, mask_name in enumerate(mask_names):
Expand All @@ -182,9 +187,13 @@ def create_segmentation_objects(base_url, mask_names): # pragma: no cover
"obsType": mask_name
}
)
# TODO: manually adjusted for the test dataset, need to be fixed on Vitessce side
if all(mask in mask_names for mask in spatialTargetCMapping.keys()):
channelIndex = spatialTargetCMapping[mask_name]
else:
channelIndex = index
seg_CL = {
# TODO: manually to match image channels - need to be fixed on the JS side
"spatialTargetC": index + 2,
"spatialTargetC": channelIndex ,
"obsType": mask_name,
"spatialChannelOpacity": 1,
"spatialChannelColor": color_channel,
Expand Down

0 comments on commit 7628817

Please sign in to comment.