• Introduction
  • Programmer's Guide
  • Technical Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • ic4
      • BufferPool
      • DeviceEnum
      • DeviceInfo
      • Display
      • DisplayNotation
      • DisplayRenderPosition
      • DisplayStatistics
      • DisplayType
      • EmbeddedDisplay
      • ErrorCode
      • ExternalOpenGLDisplay
      • FloatRepresentation
      • FloatingDisplay
      • FrameMetaData
      • Grabber
      • HandleObject
      • IBufferAllocator
      • IC4Exception
      • IDisplay
      • ImageBuffer
      • ImageBuffer.CopyOptions
      • ImageBufferExtensions
      • ImageBufferExtensionsOpenCvSharp
      • ImageType
      • IntRepresentation
      • Interface
      • Library
      • LogLevel
      • LogTarget
      • PixelFormat
      • PixelFormatExtensions
      • PngCompressionLevel
      • PropBoolean
      • PropCategory
      • PropCommand
      • PropEnumEntry
      • PropEnumeration
      • PropFloat
      • PropId
      • PropIdBoolean
      • PropIdCommand
      • PropIdEnumeration
      • PropIdFloat
      • PropIdInteger
      • PropIdRegister
      • PropIdString
      • PropInteger
      • PropRegister
      • PropString
      • Property
      • PropertyIncrementMode
      • PropertyMap
      • PropertyType
      • PropertyVisibility
      • QueueSink
      • QueueSinkConnectedEventArgs
      • QueueSinkEventArgs
      • QueueSinkQueueSizes
      • Sink
      • SinkMode
      • SinkType
      • SnapSink
      • SnapSinkAllocationStrategy
      • StreamSetupOption
      • StreamStatistics
      • TransportLayerType
      • VersionInfoFlags
      • VideoWriter
      • VideoWriterType

    Class PropFloat

    Float properties represent a feature whose value is a floating-point number.

    Inheritance
    object
    HandleObject
    Property
    PropFloat
    Implements
    IDisposable
    Inherited Members
    Property.Notification
    Property.Type
    Property.DisplayName
    Property.Name
    Property.Description
    Property.Tooltip
    Property.Visibility
    Property.IsLocked
    Property.IsLikelyLockedByStream
    Property.IsAvailable
    Property.IsReadonly
    Property.IsSelector
    Property.SelectedProperties
    HandleObject.Dispose(bool)
    HandleObject.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: ic4
    Assembly: ic4dotnet.dll
    Syntax
    public class PropFloat : Property, IDisposable
    Remarks

    Common examples for a float properties are AcquisitionFrameRate, ExposureTime or Gain.

    A float property can limit the range of valid values. The range of possible values can be queried by reading Minimum and Maximum.

    The possible values can be further restricted by an increment value or a set of value values. Check IncrementMode, Increment and ValidValueSet.

    A float property supplies hints that can be useful when creating a user interface:

    • A Representation
    • A Unit
    • DisplayNotation and DisplayPrecision

    PropFloat instances are created in multiple ways:

    • By directly querying a PropertyMap for a float property:
      • Find(PropIdFloat)
      • FindFloat(string)
      • TryFind(PropIdFloat, out PropFloat)
      • TryFindFloat(string, out PropFloat)
    • By casting a Property object obtained from one of the functions returning generic property objects:
      • Find(string)
      • TryFind(string, out Property)
      • Features
      • All
      • SelectedProperties

    Properties

    DisplayNotation

    A suggested display notation to use when displaying the float property's value

    Declaration
    public DisplayNotation DisplayNotation { get; }
    Property Value
    Type Description
    DisplayNotation

    A suggested display notation to use when displaying the float property's value

    Remarks

    The display precision can be used as a hint when creating user interfaces

    DisplayPrecision

    A suggested number of significant digits to use when displaying the float property's value

    Declaration
    public long DisplayPrecision { get; }
    Property Value
    Type Description
    long

    A suggested number of significant digits to use when displaying the float property's value

    Remarks

    The display precision can be used as a hint when creating user interfaces

    Increment

    The step size for valid values accepted by this float property

    Declaration
    public double Increment { get; }
    Property Value
    Type Description
    double

    The step size for valid values accepted by this float property

    Remarks

    The increment restricts the set of valid values for a float property.

    For example, if the property's minimum value is 0, the maximum is 10, and the increment is 0.5, 0.25 is not a valid value for the property

    Accessing Increment will throw an exception if IncrementMode is not equal to Increment.

    Exceptions
    Type Condition
    IC4Exception

    Check ErrorCode and ToString() for details.

    IncrementMode

    Indicates how this float property restricts which values are valid between its minimum and maximum value.

    Declaration
    public PropertyIncrementMode IncrementMode { get; }
    Property Value
    Type Description
    PropertyIncrementMode

    The property's increment mode

    Remarks

    A float property has 1 of 3 possible increment modes:

    Increment modeDescription
    None The property has no restrictions, all values between Minimum and Maximum can be set.
    Increment Only multiples of Increment can be set.
    ValueSet Only values that are part of ValidValueSet can be set.

    Maximum

    The maximum value accepted by this property.

    Declaration
    public double Maximum { get; }
    Property Value
    Type Description
    double

    The maximum value accepted by this property.

    Exceptions
    Type Condition
    IC4Exception

    Check ErrorCode and ToString() for details.

    Minimum

    The minimum value accepted by this property.

    Declaration
    public double Minimum { get; }
    Property Value
    Type Description
    double

    The minimum value accepted by this property.

    Exceptions
    Type Condition
    IC4Exception

    Check ErrorCode and ToString() for details.

    Representation

    The suggested representation for this float property

    Declaration
    public FloatRepresentation Representation { get; }
    Property Value
    Type Description
    FloatRepresentation

    The suggested representation for this float property

    Remarks

    The representation can be used as a hint when creating user interfaces

    Unit

    The unit of this float property

    Declaration
    public string Unit { get; }
    Property Value
    Type Description
    string

    The unit of this float property

    Exceptions
    Type Condition
    IC4Exception

    Check ErrorCode and ToString() for details.

    ValidValueSet

    The set of valid values for this property

    Declaration
    public IReadOnlyList<double> ValidValueSet { get; }
    Property Value
    Type Description
    IReadOnlyList<double>

    A list containing the values that are valid for this property

    Remarks

    Accessing Increment will throw an exception if IncrementMode is not equal to ValueSet.

    Exceptions
    Type Condition
    IC4Exception

    Check ErrorCode and ToString() for details.

    Value

    The current value of this property

    The value is only writable is the property's writability is not restricted. See IsLocked, IsReadonly, IsAvailable.

    Declaration
    public double Value { get; set; }
    Property Value
    Type Description
    double

    The current value of this property

    Exceptions
    Type Condition
    IC4Exception

    Check ErrorCode and ToString() for details.

    Methods

    TryGetValue(out double)

    Tries to get the current value of the property.

    Declaration
    public bool TryGetValue(out double val)
    Parameters
    Type Name Description
    double val

    Output parameter receiving the current value of the property on success

    Returns
    Type Description
    bool

    true, if the operation was successful, otherwise false.

    Remarks

    In contrast to reading the Value property directly, this method does not throw an exception in case of an error.

    TrySetValue(double)

    Tries to set the current value of the property.

    Declaration
    public bool TrySetValue(double val)
    Parameters
    Type Name Description
    double val

    The new value

    Returns
    Type Description
    bool

    true, if the operation was successful, otherwise false.

    Remarks

    In contrast to writing the Value property directly, this method does not throw an exception in case of an error.

    Implements

    IDisposable
    In this article
    Copyright ©️ 2024 The Imaging Source Europe GmbH www.theimagingsource.com