setID(String.valueOf( element.getAttribute("ID")));
setID(String.valueOf( element.getAttribute("ID")));
public void setROIID(String id, int ROIIndex) { // Parents: {u'OME': None} // ID is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); model.addModelObject(id, o1); o1.setID(id); }
public void setROIID(String id, int ROIIndex) { // Parents: {u'OME': None} // ID is not a reference OME o0 = root; if (o0.sizeOfROIList() == ROIIndex) { o0.addROI(new ROI()); } ROI o1 = o0.getROI(ROIIndex); model.addModelObject(id, o1); o1.setID(id); }
/** * Creates an ROI. * * @param index The index of the ROI in the file. * @param z The selected z-section. * @param c The selected channel. * @param t The selected time-point. */ public ROI createROI(int index, int z, int c, int t) { ROI roi = new ROI(); roi.setName("ROI name:"+index); roi.setID("ROI:"+index); int n = SHAPES.length; int j = index; if (index > 0) j += n; Union union = new Union(); for (int i = 0; i < n; i++) { j += i; Shape shape = createShape(j, SHAPES[i], z, c, t); shape.setID("Shape:" + index + ":" + j); union.addShape(shape); } roi.setUnion(union); return roi; }
private ROI makeROI() { ROI roi = new ROI(); roi.setID(InOutCurrentTest.ROI_ID); CommentAnnotation roiAnnotation = new CommentAnnotation(); roiAnnotation.setID(InOutCurrentTest.ROI_ANNOTATION_ID); roiAnnotation.setValue(InOutCurrentTest.ROI_ANNOTATION_VALUE); roiAnnotation.setNamespace(InOutCurrentTest.GENERAL_ANNOTATION_NAMESPACE); roi.linkAnnotation(roiAnnotation); annotations.addCommentAnnotation(roiAnnotation); Union shapeUnion = new Union(); Rectangle rect = new Rectangle(); rect.setID(InOutCurrentTest.SHAPE_ID); rect.setX(InOutCurrentTest.RECTANGLE_X); rect.setY(InOutCurrentTest.RECTANGLE_Y); rect.setWidth(InOutCurrentTest.RECTANGLE_WIDTH); rect.setHeight(InOutCurrentTest.RECTANGLE_HEIGHT); shapeUnion.addShape(rect); roi.setUnion(shapeUnion); return roi; } }