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
merged 3 commits into from Apr 1, 2016
Jump to file or symbol
Failed to load files and symbols.
+13 −8
Diff settings

Always

Just for now

View
@@ -3697,8 +3697,8 @@ var LegendView = Backbone.View.extend({
// 'x': px,
// 'y': py,
'datasetName': data.meta.datasetName,
'pixel_size_x': data.pixel_size.x,
'pixel_size_y': data.pixel_size.y,
'pixel_size_x': data.pixel_size.valueX,
'pixel_size_y': data.pixel_size.valueY,
'pixel_size_x_unit': data.pixel_size.unitX,
'pixel_size_x_symbol': data.pixel_size.symbolX,
'deltaT': data.deltaT,
@@ -4018,8 +4018,8 @@ var LegendView = Backbone.View.extend({
'y': coords.py,
'datasetName': data.meta.datasetName,
'datasetId': data.meta.datasetId,
'pixel_size_x': data.pixel_size.x,
'pixel_size_y': data.pixel_size.y,
'pixel_size_x': data.pixel_size.valueX,
'pixel_size_y': data.pixel_size.valueY,
'pixel_size_x_symbol': data.pixel_size.symbolX,
'pixel_size_x_unit': data.pixel_size.unitX,
'deltaT': data.deltaT,
@@ -226,8 +226,8 @@
// 'x': px,
// 'y': py,
'datasetName': data.meta.datasetName,
'pixel_size_x': data.pixel_size.x,
'pixel_size_y': data.pixel_size.y,
'pixel_size_x': data.pixel_size.valueX,
'pixel_size_y': data.pixel_size.valueY,
'pixel_size_x_unit': data.pixel_size.unitX,
'pixel_size_x_symbol': data.pixel_size.symbolX,
'deltaT': data.deltaT,
@@ -547,8 +547,8 @@
'y': coords.py,
'datasetName': data.meta.datasetName,
'datasetId': data.meta.datasetId,
'pixel_size_x': data.pixel_size.x,
'pixel_size_y': data.pixel_size.y,
'pixel_size_x': data.pixel_size.valueX,
'pixel_size_y': data.pixel_size.valueY,
'pixel_size_x_symbol': data.pixel_size.symbolX,
'pixel_size_x_unit': data.pixel_size.unitX,
'deltaT': data.deltaT,
View
@@ -136,9 +136,14 @@ def imgData_json(request, imageId, conn=None, **kwargs):
rv = imageMarshal(image, request=request)
if unitsSupport:
# Add extra parameters with units data
# NB ['pixel_size']['x'] will have size in MICROMETER
px = image.getPrimaryPixels().getPhysicalSizeX()
rv['pixel_size']['valueX'] = px.getValue()
rv['pixel_size']['symbolX'] = px.getSymbol()
rv['pixel_size']['unitX'] = str(px.getUnit())
py = image.getPrimaryPixels().getPhysicalSizeY()
rv['pixel_size']['valueY'] = 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.