62 lines
3.3 KiB
Markdown
62 lines
3.3 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- Common/DTS.CommonCore/Interface/RegionOfInterest/IRegionOfInterest.cs
|
||
|
|
generated_at: "2026-04-17T16:38:32.163819+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "aa8c3bd25b4f0eb9"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Documentation: IRegionOfInterest Interface
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
The `IRegionOfInterest` interface defines a contract for representing a bounded region of interest within a data stream or signal. It extends `INotifyPropertyChanged`, indicating it is designed for use in data-binding scenarios (typically UI frameworks like WPF). The interface captures temporal/spatial boundaries (`Start`, `End`), associated channel metadata, and state flags for enabling or marking default regions. This abstraction allows different implementations of ROI behavior while maintaining a consistent interface for consumers.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### Properties
|
||
|
|
|
||
|
|
| Property | Type | Access | Description |
|
||
|
|
|----------|------|--------|-------------|
|
||
|
|
| `Suffix` | `string` | get/set | A string suffix associated with the region. |
|
||
|
|
| `Start` | `double` | get/set | The starting boundary of the region. |
|
||
|
|
| `End` | `double` | get/set | The ending boundary of the region. |
|
||
|
|
| `IsEnabled` | `bool` | get/set | Flag indicating whether the region is active/enabled. |
|
||
|
|
| `IsDefault` | `bool` | get/set | Flag indicating whether this region is the default. |
|
||
|
|
| `ChannelNames` | `string[]` | get/set | Array of channel names associated with this region. |
|
||
|
|
|
||
|
|
### Methods
|
||
|
|
|
||
|
|
| Method | Signature | Description |
|
||
|
|
|--------|-----------|-------------|
|
||
|
|
| `SetChannelNamesNoNotify` | `void SetChannelNamesNoNotify(string[] names)` | Sets the `ChannelNames` property without raising property change notifications. |
|
||
|
|
| `ResetSuffix` | `void ResetSuffix()` | Resets the `Suffix` property to a default or calculated value. |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 3. Invariants
|
||
|
|
|
||
|
|
- **INotifyPropertyChanged Contract**: All implementations must raise `PropertyChanged` events when property values change (except when using `SetChannelNamesNoNotify`).
|
||
|
|
- **No explicit ordering guarantee**: The interface does not enforce that `Start` must be less than `End`; this constraint, if required, must be enforced by implementations.
|
||
|
|
- **No null constraints visible**: The interface does not specify nullability requirements for `Suffix`, `ChannelNames`, or the `names` parameter.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 4. Dependencies
|
||
|
|
|
||
|
|
### This module depends on:
|
||
|
|
- `System.ComponentModel` — for the `INotifyPropertyChanged` interface.
|
||
|
|
|
||
|
|
### What depends on this module:
|
||
|
|
- **Cannot be determined from source alone.** As an interface definition, any class implementing `IRegionOfInterest` or any consumer accepting this interface as a parameter depends on this module.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 5. Gotchas
|
||
|
|
|
||
|
|
- **`SetChannelNamesNoNotify` bypasses change notification**: This method exists specifically to set `ChannelNames` without triggering `PropertyChanged` events. Callers should be aware that UI bindings may not update automatically when using this method.
|
||
|
|
- **`ResetSuffix` behavior is undefined in the interface**: The method implies there is a default or computed suffix value, but the logic for what "reset" means is implementation-specific and not documented in the interface.
|
||
|
|
- **No validation at interface level**: There are no constraints on `Start`/`End` ordering, `ChannelNames` array contents, or mutual exclusivity of `IsDefault` across multiple regions. Implementations must define and document these behaviors.
|