Commit 9c8e93d4 authored by Locatelli's avatar Locatelli
Browse files

Pass property names to ploty2 instead of ids

parent e06c9ce4
* Pass property names to ploty2 instead of ids
4.0.7 23/04/2020 4.0.7 23/04/2020
----- -----
* Merge ploty2 branch * Merge ploty2 branch
......
...@@ -186,35 +186,35 @@ public class PlotyInstance { ...@@ -186,35 +186,35 @@ public class PlotyInstance {
plotRequester.send(messageFirst.toByteArray()); plotRequester.send(messageFirst.toByteArray());
} }
public void plot(String plotkey, List<String> key, List<String> legend_key, List<String> color, public void plot(String controllerName, String plotkey, List<String> key, List<String> legend_key, List<String> color,
List<Integer> datax_id, List<Integer> datay_id, List<Integer> dataz_id, List<Boolean> errorBars, List<String> datax_prop_name, List<String> datay_prop_name, List<String> dataz_prop_name, List<Boolean> errorBars,
String windowTitle, String plotTitle, String xAxisTitle, String yAxisTitle, Property titleProperty, String windowTitle, String plotTitle, String xAxisTitle, String yAxisTitle, Property titleProperty,
Property xAxisTitleProperty, Property yAxisTitleProperty, List<Integer> dataState_id, Property xAxisTitleProperty, Property yAxisTitleProperty, List<String> dataState_prop_name,
List<Integer> xSlice_id, List<Integer> ySlice_id, List<Integer> zSlice_id, List<Integer> wSlice_id, List<String> xSlice_prop_name, List<String> ySlice_prop_name, List<String> zSlice_prop_name, List<String> wSlice_prop_name,
List<Integer> maxXSlice_id, List<Integer> maxYSlice_id, List<Integer> maxZSlice_id, List<String> maxXSlice_prop_name, List<String> maxYSlice_prop_name, List<String> maxZSlice_prop_name,
List<Integer> maxWSlice_id, List<Integer> xPhysicalSize_id, List<Integer> yPhysicalSize_id, List<String> maxWSlice_prop_name, List<String> xPhysicalSize_prop_name, List<String> yPhysicalSize_prop_name,
List<Integer> optimizationResultFound_id, List<Integer> optimizationResultValue_id, List<String> optimizationResultFound_prop_name, List<String> optimizationResultValue_prop_name,
List<String> optimizationColor, List<Integer> optimizationFitFound_id, List<String> optimizationColor, List<String> optimizationFitFound_prop_name,
List<Integer> optimizationFitArray_id, List<String> optimizationFitColor, Integer use_grid_id, List<String> optimizationFitArray_prop_name, List<String> optimizationFitColor, String use_grid_prop_name,
Integer use_log_id, Integer color_map_id, Integer min_color_limit_id, Integer max_color_limit_id, Integer nbRois_id, List<Integer> roiX0_parentId, String use_log_prop_name, String color_map_prop_name, String min_color_limit_prop_name, String max_color_limit_prop_name, String nbRois_prop_name, List<String> roiX0_parentPropName,
List<Integer> roiY0_parentId, List<Integer> roiX1_parentId, List<Integer> roiY1_parentId, List<String> roiY0_parentPropName, List<String> roiX1_parentPropName, List<String> roiY1_parentPropName,
List<Integer> roiSum_parentId, Integer roiSelectedPlot_id, Integer roiSelectedRoi_id, List<String> roiSum_parentPropName, String roiSelectedPlot_prop_name, String roiSelectedRoi_prop_name,
Integer roiSelectedX0_id, Integer roiSelectedY0_id, Integer roiSelectedX1_id, Integer roiSelectedY1_id, String roiSelectedX0_prop_name, String roiSelectedY0_prop_name, String roiSelectedX1_prop_name, String roiSelectedY1_prop_name,
Integer roiCommandAdd_id, Integer roiCommandRaz_id, Integer countActivated_id) { String roiCommandAdd_prop_name, String roiCommandRaz_prop_name, String countActivated_prop_name) {
if (initOk == false) return; if (initOk == false) return;
int titleid = 0; String title_prop_name = "";
if (titleProperty != null) { if (titleProperty != null) {
titleid = titleProperty.getPropertyID(); title_prop_name = titleProperty.getName();
} }
int xaxistitleid = 0; String xaxistitle_prop_name = "";
if (xAxisTitleProperty != null) { if (xAxisTitleProperty != null) {
xaxistitleid = xAxisTitleProperty.getPropertyID(); xaxistitle_prop_name = xAxisTitleProperty.getName();
} }
int yaxistitleid = 0; String yaxistitle_prop_name = "";
if (yAxisTitleProperty != null) { if (yAxisTitleProperty != null) {
yaxistitleid = yAxisTitleProperty.getPropertyID(); yaxistitle_prop_name = yAxisTitleProperty.getName();
} }
...@@ -223,58 +223,59 @@ public class PlotyInstance { ...@@ -223,58 +223,59 @@ public class PlotyInstance {
build(); build();
PlotPropertyDataMessage messageSecond = DataPlotMessages.PlotPropertyDataMessage.newBuilder(). PlotPropertyDataMessage messageSecond = DataPlotMessages.PlotPropertyDataMessage.newBuilder().
setControllerName(controllerName).
setPlotkey(plotkey). setPlotkey(plotkey).
addAllKeys(key). addAllKeys(key).
addAllLegendKeys(legend_key). addAllLegendKeys(legend_key).
addAllColors(color). addAllColors(color).
addAllDataxIds(datax_id). addAllDataxPropName(datax_prop_name).
addAllDatayIds(datay_id). addAllDatayPropName(datay_prop_name).
addAllDatazIds(dataz_id). addAllDatazPropName(dataz_prop_name).
addAllPlottypeId(dataState_id). addAllPlottypePropName(dataState_prop_name).
addAllXId(xSlice_id). addAllXPropName(xSlice_prop_name).
addAllYId(ySlice_id). addAllYPropName(ySlice_prop_name).
addAllChannelId(zSlice_id). addAllChannelPropName(zSlice_prop_name).
addAllSliceId(wSlice_id). addAllSlicePropName(wSlice_prop_name).
addAllMaxXId(maxXSlice_id). addAllMaxXPropName(maxXSlice_prop_name).
addAllMaxYId(maxYSlice_id). addAllMaxYPropName(maxYSlice_prop_name).
addAllMaxChannelId(maxZSlice_id). addAllMaxChannelPropName(maxZSlice_prop_name).
addAllMaxSliceId(maxWSlice_id). addAllMaxSlicePropName(maxWSlice_prop_name).
addAllXphysicalSizeId(xPhysicalSize_id). addAllXphysicalSizePropName(xPhysicalSize_prop_name).
addAllYphysicalSizeId(yPhysicalSize_id). addAllYphysicalSizePropName(yPhysicalSize_prop_name).
addAllErrorBars(errorBars). addAllErrorBars(errorBars).
addAllOptimizationResultFoundId(optimizationResultFound_id). addAllOptimizationResultFoundPropName(optimizationResultFound_prop_name).
addAllOptimizationResultXId(optimizationResultValue_id). addAllOptimizationResultXPropName(optimizationResultValue_prop_name).
addAllOptimizationResultColor(optimizationColor). addAllOptimizationResultColor(optimizationColor).
addAllOptimizationFitFoundId(optimizationFitFound_id). addAllOptimizationFitFoundPropName(optimizationFitFound_prop_name).
addAllOptimizationFitYId(optimizationFitArray_id). addAllOptimizationFitYPropName(optimizationFitArray_prop_name).
addAllOptimizationFitColor(optimizationFitColor). addAllOptimizationFitColor(optimizationFitColor).
setUseGridId(use_grid_id). setUseGridPropName(use_grid_prop_name).
setUseLogId(use_log_id). setUseLogPropName(use_log_prop_name).
setColorMapId(color_map_id). setColorMapPropName(color_map_prop_name).
setMinColorLimitId(min_color_limit_id). setMinColorLimitPropName(min_color_limit_prop_name).
setMaxColorLimitId(max_color_limit_id). setMaxColorLimitPropName(max_color_limit_prop_name).
setWindowTitle(windowTitle). setWindowTitle(windowTitle).
setPlotTitle(plotTitle). setPlotTitle(plotTitle).
setXaxisTitle(yAxisTitle). setXaxisTitle(yAxisTitle).
setYaxisTitle(yAxisTitle). setYaxisTitle(yAxisTitle).
setTitleId(titleid). setTitlePropName(title_prop_name).
setXaxisTitleId(xaxistitleid). setXaxisTitlePropName(xaxistitle_prop_name).
setYaxisTitleId(yaxistitleid). setYaxisTitlePropName(yaxistitle_prop_name).
setNbRoisId(nbRois_id). setNbRoisPropName(nbRois_prop_name).
addAllX0ParentId(roiX0_parentId). addAllX0ParentPropName(roiX0_parentPropName).
addAllY0ParentId(roiY0_parentId). addAllY0ParentPropName(roiY0_parentPropName).
addAllX1ParentId(roiX1_parentId). addAllX1ParentPropName(roiX1_parentPropName).
addAllY1ParentId(roiY1_parentId). addAllY1ParentPropName(roiY1_parentPropName).
addAllSumParentId(roiSum_parentId). addAllSumParentPropName(roiSum_parentPropName).
setSelectedPlotId(roiSelectedPlot_id). setSelectedPlotPropName(roiSelectedPlot_prop_name).
setSelectedRoiId(roiSelectedRoi_id). setSelectedRoiPropName(roiSelectedRoi_prop_name).
setSelectedX0Id(roiSelectedX0_id). setSelectedX0PropName(roiSelectedX0_prop_name).
setSelectedY0Id(roiSelectedY0_id). setSelectedY0PropName(roiSelectedY0_prop_name).
setSelectedX1Id(roiSelectedX1_id). setSelectedX1PropName(roiSelectedX1_prop_name).
setSelectedY1Id(roiSelectedY1_id). setSelectedY1PropName(roiSelectedY1_prop_name).
setCommandRoiAddId(roiCommandAdd_id). setCommandRoiAddPropName(roiCommandAdd_prop_name).
setCommandRoiRazId(roiCommandRaz_id). setCommandRoiRazPropName(roiCommandRaz_prop_name).
setCountActivatedId(countActivated_id). setCountActivatedPropName(countActivated_prop_name).
build(); build();
plotRequester.sendTwoParts(messageFirst.toByteArray(), messageSecond.toByteArray()); plotRequester.sendTwoParts(messageFirst.toByteArray(), messageSecond.toByteArray());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment