Closed sbesson closed 4 years ago
This API addition had driven in the context of idr0065 - see https://github.com/IDR/idr0065-camsund-crispri/blob/master/scripts/generate_companions.py#L146 to populate the Plane metadata using the submitted timestamp/exposure information - see https://idr.openmicroscopy.org/webclient/img_detail/9022301 for instance. As I was trying to re-use the API for idr0092, I realized I never backported the change.
idr0065
Plane
idr0092
In terms of style, the new Plane object explicitly defines the z/c/t arguments as well as an options dictionary which takes all the optional Plane attributes. A minimal example of consumption of this API is illustrated below:
z/c/t
options
from ome_model.experimental import Image, create_companion i = Image("test", 256, 512, 1, 2, 2) i.add_plane(c=0, z=0, t=0, options={'DeltaT': '0.0'}) i.add_plane(c=0, z=0, t=1, options={'DeltaT': '1.0'}) i.add_plane(c=1, z=0, t=0, options={'DeltaT': '0.1'}) i.add_plane(c=1, z=0, t=1, options={'DeltaT': '1.1'}) create_companion(images=[i], out='planes.companion.ome')
The alternative is to define all these attributes explicitly in the constructor and the Image.add_plane() API. Feedback welcome.
Image.add_plane()
:+1: LGTM
This API addition had driven in the context of
idr0065
- see https://github.com/IDR/idr0065-camsund-crispri/blob/master/scripts/generate_companions.py#L146 to populate thePlane
metadata using the submitted timestamp/exposure information - see https://idr.openmicroscopy.org/webclient/img_detail/9022301 for instance. As I was trying to re-use the API foridr0092
, I realized I never backported the change.In terms of style, the new
Plane
object explicitly defines thez/c/t
arguments as well as anoptions
dictionary which takes all the optionalPlane
attributes. A minimal example of consumption of this API is illustrated below:The alternative is to define all these attributes explicitly in the constructor and the
Image.add_plane()
API. Feedback welcome.