uk.ac.sussex.gdsc.smlm.data.config.PSFProtos Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gdsc-smlm Show documentation
Show all versions of gdsc-smlm Show documentation
Genome Damage and Stability Centre SMLM Package
Software for single molecule localisation microscopy (SMLM)
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: uk/ac/sussex/gdsc/smlm/data/config/psf.proto
package uk.ac.sussex.gdsc.smlm.data.config;
public final class PSFProtos {
private PSFProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
*
* The type of Point Spread Function (PSF)
*
*
* Protobuf enum {@code uk.ac.sussex.gdsc.smlm.data.config.PSFType}
*/
public enum PSFType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Not available. Only the standard parameters are supported.
*
*
* PSF_TYPE_NA = 0;
*/
PSF_TYPE_NA(0),
/**
*
* A 2D Gaussian with the same standard deviation in X and Y dimensions
*
*
* ONE_AXIS_GAUSSIAN_2D = 1;
*/
ONE_AXIS_GAUSSIAN_2D(1),
/**
*
* A 2D Gaussian with standard deviations in X and Y dimensions
*
*
* TWO_AXIS_GAUSSIAN_2D = 2;
*/
TWO_AXIS_GAUSSIAN_2D(2),
/**
*
* A 2D Gaussian with standard deviations in X and Y dimensions and a rotation angle
*
*
* TWO_AXIS_AND_THETA_GAUSSIAN_2D = 3;
*/
TWO_AXIS_AND_THETA_GAUSSIAN_2D(3),
/**
*
* A 2D Gaussian with standard deviations in X and Y dimensions defined by the z-depth
*
*
* ASTIGMATIC_GAUSSIAN_2D = 4;
*/
ASTIGMATIC_GAUSSIAN_2D(4),
/**
*
* A custom point spread function (PSF)
*
*
* CUSTOM = 5;
*/
CUSTOM(5),
UNRECOGNIZED(-1),
;
/**
*
* Not available. Only the standard parameters are supported.
*
*
* PSF_TYPE_NA = 0;
*/
public static final int PSF_TYPE_NA_VALUE = 0;
/**
*
* A 2D Gaussian with the same standard deviation in X and Y dimensions
*
*
* ONE_AXIS_GAUSSIAN_2D = 1;
*/
public static final int ONE_AXIS_GAUSSIAN_2D_VALUE = 1;
/**
*
* A 2D Gaussian with standard deviations in X and Y dimensions
*
*
* TWO_AXIS_GAUSSIAN_2D = 2;
*/
public static final int TWO_AXIS_GAUSSIAN_2D_VALUE = 2;
/**
*
* A 2D Gaussian with standard deviations in X and Y dimensions and a rotation angle
*
*
* TWO_AXIS_AND_THETA_GAUSSIAN_2D = 3;
*/
public static final int TWO_AXIS_AND_THETA_GAUSSIAN_2D_VALUE = 3;
/**
*
* A 2D Gaussian with standard deviations in X and Y dimensions defined by the z-depth
*
*
* ASTIGMATIC_GAUSSIAN_2D = 4;
*/
public static final int ASTIGMATIC_GAUSSIAN_2D_VALUE = 4;
/**
*
* A custom point spread function (PSF)
*
*
* CUSTOM = 5;
*/
public static final int CUSTOM_VALUE = 5;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PSFType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static PSFType forNumber(int value) {
switch (value) {
case 0: return PSF_TYPE_NA;
case 1: return ONE_AXIS_GAUSSIAN_2D;
case 2: return TWO_AXIS_GAUSSIAN_2D;
case 3: return TWO_AXIS_AND_THETA_GAUSSIAN_2D;
case 4: return ASTIGMATIC_GAUSSIAN_2D;
case 5: return CUSTOM;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
PSFType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public PSFType findValueByNumber(int number) {
return PSFType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.getDescriptor().getEnumTypes().get(0);
}
private static final PSFType[] VALUES = values();
public static PSFType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private PSFType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:uk.ac.sussex.gdsc.smlm.data.config.PSFType)
}
/**
*
* Define the type of units supported in the Point Spread Function (PSF)
*
*
* Protobuf enum {@code uk.ac.sussex.gdsc.smlm.data.config.PSFParameterUnit}
*/
public enum PSFParameterUnit
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Not available
*
*
* PSF_PARAMETER_UNIT_NA = 0;
*/
PSF_PARAMETER_UNIT_NA(0),
/**
*
* The parameter describes a distance
*
*
* DISTANCE = 1;
*/
DISTANCE(1),
/**
*
* The parameter describes an intensity
*
*
* INTENSITY = 2;
*/
INTENSITY(2),
/**
*
* The parameter describes an angle
*
*
* ANGLE = 3;
*/
ANGLE(3),
UNRECOGNIZED(-1),
;
/**
*
* Not available
*
*
* PSF_PARAMETER_UNIT_NA = 0;
*/
public static final int PSF_PARAMETER_UNIT_NA_VALUE = 0;
/**
*
* The parameter describes a distance
*
*
* DISTANCE = 1;
*/
public static final int DISTANCE_VALUE = 1;
/**
*
* The parameter describes an intensity
*
*
* INTENSITY = 2;
*/
public static final int INTENSITY_VALUE = 2;
/**
*
* The parameter describes an angle
*
*
* ANGLE = 3;
*/
public static final int ANGLE_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PSFParameterUnit valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static PSFParameterUnit forNumber(int value) {
switch (value) {
case 0: return PSF_PARAMETER_UNIT_NA;
case 1: return DISTANCE;
case 2: return INTENSITY;
case 3: return ANGLE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
PSFParameterUnit> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public PSFParameterUnit findValueByNumber(int number) {
return PSFParameterUnit.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.getDescriptor().getEnumTypes().get(1);
}
private static final PSFParameterUnit[] VALUES = values();
public static PSFParameterUnit valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private PSFParameterUnit(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:uk.ac.sussex.gdsc.smlm.data.config.PSFParameterUnit)
}
public interface PSFParameterOrBuilder extends
// @@protoc_insertion_point(interface_extends:uk.ac.sussex.gdsc.smlm.data.config.PSFParameter)
com.google.protobuf.MessageOrBuilder {
/**
* string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
* string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* .uk.ac.sussex.gdsc.smlm.data.config.PSFParameterUnit unit = 2;
* @return The enum numeric value on the wire for unit.
*/
int getUnitValue();
/**
* .uk.ac.sussex.gdsc.smlm.data.config.PSFParameterUnit unit = 2;
* @return The unit.
*/
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit getUnit();
/**
* double value = 3;
* @return The value.
*/
double getValue();
}
/**
*
* Define the additional parameters of the Point Spread Function (PSF)
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.PSFParameter}
*/
public static final class PSFParameter extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:uk.ac.sussex.gdsc.smlm.data.config.PSFParameter)
PSFParameterOrBuilder {
private static final long serialVersionUID = 0L;
// Use PSFParameter.newBuilder() to construct.
private PSFParameter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PSFParameter() {
name_ = "";
unit_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PSFParameter();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSFParameter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSFParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
* string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
* string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int UNIT_FIELD_NUMBER = 2;
private int unit_ = 0;
/**
* .uk.ac.sussex.gdsc.smlm.data.config.PSFParameterUnit unit = 2;
* @return The enum numeric value on the wire for unit.
*/
@java.lang.Override public int getUnitValue() {
return unit_;
}
/**
* .uk.ac.sussex.gdsc.smlm.data.config.PSFParameterUnit unit = 2;
* @return The unit.
*/
@java.lang.Override public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit getUnit() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit result = uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit.forNumber(unit_);
return result == null ? uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit.UNRECOGNIZED : result;
}
public static final int VALUE_FIELD_NUMBER = 3;
private double value_ = 0D;
/**
* double value = 3;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (unit_ != uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit.PSF_PARAMETER_UNIT_NA.getNumber()) {
output.writeEnum(2, unit_);
}
if (java.lang.Double.doubleToRawLongBits(value_) != 0) {
output.writeDouble(3, value_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (unit_ != uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit.PSF_PARAMETER_UNIT_NA.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, unit_);
}
if (java.lang.Double.doubleToRawLongBits(value_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, value_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter)) {
return super.equals(obj);
}
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter other = (uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter) obj;
if (!getName()
.equals(other.getName())) return false;
if (unit_ != other.unit_) return false;
if (java.lang.Double.doubleToLongBits(getValue())
!= java.lang.Double.doubleToLongBits(
other.getValue())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + UNIT_FIELD_NUMBER;
hash = (53 * hash) + unit_;
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getValue()));
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Define the additional parameters of the Point Spread Function (PSF)
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.PSFParameter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:uk.ac.sussex.gdsc.smlm.data.config.PSFParameter)
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSFParameter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSFParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.Builder.class);
}
// Construct using uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
unit_ = 0;
value_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSFParameter_descriptor;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter getDefaultInstanceForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.getDefaultInstance();
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter build() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter buildPartial() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter result = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.unit_ = unit_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.value_ = value_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter) {
return mergeFrom((uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter other) {
if (other == uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.unit_ != 0) {
setUnitValue(other.getUnitValue());
}
if (other.getValue() != 0D) {
setValue(other.getValue());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
unit_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 25: {
value_ = input.readDouble();
bitField0_ |= 0x00000004;
break;
} // case 25
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int unit_ = 0;
/**
* .uk.ac.sussex.gdsc.smlm.data.config.PSFParameterUnit unit = 2;
* @return The enum numeric value on the wire for unit.
*/
@java.lang.Override public int getUnitValue() {
return unit_;
}
/**
* .uk.ac.sussex.gdsc.smlm.data.config.PSFParameterUnit unit = 2;
* @param value The enum numeric value on the wire for unit to set.
* @return This builder for chaining.
*/
public Builder setUnitValue(int value) {
unit_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* .uk.ac.sussex.gdsc.smlm.data.config.PSFParameterUnit unit = 2;
* @return The unit.
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit getUnit() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit result = uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit.forNumber(unit_);
return result == null ? uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit.UNRECOGNIZED : result;
}
/**
* .uk.ac.sussex.gdsc.smlm.data.config.PSFParameterUnit unit = 2;
* @param value The unit to set.
* @return This builder for chaining.
*/
public Builder setUnit(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterUnit value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
unit_ = value.getNumber();
onChanged();
return this;
}
/**
* .uk.ac.sussex.gdsc.smlm.data.config.PSFParameterUnit unit = 2;
* @return This builder for chaining.
*/
public Builder clearUnit() {
bitField0_ = (bitField0_ & ~0x00000002);
unit_ = 0;
onChanged();
return this;
}
private double value_ ;
/**
* double value = 3;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
/**
* double value = 3;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(double value) {
value_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* double value = 3;
* @return This builder for chaining.
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000004);
value_ = 0D;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:uk.ac.sussex.gdsc.smlm.data.config.PSFParameter)
}
// @@protoc_insertion_point(class_scope:uk.ac.sussex.gdsc.smlm.data.config.PSFParameter)
private static final uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter();
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PSFParameter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AstigmatismModelOrBuilder extends
// @@protoc_insertion_point(interface_extends:uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel)
com.google.protobuf.MessageOrBuilder {
/**
*
* The gamma parameter (half the distance between the focal planes).
* Note that a positive gamma puts the focal plane for the X-dimension above the
* z-centre (positive Z) and the focal plane for the Y-dimension below the z-centre
* (negative Z). If gamma is negative then the orientation of the focal planes of X
* and Y are reversed.
*
*
* double gamma = 1;
* @return The gamma.
*/
double getGamma();
/**
*
* Depth-of-focus. This is the z-distance where the width is enlarged by
* a factor of sqrt(2) compared to the width in the focal plane.
*
*
* double d = 2;
* @return The d.
*/
double getD();
/**
*
* Empirical constant A for the x-astigmatism of the PSF
*
*
* double ax = 3;
* @return The ax.
*/
double getAx();
/**
*
* Empirical constant B for the x-astigmatism of the PSF
*
*
* double bx = 4;
* @return The bx.
*/
double getBx();
/**
*
* Empirical constant A for the y-astigmatism of the PSF
*
*
* double ay = 5;
* @return The ay.
*/
double getAy();
/**
*
* Empirical constant B for the y-astigmatism of the PSF
*
*
* double by = 6;
* @return The by.
*/
double getBy();
/**
*
* The width (standard deviation) in the x-focal plane
*
*
* double s0x = 7;
* @return The s0x.
*/
double getS0X();
/**
*
* The width (standard deviation) in the y-focal plane
*
*
* double s0y = 8;
* @return The s0y.
*/
double getS0Y();
/**
*
* The input distance unit for z (μm, nm)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit z_distance_unit = 9;
* @return The enum numeric value on the wire for zDistanceUnit.
*/
int getZDistanceUnitValue();
/**
*
* The input distance unit for z (μm, nm)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit z_distance_unit = 9;
* @return The zDistanceUnit.
*/
uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit getZDistanceUnit();
/**
*
* The output distance unit for s (may be pixels)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit s_distance_unit = 10;
* @return The enum numeric value on the wire for sDistanceUnit.
*/
int getSDistanceUnitValue();
/**
*
* The output distance unit for s (may be pixels)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit s_distance_unit = 10;
* @return The sDistanceUnit.
*/
uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit getSDistanceUnit();
/**
*
* The pixel size used to create the model. A model is only valid when used
* with the same light path (objective, magnification, camera sensor). The entire
* light path is not recorded but the pixel size is stored. This can be used as
* a quick validation of matching calibration, or to convert output width in pixels.
*
*
* double nm_per_pixel = 11;
* @return The nmPerPixel.
*/
double getNmPerPixel();
/**
*
* The z-centre. This is assumed to be zero but can be used to store the results
* of curve fitting where the z-centre is a parameter.
*
*
* double z0 = 12;
* @return The z0.
*/
double getZ0();
}
/**
*
* Define the Gaussian 2D Astigmatism model. This maps a z-coordinate into a Gaussian width
* for the X and Y dimensions.
* Uses the model described by Smith, et al (2010) based on Holtzer, et al (2007).
* Smith et al, (2010). Fast, single-molecule localisation that achieves theoretically
* minimum uncertainty. Nature Methods 7, 373-375 (supplementary note).
* Holtzer, L., Meckel, T. & Schmidt, T. Nanometric three-dimensional tracking of individual
* quantum dots in cells. Applied Physics Letters 90, 1–3 (2007).
* For X/Y dimension: z' = (z-/+gamma); s = s0 * sqrt(1 + (z'^2 + A * z'^3 + B * z'^4) / d^2).
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel}
*/
public static final class AstigmatismModel extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel)
AstigmatismModelOrBuilder {
private static final long serialVersionUID = 0L;
// Use AstigmatismModel.newBuilder() to construct.
private AstigmatismModel(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AstigmatismModel() {
zDistanceUnit_ = 0;
sDistanceUnit_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AstigmatismModel();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModel_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModel_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel.Builder.class);
}
public static final int GAMMA_FIELD_NUMBER = 1;
private double gamma_ = 0D;
/**
*
* The gamma parameter (half the distance between the focal planes).
* Note that a positive gamma puts the focal plane for the X-dimension above the
* z-centre (positive Z) and the focal plane for the Y-dimension below the z-centre
* (negative Z). If gamma is negative then the orientation of the focal planes of X
* and Y are reversed.
*
*
* double gamma = 1;
* @return The gamma.
*/
@java.lang.Override
public double getGamma() {
return gamma_;
}
public static final int D_FIELD_NUMBER = 2;
private double d_ = 0D;
/**
*
* Depth-of-focus. This is the z-distance where the width is enlarged by
* a factor of sqrt(2) compared to the width in the focal plane.
*
*
* double d = 2;
* @return The d.
*/
@java.lang.Override
public double getD() {
return d_;
}
public static final int AX_FIELD_NUMBER = 3;
private double ax_ = 0D;
/**
*
* Empirical constant A for the x-astigmatism of the PSF
*
*
* double ax = 3;
* @return The ax.
*/
@java.lang.Override
public double getAx() {
return ax_;
}
public static final int BX_FIELD_NUMBER = 4;
private double bx_ = 0D;
/**
*
* Empirical constant B for the x-astigmatism of the PSF
*
*
* double bx = 4;
* @return The bx.
*/
@java.lang.Override
public double getBx() {
return bx_;
}
public static final int AY_FIELD_NUMBER = 5;
private double ay_ = 0D;
/**
*
* Empirical constant A for the y-astigmatism of the PSF
*
*
* double ay = 5;
* @return The ay.
*/
@java.lang.Override
public double getAy() {
return ay_;
}
public static final int BY_FIELD_NUMBER = 6;
private double by_ = 0D;
/**
*
* Empirical constant B for the y-astigmatism of the PSF
*
*
* double by = 6;
* @return The by.
*/
@java.lang.Override
public double getBy() {
return by_;
}
public static final int S0X_FIELD_NUMBER = 7;
private double s0X_ = 0D;
/**
*
* The width (standard deviation) in the x-focal plane
*
*
* double s0x = 7;
* @return The s0x.
*/
@java.lang.Override
public double getS0X() {
return s0X_;
}
public static final int S0Y_FIELD_NUMBER = 8;
private double s0Y_ = 0D;
/**
*
* The width (standard deviation) in the y-focal plane
*
*
* double s0y = 8;
* @return The s0y.
*/
@java.lang.Override
public double getS0Y() {
return s0Y_;
}
public static final int Z_DISTANCE_UNIT_FIELD_NUMBER = 9;
private int zDistanceUnit_ = 0;
/**
*
* The input distance unit for z (μm, nm)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit z_distance_unit = 9;
* @return The enum numeric value on the wire for zDistanceUnit.
*/
@java.lang.Override public int getZDistanceUnitValue() {
return zDistanceUnit_;
}
/**
*
* The input distance unit for z (μm, nm)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit z_distance_unit = 9;
* @return The zDistanceUnit.
*/
@java.lang.Override public uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit getZDistanceUnit() {
uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit result = uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.forNumber(zDistanceUnit_);
return result == null ? uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.UNRECOGNIZED : result;
}
public static final int S_DISTANCE_UNIT_FIELD_NUMBER = 10;
private int sDistanceUnit_ = 0;
/**
*
* The output distance unit for s (may be pixels)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit s_distance_unit = 10;
* @return The enum numeric value on the wire for sDistanceUnit.
*/
@java.lang.Override public int getSDistanceUnitValue() {
return sDistanceUnit_;
}
/**
*
* The output distance unit for s (may be pixels)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit s_distance_unit = 10;
* @return The sDistanceUnit.
*/
@java.lang.Override public uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit getSDistanceUnit() {
uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit result = uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.forNumber(sDistanceUnit_);
return result == null ? uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.UNRECOGNIZED : result;
}
public static final int NM_PER_PIXEL_FIELD_NUMBER = 11;
private double nmPerPixel_ = 0D;
/**
*
* The pixel size used to create the model. A model is only valid when used
* with the same light path (objective, magnification, camera sensor). The entire
* light path is not recorded but the pixel size is stored. This can be used as
* a quick validation of matching calibration, or to convert output width in pixels.
*
*
* double nm_per_pixel = 11;
* @return The nmPerPixel.
*/
@java.lang.Override
public double getNmPerPixel() {
return nmPerPixel_;
}
public static final int Z0_FIELD_NUMBER = 12;
private double z0_ = 0D;
/**
*
* The z-centre. This is assumed to be zero but can be used to store the results
* of curve fitting where the z-centre is a parameter.
*
*
* double z0 = 12;
* @return The z0.
*/
@java.lang.Override
public double getZ0() {
return z0_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (java.lang.Double.doubleToRawLongBits(gamma_) != 0) {
output.writeDouble(1, gamma_);
}
if (java.lang.Double.doubleToRawLongBits(d_) != 0) {
output.writeDouble(2, d_);
}
if (java.lang.Double.doubleToRawLongBits(ax_) != 0) {
output.writeDouble(3, ax_);
}
if (java.lang.Double.doubleToRawLongBits(bx_) != 0) {
output.writeDouble(4, bx_);
}
if (java.lang.Double.doubleToRawLongBits(ay_) != 0) {
output.writeDouble(5, ay_);
}
if (java.lang.Double.doubleToRawLongBits(by_) != 0) {
output.writeDouble(6, by_);
}
if (java.lang.Double.doubleToRawLongBits(s0X_) != 0) {
output.writeDouble(7, s0X_);
}
if (java.lang.Double.doubleToRawLongBits(s0Y_) != 0) {
output.writeDouble(8, s0Y_);
}
if (zDistanceUnit_ != uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.DISTANCE_UNIT_NA.getNumber()) {
output.writeEnum(9, zDistanceUnit_);
}
if (sDistanceUnit_ != uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.DISTANCE_UNIT_NA.getNumber()) {
output.writeEnum(10, sDistanceUnit_);
}
if (java.lang.Double.doubleToRawLongBits(nmPerPixel_) != 0) {
output.writeDouble(11, nmPerPixel_);
}
if (java.lang.Double.doubleToRawLongBits(z0_) != 0) {
output.writeDouble(12, z0_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Double.doubleToRawLongBits(gamma_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, gamma_);
}
if (java.lang.Double.doubleToRawLongBits(d_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, d_);
}
if (java.lang.Double.doubleToRawLongBits(ax_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, ax_);
}
if (java.lang.Double.doubleToRawLongBits(bx_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, bx_);
}
if (java.lang.Double.doubleToRawLongBits(ay_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(5, ay_);
}
if (java.lang.Double.doubleToRawLongBits(by_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(6, by_);
}
if (java.lang.Double.doubleToRawLongBits(s0X_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(7, s0X_);
}
if (java.lang.Double.doubleToRawLongBits(s0Y_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(8, s0Y_);
}
if (zDistanceUnit_ != uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.DISTANCE_UNIT_NA.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(9, zDistanceUnit_);
}
if (sDistanceUnit_ != uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.DISTANCE_UNIT_NA.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(10, sDistanceUnit_);
}
if (java.lang.Double.doubleToRawLongBits(nmPerPixel_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(11, nmPerPixel_);
}
if (java.lang.Double.doubleToRawLongBits(z0_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(12, z0_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel)) {
return super.equals(obj);
}
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel other = (uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel) obj;
if (java.lang.Double.doubleToLongBits(getGamma())
!= java.lang.Double.doubleToLongBits(
other.getGamma())) return false;
if (java.lang.Double.doubleToLongBits(getD())
!= java.lang.Double.doubleToLongBits(
other.getD())) return false;
if (java.lang.Double.doubleToLongBits(getAx())
!= java.lang.Double.doubleToLongBits(
other.getAx())) return false;
if (java.lang.Double.doubleToLongBits(getBx())
!= java.lang.Double.doubleToLongBits(
other.getBx())) return false;
if (java.lang.Double.doubleToLongBits(getAy())
!= java.lang.Double.doubleToLongBits(
other.getAy())) return false;
if (java.lang.Double.doubleToLongBits(getBy())
!= java.lang.Double.doubleToLongBits(
other.getBy())) return false;
if (java.lang.Double.doubleToLongBits(getS0X())
!= java.lang.Double.doubleToLongBits(
other.getS0X())) return false;
if (java.lang.Double.doubleToLongBits(getS0Y())
!= java.lang.Double.doubleToLongBits(
other.getS0Y())) return false;
if (zDistanceUnit_ != other.zDistanceUnit_) return false;
if (sDistanceUnit_ != other.sDistanceUnit_) return false;
if (java.lang.Double.doubleToLongBits(getNmPerPixel())
!= java.lang.Double.doubleToLongBits(
other.getNmPerPixel())) return false;
if (java.lang.Double.doubleToLongBits(getZ0())
!= java.lang.Double.doubleToLongBits(
other.getZ0())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + GAMMA_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getGamma()));
hash = (37 * hash) + D_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getD()));
hash = (37 * hash) + AX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getAx()));
hash = (37 * hash) + BX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getBx()));
hash = (37 * hash) + AY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getAy()));
hash = (37 * hash) + BY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getBy()));
hash = (37 * hash) + S0X_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getS0X()));
hash = (37 * hash) + S0Y_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getS0Y()));
hash = (37 * hash) + Z_DISTANCE_UNIT_FIELD_NUMBER;
hash = (53 * hash) + zDistanceUnit_;
hash = (37 * hash) + S_DISTANCE_UNIT_FIELD_NUMBER;
hash = (53 * hash) + sDistanceUnit_;
hash = (37 * hash) + NM_PER_PIXEL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getNmPerPixel()));
hash = (37 * hash) + Z0_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getZ0()));
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Define the Gaussian 2D Astigmatism model. This maps a z-coordinate into a Gaussian width
* for the X and Y dimensions.
* Uses the model described by Smith, et al (2010) based on Holtzer, et al (2007).
* Smith et al, (2010). Fast, single-molecule localisation that achieves theoretically
* minimum uncertainty. Nature Methods 7, 373-375 (supplementary note).
* Holtzer, L., Meckel, T. & Schmidt, T. Nanometric three-dimensional tracking of individual
* quantum dots in cells. Applied Physics Letters 90, 1–3 (2007).
* For X/Y dimension: z' = (z-/+gamma); s = s0 * sqrt(1 + (z'^2 + A * z'^3 + B * z'^4) / d^2).
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel)
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModel_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModel_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel.Builder.class);
}
// Construct using uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
gamma_ = 0D;
d_ = 0D;
ax_ = 0D;
bx_ = 0D;
ay_ = 0D;
by_ = 0D;
s0X_ = 0D;
s0Y_ = 0D;
zDistanceUnit_ = 0;
sDistanceUnit_ = 0;
nmPerPixel_ = 0D;
z0_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModel_descriptor;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel getDefaultInstanceForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel.getDefaultInstance();
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel build() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel buildPartial() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel result = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.gamma_ = gamma_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.d_ = d_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.ax_ = ax_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.bx_ = bx_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.ay_ = ay_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.by_ = by_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.s0X_ = s0X_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.s0Y_ = s0Y_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.zDistanceUnit_ = zDistanceUnit_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.sDistanceUnit_ = sDistanceUnit_;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.nmPerPixel_ = nmPerPixel_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.z0_ = z0_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel) {
return mergeFrom((uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel other) {
if (other == uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel.getDefaultInstance()) return this;
if (other.getGamma() != 0D) {
setGamma(other.getGamma());
}
if (other.getD() != 0D) {
setD(other.getD());
}
if (other.getAx() != 0D) {
setAx(other.getAx());
}
if (other.getBx() != 0D) {
setBx(other.getBx());
}
if (other.getAy() != 0D) {
setAy(other.getAy());
}
if (other.getBy() != 0D) {
setBy(other.getBy());
}
if (other.getS0X() != 0D) {
setS0X(other.getS0X());
}
if (other.getS0Y() != 0D) {
setS0Y(other.getS0Y());
}
if (other.zDistanceUnit_ != 0) {
setZDistanceUnitValue(other.getZDistanceUnitValue());
}
if (other.sDistanceUnit_ != 0) {
setSDistanceUnitValue(other.getSDistanceUnitValue());
}
if (other.getNmPerPixel() != 0D) {
setNmPerPixel(other.getNmPerPixel());
}
if (other.getZ0() != 0D) {
setZ0(other.getZ0());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 9: {
gamma_ = input.readDouble();
bitField0_ |= 0x00000001;
break;
} // case 9
case 17: {
d_ = input.readDouble();
bitField0_ |= 0x00000002;
break;
} // case 17
case 25: {
ax_ = input.readDouble();
bitField0_ |= 0x00000004;
break;
} // case 25
case 33: {
bx_ = input.readDouble();
bitField0_ |= 0x00000008;
break;
} // case 33
case 41: {
ay_ = input.readDouble();
bitField0_ |= 0x00000010;
break;
} // case 41
case 49: {
by_ = input.readDouble();
bitField0_ |= 0x00000020;
break;
} // case 49
case 57: {
s0X_ = input.readDouble();
bitField0_ |= 0x00000040;
break;
} // case 57
case 65: {
s0Y_ = input.readDouble();
bitField0_ |= 0x00000080;
break;
} // case 65
case 72: {
zDistanceUnit_ = input.readEnum();
bitField0_ |= 0x00000100;
break;
} // case 72
case 80: {
sDistanceUnit_ = input.readEnum();
bitField0_ |= 0x00000200;
break;
} // case 80
case 89: {
nmPerPixel_ = input.readDouble();
bitField0_ |= 0x00000400;
break;
} // case 89
case 97: {
z0_ = input.readDouble();
bitField0_ |= 0x00000800;
break;
} // case 97
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private double gamma_ ;
/**
*
* The gamma parameter (half the distance between the focal planes).
* Note that a positive gamma puts the focal plane for the X-dimension above the
* z-centre (positive Z) and the focal plane for the Y-dimension below the z-centre
* (negative Z). If gamma is negative then the orientation of the focal planes of X
* and Y are reversed.
*
*
* double gamma = 1;
* @return The gamma.
*/
@java.lang.Override
public double getGamma() {
return gamma_;
}
/**
*
* The gamma parameter (half the distance between the focal planes).
* Note that a positive gamma puts the focal plane for the X-dimension above the
* z-centre (positive Z) and the focal plane for the Y-dimension below the z-centre
* (negative Z). If gamma is negative then the orientation of the focal planes of X
* and Y are reversed.
*
*
* double gamma = 1;
* @param value The gamma to set.
* @return This builder for chaining.
*/
public Builder setGamma(double value) {
gamma_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The gamma parameter (half the distance between the focal planes).
* Note that a positive gamma puts the focal plane for the X-dimension above the
* z-centre (positive Z) and the focal plane for the Y-dimension below the z-centre
* (negative Z). If gamma is negative then the orientation of the focal planes of X
* and Y are reversed.
*
*
* double gamma = 1;
* @return This builder for chaining.
*/
public Builder clearGamma() {
bitField0_ = (bitField0_ & ~0x00000001);
gamma_ = 0D;
onChanged();
return this;
}
private double d_ ;
/**
*
* Depth-of-focus. This is the z-distance where the width is enlarged by
* a factor of sqrt(2) compared to the width in the focal plane.
*
*
* double d = 2;
* @return The d.
*/
@java.lang.Override
public double getD() {
return d_;
}
/**
*
* Depth-of-focus. This is the z-distance where the width is enlarged by
* a factor of sqrt(2) compared to the width in the focal plane.
*
*
* double d = 2;
* @param value The d to set.
* @return This builder for chaining.
*/
public Builder setD(double value) {
d_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Depth-of-focus. This is the z-distance where the width is enlarged by
* a factor of sqrt(2) compared to the width in the focal plane.
*
*
* double d = 2;
* @return This builder for chaining.
*/
public Builder clearD() {
bitField0_ = (bitField0_ & ~0x00000002);
d_ = 0D;
onChanged();
return this;
}
private double ax_ ;
/**
*
* Empirical constant A for the x-astigmatism of the PSF
*
*
* double ax = 3;
* @return The ax.
*/
@java.lang.Override
public double getAx() {
return ax_;
}
/**
*
* Empirical constant A for the x-astigmatism of the PSF
*
*
* double ax = 3;
* @param value The ax to set.
* @return This builder for chaining.
*/
public Builder setAx(double value) {
ax_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Empirical constant A for the x-astigmatism of the PSF
*
*
* double ax = 3;
* @return This builder for chaining.
*/
public Builder clearAx() {
bitField0_ = (bitField0_ & ~0x00000004);
ax_ = 0D;
onChanged();
return this;
}
private double bx_ ;
/**
*
* Empirical constant B for the x-astigmatism of the PSF
*
*
* double bx = 4;
* @return The bx.
*/
@java.lang.Override
public double getBx() {
return bx_;
}
/**
*
* Empirical constant B for the x-astigmatism of the PSF
*
*
* double bx = 4;
* @param value The bx to set.
* @return This builder for chaining.
*/
public Builder setBx(double value) {
bx_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Empirical constant B for the x-astigmatism of the PSF
*
*
* double bx = 4;
* @return This builder for chaining.
*/
public Builder clearBx() {
bitField0_ = (bitField0_ & ~0x00000008);
bx_ = 0D;
onChanged();
return this;
}
private double ay_ ;
/**
*
* Empirical constant A for the y-astigmatism of the PSF
*
*
* double ay = 5;
* @return The ay.
*/
@java.lang.Override
public double getAy() {
return ay_;
}
/**
*
* Empirical constant A for the y-astigmatism of the PSF
*
*
* double ay = 5;
* @param value The ay to set.
* @return This builder for chaining.
*/
public Builder setAy(double value) {
ay_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Empirical constant A for the y-astigmatism of the PSF
*
*
* double ay = 5;
* @return This builder for chaining.
*/
public Builder clearAy() {
bitField0_ = (bitField0_ & ~0x00000010);
ay_ = 0D;
onChanged();
return this;
}
private double by_ ;
/**
*
* Empirical constant B for the y-astigmatism of the PSF
*
*
* double by = 6;
* @return The by.
*/
@java.lang.Override
public double getBy() {
return by_;
}
/**
*
* Empirical constant B for the y-astigmatism of the PSF
*
*
* double by = 6;
* @param value The by to set.
* @return This builder for chaining.
*/
public Builder setBy(double value) {
by_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Empirical constant B for the y-astigmatism of the PSF
*
*
* double by = 6;
* @return This builder for chaining.
*/
public Builder clearBy() {
bitField0_ = (bitField0_ & ~0x00000020);
by_ = 0D;
onChanged();
return this;
}
private double s0X_ ;
/**
*
* The width (standard deviation) in the x-focal plane
*
*
* double s0x = 7;
* @return The s0x.
*/
@java.lang.Override
public double getS0X() {
return s0X_;
}
/**
*
* The width (standard deviation) in the x-focal plane
*
*
* double s0x = 7;
* @param value The s0x to set.
* @return This builder for chaining.
*/
public Builder setS0X(double value) {
s0X_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* The width (standard deviation) in the x-focal plane
*
*
* double s0x = 7;
* @return This builder for chaining.
*/
public Builder clearS0X() {
bitField0_ = (bitField0_ & ~0x00000040);
s0X_ = 0D;
onChanged();
return this;
}
private double s0Y_ ;
/**
*
* The width (standard deviation) in the y-focal plane
*
*
* double s0y = 8;
* @return The s0y.
*/
@java.lang.Override
public double getS0Y() {
return s0Y_;
}
/**
*
* The width (standard deviation) in the y-focal plane
*
*
* double s0y = 8;
* @param value The s0y to set.
* @return This builder for chaining.
*/
public Builder setS0Y(double value) {
s0Y_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* The width (standard deviation) in the y-focal plane
*
*
* double s0y = 8;
* @return This builder for chaining.
*/
public Builder clearS0Y() {
bitField0_ = (bitField0_ & ~0x00000080);
s0Y_ = 0D;
onChanged();
return this;
}
private int zDistanceUnit_ = 0;
/**
*
* The input distance unit for z (μm, nm)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit z_distance_unit = 9;
* @return The enum numeric value on the wire for zDistanceUnit.
*/
@java.lang.Override public int getZDistanceUnitValue() {
return zDistanceUnit_;
}
/**
*
* The input distance unit for z (μm, nm)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit z_distance_unit = 9;
* @param value The enum numeric value on the wire for zDistanceUnit to set.
* @return This builder for chaining.
*/
public Builder setZDistanceUnitValue(int value) {
zDistanceUnit_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* The input distance unit for z (μm, nm)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit z_distance_unit = 9;
* @return The zDistanceUnit.
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit getZDistanceUnit() {
uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit result = uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.forNumber(zDistanceUnit_);
return result == null ? uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.UNRECOGNIZED : result;
}
/**
*
* The input distance unit for z (μm, nm)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit z_distance_unit = 9;
* @param value The zDistanceUnit to set.
* @return This builder for chaining.
*/
public Builder setZDistanceUnit(uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000100;
zDistanceUnit_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The input distance unit for z (μm, nm)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit z_distance_unit = 9;
* @return This builder for chaining.
*/
public Builder clearZDistanceUnit() {
bitField0_ = (bitField0_ & ~0x00000100);
zDistanceUnit_ = 0;
onChanged();
return this;
}
private int sDistanceUnit_ = 0;
/**
*
* The output distance unit for s (may be pixels)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit s_distance_unit = 10;
* @return The enum numeric value on the wire for sDistanceUnit.
*/
@java.lang.Override public int getSDistanceUnitValue() {
return sDistanceUnit_;
}
/**
*
* The output distance unit for s (may be pixels)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit s_distance_unit = 10;
* @param value The enum numeric value on the wire for sDistanceUnit to set.
* @return This builder for chaining.
*/
public Builder setSDistanceUnitValue(int value) {
sDistanceUnit_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
* The output distance unit for s (may be pixels)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit s_distance_unit = 10;
* @return The sDistanceUnit.
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit getSDistanceUnit() {
uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit result = uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.forNumber(sDistanceUnit_);
return result == null ? uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit.UNRECOGNIZED : result;
}
/**
*
* The output distance unit for s (may be pixels)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit s_distance_unit = 10;
* @param value The sDistanceUnit to set.
* @return This builder for chaining.
*/
public Builder setSDistanceUnit(uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000200;
sDistanceUnit_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The output distance unit for s (may be pixels)
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.DistanceUnit s_distance_unit = 10;
* @return This builder for chaining.
*/
public Builder clearSDistanceUnit() {
bitField0_ = (bitField0_ & ~0x00000200);
sDistanceUnit_ = 0;
onChanged();
return this;
}
private double nmPerPixel_ ;
/**
*
* The pixel size used to create the model. A model is only valid when used
* with the same light path (objective, magnification, camera sensor). The entire
* light path is not recorded but the pixel size is stored. This can be used as
* a quick validation of matching calibration, or to convert output width in pixels.
*
*
* double nm_per_pixel = 11;
* @return The nmPerPixel.
*/
@java.lang.Override
public double getNmPerPixel() {
return nmPerPixel_;
}
/**
*
* The pixel size used to create the model. A model is only valid when used
* with the same light path (objective, magnification, camera sensor). The entire
* light path is not recorded but the pixel size is stored. This can be used as
* a quick validation of matching calibration, or to convert output width in pixels.
*
*
* double nm_per_pixel = 11;
* @param value The nmPerPixel to set.
* @return This builder for chaining.
*/
public Builder setNmPerPixel(double value) {
nmPerPixel_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
* The pixel size used to create the model. A model is only valid when used
* with the same light path (objective, magnification, camera sensor). The entire
* light path is not recorded but the pixel size is stored. This can be used as
* a quick validation of matching calibration, or to convert output width in pixels.
*
*
* double nm_per_pixel = 11;
* @return This builder for chaining.
*/
public Builder clearNmPerPixel() {
bitField0_ = (bitField0_ & ~0x00000400);
nmPerPixel_ = 0D;
onChanged();
return this;
}
private double z0_ ;
/**
*
* The z-centre. This is assumed to be zero but can be used to store the results
* of curve fitting where the z-centre is a parameter.
*
*
* double z0 = 12;
* @return The z0.
*/
@java.lang.Override
public double getZ0() {
return z0_;
}
/**
*
* The z-centre. This is assumed to be zero but can be used to store the results
* of curve fitting where the z-centre is a parameter.
*
*
* double z0 = 12;
* @param value The z0 to set.
* @return This builder for chaining.
*/
public Builder setZ0(double value) {
z0_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
* The z-centre. This is assumed to be zero but can be used to store the results
* of curve fitting where the z-centre is a parameter.
*
*
* double z0 = 12;
* @return This builder for chaining.
*/
public Builder clearZ0() {
bitField0_ = (bitField0_ & ~0x00000800);
z0_ = 0D;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel)
}
// @@protoc_insertion_point(class_scope:uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel)
private static final uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel();
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AstigmatismModel parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AstigmatismModelSettingsOrBuilder extends
// @@protoc_insertion_point(interface_extends:uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModelSettings)
com.google.protobuf.MessageOrBuilder {
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
int getAstigmatismModelResourcesCount();
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
boolean containsAstigmatismModelResources(
java.lang.String key);
/**
* Use {@link #getAstigmatismModelResourcesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getAstigmatismModelResources();
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
java.util.Map
getAstigmatismModelResourcesMap();
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel getAstigmatismModelResourcesOrDefault(
java.lang.String key,
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel defaultValue);
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel getAstigmatismModelResourcesOrThrow(
java.lang.String key);
}
/**
*
* Define the astigmatism model settings
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModelSettings}
*/
public static final class AstigmatismModelSettings extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModelSettings)
AstigmatismModelSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use AstigmatismModelSettings.newBuilder() to construct.
private AstigmatismModelSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AstigmatismModelSettings() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AstigmatismModelSettings();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetAstigmatismModelResources();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings.Builder.class);
}
public static final int ASTIGMATISM_MODEL_RESOURCES_FIELD_NUMBER = 1;
private static final class AstigmatismModelResourcesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_AstigmatismModelResourcesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel> astigmatismModelResources_;
private com.google.protobuf.MapField
internalGetAstigmatismModelResources() {
if (astigmatismModelResources_ == null) {
return com.google.protobuf.MapField.emptyMapField(
AstigmatismModelResourcesDefaultEntryHolder.defaultEntry);
}
return astigmatismModelResources_;
}
public int getAstigmatismModelResourcesCount() {
return internalGetAstigmatismModelResources().getMap().size();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
@java.lang.Override
public boolean containsAstigmatismModelResources(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetAstigmatismModelResources().getMap().containsKey(key);
}
/**
* Use {@link #getAstigmatismModelResourcesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getAstigmatismModelResources() {
return getAstigmatismModelResourcesMap();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
@java.lang.Override
public java.util.Map getAstigmatismModelResourcesMap() {
return internalGetAstigmatismModelResources().getMap();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
@java.lang.Override
public /* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel getAstigmatismModelResourcesOrDefault(
java.lang.String key,
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetAstigmatismModelResources().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel getAstigmatismModelResourcesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetAstigmatismModelResources().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetAstigmatismModelResources(),
AstigmatismModelResourcesDefaultEntryHolder.defaultEntry,
1);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry
: internalGetAstigmatismModelResources().getMap().entrySet()) {
com.google.protobuf.MapEntry
astigmatismModelResources__ = AstigmatismModelResourcesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, astigmatismModelResources__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings)) {
return super.equals(obj);
}
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings other = (uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings) obj;
if (!internalGetAstigmatismModelResources().equals(
other.internalGetAstigmatismModelResources())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetAstigmatismModelResources().getMap().isEmpty()) {
hash = (37 * hash) + ASTIGMATISM_MODEL_RESOURCES_FIELD_NUMBER;
hash = (53 * hash) + internalGetAstigmatismModelResources().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Define the astigmatism model settings
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModelSettings}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModelSettings)
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetAstigmatismModelResources();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutableAstigmatismModelResources();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings.Builder.class);
}
// Construct using uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
internalGetMutableAstigmatismModelResources().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_descriptor;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings getDefaultInstanceForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings.getDefaultInstance();
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings build() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings buildPartial() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings result = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.astigmatismModelResources_ = internalGetAstigmatismModelResources();
result.astigmatismModelResources_.makeImmutable();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings) {
return mergeFrom((uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings other) {
if (other == uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings.getDefaultInstance()) return this;
internalGetMutableAstigmatismModelResources().mergeFrom(
other.internalGetAstigmatismModelResources());
bitField0_ |= 0x00000001;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.MapEntry
astigmatismModelResources__ = input.readMessage(
AstigmatismModelResourcesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableAstigmatismModelResources().getMutableMap().put(
astigmatismModelResources__.getKey(), astigmatismModelResources__.getValue());
bitField0_ |= 0x00000001;
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.String, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel> astigmatismModelResources_;
private com.google.protobuf.MapField
internalGetAstigmatismModelResources() {
if (astigmatismModelResources_ == null) {
return com.google.protobuf.MapField.emptyMapField(
AstigmatismModelResourcesDefaultEntryHolder.defaultEntry);
}
return astigmatismModelResources_;
}
private com.google.protobuf.MapField
internalGetMutableAstigmatismModelResources() {
if (astigmatismModelResources_ == null) {
astigmatismModelResources_ = com.google.protobuf.MapField.newMapField(
AstigmatismModelResourcesDefaultEntryHolder.defaultEntry);
}
if (!astigmatismModelResources_.isMutable()) {
astigmatismModelResources_ = astigmatismModelResources_.copy();
}
bitField0_ |= 0x00000001;
onChanged();
return astigmatismModelResources_;
}
public int getAstigmatismModelResourcesCount() {
return internalGetAstigmatismModelResources().getMap().size();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
@java.lang.Override
public boolean containsAstigmatismModelResources(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetAstigmatismModelResources().getMap().containsKey(key);
}
/**
* Use {@link #getAstigmatismModelResourcesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getAstigmatismModelResources() {
return getAstigmatismModelResourcesMap();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
@java.lang.Override
public java.util.Map getAstigmatismModelResourcesMap() {
return internalGetAstigmatismModelResources().getMap();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
@java.lang.Override
public /* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel getAstigmatismModelResourcesOrDefault(
java.lang.String key,
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetAstigmatismModelResources().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel getAstigmatismModelResourcesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetAstigmatismModelResources().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearAstigmatismModelResources() {
bitField0_ = (bitField0_ & ~0x00000001);
internalGetMutableAstigmatismModelResources().getMutableMap()
.clear();
return this;
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
public Builder removeAstigmatismModelResources(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableAstigmatismModelResources().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableAstigmatismModelResources() {
bitField0_ |= 0x00000001;
return internalGetMutableAstigmatismModelResources().getMutableMap();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
public Builder putAstigmatismModelResources(
java.lang.String key,
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModel value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableAstigmatismModelResources().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000001;
return this;
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModel> astigmatism_model_resources = 1;
*/
public Builder putAllAstigmatismModelResources(
java.util.Map values) {
internalGetMutableAstigmatismModelResources().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000001;
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModelSettings)
}
// @@protoc_insertion_point(class_scope:uk.ac.sussex.gdsc.smlm.data.config.AstigmatismModelSettings)
private static final uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings();
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AstigmatismModelSettings parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.AstigmatismModelSettings getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PSFOrBuilder extends
// @@protoc_insertion_point(interface_extends:uk.ac.sussex.gdsc.smlm.data.config.PSF)
com.google.protobuf.MessageOrBuilder {
/**
*
* The PSF type
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.PSFType psf_type = 1;
* @return The enum numeric value on the wire for psfType.
*/
int getPsfTypeValue();
/**
*
* The PSF type
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.PSFType psf_type = 1;
* @return The psfType.
*/
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType getPsfType();
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
java.util.List
getParametersList();
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter getParameters(int index);
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
int getParametersCount();
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
java.util.List extends uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterOrBuilder>
getParametersOrBuilderList();
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterOrBuilder getParametersOrBuilder(
int index);
/**
*
* The PSF model name. This should contain all the information required to
* load the model, e.g. in the case of a astigmatic Gaussian 2D PSF.
*
*
* string model_name = 3;
* @return The modelName.
*/
java.lang.String getModelName();
/**
*
* The PSF model name. This should contain all the information required to
* load the model, e.g. in the case of a astigmatic Gaussian 2D PSF.
*
*
* string model_name = 3;
* @return The bytes for modelName.
*/
com.google.protobuf.ByteString
getModelNameBytes();
}
/**
*
* Define the Point Spread Function (PSF)
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.PSF}
*/
public static final class PSF extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:uk.ac.sussex.gdsc.smlm.data.config.PSF)
PSFOrBuilder {
private static final long serialVersionUID = 0L;
// Use PSF.newBuilder() to construct.
private PSF(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PSF() {
psfType_ = 0;
parameters_ = java.util.Collections.emptyList();
modelName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PSF();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSF_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSF_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF.Builder.class);
}
public static final int PSF_TYPE_FIELD_NUMBER = 1;
private int psfType_ = 0;
/**
*
* The PSF type
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.PSFType psf_type = 1;
* @return The enum numeric value on the wire for psfType.
*/
@java.lang.Override public int getPsfTypeValue() {
return psfType_;
}
/**
*
* The PSF type
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.PSFType psf_type = 1;
* @return The psfType.
*/
@java.lang.Override public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType getPsfType() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType result = uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType.forNumber(psfType_);
return result == null ? uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType.UNRECOGNIZED : result;
}
public static final int PARAMETERS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List parameters_;
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
@java.lang.Override
public java.util.List getParametersList() {
return parameters_;
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
@java.lang.Override
public java.util.List extends uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterOrBuilder>
getParametersOrBuilderList() {
return parameters_;
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
@java.lang.Override
public int getParametersCount() {
return parameters_.size();
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter getParameters(int index) {
return parameters_.get(index);
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterOrBuilder getParametersOrBuilder(
int index) {
return parameters_.get(index);
}
public static final int MODEL_NAME_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object modelName_ = "";
/**
*
* The PSF model name. This should contain all the information required to
* load the model, e.g. in the case of a astigmatic Gaussian 2D PSF.
*
*
* string model_name = 3;
* @return The modelName.
*/
@java.lang.Override
public java.lang.String getModelName() {
java.lang.Object ref = modelName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
modelName_ = s;
return s;
}
}
/**
*
* The PSF model name. This should contain all the information required to
* load the model, e.g. in the case of a astigmatic Gaussian 2D PSF.
*
*
* string model_name = 3;
* @return The bytes for modelName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getModelNameBytes() {
java.lang.Object ref = modelName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
modelName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (psfType_ != uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType.PSF_TYPE_NA.getNumber()) {
output.writeEnum(1, psfType_);
}
for (int i = 0; i < parameters_.size(); i++) {
output.writeMessage(2, parameters_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, modelName_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (psfType_ != uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType.PSF_TYPE_NA.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, psfType_);
}
for (int i = 0; i < parameters_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, parameters_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, modelName_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF)) {
return super.equals(obj);
}
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF other = (uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF) obj;
if (psfType_ != other.psfType_) return false;
if (!getParametersList()
.equals(other.getParametersList())) return false;
if (!getModelName()
.equals(other.getModelName())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PSF_TYPE_FIELD_NUMBER;
hash = (53 * hash) + psfType_;
if (getParametersCount() > 0) {
hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
hash = (53 * hash) + getParametersList().hashCode();
}
hash = (37 * hash) + MODEL_NAME_FIELD_NUMBER;
hash = (53 * hash) + getModelName().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Define the Point Spread Function (PSF)
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.PSF}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:uk.ac.sussex.gdsc.smlm.data.config.PSF)
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSF_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSF_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF.Builder.class);
}
// Construct using uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
psfType_ = 0;
if (parametersBuilder_ == null) {
parameters_ = java.util.Collections.emptyList();
} else {
parameters_ = null;
parametersBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
modelName_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSF_descriptor;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF getDefaultInstanceForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF.getDefaultInstance();
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF build() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF buildPartial() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF result = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF result) {
if (parametersBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
parameters_ = java.util.Collections.unmodifiableList(parameters_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.parameters_ = parameters_;
} else {
result.parameters_ = parametersBuilder_.build();
}
}
private void buildPartial0(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.psfType_ = psfType_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.modelName_ = modelName_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF) {
return mergeFrom((uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF other) {
if (other == uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF.getDefaultInstance()) return this;
if (other.psfType_ != 0) {
setPsfTypeValue(other.getPsfTypeValue());
}
if (parametersBuilder_ == null) {
if (!other.parameters_.isEmpty()) {
if (parameters_.isEmpty()) {
parameters_ = other.parameters_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureParametersIsMutable();
parameters_.addAll(other.parameters_);
}
onChanged();
}
} else {
if (!other.parameters_.isEmpty()) {
if (parametersBuilder_.isEmpty()) {
parametersBuilder_.dispose();
parametersBuilder_ = null;
parameters_ = other.parameters_;
bitField0_ = (bitField0_ & ~0x00000002);
parametersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getParametersFieldBuilder() : null;
} else {
parametersBuilder_.addAllMessages(other.parameters_);
}
}
}
if (!other.getModelName().isEmpty()) {
modelName_ = other.modelName_;
bitField0_ |= 0x00000004;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
psfType_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter m =
input.readMessage(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.parser(),
extensionRegistry);
if (parametersBuilder_ == null) {
ensureParametersIsMutable();
parameters_.add(m);
} else {
parametersBuilder_.addMessage(m);
}
break;
} // case 18
case 26: {
modelName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int psfType_ = 0;
/**
*
* The PSF type
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.PSFType psf_type = 1;
* @return The enum numeric value on the wire for psfType.
*/
@java.lang.Override public int getPsfTypeValue() {
return psfType_;
}
/**
*
* The PSF type
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.PSFType psf_type = 1;
* @param value The enum numeric value on the wire for psfType to set.
* @return This builder for chaining.
*/
public Builder setPsfTypeValue(int value) {
psfType_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The PSF type
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.PSFType psf_type = 1;
* @return The psfType.
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType getPsfType() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType result = uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType.forNumber(psfType_);
return result == null ? uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType.UNRECOGNIZED : result;
}
/**
*
* The PSF type
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.PSFType psf_type = 1;
* @param value The psfType to set.
* @return This builder for chaining.
*/
public Builder setPsfType(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
psfType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The PSF type
*
*
* .uk.ac.sussex.gdsc.smlm.data.config.PSFType psf_type = 1;
* @return This builder for chaining.
*/
public Builder clearPsfType() {
bitField0_ = (bitField0_ & ~0x00000001);
psfType_ = 0;
onChanged();
return this;
}
private java.util.List parameters_ =
java.util.Collections.emptyList();
private void ensureParametersIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
parameters_ = new java.util.ArrayList(parameters_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.Builder, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterOrBuilder> parametersBuilder_;
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public java.util.List getParametersList() {
if (parametersBuilder_ == null) {
return java.util.Collections.unmodifiableList(parameters_);
} else {
return parametersBuilder_.getMessageList();
}
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public int getParametersCount() {
if (parametersBuilder_ == null) {
return parameters_.size();
} else {
return parametersBuilder_.getCount();
}
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter getParameters(int index) {
if (parametersBuilder_ == null) {
return parameters_.get(index);
} else {
return parametersBuilder_.getMessage(index);
}
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public Builder setParameters(
int index, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter value) {
if (parametersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureParametersIsMutable();
parameters_.set(index, value);
onChanged();
} else {
parametersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public Builder setParameters(
int index, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.Builder builderForValue) {
if (parametersBuilder_ == null) {
ensureParametersIsMutable();
parameters_.set(index, builderForValue.build());
onChanged();
} else {
parametersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public Builder addParameters(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter value) {
if (parametersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureParametersIsMutable();
parameters_.add(value);
onChanged();
} else {
parametersBuilder_.addMessage(value);
}
return this;
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public Builder addParameters(
int index, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter value) {
if (parametersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureParametersIsMutable();
parameters_.add(index, value);
onChanged();
} else {
parametersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public Builder addParameters(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.Builder builderForValue) {
if (parametersBuilder_ == null) {
ensureParametersIsMutable();
parameters_.add(builderForValue.build());
onChanged();
} else {
parametersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public Builder addParameters(
int index, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.Builder builderForValue) {
if (parametersBuilder_ == null) {
ensureParametersIsMutable();
parameters_.add(index, builderForValue.build());
onChanged();
} else {
parametersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public Builder addAllParameters(
java.lang.Iterable extends uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter> values) {
if (parametersBuilder_ == null) {
ensureParametersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, parameters_);
onChanged();
} else {
parametersBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public Builder clearParameters() {
if (parametersBuilder_ == null) {
parameters_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
parametersBuilder_.clear();
}
return this;
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public Builder removeParameters(int index) {
if (parametersBuilder_ == null) {
ensureParametersIsMutable();
parameters_.remove(index);
onChanged();
} else {
parametersBuilder_.remove(index);
}
return this;
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.Builder getParametersBuilder(
int index) {
return getParametersFieldBuilder().getBuilder(index);
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterOrBuilder getParametersOrBuilder(
int index) {
if (parametersBuilder_ == null) {
return parameters_.get(index); } else {
return parametersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public java.util.List extends uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterOrBuilder>
getParametersOrBuilderList() {
if (parametersBuilder_ != null) {
return parametersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(parameters_);
}
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.Builder addParametersBuilder() {
return getParametersFieldBuilder().addBuilder(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.getDefaultInstance());
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.Builder addParametersBuilder(
int index) {
return getParametersFieldBuilder().addBuilder(
index, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.getDefaultInstance());
}
/**
*
* The names of the PSF parameters. The results are stored using the standard parameters of
* [background, intensity, x, y, z]. Any additional parameters can be stored in the results
* parameters array. The names of the non-standard parameters, in order, can be defined here.
*
*
* repeated .uk.ac.sussex.gdsc.smlm.data.config.PSFParameter parameters = 2;
*/
public java.util.List
getParametersBuilderList() {
return getParametersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.Builder, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterOrBuilder>
getParametersFieldBuilder() {
if (parametersBuilder_ == null) {
parametersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameter.Builder, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSFParameterOrBuilder>(
parameters_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
parameters_ = null;
}
return parametersBuilder_;
}
private java.lang.Object modelName_ = "";
/**
*
* The PSF model name. This should contain all the information required to
* load the model, e.g. in the case of a astigmatic Gaussian 2D PSF.
*
*
* string model_name = 3;
* @return The modelName.
*/
public java.lang.String getModelName() {
java.lang.Object ref = modelName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
modelName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The PSF model name. This should contain all the information required to
* load the model, e.g. in the case of a astigmatic Gaussian 2D PSF.
*
*
* string model_name = 3;
* @return The bytes for modelName.
*/
public com.google.protobuf.ByteString
getModelNameBytes() {
java.lang.Object ref = modelName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
modelName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The PSF model name. This should contain all the information required to
* load the model, e.g. in the case of a astigmatic Gaussian 2D PSF.
*
*
* string model_name = 3;
* @param value The modelName to set.
* @return This builder for chaining.
*/
public Builder setModelName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
modelName_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The PSF model name. This should contain all the information required to
* load the model, e.g. in the case of a astigmatic Gaussian 2D PSF.
*
*
* string model_name = 3;
* @return This builder for chaining.
*/
public Builder clearModelName() {
modelName_ = getDefaultInstance().getModelName();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* The PSF model name. This should contain all the information required to
* load the model, e.g. in the case of a astigmatic Gaussian 2D PSF.
*
*
* string model_name = 3;
* @param value The bytes for modelName to set.
* @return This builder for chaining.
*/
public Builder setModelNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
modelName_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:uk.ac.sussex.gdsc.smlm.data.config.PSF)
}
// @@protoc_insertion_point(class_scope:uk.ac.sussex.gdsc.smlm.data.config.PSF)
private static final uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF();
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PSF parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.PSF getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OffsetOrBuilder extends
// @@protoc_insertion_point(interface_extends:uk.ac.sussex.gdsc.smlm.data.config.Offset)
com.google.protobuf.MessageOrBuilder {
/**
* double cx = 2;
* @return The cx.
*/
double getCx();
/**
* double cy = 3;
* @return The cy.
*/
double getCy();
}
/**
*
* Define the offset for slice alignment correction
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.Offset}
*/
public static final class Offset extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:uk.ac.sussex.gdsc.smlm.data.config.Offset)
OffsetOrBuilder {
private static final long serialVersionUID = 0L;
// Use Offset.newBuilder() to construct.
private Offset(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Offset() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Offset();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_Offset_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_Offset_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset.Builder.class);
}
public static final int CX_FIELD_NUMBER = 2;
private double cx_ = 0D;
/**
* double cx = 2;
* @return The cx.
*/
@java.lang.Override
public double getCx() {
return cx_;
}
public static final int CY_FIELD_NUMBER = 3;
private double cy_ = 0D;
/**
* double cy = 3;
* @return The cy.
*/
@java.lang.Override
public double getCy() {
return cy_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (java.lang.Double.doubleToRawLongBits(cx_) != 0) {
output.writeDouble(2, cx_);
}
if (java.lang.Double.doubleToRawLongBits(cy_) != 0) {
output.writeDouble(3, cy_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Double.doubleToRawLongBits(cx_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, cx_);
}
if (java.lang.Double.doubleToRawLongBits(cy_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, cy_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset)) {
return super.equals(obj);
}
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset other = (uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset) obj;
if (java.lang.Double.doubleToLongBits(getCx())
!= java.lang.Double.doubleToLongBits(
other.getCx())) return false;
if (java.lang.Double.doubleToLongBits(getCy())
!= java.lang.Double.doubleToLongBits(
other.getCy())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getCx()));
hash = (37 * hash) + CY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getCy()));
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Define the offset for slice alignment correction
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.Offset}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:uk.ac.sussex.gdsc.smlm.data.config.Offset)
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.OffsetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_Offset_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_Offset_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset.Builder.class);
}
// Construct using uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
cx_ = 0D;
cy_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_Offset_descriptor;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset getDefaultInstanceForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset.getDefaultInstance();
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset build() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset buildPartial() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset result = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.cx_ = cx_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.cy_ = cy_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset) {
return mergeFrom((uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset other) {
if (other == uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset.getDefaultInstance()) return this;
if (other.getCx() != 0D) {
setCx(other.getCx());
}
if (other.getCy() != 0D) {
setCy(other.getCy());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 17: {
cx_ = input.readDouble();
bitField0_ |= 0x00000001;
break;
} // case 17
case 25: {
cy_ = input.readDouble();
bitField0_ |= 0x00000002;
break;
} // case 25
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private double cx_ ;
/**
* double cx = 2;
* @return The cx.
*/
@java.lang.Override
public double getCx() {
return cx_;
}
/**
* double cx = 2;
* @param value The cx to set.
* @return This builder for chaining.
*/
public Builder setCx(double value) {
cx_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* double cx = 2;
* @return This builder for chaining.
*/
public Builder clearCx() {
bitField0_ = (bitField0_ & ~0x00000001);
cx_ = 0D;
onChanged();
return this;
}
private double cy_ ;
/**
* double cy = 3;
* @return The cy.
*/
@java.lang.Override
public double getCy() {
return cy_;
}
/**
* double cy = 3;
* @param value The cy to set.
* @return This builder for chaining.
*/
public Builder setCy(double value) {
cy_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* double cy = 3;
* @return This builder for chaining.
*/
public Builder clearCy() {
bitField0_ = (bitField0_ & ~0x00000002);
cy_ = 0D;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:uk.ac.sussex.gdsc.smlm.data.config.Offset)
}
// @@protoc_insertion_point(class_scope:uk.ac.sussex.gdsc.smlm.data.config.Offset)
private static final uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset();
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Offset parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ImagePSFOrBuilder extends
// @@protoc_insertion_point(interface_extends:uk.ac.sussex.gdsc.smlm.data.config.ImagePSF)
com.google.protobuf.MessageOrBuilder {
/**
*
* The number of images in the PSF
*
*
* int32 image_count = 1;
* @return The imageCount.
*/
int getImageCount();
/**
*
* The image containing the focal plane of the PSF. This is 1-indexed.
*
*
* int32 centre_image = 2;
* @return The centreImage.
*/
int getCentreImage();
/**
*
* The size of the PSF pixel in nanometers
*
*
* double pixel_size = 3;
* @return The pixelSize.
*/
double getPixelSize();
/**
*
* The depth of the PSF pixel in nanometers
*
*
* double pixel_depth = 4;
* @return The pixelDepth.
*/
double getPixelDepth();
/**
*
* The Full Width at Half Maxima (FWHM) in image pixels
*
*
* double fwhm = 5;
* @return The fwhm.
*/
double getFwhm();
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
int getNotesCount();
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
boolean containsNotes(
java.lang.String key);
/**
* Use {@link #getNotesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getNotes();
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
java.util.Map
getNotesMap();
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
/* nullable */
java.lang.String getNotesOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue);
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
java.lang.String getNotesOrThrow(
java.lang.String key);
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
int getOffsetsCount();
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
boolean containsOffsets(
int key);
/**
* Use {@link #getOffsetsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getOffsets();
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
java.util.Map
getOffsetsMap();
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset getOffsetsOrDefault(
int key,
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset defaultValue);
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset getOffsetsOrThrow(
int key);
/**
*
* X-centre. This can be used instead of the offsets. This is the distance
* through the image width that is the x-centre.
*
*
* double x_centre = 8;
* @return The xCentre.
*/
double getXCentre();
/**
*
* Y-centre. This can be used instead of the offsets. This is the distance
* through the image width that is the y-centre.
*
*
* double y_centre = 9;
* @return The yCentre.
*/
double getYCentre();
/**
*
* Z-centre. This can be used instead of the centre_image. This is the distance
* through the image stack that is the z-centre. Conversion to the 1-indexed centre_image
* should use rounding to the nearest integer and then add 1.
*
*
* double z_centre = 10;
* @return The zCentre.
*/
double getZCentre();
}
/**
*
* Define the settings of an observed Point Spread Function (PSF) represented as an image stack.
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.ImagePSF}
*/
public static final class ImagePSF extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:uk.ac.sussex.gdsc.smlm.data.config.ImagePSF)
ImagePSFOrBuilder {
private static final long serialVersionUID = 0L;
// Use ImagePSF.newBuilder() to construct.
private ImagePSF(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ImagePSF() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ImagePSF();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 6:
return internalGetNotes();
case 7:
return internalGetOffsets();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF.Builder.class);
}
public static final int IMAGE_COUNT_FIELD_NUMBER = 1;
private int imageCount_ = 0;
/**
*
* The number of images in the PSF
*
*
* int32 image_count = 1;
* @return The imageCount.
*/
@java.lang.Override
public int getImageCount() {
return imageCount_;
}
public static final int CENTRE_IMAGE_FIELD_NUMBER = 2;
private int centreImage_ = 0;
/**
*
* The image containing the focal plane of the PSF. This is 1-indexed.
*
*
* int32 centre_image = 2;
* @return The centreImage.
*/
@java.lang.Override
public int getCentreImage() {
return centreImage_;
}
public static final int PIXEL_SIZE_FIELD_NUMBER = 3;
private double pixelSize_ = 0D;
/**
*
* The size of the PSF pixel in nanometers
*
*
* double pixel_size = 3;
* @return The pixelSize.
*/
@java.lang.Override
public double getPixelSize() {
return pixelSize_;
}
public static final int PIXEL_DEPTH_FIELD_NUMBER = 4;
private double pixelDepth_ = 0D;
/**
*
* The depth of the PSF pixel in nanometers
*
*
* double pixel_depth = 4;
* @return The pixelDepth.
*/
@java.lang.Override
public double getPixelDepth() {
return pixelDepth_;
}
public static final int FWHM_FIELD_NUMBER = 5;
private double fwhm_ = 0D;
/**
*
* The Full Width at Half Maxima (FWHM) in image pixels
*
*
* double fwhm = 5;
* @return The fwhm.
*/
@java.lang.Override
public double getFwhm() {
return fwhm_;
}
public static final int NOTES_FIELD_NUMBER = 6;
private static final class NotesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_NotesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> notes_;
private com.google.protobuf.MapField
internalGetNotes() {
if (notes_ == null) {
return com.google.protobuf.MapField.emptyMapField(
NotesDefaultEntryHolder.defaultEntry);
}
return notes_;
}
public int getNotesCount() {
return internalGetNotes().getMap().size();
}
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
@java.lang.Override
public boolean containsNotes(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetNotes().getMap().containsKey(key);
}
/**
* Use {@link #getNotesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getNotes() {
return getNotesMap();
}
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
@java.lang.Override
public java.util.Map getNotesMap() {
return internalGetNotes().getMap();
}
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
@java.lang.Override
public /* nullable */
java.lang.String getNotesOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetNotes().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
@java.lang.Override
public java.lang.String getNotesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetNotes().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int OFFSETS_FIELD_NUMBER = 7;
private static final class OffsetsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.Integer, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_OffsetsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.INT32,
0,
com.google.protobuf.WireFormat.FieldType.MESSAGE,
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.Integer, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset> offsets_;
private com.google.protobuf.MapField
internalGetOffsets() {
if (offsets_ == null) {
return com.google.protobuf.MapField.emptyMapField(
OffsetsDefaultEntryHolder.defaultEntry);
}
return offsets_;
}
public int getOffsetsCount() {
return internalGetOffsets().getMap().size();
}
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
@java.lang.Override
public boolean containsOffsets(
int key) {
return internalGetOffsets().getMap().containsKey(key);
}
/**
* Use {@link #getOffsetsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getOffsets() {
return getOffsetsMap();
}
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
@java.lang.Override
public java.util.Map getOffsetsMap() {
return internalGetOffsets().getMap();
}
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
@java.lang.Override
public /* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset getOffsetsOrDefault(
int key,
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset defaultValue) {
java.util.Map map =
internalGetOffsets().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset getOffsetsOrThrow(
int key) {
java.util.Map map =
internalGetOffsets().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int X_CENTRE_FIELD_NUMBER = 8;
private double xCentre_ = 0D;
/**
*
* X-centre. This can be used instead of the offsets. This is the distance
* through the image width that is the x-centre.
*
*
* double x_centre = 8;
* @return The xCentre.
*/
@java.lang.Override
public double getXCentre() {
return xCentre_;
}
public static final int Y_CENTRE_FIELD_NUMBER = 9;
private double yCentre_ = 0D;
/**
*
* Y-centre. This can be used instead of the offsets. This is the distance
* through the image width that is the y-centre.
*
*
* double y_centre = 9;
* @return The yCentre.
*/
@java.lang.Override
public double getYCentre() {
return yCentre_;
}
public static final int Z_CENTRE_FIELD_NUMBER = 10;
private double zCentre_ = 0D;
/**
*
* Z-centre. This can be used instead of the centre_image. This is the distance
* through the image stack that is the z-centre. Conversion to the 1-indexed centre_image
* should use rounding to the nearest integer and then add 1.
*
*
* double z_centre = 10;
* @return The zCentre.
*/
@java.lang.Override
public double getZCentre() {
return zCentre_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (imageCount_ != 0) {
output.writeInt32(1, imageCount_);
}
if (centreImage_ != 0) {
output.writeInt32(2, centreImage_);
}
if (java.lang.Double.doubleToRawLongBits(pixelSize_) != 0) {
output.writeDouble(3, pixelSize_);
}
if (java.lang.Double.doubleToRawLongBits(pixelDepth_) != 0) {
output.writeDouble(4, pixelDepth_);
}
if (java.lang.Double.doubleToRawLongBits(fwhm_) != 0) {
output.writeDouble(5, fwhm_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetNotes(),
NotesDefaultEntryHolder.defaultEntry,
6);
com.google.protobuf.GeneratedMessageV3
.serializeIntegerMapTo(
output,
internalGetOffsets(),
OffsetsDefaultEntryHolder.defaultEntry,
7);
if (java.lang.Double.doubleToRawLongBits(xCentre_) != 0) {
output.writeDouble(8, xCentre_);
}
if (java.lang.Double.doubleToRawLongBits(yCentre_) != 0) {
output.writeDouble(9, yCentre_);
}
if (java.lang.Double.doubleToRawLongBits(zCentre_) != 0) {
output.writeDouble(10, zCentre_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (imageCount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, imageCount_);
}
if (centreImage_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, centreImage_);
}
if (java.lang.Double.doubleToRawLongBits(pixelSize_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, pixelSize_);
}
if (java.lang.Double.doubleToRawLongBits(pixelDepth_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, pixelDepth_);
}
if (java.lang.Double.doubleToRawLongBits(fwhm_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(5, fwhm_);
}
for (java.util.Map.Entry entry
: internalGetNotes().getMap().entrySet()) {
com.google.protobuf.MapEntry
notes__ = NotesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, notes__);
}
for (java.util.Map.Entry entry
: internalGetOffsets().getMap().entrySet()) {
com.google.protobuf.MapEntry
offsets__ = OffsetsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, offsets__);
}
if (java.lang.Double.doubleToRawLongBits(xCentre_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(8, xCentre_);
}
if (java.lang.Double.doubleToRawLongBits(yCentre_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(9, yCentre_);
}
if (java.lang.Double.doubleToRawLongBits(zCentre_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(10, zCentre_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF)) {
return super.equals(obj);
}
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF other = (uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF) obj;
if (getImageCount()
!= other.getImageCount()) return false;
if (getCentreImage()
!= other.getCentreImage()) return false;
if (java.lang.Double.doubleToLongBits(getPixelSize())
!= java.lang.Double.doubleToLongBits(
other.getPixelSize())) return false;
if (java.lang.Double.doubleToLongBits(getPixelDepth())
!= java.lang.Double.doubleToLongBits(
other.getPixelDepth())) return false;
if (java.lang.Double.doubleToLongBits(getFwhm())
!= java.lang.Double.doubleToLongBits(
other.getFwhm())) return false;
if (!internalGetNotes().equals(
other.internalGetNotes())) return false;
if (!internalGetOffsets().equals(
other.internalGetOffsets())) return false;
if (java.lang.Double.doubleToLongBits(getXCentre())
!= java.lang.Double.doubleToLongBits(
other.getXCentre())) return false;
if (java.lang.Double.doubleToLongBits(getYCentre())
!= java.lang.Double.doubleToLongBits(
other.getYCentre())) return false;
if (java.lang.Double.doubleToLongBits(getZCentre())
!= java.lang.Double.doubleToLongBits(
other.getZCentre())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + IMAGE_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getImageCount();
hash = (37 * hash) + CENTRE_IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getCentreImage();
hash = (37 * hash) + PIXEL_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getPixelSize()));
hash = (37 * hash) + PIXEL_DEPTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getPixelDepth()));
hash = (37 * hash) + FWHM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getFwhm()));
if (!internalGetNotes().getMap().isEmpty()) {
hash = (37 * hash) + NOTES_FIELD_NUMBER;
hash = (53 * hash) + internalGetNotes().hashCode();
}
if (!internalGetOffsets().getMap().isEmpty()) {
hash = (37 * hash) + OFFSETS_FIELD_NUMBER;
hash = (53 * hash) + internalGetOffsets().hashCode();
}
hash = (37 * hash) + X_CENTRE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getXCentre()));
hash = (37 * hash) + Y_CENTRE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getYCentre()));
hash = (37 * hash) + Z_CENTRE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getZCentre()));
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Define the settings of an observed Point Spread Function (PSF) represented as an image stack.
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.ImagePSF}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:uk.ac.sussex.gdsc.smlm.data.config.ImagePSF)
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSFOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 6:
return internalGetNotes();
case 7:
return internalGetOffsets();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 6:
return internalGetMutableNotes();
case 7:
return internalGetMutableOffsets();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF.Builder.class);
}
// Construct using uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
imageCount_ = 0;
centreImage_ = 0;
pixelSize_ = 0D;
pixelDepth_ = 0D;
fwhm_ = 0D;
internalGetMutableNotes().clear();
internalGetMutableOffsets().clear();
xCentre_ = 0D;
yCentre_ = 0D;
zCentre_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_descriptor;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF getDefaultInstanceForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF.getDefaultInstance();
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF build() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF buildPartial() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF result = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.imageCount_ = imageCount_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.centreImage_ = centreImage_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.pixelSize_ = pixelSize_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.pixelDepth_ = pixelDepth_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.fwhm_ = fwhm_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.notes_ = internalGetNotes();
result.notes_.makeImmutable();
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.offsets_ = internalGetOffsets();
result.offsets_.makeImmutable();
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.xCentre_ = xCentre_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.yCentre_ = yCentre_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.zCentre_ = zCentre_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF) {
return mergeFrom((uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF other) {
if (other == uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF.getDefaultInstance()) return this;
if (other.getImageCount() != 0) {
setImageCount(other.getImageCount());
}
if (other.getCentreImage() != 0) {
setCentreImage(other.getCentreImage());
}
if (other.getPixelSize() != 0D) {
setPixelSize(other.getPixelSize());
}
if (other.getPixelDepth() != 0D) {
setPixelDepth(other.getPixelDepth());
}
if (other.getFwhm() != 0D) {
setFwhm(other.getFwhm());
}
internalGetMutableNotes().mergeFrom(
other.internalGetNotes());
bitField0_ |= 0x00000020;
internalGetMutableOffsets().mergeFrom(
other.internalGetOffsets());
bitField0_ |= 0x00000040;
if (other.getXCentre() != 0D) {
setXCentre(other.getXCentre());
}
if (other.getYCentre() != 0D) {
setYCentre(other.getYCentre());
}
if (other.getZCentre() != 0D) {
setZCentre(other.getZCentre());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
imageCount_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
centreImage_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 25: {
pixelSize_ = input.readDouble();
bitField0_ |= 0x00000004;
break;
} // case 25
case 33: {
pixelDepth_ = input.readDouble();
bitField0_ |= 0x00000008;
break;
} // case 33
case 41: {
fwhm_ = input.readDouble();
bitField0_ |= 0x00000010;
break;
} // case 41
case 50: {
com.google.protobuf.MapEntry
notes__ = input.readMessage(
NotesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableNotes().getMutableMap().put(
notes__.getKey(), notes__.getValue());
bitField0_ |= 0x00000020;
break;
} // case 50
case 58: {
com.google.protobuf.MapEntry
offsets__ = input.readMessage(
OffsetsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableOffsets().getMutableMap().put(
offsets__.getKey(), offsets__.getValue());
bitField0_ |= 0x00000040;
break;
} // case 58
case 65: {
xCentre_ = input.readDouble();
bitField0_ |= 0x00000080;
break;
} // case 65
case 73: {
yCentre_ = input.readDouble();
bitField0_ |= 0x00000100;
break;
} // case 73
case 81: {
zCentre_ = input.readDouble();
bitField0_ |= 0x00000200;
break;
} // case 81
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int imageCount_ ;
/**
*
* The number of images in the PSF
*
*
* int32 image_count = 1;
* @return The imageCount.
*/
@java.lang.Override
public int getImageCount() {
return imageCount_;
}
/**
*
* The number of images in the PSF
*
*
* int32 image_count = 1;
* @param value The imageCount to set.
* @return This builder for chaining.
*/
public Builder setImageCount(int value) {
imageCount_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The number of images in the PSF
*
*
* int32 image_count = 1;
* @return This builder for chaining.
*/
public Builder clearImageCount() {
bitField0_ = (bitField0_ & ~0x00000001);
imageCount_ = 0;
onChanged();
return this;
}
private int centreImage_ ;
/**
*
* The image containing the focal plane of the PSF. This is 1-indexed.
*
*
* int32 centre_image = 2;
* @return The centreImage.
*/
@java.lang.Override
public int getCentreImage() {
return centreImage_;
}
/**
*
* The image containing the focal plane of the PSF. This is 1-indexed.
*
*
* int32 centre_image = 2;
* @param value The centreImage to set.
* @return This builder for chaining.
*/
public Builder setCentreImage(int value) {
centreImage_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The image containing the focal plane of the PSF. This is 1-indexed.
*
*
* int32 centre_image = 2;
* @return This builder for chaining.
*/
public Builder clearCentreImage() {
bitField0_ = (bitField0_ & ~0x00000002);
centreImage_ = 0;
onChanged();
return this;
}
private double pixelSize_ ;
/**
*
* The size of the PSF pixel in nanometers
*
*
* double pixel_size = 3;
* @return The pixelSize.
*/
@java.lang.Override
public double getPixelSize() {
return pixelSize_;
}
/**
*
* The size of the PSF pixel in nanometers
*
*
* double pixel_size = 3;
* @param value The pixelSize to set.
* @return This builder for chaining.
*/
public Builder setPixelSize(double value) {
pixelSize_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The size of the PSF pixel in nanometers
*
*
* double pixel_size = 3;
* @return This builder for chaining.
*/
public Builder clearPixelSize() {
bitField0_ = (bitField0_ & ~0x00000004);
pixelSize_ = 0D;
onChanged();
return this;
}
private double pixelDepth_ ;
/**
*
* The depth of the PSF pixel in nanometers
*
*
* double pixel_depth = 4;
* @return The pixelDepth.
*/
@java.lang.Override
public double getPixelDepth() {
return pixelDepth_;
}
/**
*
* The depth of the PSF pixel in nanometers
*
*
* double pixel_depth = 4;
* @param value The pixelDepth to set.
* @return This builder for chaining.
*/
public Builder setPixelDepth(double value) {
pixelDepth_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The depth of the PSF pixel in nanometers
*
*
* double pixel_depth = 4;
* @return This builder for chaining.
*/
public Builder clearPixelDepth() {
bitField0_ = (bitField0_ & ~0x00000008);
pixelDepth_ = 0D;
onChanged();
return this;
}
private double fwhm_ ;
/**
*
* The Full Width at Half Maxima (FWHM) in image pixels
*
*
* double fwhm = 5;
* @return The fwhm.
*/
@java.lang.Override
public double getFwhm() {
return fwhm_;
}
/**
*
* The Full Width at Half Maxima (FWHM) in image pixels
*
*
* double fwhm = 5;
* @param value The fwhm to set.
* @return This builder for chaining.
*/
public Builder setFwhm(double value) {
fwhm_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* The Full Width at Half Maxima (FWHM) in image pixels
*
*
* double fwhm = 5;
* @return This builder for chaining.
*/
public Builder clearFwhm() {
bitField0_ = (bitField0_ & ~0x00000010);
fwhm_ = 0D;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> notes_;
private com.google.protobuf.MapField
internalGetNotes() {
if (notes_ == null) {
return com.google.protobuf.MapField.emptyMapField(
NotesDefaultEntryHolder.defaultEntry);
}
return notes_;
}
private com.google.protobuf.MapField
internalGetMutableNotes() {
if (notes_ == null) {
notes_ = com.google.protobuf.MapField.newMapField(
NotesDefaultEntryHolder.defaultEntry);
}
if (!notes_.isMutable()) {
notes_ = notes_.copy();
}
bitField0_ |= 0x00000020;
onChanged();
return notes_;
}
public int getNotesCount() {
return internalGetNotes().getMap().size();
}
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
@java.lang.Override
public boolean containsNotes(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetNotes().getMap().containsKey(key);
}
/**
* Use {@link #getNotesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getNotes() {
return getNotesMap();
}
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
@java.lang.Override
public java.util.Map getNotesMap() {
return internalGetNotes().getMap();
}
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
@java.lang.Override
public /* nullable */
java.lang.String getNotesOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetNotes().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
@java.lang.Override
public java.lang.String getNotesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetNotes().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearNotes() {
bitField0_ = (bitField0_ & ~0x00000020);
internalGetMutableNotes().getMutableMap()
.clear();
return this;
}
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
public Builder removeNotes(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableNotes().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableNotes() {
bitField0_ |= 0x00000020;
return internalGetMutableNotes().getMutableMap();
}
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
public Builder putNotes(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableNotes().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000020;
return this;
}
/**
*
* Notes about the PSF, added as Key-Value pairs.
*
*
* map<string, string> notes = 6;
*/
public Builder putAllNotes(
java.util.Map values) {
internalGetMutableNotes().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000020;
return this;
}
private com.google.protobuf.MapField<
java.lang.Integer, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset> offsets_;
private com.google.protobuf.MapField
internalGetOffsets() {
if (offsets_ == null) {
return com.google.protobuf.MapField.emptyMapField(
OffsetsDefaultEntryHolder.defaultEntry);
}
return offsets_;
}
private com.google.protobuf.MapField
internalGetMutableOffsets() {
if (offsets_ == null) {
offsets_ = com.google.protobuf.MapField.newMapField(
OffsetsDefaultEntryHolder.defaultEntry);
}
if (!offsets_.isMutable()) {
offsets_ = offsets_.copy();
}
bitField0_ |= 0x00000040;
onChanged();
return offsets_;
}
public int getOffsetsCount() {
return internalGetOffsets().getMap().size();
}
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
@java.lang.Override
public boolean containsOffsets(
int key) {
return internalGetOffsets().getMap().containsKey(key);
}
/**
* Use {@link #getOffsetsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getOffsets() {
return getOffsetsMap();
}
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
@java.lang.Override
public java.util.Map getOffsetsMap() {
return internalGetOffsets().getMap();
}
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
@java.lang.Override
public /* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset getOffsetsOrDefault(
int key,
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset defaultValue) {
java.util.Map map =
internalGetOffsets().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset getOffsetsOrThrow(
int key) {
java.util.Map map =
internalGetOffsets().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearOffsets() {
bitField0_ = (bitField0_ & ~0x00000040);
internalGetMutableOffsets().getMutableMap()
.clear();
return this;
}
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
public Builder removeOffsets(
int key) {
internalGetMutableOffsets().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableOffsets() {
bitField0_ |= 0x00000040;
return internalGetMutableOffsets().getMutableMap();
}
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
public Builder putOffsets(
int key,
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.Offset value) {
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableOffsets().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000040;
return this;
}
/**
*
* The alignment correction for each slice in pixels. This is the shift required to
* move the centre of the image to the centre of the PSF. The PSF centre may be
* determined by PSF fitting.
* If missing then the alignment is assumed to be 0,0.
*
*
* map<int32, .uk.ac.sussex.gdsc.smlm.data.config.Offset> offsets = 7;
*/
public Builder putAllOffsets(
java.util.Map values) {
internalGetMutableOffsets().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000040;
return this;
}
private double xCentre_ ;
/**
*
* X-centre. This can be used instead of the offsets. This is the distance
* through the image width that is the x-centre.
*
*
* double x_centre = 8;
* @return The xCentre.
*/
@java.lang.Override
public double getXCentre() {
return xCentre_;
}
/**
*
* X-centre. This can be used instead of the offsets. This is the distance
* through the image width that is the x-centre.
*
*
* double x_centre = 8;
* @param value The xCentre to set.
* @return This builder for chaining.
*/
public Builder setXCentre(double value) {
xCentre_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* X-centre. This can be used instead of the offsets. This is the distance
* through the image width that is the x-centre.
*
*
* double x_centre = 8;
* @return This builder for chaining.
*/
public Builder clearXCentre() {
bitField0_ = (bitField0_ & ~0x00000080);
xCentre_ = 0D;
onChanged();
return this;
}
private double yCentre_ ;
/**
*
* Y-centre. This can be used instead of the offsets. This is the distance
* through the image width that is the y-centre.
*
*
* double y_centre = 9;
* @return The yCentre.
*/
@java.lang.Override
public double getYCentre() {
return yCentre_;
}
/**
*
* Y-centre. This can be used instead of the offsets. This is the distance
* through the image width that is the y-centre.
*
*
* double y_centre = 9;
* @param value The yCentre to set.
* @return This builder for chaining.
*/
public Builder setYCentre(double value) {
yCentre_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* Y-centre. This can be used instead of the offsets. This is the distance
* through the image width that is the y-centre.
*
*
* double y_centre = 9;
* @return This builder for chaining.
*/
public Builder clearYCentre() {
bitField0_ = (bitField0_ & ~0x00000100);
yCentre_ = 0D;
onChanged();
return this;
}
private double zCentre_ ;
/**
*
* Z-centre. This can be used instead of the centre_image. This is the distance
* through the image stack that is the z-centre. Conversion to the 1-indexed centre_image
* should use rounding to the nearest integer and then add 1.
*
*
* double z_centre = 10;
* @return The zCentre.
*/
@java.lang.Override
public double getZCentre() {
return zCentre_;
}
/**
*
* Z-centre. This can be used instead of the centre_image. This is the distance
* through the image stack that is the z-centre. Conversion to the 1-indexed centre_image
* should use rounding to the nearest integer and then add 1.
*
*
* double z_centre = 10;
* @param value The zCentre to set.
* @return This builder for chaining.
*/
public Builder setZCentre(double value) {
zCentre_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
* Z-centre. This can be used instead of the centre_image. This is the distance
* through the image stack that is the z-centre. Conversion to the 1-indexed centre_image
* should use rounding to the nearest integer and then add 1.
*
*
* double z_centre = 10;
* @return This builder for chaining.
*/
public Builder clearZCentre() {
bitField0_ = (bitField0_ & ~0x00000200);
zCentre_ = 0D;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:uk.ac.sussex.gdsc.smlm.data.config.ImagePSF)
}
// @@protoc_insertion_point(class_scope:uk.ac.sussex.gdsc.smlm.data.config.ImagePSF)
private static final uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF();
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ImagePSF parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.ImagePSF getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CubicSplineResourceOrBuilder extends
// @@protoc_insertion_point(interface_extends:uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource)
com.google.protobuf.MessageOrBuilder {
/**
*
* The filename where the spline data is stored
*
*
* string filename = 1;
* @return The filename.
*/
java.lang.String getFilename();
/**
*
* The filename where the spline data is stored
*
*
* string filename = 1;
* @return The bytes for filename.
*/
com.google.protobuf.ByteString
getFilenameBytes();
/**
*
* The size of the spline scale in nanometers
*
*
* double spline_scale = 2;
* @return The splineScale.
*/
double getSplineScale();
}
/**
*
* Define a cubic spline resource that can be loaded
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource}
*/
public static final class CubicSplineResource extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource)
CubicSplineResourceOrBuilder {
private static final long serialVersionUID = 0L;
// Use CubicSplineResource.newBuilder() to construct.
private CubicSplineResource(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CubicSplineResource() {
filename_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CubicSplineResource();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineResource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineResource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource.Builder.class);
}
public static final int FILENAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object filename_ = "";
/**
*
* The filename where the spline data is stored
*
*
* string filename = 1;
* @return The filename.
*/
@java.lang.Override
public java.lang.String getFilename() {
java.lang.Object ref = filename_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
filename_ = s;
return s;
}
}
/**
*
* The filename where the spline data is stored
*
*
* string filename = 1;
* @return The bytes for filename.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFilenameBytes() {
java.lang.Object ref = filename_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
filename_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SPLINE_SCALE_FIELD_NUMBER = 2;
private double splineScale_ = 0D;
/**
*
* The size of the spline scale in nanometers
*
*
* double spline_scale = 2;
* @return The splineScale.
*/
@java.lang.Override
public double getSplineScale() {
return splineScale_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filename_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filename_);
}
if (java.lang.Double.doubleToRawLongBits(splineScale_) != 0) {
output.writeDouble(2, splineScale_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filename_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filename_);
}
if (java.lang.Double.doubleToRawLongBits(splineScale_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, splineScale_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource)) {
return super.equals(obj);
}
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource other = (uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource) obj;
if (!getFilename()
.equals(other.getFilename())) return false;
if (java.lang.Double.doubleToLongBits(getSplineScale())
!= java.lang.Double.doubleToLongBits(
other.getSplineScale())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FILENAME_FIELD_NUMBER;
hash = (53 * hash) + getFilename().hashCode();
hash = (37 * hash) + SPLINE_SCALE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getSplineScale()));
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Define a cubic spline resource that can be loaded
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource)
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineResource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineResource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource.Builder.class);
}
// Construct using uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
filename_ = "";
splineScale_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineResource_descriptor;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource getDefaultInstanceForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource.getDefaultInstance();
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource build() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource buildPartial() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource result = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.filename_ = filename_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.splineScale_ = splineScale_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource) {
return mergeFrom((uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource other) {
if (other == uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource.getDefaultInstance()) return this;
if (!other.getFilename().isEmpty()) {
filename_ = other.filename_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.getSplineScale() != 0D) {
setSplineScale(other.getSplineScale());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
filename_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 17: {
splineScale_ = input.readDouble();
bitField0_ |= 0x00000002;
break;
} // case 17
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object filename_ = "";
/**
*
* The filename where the spline data is stored
*
*
* string filename = 1;
* @return The filename.
*/
public java.lang.String getFilename() {
java.lang.Object ref = filename_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
filename_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The filename where the spline data is stored
*
*
* string filename = 1;
* @return The bytes for filename.
*/
public com.google.protobuf.ByteString
getFilenameBytes() {
java.lang.Object ref = filename_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
filename_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The filename where the spline data is stored
*
*
* string filename = 1;
* @param value The filename to set.
* @return This builder for chaining.
*/
public Builder setFilename(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
filename_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The filename where the spline data is stored
*
*
* string filename = 1;
* @return This builder for chaining.
*/
public Builder clearFilename() {
filename_ = getDefaultInstance().getFilename();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The filename where the spline data is stored
*
*
* string filename = 1;
* @param value The bytes for filename to set.
* @return This builder for chaining.
*/
public Builder setFilenameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
filename_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private double splineScale_ ;
/**
*
* The size of the spline scale in nanometers
*
*
* double spline_scale = 2;
* @return The splineScale.
*/
@java.lang.Override
public double getSplineScale() {
return splineScale_;
}
/**
*
* The size of the spline scale in nanometers
*
*
* double spline_scale = 2;
* @param value The splineScale to set.
* @return This builder for chaining.
*/
public Builder setSplineScale(double value) {
splineScale_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The size of the spline scale in nanometers
*
*
* double spline_scale = 2;
* @return This builder for chaining.
*/
public Builder clearSplineScale() {
bitField0_ = (bitField0_ & ~0x00000002);
splineScale_ = 0D;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource)
}
// @@protoc_insertion_point(class_scope:uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource)
private static final uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource();
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CubicSplineResource parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CubicSplineSettingsOrBuilder extends
// @@protoc_insertion_point(interface_extends:uk.ac.sussex.gdsc.smlm.data.config.CubicSplineSettings)
com.google.protobuf.MessageOrBuilder {
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
int getCubicSplineResourcesCount();
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
boolean containsCubicSplineResources(
java.lang.String key);
/**
* Use {@link #getCubicSplineResourcesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getCubicSplineResources();
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
java.util.Map
getCubicSplineResourcesMap();
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource getCubicSplineResourcesOrDefault(
java.lang.String key,
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource defaultValue);
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource getCubicSplineResourcesOrThrow(
java.lang.String key);
}
/**
*
* Define the cubic spline settings
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.CubicSplineSettings}
*/
public static final class CubicSplineSettings extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:uk.ac.sussex.gdsc.smlm.data.config.CubicSplineSettings)
CubicSplineSettingsOrBuilder {
private static final long serialVersionUID = 0L;
// Use CubicSplineSettings.newBuilder() to construct.
private CubicSplineSettings(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CubicSplineSettings() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CubicSplineSettings();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetCubicSplineResources();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings.Builder.class);
}
public static final int CUBIC_SPLINE_RESOURCES_FIELD_NUMBER = 1;
private static final class CubicSplineResourcesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_CubicSplineResourcesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource> cubicSplineResources_;
private com.google.protobuf.MapField
internalGetCubicSplineResources() {
if (cubicSplineResources_ == null) {
return com.google.protobuf.MapField.emptyMapField(
CubicSplineResourcesDefaultEntryHolder.defaultEntry);
}
return cubicSplineResources_;
}
public int getCubicSplineResourcesCount() {
return internalGetCubicSplineResources().getMap().size();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
@java.lang.Override
public boolean containsCubicSplineResources(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetCubicSplineResources().getMap().containsKey(key);
}
/**
* Use {@link #getCubicSplineResourcesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getCubicSplineResources() {
return getCubicSplineResourcesMap();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
@java.lang.Override
public java.util.Map getCubicSplineResourcesMap() {
return internalGetCubicSplineResources().getMap();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
@java.lang.Override
public /* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource getCubicSplineResourcesOrDefault(
java.lang.String key,
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetCubicSplineResources().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource getCubicSplineResourcesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetCubicSplineResources().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetCubicSplineResources(),
CubicSplineResourcesDefaultEntryHolder.defaultEntry,
1);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry
: internalGetCubicSplineResources().getMap().entrySet()) {
com.google.protobuf.MapEntry
cubicSplineResources__ = CubicSplineResourcesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, cubicSplineResources__);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings)) {
return super.equals(obj);
}
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings other = (uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings) obj;
if (!internalGetCubicSplineResources().equals(
other.internalGetCubicSplineResources())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetCubicSplineResources().getMap().isEmpty()) {
hash = (37 * hash) + CUBIC_SPLINE_RESOURCES_FIELD_NUMBER;
hash = (53 * hash) + internalGetCubicSplineResources().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Define the cubic spline settings
*
*
* Protobuf type {@code uk.ac.sussex.gdsc.smlm.data.config.CubicSplineSettings}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:uk.ac.sussex.gdsc.smlm.data.config.CubicSplineSettings)
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettingsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetCubicSplineResources();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutableCubicSplineResources();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_fieldAccessorTable
.ensureFieldAccessorsInitialized(
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings.class, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings.Builder.class);
}
// Construct using uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
internalGetMutableCubicSplineResources().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_descriptor;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings getDefaultInstanceForType() {
return uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings.getDefaultInstance();
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings build() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings buildPartial() {
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings result = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.cubicSplineResources_ = internalGetCubicSplineResources();
result.cubicSplineResources_.makeImmutable();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings) {
return mergeFrom((uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings other) {
if (other == uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings.getDefaultInstance()) return this;
internalGetMutableCubicSplineResources().mergeFrom(
other.internalGetCubicSplineResources());
bitField0_ |= 0x00000001;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.MapEntry
cubicSplineResources__ = input.readMessage(
CubicSplineResourcesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableCubicSplineResources().getMutableMap().put(
cubicSplineResources__.getKey(), cubicSplineResources__.getValue());
bitField0_ |= 0x00000001;
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.String, uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource> cubicSplineResources_;
private com.google.protobuf.MapField
internalGetCubicSplineResources() {
if (cubicSplineResources_ == null) {
return com.google.protobuf.MapField.emptyMapField(
CubicSplineResourcesDefaultEntryHolder.defaultEntry);
}
return cubicSplineResources_;
}
private com.google.protobuf.MapField
internalGetMutableCubicSplineResources() {
if (cubicSplineResources_ == null) {
cubicSplineResources_ = com.google.protobuf.MapField.newMapField(
CubicSplineResourcesDefaultEntryHolder.defaultEntry);
}
if (!cubicSplineResources_.isMutable()) {
cubicSplineResources_ = cubicSplineResources_.copy();
}
bitField0_ |= 0x00000001;
onChanged();
return cubicSplineResources_;
}
public int getCubicSplineResourcesCount() {
return internalGetCubicSplineResources().getMap().size();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
@java.lang.Override
public boolean containsCubicSplineResources(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetCubicSplineResources().getMap().containsKey(key);
}
/**
* Use {@link #getCubicSplineResourcesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getCubicSplineResources() {
return getCubicSplineResourcesMap();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
@java.lang.Override
public java.util.Map getCubicSplineResourcesMap() {
return internalGetCubicSplineResources().getMap();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
@java.lang.Override
public /* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource getCubicSplineResourcesOrDefault(
java.lang.String key,
/* nullable */
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetCubicSplineResources().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource getCubicSplineResourcesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetCubicSplineResources().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearCubicSplineResources() {
bitField0_ = (bitField0_ & ~0x00000001);
internalGetMutableCubicSplineResources().getMutableMap()
.clear();
return this;
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
public Builder removeCubicSplineResources(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableCubicSplineResources().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableCubicSplineResources() {
bitField0_ |= 0x00000001;
return internalGetMutableCubicSplineResources().getMutableMap();
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
public Builder putCubicSplineResources(
java.lang.String key,
uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineResource value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableCubicSplineResources().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000001;
return this;
}
/**
* map<string, .uk.ac.sussex.gdsc.smlm.data.config.CubicSplineResource> cubic_spline_resources = 1;
*/
public Builder putAllCubicSplineResources(
java.util.Map values) {
internalGetMutableCubicSplineResources().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000001;
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:uk.ac.sussex.gdsc.smlm.data.config.CubicSplineSettings)
}
// @@protoc_insertion_point(class_scope:uk.ac.sussex.gdsc.smlm.data.config.CubicSplineSettings)
private static final uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings();
}
public static uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CubicSplineSettings parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public uk.ac.sussex.gdsc.smlm.data.config.PSFProtos.CubicSplineSettings getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSFParameter_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSFParameter_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModel_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModel_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_AstigmatismModelResourcesEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_AstigmatismModelResourcesEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSF_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSF_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_Offset_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_Offset_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_NotesEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_NotesEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_OffsetsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_OffsetsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineResource_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineResource_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_CubicSplineResourcesEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_CubicSplineResourcesEntry_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n,uk/ac/sussex/gdsc/smlm/data/config/psf" +
".proto\022\"uk.ac.sussex.gdsc.smlm.data.conf" +
"ig\032-uk/ac/sussex/gdsc/smlm/data/config/u" +
"nit.proto\"o\n\014PSFParameter\022\014\n\004name\030\001 \001(\t\022" +
"B\n\004unit\030\002 \001(\01624.uk.ac.sussex.gdsc.smlm.d" +
"ata.config.PSFParameterUnit\022\r\n\005value\030\003 \001" +
"(\001\"\256\002\n\020AstigmatismModel\022\r\n\005gamma\030\001 \001(\001\022\t" +
"\n\001d\030\002 \001(\001\022\n\n\002ax\030\003 \001(\001\022\n\n\002bx\030\004 \001(\001\022\n\n\002ay\030" +
"\005 \001(\001\022\n\n\002by\030\006 \001(\001\022\013\n\003s0x\030\007 \001(\001\022\013\n\003s0y\030\010 " +
"\001(\001\022I\n\017z_distance_unit\030\t \001(\01620.uk.ac.sus" +
"sex.gdsc.smlm.data.config.DistanceUnit\022I" +
"\n\017s_distance_unit\030\n \001(\01620.uk.ac.sussex.g" +
"dsc.smlm.data.config.DistanceUnit\022\024\n\014nm_" +
"per_pixel\030\013 \001(\001\022\n\n\002z0\030\014 \001(\001\"\225\002\n\030Astigmat" +
"ismModelSettings\022\200\001\n\033astigmatism_model_r" +
"esources\030\001 \003(\0132[.uk.ac.sussex.gdsc.smlm." +
"data.config.AstigmatismModelSettings.Ast" +
"igmatismModelResourcesEntry\032v\n\036Astigmati" +
"smModelResourcesEntry\022\013\n\003key\030\001 \001(\t\022C\n\005va" +
"lue\030\002 \001(\01324.uk.ac.sussex.gdsc.smlm.data." +
"config.AstigmatismModel:\0028\001\"\236\001\n\003PSF\022=\n\010p" +
"sf_type\030\001 \001(\0162+.uk.ac.sussex.gdsc.smlm.d" +
"ata.config.PSFType\022D\n\nparameters\030\002 \003(\01320" +
".uk.ac.sussex.gdsc.smlm.data.config.PSFP" +
"arameter\022\022\n\nmodel_name\030\003 \001(\t\" \n\006Offset\022\n" +
"\n\002cx\030\002 \001(\001\022\n\n\002cy\030\003 \001(\001\"\300\003\n\010ImagePSF\022\023\n\013i" +
"mage_count\030\001 \001(\005\022\024\n\014centre_image\030\002 \001(\005\022\022" +
"\n\npixel_size\030\003 \001(\001\022\023\n\013pixel_depth\030\004 \001(\001\022" +
"\014\n\004fwhm\030\005 \001(\001\022F\n\005notes\030\006 \003(\01327.uk.ac.sus" +
"sex.gdsc.smlm.data.config.ImagePSF.Notes" +
"Entry\022J\n\007offsets\030\007 \003(\01329.uk.ac.sussex.gd" +
"sc.smlm.data.config.ImagePSF.OffsetsEntr" +
"y\022\020\n\010x_centre\030\010 \001(\001\022\020\n\010y_centre\030\t \001(\001\022\020\n" +
"\010z_centre\030\n \001(\001\032,\n\nNotesEntry\022\013\n\003key\030\001 \001" +
"(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032Z\n\014OffsetsEntry\022\013\n" +
"\003key\030\001 \001(\005\0229\n\005value\030\002 \001(\0132*.uk.ac.sussex" +
".gdsc.smlm.data.config.Offset:\0028\001\"=\n\023Cub" +
"icSplineResource\022\020\n\010filename\030\001 \001(\t\022\024\n\014sp" +
"line_scale\030\002 \001(\001\"\376\001\n\023CubicSplineSettings" +
"\022q\n\026cubic_spline_resources\030\001 \003(\0132Q.uk.ac" +
".sussex.gdsc.smlm.data.config.CubicSplin" +
"eSettings.CubicSplineResourcesEntry\032t\n\031C" +
"ubicSplineResourcesEntry\022\013\n\003key\030\001 \001(\t\022F\n" +
"\005value\030\002 \001(\01327.uk.ac.sussex.gdsc.smlm.da" +
"ta.config.CubicSplineResource:\0028\001*\232\001\n\007PS" +
"FType\022\017\n\013PSF_TYPE_NA\020\000\022\030\n\024ONE_AXIS_GAUSS" +
"IAN_2D\020\001\022\030\n\024TWO_AXIS_GAUSSIAN_2D\020\002\022\"\n\036TW" +
"O_AXIS_AND_THETA_GAUSSIAN_2D\020\003\022\032\n\026ASTIGM" +
"ATIC_GAUSSIAN_2D\020\004\022\n\n\006CUSTOM\020\005*U\n\020PSFPar" +
"ameterUnit\022\031\n\025PSF_PARAMETER_UNIT_NA\020\000\022\014\n" +
"\010DISTANCE\020\001\022\r\n\tINTENSITY\020\002\022\t\n\005ANGLE\020\003B\013B" +
"\tPSFProtosb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.getDescriptor(),
});
internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSFParameter_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSFParameter_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSFParameter_descriptor,
new java.lang.String[] { "Name", "Unit", "Value", });
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModel_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModel_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModel_descriptor,
new java.lang.String[] { "Gamma", "D", "Ax", "Bx", "Ay", "By", "S0X", "S0Y", "ZDistanceUnit", "SDistanceUnit", "NmPerPixel", "Z0", });
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_descriptor,
new java.lang.String[] { "AstigmatismModelResources", });
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_AstigmatismModelResourcesEntry_descriptor =
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_descriptor.getNestedTypes().get(0);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_AstigmatismModelResourcesEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_AstigmatismModelSettings_AstigmatismModelResourcesEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSF_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSF_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_PSF_descriptor,
new java.lang.String[] { "PsfType", "Parameters", "ModelName", });
internal_static_uk_ac_sussex_gdsc_smlm_data_config_Offset_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_Offset_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_Offset_descriptor,
new java.lang.String[] { "Cx", "Cy", });
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_descriptor,
new java.lang.String[] { "ImageCount", "CentreImage", "PixelSize", "PixelDepth", "Fwhm", "Notes", "Offsets", "XCentre", "YCentre", "ZCentre", });
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_NotesEntry_descriptor =
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_descriptor.getNestedTypes().get(0);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_NotesEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_NotesEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_OffsetsEntry_descriptor =
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_descriptor.getNestedTypes().get(1);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_OffsetsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_ImagePSF_OffsetsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineResource_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineResource_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineResource_descriptor,
new java.lang.String[] { "Filename", "SplineScale", });
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_descriptor,
new java.lang.String[] { "CubicSplineResources", });
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_CubicSplineResourcesEntry_descriptor =
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_descriptor.getNestedTypes().get(0);
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_CubicSplineResourcesEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_uk_ac_sussex_gdsc_smlm_data_config_CubicSplineSettings_CubicSplineResourcesEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy