public ome.model.roi.Mask asMaskI(int z, int t) throws IOException { ome.model.roi.Mask mask = new ome.model.roi.Mask(); mask.setX((double)min.x); mask.setY((double)min.y); mask.setWidth((double)width); mask.setHeight((double)height); mask.setLocked(true); mask.setTheT(t); mask.setTheZ(z); byte[] theseBytes; theseBytes = this.asBytes(); mask.setBytes(theseBytes); return mask; }
public void setTextValue(java.lang.String textValue) { if (! _loaded ) errorIfUnloaded(); this.textValue = (java.lang.String) textValue; } protected byte[] bytes = null;
@Override public void putAt(String field, Object value) { if (field == null) { return; } else if (field.equals(X)) { setX((java.lang.Double)value); } else if (field.equals(Y)) { setY((java.lang.Double)value); } else if (field.equals(WIDTH)) { setWidth((java.lang.Double)value); } else if (field.equals(HEIGHT)) { setHeight((java.lang.Double)value); } else if (field.equals(PIXELS)) { setPixels((ome.model.core.Pixels)value); } else if (field.equals(TEXTVALUE)) { setTextValue((java.lang.String)value); } else if (field.equals(BYTES)) { setBytes((byte[])value); } else { super.putAt(field,value); } }
@Override public Object retrieve(String field) { if (field == null) { return null; } else if (field.equals(X)) { return getX(); } else if (field.equals(Y)) { return getY(); } else if (field.equals(WIDTH)) { return getWidth(); } else if (field.equals(HEIGHT)) { return getHeight(); } else if (field.equals(PIXELS)) { return getPixels(); } else if (field.equals(TEXTVALUE)) { return getTextValue(); } else if (field.equals(BYTES)) { return getBytes(); } else { return super.retrieve(field); } }
/** * Get Mask attached to the image for rendering. */ private Map<byte[], Integer> getMasks(PlaneDef pd) { List<IObject> masks = new ArrayList<IObject>(); Map<byte[], Integer> maskMap = new LinkedHashMap<byte[], Integer>(); if (!pd.getRenderShapes()) { return maskMap; } if (pd.getShapeIds().isEmpty()) { masks = getAllMasks(pd); } else { masks = getMasksById(pd); } for (int i = 0; i < masks.size(); i++) { maskMap.put( ((Mask) masks.get(i)).getBytes(), ((Mask) masks.get(i)).getFillColor() ); } return maskMap; } }
public ome.model.roi.Mask newInstance() { return new ome.model.roi.Mask(); }
public ome.model.roi.Mask proxy() { return new ome.model.roi.Mask(this.id, false); }
public void setWidth(java.lang.Double width) { if (! _loaded ) errorIfUnloaded(); this.width = (java.lang.Double) width; } protected java.lang.Double height = null;
public void setPixels(ome.model.core.Pixels pixels) { if (! _loaded ) errorIfUnloaded(); this.pixels = pixels; } protected java.lang.String textValue = null;
public void setX(java.lang.Double x) { if (! _loaded ) errorIfUnloaded(); this.x = (java.lang.Double) x; } protected java.lang.Double y = null;
public void setY(java.lang.Double y) { if (! _loaded ) errorIfUnloaded(); this.y = (java.lang.Double) y; } protected java.lang.Double width = null;
public void setHeight(java.lang.Double height) { if (! _loaded ) errorIfUnloaded(); this.height = (java.lang.Double) height; } protected ome.model.core.Pixels pixels = null;
public void setBytes(byte[] bytes) { if (! _loaded ) errorIfUnloaded(); this.bytes = (byte[]) bytes; }
/** * Simple field ome.model.roi.Mask.bytes (byte[]) */ // No @Type annotation // Not indexed @javax.persistence.Column(columnDefinition="bytea", nullable=true, unique=false, name="bytes", updatable=true) public byte[] getBytes() { if (! _loaded ) errorIfUnloaded(); return this.bytes; }
/** * Simple field ome.model.roi.Mask.width (java.lang.Double) */ // No @Type annotation @org.hibernate.search.annotations.Fields({ @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED), @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED, name="combined_fields") }) @javax.persistence.Column(columnDefinition="", nullable=true, unique=false, name="width", updatable=true) public java.lang.Double getWidth() { if (! _loaded ) errorIfUnloaded(); return this.width; }
/** * Simple field ome.model.roi.Mask.y (java.lang.Double) */ // No @Type annotation @org.hibernate.search.annotations.Fields({ @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED), @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED, name="combined_fields") }) @javax.persistence.Column(columnDefinition="", nullable=true, unique=false, name="y", updatable=true) public java.lang.Double getY() { if (! _loaded ) errorIfUnloaded(); return this.y; }
/** * Simple field ome.model.roi.Mask.height (java.lang.Double) */ // No @Type annotation @org.hibernate.search.annotations.Fields({ @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED), @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED, name="combined_fields") }) @javax.persistence.Column(columnDefinition="", nullable=true, unique=false, name="height", updatable=true) public java.lang.Double getHeight() { if (! _loaded ) errorIfUnloaded(); return this.height; }
/** * Simple field ome.model.roi.Mask.x (java.lang.Double) */ // No @Type annotation @org.hibernate.search.annotations.Fields({ @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED), @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED, name="combined_fields") }) @javax.persistence.Column(columnDefinition="", nullable=true, unique=false, name="x", updatable=true) public java.lang.Double getX() { if (! _loaded ) errorIfUnloaded(); return this.x; }
/** * Many-to-one field ome.model.roi.Mask.pixels (ome.model.core.Pixels) */ @javax.persistence.ManyToOne(fetch = javax.persistence.FetchType.LAZY, cascade = {javax.persistence.CascadeType.MERGE, javax.persistence.CascadeType.PERSIST, javax.persistence.CascadeType.REFRESH}, targetEntity = ome.model.core.Pixels.class) @org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.LOCK, org.hibernate.annotations.CascadeType.MERGE, org.hibernate.annotations.CascadeType.PERSIST, org.hibernate.annotations.CascadeType.REPLICATE, org.hibernate.annotations.CascadeType.REFRESH, org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.EVICT}) @javax.persistence.JoinColumn(name="pixels", nullable=true, unique=false, insertable=true, updatable=true) @org.hibernate.annotations.ForeignKey(name="FKmask_pixels_pixels") public ome.model.core.Pixels getPixels() { if (! _loaded ) errorIfUnloaded(); return this.pixels; }
/** * Simple field ome.model.roi.Mask.textValue (java.lang.String) */ @org.hibernate.annotations.Type(type="org.hibernate.type.TextType") @org.hibernate.search.annotations.Fields({ @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.TOKENIZED), @org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.TOKENIZED, name="combined_fields") }) @javax.persistence.Column(columnDefinition="", nullable=true, unique=false, name="textValue", updatable=true) public java.lang.String getTextValue() { if (! _loaded ) errorIfUnloaded(); return this.textValue; }