Package biopb.image

Class RoiAnnotation.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
biopb.image.RoiAnnotation.Builder
All Implemented Interfaces:
RoiAnnotationOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
RoiAnnotation

public static final class RoiAnnotation.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder> implements RoiAnnotationOrBuilder
 One annotation: a geometry, where it sits, and what the user called it.
 
Protobuf type biopb.image.RoiAnnotation
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • clear

      public RoiAnnotation.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • getDefaultInstanceForType

      public RoiAnnotation getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public RoiAnnotation build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public RoiAnnotation buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public RoiAnnotation.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • setField

      public RoiAnnotation.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • clearField

      public RoiAnnotation.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • clearOneof

      public RoiAnnotation.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • setRepeatedField

      public RoiAnnotation.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • addRepeatedField

      public RoiAnnotation.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • mergeFrom

      public RoiAnnotation.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RoiAnnotation.Builder>
    • mergeFrom

      public RoiAnnotation.Builder mergeFrom(RoiAnnotation other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • mergeFrom

      public RoiAnnotation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RoiAnnotation.Builder>
      Throws:
      IOException
    • getRoiId

      public String getRoiId()
       Stable id. Empty on create -> the server mints a uuid4 hex.
       
      string roi_id = 1;
      Specified by:
      getRoiId in interface RoiAnnotationOrBuilder
      Returns:
      The roiId.
    • getRoiIdBytes

      public com.google.protobuf.ByteString getRoiIdBytes()
       Stable id. Empty on create -> the server mints a uuid4 hex.
       
      string roi_id = 1;
      Specified by:
      getRoiIdBytes in interface RoiAnnotationOrBuilder
      Returns:
      The bytes for roiId.
    • setRoiId

      public RoiAnnotation.Builder setRoiId(String value)
       Stable id. Empty on create -> the server mints a uuid4 hex.
       
      string roi_id = 1;
      Parameters:
      value - The roiId to set.
      Returns:
      This builder for chaining.
    • clearRoiId

      public RoiAnnotation.Builder clearRoiId()
       Stable id. Empty on create -> the server mints a uuid4 hex.
       
      string roi_id = 1;
      Returns:
      This builder for chaining.
    • setRoiIdBytes

      public RoiAnnotation.Builder setRoiIdBytes(com.google.protobuf.ByteString value)
       Stable id. Empty on create -> the server mints a uuid4 hex.
       
      string roi_id = 1;
      Parameters:
      value - The bytes for roiId to set.
      Returns:
      This builder for chaining.
    • getArrayId

      public String getArrayId()
       The tensor this annotation is drawn on: the globally-unique array_id, in its
       UNVERSIONED form (never the sidecar's `source@token/field`). Annotations
       must outlive an in-place edit of the image, so the version token is stripped
       before it reaches the store.
       
      string array_id = 2;
      Specified by:
      getArrayId in interface RoiAnnotationOrBuilder
      Returns:
      The arrayId.
    • getArrayIdBytes

      public com.google.protobuf.ByteString getArrayIdBytes()
       The tensor this annotation is drawn on: the globally-unique array_id, in its
       UNVERSIONED form (never the sidecar's `source@token/field`). Annotations
       must outlive an in-place edit of the image, so the version token is stripped
       before it reaches the store.
       
      string array_id = 2;
      Specified by:
      getArrayIdBytes in interface RoiAnnotationOrBuilder
      Returns:
      The bytes for arrayId.
    • setArrayId

      public RoiAnnotation.Builder setArrayId(String value)
       The tensor this annotation is drawn on: the globally-unique array_id, in its
       UNVERSIONED form (never the sidecar's `source@token/field`). Annotations
       must outlive an in-place edit of the image, so the version token is stripped
       before it reaches the store.
       
      string array_id = 2;
      Parameters:
      value - The arrayId to set.
      Returns:
      This builder for chaining.
    • clearArrayId

      public RoiAnnotation.Builder clearArrayId()
       The tensor this annotation is drawn on: the globally-unique array_id, in its
       UNVERSIONED form (never the sidecar's `source@token/field`). Annotations
       must outlive an in-place edit of the image, so the version token is stripped
       before it reaches the store.
       
      string array_id = 2;
      Returns:
      This builder for chaining.
    • setArrayIdBytes

      public RoiAnnotation.Builder setArrayIdBytes(com.google.protobuf.ByteString value)
       The tensor this annotation is drawn on: the globally-unique array_id, in its
       UNVERSIONED form (never the sidecar's `source@token/field`). Annotations
       must outlive an in-place edit of the image, so the version token is stripped
       before it reaches the store.
       
      string array_id = 2;
      Parameters:
      value - The bytes for arrayId to set.
      Returns:
      This builder for chaining.
    • getSetName

      public String getSetName()
       Grouping key -- the "layer" an annotation belongs to (e.g. "nuclei").
       Empty -> "default".
       
      string set_name = 3;
      Specified by:
      getSetName in interface RoiAnnotationOrBuilder
      Returns:
      The setName.
    • getSetNameBytes

      public com.google.protobuf.ByteString getSetNameBytes()
       Grouping key -- the "layer" an annotation belongs to (e.g. "nuclei").
       Empty -> "default".
       
      string set_name = 3;
      Specified by:
      getSetNameBytes in interface RoiAnnotationOrBuilder
      Returns:
      The bytes for setName.
    • setSetName

      public RoiAnnotation.Builder setSetName(String value)
       Grouping key -- the "layer" an annotation belongs to (e.g. "nuclei").
       Empty -> "default".
       
      string set_name = 3;
      Parameters:
      value - The setName to set.
      Returns:
      This builder for chaining.
    • clearSetName

      public RoiAnnotation.Builder clearSetName()
       Grouping key -- the "layer" an annotation belongs to (e.g. "nuclei").
       Empty -> "default".
       
      string set_name = 3;
      Returns:
      This builder for chaining.
    • setSetNameBytes

      public RoiAnnotation.Builder setSetNameBytes(com.google.protobuf.ByteString value)
       Grouping key -- the "layer" an annotation belongs to (e.g. "nuclei").
       Empty -> "default".
       
      string set_name = 3;
      Parameters:
      value - The bytes for setName to set.
      Returns:
      This builder for chaining.
    • getLabel

      public String getLabel()
       User-facing class/name for this ROI.
       
      string label = 4;
      Specified by:
      getLabel in interface RoiAnnotationOrBuilder
      Returns:
      The label.
    • getLabelBytes

      public com.google.protobuf.ByteString getLabelBytes()
       User-facing class/name for this ROI.
       
      string label = 4;
      Specified by:
      getLabelBytes in interface RoiAnnotationOrBuilder
      Returns:
      The bytes for label.
    • setLabel

      public RoiAnnotation.Builder setLabel(String value)
       User-facing class/name for this ROI.
       
      string label = 4;
      Parameters:
      value - The label to set.
      Returns:
      This builder for chaining.
    • clearLabel

      public RoiAnnotation.Builder clearLabel()
       User-facing class/name for this ROI.
       
      string label = 4;
      Returns:
      This builder for chaining.
    • setLabelBytes

      public RoiAnnotation.Builder setLabelBytes(com.google.protobuf.ByteString value)
       User-facing class/name for this ROI.
       
      string label = 4;
      Parameters:
      value - The bytes for label to set.
      Returns:
      This builder for chaining.
    • hasRoi

      public boolean hasRoi()
       Geometry in LEVEL-0 pixel coordinates, in the tensor's own Y/X axes. A shape
       drawn on a downsampled level is scaled up by the client; the server never
       rescales geometry.
       
      .biopb.image.ROI roi = 5;
      Specified by:
      hasRoi in interface RoiAnnotationOrBuilder
      Returns:
      Whether the roi field is set.
    • getRoi

      public ROI getRoi()
       Geometry in LEVEL-0 pixel coordinates, in the tensor's own Y/X axes. A shape
       drawn on a downsampled level is scaled up by the client; the server never
       rescales geometry.
       
      .biopb.image.ROI roi = 5;
      Specified by:
      getRoi in interface RoiAnnotationOrBuilder
      Returns:
      The roi.
    • setRoi

      public RoiAnnotation.Builder setRoi(ROI value)
       Geometry in LEVEL-0 pixel coordinates, in the tensor's own Y/X axes. A shape
       drawn on a downsampled level is scaled up by the client; the server never
       rescales geometry.
       
      .biopb.image.ROI roi = 5;
    • setRoi

      public RoiAnnotation.Builder setRoi(ROI.Builder builderForValue)
       Geometry in LEVEL-0 pixel coordinates, in the tensor's own Y/X axes. A shape
       drawn on a downsampled level is scaled up by the client; the server never
       rescales geometry.
       
      .biopb.image.ROI roi = 5;
    • mergeRoi

      public RoiAnnotation.Builder mergeRoi(ROI value)
       Geometry in LEVEL-0 pixel coordinates, in the tensor's own Y/X axes. A shape
       drawn on a downsampled level is scaled up by the client; the server never
       rescales geometry.
       
      .biopb.image.ROI roi = 5;
    • clearRoi

      public RoiAnnotation.Builder clearRoi()
       Geometry in LEVEL-0 pixel coordinates, in the tensor's own Y/X axes. A shape
       drawn on a downsampled level is scaled up by the client; the server never
       rescales geometry.
       
      .biopb.image.ROI roi = 5;
    • getRoiBuilder

      public ROI.Builder getRoiBuilder()
       Geometry in LEVEL-0 pixel coordinates, in the tensor's own Y/X axes. A shape
       drawn on a downsampled level is scaled up by the client; the server never
       rescales geometry.
       
      .biopb.image.ROI roi = 5;
    • getRoiOrBuilder

      public ROIOrBuilder getRoiOrBuilder()
       Geometry in LEVEL-0 pixel coordinates, in the tensor's own Y/X axes. A shape
       drawn on a downsampled level is scaled up by the client; the server never
       rescales geometry.
       
      .biopb.image.ROI roi = 5;
      Specified by:
      getRoiOrBuilder in interface RoiAnnotationOrBuilder
    • getPlaneCount

      public int getPlaneCount()
      Description copied from interface: RoiAnnotationOrBuilder
      map<uint32, uint32> plane = 12;
      Specified by:
      getPlaneCount in interface RoiAnnotationOrBuilder
    • containsPlane

      public boolean containsPlane(int key)
      map<uint32, uint32> plane = 12;
      Specified by:
      containsPlane in interface RoiAnnotationOrBuilder
    • getPlane

      @Deprecated public Map<Integer,Integer> getPlane()
      Deprecated.
      Use getPlaneMap() instead.
      Specified by:
      getPlane in interface RoiAnnotationOrBuilder
    • getPlaneMap

      public Map<Integer,Integer> getPlaneMap()
      map<uint32, uint32> plane = 12;
      Specified by:
      getPlaneMap in interface RoiAnnotationOrBuilder
    • getPlaneOrDefault

      public int getPlaneOrDefault(int key, int defaultValue)
      map<uint32, uint32> plane = 12;
      Specified by:
      getPlaneOrDefault in interface RoiAnnotationOrBuilder
    • getPlaneOrThrow

      public int getPlaneOrThrow(int key)
      map<uint32, uint32> plane = 12;
      Specified by:
      getPlaneOrThrow in interface RoiAnnotationOrBuilder
    • clearPlane

      public RoiAnnotation.Builder clearPlane()
    • removePlane

      public RoiAnnotation.Builder removePlane(int key)
      map<uint32, uint32> plane = 12;
    • getMutablePlane

      @Deprecated public Map<Integer,Integer> getMutablePlane()
      Deprecated.
      Use alternate mutation accessors instead.
    • putPlane

      public RoiAnnotation.Builder putPlane(int key, int value)
      map<uint32, uint32> plane = 12;
    • putAllPlane

      public RoiAnnotation.Builder putAllPlane(Map<Integer,Integer> values)
      map<uint32, uint32> plane = 12;
    • getPropsJson

      public String getPropsJson()
       Free-form client JSON (colour, score, author, ...). Opaque to the server.
       
      string props_json = 7;
      Specified by:
      getPropsJson in interface RoiAnnotationOrBuilder
      Returns:
      The propsJson.
    • getPropsJsonBytes

      public com.google.protobuf.ByteString getPropsJsonBytes()
       Free-form client JSON (colour, score, author, ...). Opaque to the server.
       
      string props_json = 7;
      Specified by:
      getPropsJsonBytes in interface RoiAnnotationOrBuilder
      Returns:
      The bytes for propsJson.
    • setPropsJson

      public RoiAnnotation.Builder setPropsJson(String value)
       Free-form client JSON (colour, score, author, ...). Opaque to the server.
       
      string props_json = 7;
      Parameters:
      value - The propsJson to set.
      Returns:
      This builder for chaining.
    • clearPropsJson

      public RoiAnnotation.Builder clearPropsJson()
       Free-form client JSON (colour, score, author, ...). Opaque to the server.
       
      string props_json = 7;
      Returns:
      This builder for chaining.
    • setPropsJsonBytes

      public RoiAnnotation.Builder setPropsJsonBytes(com.google.protobuf.ByteString value)
       Free-form client JSON (colour, score, author, ...). Opaque to the server.
       
      string props_json = 7;
      Parameters:
      value - The bytes for propsJson to set.
      Returns:
      This builder for chaining.
    • hasDrawnAgainstVersion

      public boolean hasDrawnAgainstVersion()
       The tensor's content_version when this annotation was written, or unset when
       the source could not claim one. A client compares it against the current
       descriptor to warn "the image changed since this was drawn" -- CONTENT
       staleness, as distinct from the tensor going away entirely.
       
      optional bytes drawn_against_version = 8;
      Specified by:
      hasDrawnAgainstVersion in interface RoiAnnotationOrBuilder
      Returns:
      Whether the drawnAgainstVersion field is set.
    • getDrawnAgainstVersion

      public com.google.protobuf.ByteString getDrawnAgainstVersion()
       The tensor's content_version when this annotation was written, or unset when
       the source could not claim one. A client compares it against the current
       descriptor to warn "the image changed since this was drawn" -- CONTENT
       staleness, as distinct from the tensor going away entirely.
       
      optional bytes drawn_against_version = 8;
      Specified by:
      getDrawnAgainstVersion in interface RoiAnnotationOrBuilder
      Returns:
      The drawnAgainstVersion.
    • setDrawnAgainstVersion

      public RoiAnnotation.Builder setDrawnAgainstVersion(com.google.protobuf.ByteString value)
       The tensor's content_version when this annotation was written, or unset when
       the source could not claim one. A client compares it against the current
       descriptor to warn "the image changed since this was drawn" -- CONTENT
       staleness, as distinct from the tensor going away entirely.
       
      optional bytes drawn_against_version = 8;
      Parameters:
      value - The drawnAgainstVersion to set.
      Returns:
      This builder for chaining.
    • clearDrawnAgainstVersion

      public RoiAnnotation.Builder clearDrawnAgainstVersion()
       The tensor's content_version when this annotation was written, or unset when
       the source could not claim one. A client compares it against the current
       descriptor to warn "the image changed since this was drawn" -- CONTENT
       staleness, as distinct from the tensor going away entirely.
       
      optional bytes drawn_against_version = 8;
      Returns:
      This builder for chaining.
    • getRev

      public long getRev()
       Server-assigned, bumped on every write. Echo the value you read back in a
       put with check_rev set to make the write conditional.
       
      int64 rev = 9;
      Specified by:
      getRev in interface RoiAnnotationOrBuilder
      Returns:
      The rev.
    • setRev

      public RoiAnnotation.Builder setRev(long value)
       Server-assigned, bumped on every write. Echo the value you read back in a
       put with check_rev set to make the write conditional.
       
      int64 rev = 9;
      Parameters:
      value - The rev to set.
      Returns:
      This builder for chaining.
    • clearRev

      public RoiAnnotation.Builder clearRev()
       Server-assigned, bumped on every write. Echo the value you read back in a
       put with check_rev set to make the write conditional.
       
      int64 rev = 9;
      Returns:
      This builder for chaining.
    • getCreatedAtUnixMs

      public long getCreatedAtUnixMs()
      int64 created_at_unix_ms = 10;
      Specified by:
      getCreatedAtUnixMs in interface RoiAnnotationOrBuilder
      Returns:
      The createdAtUnixMs.
    • setCreatedAtUnixMs

      public RoiAnnotation.Builder setCreatedAtUnixMs(long value)
      int64 created_at_unix_ms = 10;
      Parameters:
      value - The createdAtUnixMs to set.
      Returns:
      This builder for chaining.
    • clearCreatedAtUnixMs

      public RoiAnnotation.Builder clearCreatedAtUnixMs()
      int64 created_at_unix_ms = 10;
      Returns:
      This builder for chaining.
    • getUpdatedAtUnixMs

      public long getUpdatedAtUnixMs()
      int64 updated_at_unix_ms = 11;
      Specified by:
      getUpdatedAtUnixMs in interface RoiAnnotationOrBuilder
      Returns:
      The updatedAtUnixMs.
    • setUpdatedAtUnixMs

      public RoiAnnotation.Builder setUpdatedAtUnixMs(long value)
      int64 updated_at_unix_ms = 11;
      Parameters:
      value - The updatedAtUnixMs to set.
      Returns:
      This builder for chaining.
    • clearUpdatedAtUnixMs

      public RoiAnnotation.Builder clearUpdatedAtUnixMs()
      int64 updated_at_unix_ms = 11;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final RoiAnnotation.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>
    • mergeUnknownFields

      public final RoiAnnotation.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RoiAnnotation.Builder>