Click or drag to resize
IsothermCollection Class
This class represents a collection of isotherms.
Adds the specified isotherm of IsothermType type to the collection.
Inheritance Hierarchy
SystemObject
  Flir.Atlas.Image.IsothermsIsothermCollection

Namespace: Flir.Atlas.Image.Isotherms
Assembly: Flir.Atlas.Image (in Flir.Atlas.Image.dll) Version: 3.1
Syntax
C#
public class IsothermCollection : IEnumerable<Isotherm>, 
	IEnumerable

Return Value

Type: 
The added isotherm object.

The IsothermCollection type exposes the following members.

Methods
  NameDescription
Public methodAddAbove
Adds the specified isotherm of IsothermType type to the collection.
Public methodAddBelow
Adds the specified isotherm of IsothermType type to the collection.
Public methodAddInterval
Adds the specified isotherm of IsothermType type to the collection.
Public methodClear
Clears all isotherms from the collection.
Public methodContains
Determines whether the collection contains the specified Isotherm.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodCode exampleRemove
Removes the specified isotherm.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyCount
Gets the number of isotherms in the collection.
Public propertyItem
Gets the isotherm at the specified index.
Top
Events
  NameDescription
Public eventAdded
Occurs when an Isotherm is added.
Public eventChanged
Occurs when an Isotherm is changed.
Public eventRemoved
Occurs when an Isotherm is removed.
Top
Examples
C#
using Flir.Atlas.Image;
namespace MyNamespace
{
   private void ApplyIsotherm()
   {
      // create Isotherm depending on Selected Item in ComboBox
      _image.Isotherms.Clear();
      switch ((IsothermType)isoThermToolStripComboBox.SelectedItem)
      {
          case IsothermType.Above:
              _image.Isotherms.AddAbove();
              break;
           case IsothermType.Below:
               _image.Isotherms.AddBelow();
               break;
           case IsothermType.Interval:
              _image.Isotherms.AddInterval();
               break;
          default:
               throw new ArgumentOutOfRangeException();
       }

       Isotherm iso = _image.Isotherms[0];
       labelLevel.Text = _image.TemperatureUnit == TemperatureUnit.Celsius ? "°C" : "°F";

         //Read out the threshold and update the GUI  
        if (iso.IsothermType == IsothermType.Interval)
        {
              IsothermInterval isothermInterval = (IsothermInterval) iso;
              numericUpDownWidth.Enabled = true;
              numericUpDownLevel.Enabled = true;

              numericUpDownWidth.Value = (decimal)(Math.Abs(isothermInterval.Interval.Maximum - isothermInterval.Interval.Minimum));
              numericUpDownLevel.Value = (decimal)(isothermInterval.Interval.Minimum);
          }
          else if (iso.IsothermType == IsothermType.Above)
          {
                IsothermAbove isothermAbove = (IsothermAbove) iso;
                var val = isothermAbove.Threshold;

                 numericUpDownLevel.Enabled = true;
                 numericUpDownWidth.Enabled = false;

                 numericUpDownLevel.Value = (decimal)val;
           }
           else // Below
           {
               IsothermBelow isothermBelow = (IsothermBelow) iso;
                var val = isothermBelow.Threshold;

                 numericUpDownLevel.Enabled = true;
               numericUpDownWidth.Enabled = false;

             numericUpDownLevel.Value = (decimal)val;
          }
   }
}
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also