feat(core): add ECGViewport for DICOM waveform rendering#2621
Open
TFRadicalImaging wants to merge 1 commit intocornerstonejs:mainfrom
Open
feat(core): add ECGViewport for DICOM waveform rendering#2621TFRadicalImaging wants to merge 1 commit intocornerstonejs:mainfrom
TFRadicalImaging wants to merge 1 commit intocornerstonejs:mainfrom
Conversation
Add a new ECG viewport type that renders 12-lead ECG traces from DICOM Waveform data using a canvas-based custom rendering pipeline (same pattern as VideoViewport and WSIViewport). - ECGViewport class with grid, trace, and label rendering - Pan (left-drag) and Zoom (right-drag) tool support - Per-channel trace visibility toggle - Supports InlineBinary, BulkDataURI, and retrieveBulkData data sources - Typed WaveformSequenceInput interface for the setEcg() API - Interactive example with 12-lead ECG demo data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new ECG viewport type that renders 12-lead ECG traces from DICOM Waveform data using a canvas-based custom rendering pipeline (same pattern as VideoViewport and WSIViewport).
Context
Adds a new ECG viewport type to Cornerstone3D for rendering 12-lead ECG traces from DICOM Waveform data (SOP Class 1.2.840.10008.5.1.4.1.1.9.1.1). This follows the same custom rendering pipeline pattern used by
VideoViewportandWSIViewport— canvas 2D rendering, no VTK.js dependency.The viewport accepts parsed DICOM WaveformSequence metadata via
setEcg()and handles data loading from InlineBinary, BulkDataURI, orretrieveBulkDatasources.Changes & Results
New files:
packages/core/src/RenderingEngine/ECGViewport.ts— Main viewport class (~940 lines) with grid, trace, and label renderingpackages/core/src/types/ECGViewportTypes.ts— Type definitions (ECGChannel,ECGWaveformData,WaveformSequenceInput,WaveformDataSource)packages/core/src/types/ECGViewportProperties.ts— Viewport properties extendingViewportPropertiespackages/core/src/types/IECGViewport.ts— Type alias for the viewportpackages/core/examples/ecg/index.ts— Interactive example with 12-lead ECG demo dataModified files:
packages/core/src/enums/ViewportType.ts— AddedECG = 'ecg'packages/core/src/RenderingEngine/helpers/viewportTypeToViewportClass.ts— Registered ECGViewportpackages/core/src/index.ts— Exported ECGViewportpackages/core/src/types/index.ts— Exported new ECG typesFeatures:
Testing
yarn example ecgChecklist
PR
semantic-release format and guidelines.
Code
etc.)
Tested Environment