New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Img data pixel sizes units #144

merged 3 commits into from Apr 1, 2016
Jump to file or symbol
Failed to load files and symbols.
+5 −0
Diff settings


Just for now


imgData pixel sizes in custom units, not MICROMETERS

  • Loading branch information...
will-moore committed Feb 18, 2016
commit 4ce5fbc20b25c5a0fc2fbf502eb96579c389f6b7
@@ -136,9 +136,14 @@ def imgData_json(request, imageId, conn=None, **kwargs):
rv = imageMarshal(image, request=request)
if unitsSupport:
px = image.getPrimaryPixels().getPhysicalSizeX()
# overwrite existing x value, which will be in MICROMETERS
rv['pixel_size']['x'] = px.getValue()
rv['pixel_size']['symbolX'] = px.getSymbol()
rv['pixel_size']['unitX'] = str(px.getUnit())
py = image.getPrimaryPixels().getPhysicalSizeY()
# overwrite existing y value, which will be in MICROMETERS
rv['pixel_size']['y'] = py.getValue()
rv['pixel_size']['symbolY'] = py.getSymbol()
rv['pixel_size']['unitY'] = str(py.getUnit())
sizeT = image.getSizeT()
ProTip! Use n and p to navigate between commits in a pull request.