Skip to content

Commit

Permalink
Removed manual channel mapping for EPICs
Browse files Browse the repository at this point in the history
  • Loading branch information
tkakar committed Nov 21, 2024
1 parent 76ed1be commit 3c0eabc
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/portal_visualization/builders/epic_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,9 @@ 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):
for mask_name in enumerate(mask_names):
color_channel = generate_unique_color()
mask_url = f'{base_url}/{mask_name}.zarr'
segmentations_zarr = AnnDataWrapper(
Expand All @@ -187,13 +182,8 @@ 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 = {
"spatialTargetC": channelIndex,
"spatialTargetC": mask_name,
"obsType": mask_name,
"spatialChannelOpacity": 1,
"spatialChannelColor": color_channel,
Expand Down

0 comments on commit 3c0eabc

Please sign in to comment.