Closed ruven closed 2 months ago
Looks fine except for a small detail: layers can be assigned a transformation inside the canvas, so the layer pixelSize cannot be directly used for the ScaleBar.
I think a cleaner solution could be to define a Layer function pixelSizeInMM() that keeps the layer transform into account (just need to be multiplied by the zoom parameter).
OK, so something like this within Layer.js?
function pixelSizeInMM(){
return this.pixelSize * this.transform.z;
}
I guess pixelSize would also need to be initialized to zero within Layer.js via init(). Otherwise, we'd need to add an if (this.pixelSize)
here.
Looks fine, and yes, initializing makes more sense.
Thanks!
These commits add IIPImage support to OpenLime, including support for TIFF stacks for RTI data. The implementation works for both image and RTI image types. An optional
server
parameter can be used to allow an iipsrv endpoint to be specified, in which case theurl
parameter is simply the image file name. Examples have been added to dist/examples.An update to the scale bar code also adds µm units and allows the resolution to be obtained directly from the image layer.