Files
2026-04-17 14:55:32 -04:00

3.0 KiB
Raw Permalink Blame History

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.CommonCore/Events/RegionOfInterest/RegionOfInterestChangedEvent.cs
2026-04-16T02:47:49.374454+00:00 Qwen/Qwen3-Coder-Next-FP8 1 a47f2325776df1cf

RegionOfInterest

  1. Purpose
    This module defines a Prism CompositePresentationEvent-based event (RegionOfInterestChangedEvent) used to publish and subscribe to notifications when a region of interest (ROI) changes within the system. It serves as the messaging mechanism in the event-driven architecture to decouple components that generate or consume ROI updates—enabling loose coupling between ROI management logic and UI or processing modules that react to ROI changes.

  2. Public Interface

  • RegionOfInterestChangedEvent
    • Type: class (inherits from CompositePresentationEvent<IRegionOfInterest>)
    • Behavior: A Prism event type used for publishing and subscribing to ROI change notifications. When published, the event carries an IRegionOfInterest instance representing the new or updated region of interest. Subscribers receive the payload via their event handler.
  1. Invariants
  • The event payload is guaranteed to be of type IRegionOfInterest (as per the generic parameter of the base class).
  • The event must be published only with a non-null IRegionOfInterest instance (though the source does not enforce this at compile time; runtime enforcement would depend on publisher code).
  • As a CompositePresentationEvent, it supports multiple subscribers and thread-safe publication/subscription (per Prisms implementation), but ordering of subscriber invocation is not guaranteed.
  1. Dependencies
  • External Dependencies:
    • Microsoft.Practices.Prism.Events — provides the CompositePresentationEvent<T> base class.
    • DTS.Common.Interface.RegionOfInterest — defines the IRegionOfInterest interface used as the event payload.
  • Depended upon by:
    • Any module or component that needs to react to ROI changes (e.g., UI views, analysis pipelines) will subscribe to this event.
    • ROI management components (e.g., ROI editors, trackers) are expected to publish this event when an ROI is modified.
  1. Gotchas
  • The class is a pure event definition—it contains no logic, validation, or helper methods. All behavior (e.g., payload construction, null checks) resides in the publisher/consumer code.
  • No explicit documentation is present about whether the event is intended for synchronous or asynchronous use; Prisms CompositePresentationEvent defaults to synchronous dispatch on the calling thread unless configured otherwise (e.g., via ThreadOption.Background in subscription), but this is not specified here.
  • The event name RegionOfInterestChangedEvent suggests a change occurred, but the payload is the current ROI state—not a diff or delta. Consumers must infer what changed by comparing with prior state if needed.
  • None identified from source alone.