Commit 4b31d29f authored by Locatelli's avatar Locatelli

Add rois and get dynamic property ids

parent 10679113
......@@ -43,6 +43,10 @@ public class DynamicProperty {
return properties;
}
public int getId() {
return id;
}
public String toString() {
String result = "DynamicProperty " + id + " {\n";
......
......@@ -729,6 +729,26 @@ public class PropertyManager {
throw pnfe;
}
/**
* Search dynamic property
*/
public int getDynamicPropertyParentId(Controller controller, String propertyName) throws PropertyNotFoundException {
if (dynamicPropertyMap == null || !this.dynamicPropertyMap.containsKey(((Servant)controller).getId())) {
//problem with empty map
createDynamicPropertiesForController((Servant)controller);
}
HashMap<String, DynamicProperty> map = dynamicPropertyMap.get(((Servant)controller).getId());
if (map != null) {
DynamicProperty dynamicProperty = map.get(propertyName);
if (dynamicProperty != null) {
return dynamicProperty.getId();
}
}
PropertyNotFoundException pnfe = new PropertyNotFoundException(propertyName, controller.getType(), controller.getName(), getClass().getCanonicalName(), "getDynamicProperty");
throw pnfe;
}
/**
* Used to clone a property
* @param controllerType
......
......@@ -81,7 +81,10 @@ public class PlotyInstance {
List<Integer> ySlice_id, List<Integer> zSlice_id, List<Integer> wSlice_id, List<Integer> maxXSlice_id,
List<Integer> maxYSlice_id, List<Integer> maxZSlice_id, List<Integer> maxWSlice_id, List<Integer> xPhysicalSize_id, List<Integer> yPhysicalSize_id, List<Integer> optimizationResultFound_id ,
List<Integer> optimizationResultValue_id , List<String> optimizationColor, List<Integer> optimizationFitFound_id , List<Integer> optimizationFitArray_id,
List<String> optimizationFitColor) {
List<String> optimizationFitColor, Integer nbRois_id, List<Integer> roiX0_parentId, List<Integer> roiY0_parentId, List<Integer> roiX1_parentId, List<Integer> roiY1_parentId, List<Integer> roiSum_parentId,
Integer roiSelectedPlot_id, Integer roiSelectedRoi_id, Integer roiSelectedX0_id,
Integer roiSelectedY0_id, Integer roiSelectedX1_id, Integer roiSelectedY1_id,
Integer roiCommandAdd_id, Integer roiCommandRaz_id) {
if (initOk == false) return;
......@@ -102,7 +105,7 @@ public class PlotyInstance {
Message messageFirst = DataPlotMessages.Message.newBuilder().
setType(DataPlotMessages.Message.Type.PlotPropertyData).
build();
PlotPropertyDataMessage messageSecond = DataPlotMessages.PlotPropertyDataMessage.newBuilder().
setPlotkey(plotkey).
addAllKeys(key).
......@@ -136,6 +139,20 @@ public class PlotyInstance {
setTitleId(titleid).
setXaxisTitleId(xaxistitleid).
setYaxisTitleId(yaxistitleid).
setNbRoisId(nbRois_id).
addAllX0ParentId(roiX0_parentId).
addAllY0ParentId(roiY0_parentId).
addAllX1ParentId(roiX1_parentId).
addAllY1ParentId(roiY1_parentId).
addAllSumParentId(roiSum_parentId).
setSelectedPlotId(roiSelectedPlot_id).
setSelectedRoiId(roiSelectedRoi_id).
setSelectedX0Id(roiSelectedX0_id).
setSelectedY0Id(roiSelectedY0_id).
setSelectedX1Id(roiSelectedX1_id).
setSelectedY1Id(roiSelectedY1_id).
setCommandRoiAddId(roiCommandAdd_id).
setCommandRoiRazId(roiCommandRaz_id).
build();
plotRequester.sendTwoParts(messageFirst.toByteArray(), messageSecond.toByteArray());
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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