IsothermCollection Class |
Namespace: Flir.Atlas.Image.Isotherms
public class IsothermCollection : IEnumerable<Isotherm>, IEnumerable
The IsothermCollection type exposes the following members.
Name | Description | |
---|---|---|
AddAbove |
Adds the specified isotherm of IsothermType type to the collection.
| |
AddBelow |
Adds the specified isotherm of IsothermType type to the collection.
| |
AddInterval |
Adds the specified isotherm of IsothermType type to the collection.
| |
Clear |
Clears all isotherms from the collection.
| |
Contains |
Determines whether the collection contains the specified Isotherm.
| |
Equals | (Inherited from Object.) | |
GetEnumerator |
Returns an enumerator that iterates through the collection.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Remove |
Removes the specified isotherm.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Count |
Gets the number of isotherms in the collection.
| |
Item |
Gets the isotherm at the specified index.
|
Name | Description | |
---|---|---|
Added |
Occurs when an Isotherm is added.
| |
Changed |
Occurs when an Isotherm is changed.
| |
Removed |
Occurs when an Isotherm is removed.
|
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; } } }