Calling `to_dict()` early prevents `to_python()` late
Opened this issue · 0 comments
in imaging_builders.py
:
vc = self._setup_view_config_raster(vc, dataset)
conf = vc.to_dict()
# Don't want to render all layers
del conf["datasets"][0]["files"][0]["options"]["renderLayers"]
return get_conf_cells(
conf, f'TODO: Confirm that this notebook works! {type(self).__name__}')
The problem is that at this point, conf
isn't really a Vitessce view config object: It's just a dict
, so we can't call to_python
on it to make a notebook.
- Is there some way to build the conf so that it doesn't have the stuff we don't want?
- If that's hard, how bad would it be if we left the view conf intact?
Chuck:
Do you know if there’s a way to construct the Vitessce conf so it doesn’t have the renderLayers to begin with? Maybe that would require a change in the vitessce-python?
If that’s not feasible, maybe we do just dump the JSON to the notebook, since to_python can’t be used on a regular dict. I don’t think that would be the end of the world.
Ilan:
I think that would require a change, but we may have added the feature and then never updated things here. I’d have to check.
So yes this would require a change to Vitessce python. It adds all the images right now and is hard coded to do so