├── .gitignore ├── README.md ├── apps ├── ECGPrint │ ├── AssemblyInfo.cs │ ├── DDEClient.cs │ ├── ECGPrint.cs │ ├── ECGPrint.csproj │ └── ECGPrint.ico ├── ECGStoreSCU │ ├── AssemblyInfo.cs │ ├── ECGStoreSCU.cs │ ├── ECGStoreSCU.csproj │ └── ECGStoreSCU.ico ├── ECGTool │ ├── AssemblyInfo.cs │ ├── ECGTool-core.csproj │ ├── ECGTool.cs │ ├── ECGTool.csproj │ ├── ECGToolkit.bat │ └── ECGViewer.ico ├── ECGViewer │ ├── AssemblyInfo.cs │ ├── Config.cs │ ├── Config.resources │ ├── Config.resx │ ├── ECGViewer-core.csproj │ ├── ECGViewer.cs │ ├── ECGViewer.csproj │ ├── ECGViewer.ico │ ├── ECGViewer.resources │ ├── ECGViewer.resx │ ├── OpenFromECGMS.cs │ ├── OpenFromECGMS.resources │ ├── OpenFromECGMS.resx │ ├── SaveToECGMS.cs │ ├── SaveToECGMS.resources │ └── SaveToECGMS.resx ├── apps-core.sln └── apps.sln ├── examples ├── Example.dcm ├── Example.scp └── Example.xml ├── exclude.txt ├── libs └── ECGConversion │ ├── DICOM │ ├── AssemblyInfo.cs │ ├── DICOM-core.csproj │ ├── DICOM.csproj │ ├── DICOM │ │ ├── DICOMFormat.cs │ │ └── DICOMPDFFormat.cs │ ├── DICOMReader.cs │ ├── ECGLoad.cs │ ├── PACS.cs │ ├── ecgtoolkit-icon.png │ └── libs │ │ ├── 1.1 │ │ ├── dicomcs.dll │ │ └── log4net.dll │ │ ├── 2.0 │ │ └── dicomcs.dll │ │ ├── net5.0 │ │ └── dicomcs.dll │ │ └── netstandard2.0 │ │ ├── dicomcs.deps.json │ │ └── dicomcs.dll │ ├── ECGConversion-core.sln │ ├── ECGConversion.sln │ ├── ECGConversion │ ├── AssemblyInfo.cs │ ├── CSV │ │ └── CSVFormat.cs │ ├── CheckVersion.cs │ ├── DSP │ │ ├── BandpassFilterButterworthImplementation.cs │ │ ├── FIRFilterImplementation.cs │ │ ├── HighpassFilterButterworthImplementation.cs │ │ ├── HighpassFilterButterworthSection.cs │ │ ├── IFilter.cs │ │ ├── IIRFilterImplementation.cs │ │ ├── LowpassFilterButterworthImplementation.cs │ │ └── LowpassFilterButterworthSection.cs │ ├── ECGConfig.cs │ ├── ECGConversion-core.csproj │ ├── ECGConversion.csproj │ ├── ECGConverter.cs │ ├── ECGDemographics │ │ ├── AcquiringDeviceID.cs │ │ ├── Date.cs │ │ ├── DemographicEnumrations.cs │ │ ├── Drug.cs │ │ └── IDemographic.cs │ ├── ECGDiagnostic │ │ ├── IDiagnostic.cs │ │ └── Statements.cs │ ├── ECGDraw.cs │ ├── ECGGlobalMeasurements │ │ ├── GlobalMeasurement.cs │ │ ├── GlobalMeasurements.cs │ │ ├── IGlobalMeasurement.cs │ │ └── Spike.cs │ ├── ECGLeadMeasurements │ │ ├── ILeadMeasurement.cs │ │ ├── LeadMeasurement.cs │ │ ├── LeadMeasurements.cs │ │ ├── MeasurementType.cs │ │ └── Morphology.cs │ ├── ECGManagementSysteem │ │ ├── ECGInfo.cs │ │ └── IECGManagementSystem.cs │ ├── ECGPlugin.cs │ ├── ECGSignals │ │ ├── BufferedSignals.cs │ │ ├── IBufferedSource.cs │ │ ├── ISignal.cs │ │ ├── LeadType.cs │ │ ├── QRSZone.cs │ │ ├── Signal.cs │ │ └── Signals.cs │ ├── ECGTool.cs │ ├── ECGWriter.cs │ ├── IECGFormat.cs │ ├── IECGReader.cs │ ├── LICENSE-2.0.txt │ ├── NOTICE.txt │ ├── RawECGReader.cs │ ├── RawFormat │ │ ├── RawECGData.cs │ │ ├── RawECGFormat.cs │ │ └── RawECGHeader.cs │ ├── SCP │ │ ├── SCPDate.cs │ │ ├── SCPFormat.cs │ │ ├── SCPSection.cs │ │ ├── SCPSection0.cs │ │ ├── SCPSection1.cs │ │ ├── SCPSection10.cs │ │ ├── SCPSection11.cs │ │ ├── SCPSection2.cs │ │ ├── SCPSection3.cs │ │ ├── SCPSection4.cs │ │ ├── SCPSection5.cs │ │ ├── SCPSection6.cs │ │ ├── SCPSection7.cs │ │ ├── SCPSection8.cs │ │ ├── SCPSectionUnkown.cs │ │ └── SCPTime.cs │ ├── SCPReader.cs │ ├── SortedList.cs │ ├── Tools │ │ ├── BytesTool.cs │ │ ├── CRCTool.cs │ │ └── DataSection.cs │ ├── UnknownECGReader.cs │ ├── ecgtoolkit-icon.png │ └── license.rtf │ ├── ISHNE │ ├── AssemblyInfo.cs │ ├── ECGLoad.cs │ ├── ISHNE-core.csproj │ ├── ISHNE.csproj │ ├── ISHNE │ │ ├── ISHNEFormat.cs │ │ └── ISHNEHeader.cs │ ├── ISHNEReader.cs │ └── ecgtoolkit-icon.png │ ├── MUSEXML │ ├── AssemblyInfo.cs │ ├── ECGLoad.cs │ ├── MUSEXML-core.csproj │ ├── MUSEXML.csproj │ ├── MUSEXML │ │ └── MUSEXMLFormat.cs │ ├── MUSEXMLReader.cs │ ├── Schemas │ │ ├── I2.dtd │ │ ├── restecg.cs │ │ ├── restecg.dtd │ │ └── restecg.xsd │ └── ecgtoolkit-icon.png │ ├── OmronECG │ ├── AssemblyInfo.cs │ ├── ECGLoad.cs │ ├── OmronECG-core.csproj │ ├── OmronECG.csproj │ ├── OmronECG │ │ └── OmronECGFormat.cs │ ├── OmronECGReader.cs │ └── ecgtoolkit-icon.png │ ├── PDF │ ├── AssemblyInfo.cs │ ├── ECGLoad.cs │ ├── PDF-core.csproj │ ├── PDF.csproj │ ├── PDF │ │ ├── PDFDemographics.cs │ │ └── PDFFormat.cs │ ├── PDFTool.cs │ ├── ecgtoolkit-icon.png │ └── libs │ │ ├── 1.1 │ │ └── itextsharp.dll │ │ ├── 2.0 │ │ └── itextsharp.dll │ │ ├── net5.0 │ │ └── itextsharp.dll │ │ └── netstandard2.0 │ │ ├── itextsharp.deps.json │ │ └── itextsharp.dll │ └── aECG │ ├── AssemblyInfo.cs │ ├── ECGLoad.cs │ ├── MegaCare.xslt │ ├── aECG-core.csproj │ ├── aECG.csproj │ ├── aECG │ ├── aECGAddress.cs │ ├── aECGAnnotation.cs │ ├── aECGAnnotationSet.cs │ ├── aECGAssignedAuthorType.cs │ ├── aECGAuthor.cs │ ├── aECGBoundary.cs │ ├── aECGClinicalTrial.cs │ ├── aECGCode.cs │ ├── aECGComponent.cs │ ├── aECGControlVariable.cs │ ├── aECGControlVariableHolder.cs │ ├── aECGDemographicPerson.cs │ ├── aECGDevice.cs │ ├── aECGElement.cs │ ├── aECGFormat.cs │ ├── aECGId.cs │ ├── aECGIdentification.cs │ ├── aECGLocation.cs │ ├── aECGName.cs │ ├── aECGOrganization.cs │ ├── aECGPerformer.cs │ ├── aECGPerson.cs │ ├── aECGPlayedManufacturedDevice.cs │ ├── aECGRelatedObservation.cs │ ├── aECGSequence.cs │ ├── aECGSequenceSet.cs │ ├── aECGSeries.cs │ ├── aECGSite.cs │ ├── aECGSubjectAssignment.cs │ ├── aECGSubjectAssignmentDefinition.cs │ ├── aECGSubjectFindingComment.cs │ ├── aECGSupportingROI.cs │ ├── aECGTime.cs │ ├── aECGTimepointEvent.cs │ ├── aECGTransactionType.cs │ ├── aECGTrialSubject.cs │ ├── aECGUnknownElement.cs │ ├── aECGValue.cs │ └── aECGValuePair.cs │ ├── aECGReader.cs │ └── ecgtoolkit-icon.png ├── package ├── ECGConversionToolkit │ ├── ECGToolkit.bat │ ├── LICENSE-2.0.txt │ ├── NOTICE.txt │ └── license.rtf ├── ECGToolkit │ └── ECGToolkit.mdproj └── package.sln └── release.bat /.gitignore: -------------------------------------------------------------------------------- 1 | libs\ClosedFormats\ 2 | Release\ 3 | Debug\ 4 | Release-CE\ 5 | Debug-CE\ 6 | Release-2K5\ 7 | Debug-2K5\ 8 | Release-CE-2K5\ 9 | Debug-CE-2K5\ 10 | release.bat 11 | .bak 12 | bin/ 13 | obj/ 14 | .idea/ 15 | latest/ 16 | /env-vars.bat 17 | *.suo 18 | #ignore thumbnails created by windows 19 | Thumbs.db 20 | #Ignore files build by Visual Studio 21 | *.obj 22 | *.exe 23 | *.pdb 24 | *.user 25 | *.aps 26 | *.pch 27 | *.vspscc 28 | *_i.c 29 | *_p.c 30 | *.ncb 31 | *.suo 32 | *.tlb 33 | *.tlh 34 | *.bak 35 | *.cache 36 | *.ilk 37 | *.log 38 | [Bb]in 39 | [Dd]ebug*/ 40 | *.lib 41 | *.sbr 42 | *.resharper.user 43 | obj/ 44 | [Rr]elease*/ 45 | _ReSharper*/ 46 | [Tt]est[Rr]esult* 47 | App_Data/ 48 | nuget-packages/ 49 | *.nupkg 50 | *.pidb 51 | *.userprefs 52 | add.sh 53 | .gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # C# ECG Toolkit 3.0 2 | ### ECG Toolkit support for: SCP-ECG, DICOM, HL7 aECG, ISHNE & MUSE-XML 3 | 4 | ## Description 5 | C# ECG Toolkit is an open source software toolkit to convert, view and print electrocardiograms. The toolkit is developed using C# .NET 2.0 (code also supports 1.1, 3.5 and 4.0). Support for ECG formats: SCP-ECG, DICOM, HL7 aECG, ISHNE and MUSE-XML. 6 | 7 | ## Features 8 | - ECG Viewer 9 | - Caliper 10 | - Converter 11 | - SCP ECG 12 | - HL7 aECG 13 | - DICOM 14 | - ISHNE 15 | - MUSE-XML 16 | - PDF 17 | - OmronECG 18 | 19 | > Migrating from SourceForge [CVS repository](http://ecgtoolkit-cs.sourceforge.net/), 2016-6-12. 20 | > Merge all commits prior to 2019-12-2。 21 | > Merge all commits prior to 2024-09-27。 22 | [Ecgtoolkit-cs](https://sourceforge.net/p/ecgtoolkit-cs/git/ci/master/tree/) project revived, go to sourceforge for the latest source code。 23 | -------------------------------------------------------------------------------- /apps/ECGPrint/ECGPrint.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 10.0.0 7 | 2.0 8 | {D6BA6917-543C-4198-AA19-54BE3C363EDD} 9 | Exe 10 | ECGPrint 11 | ECGPrint 12 | ECGPrint.ECGPrint 13 | ECGPrint.ico 14 | 2.2 15 | v4.7.2 16 | 17 | 18 | 19 | True 20 | full 21 | False 22 | bin\Debug 23 | DEBUG; 24 | prompt 25 | 4 26 | False 27 | false 28 | 29 | 30 | none 31 | True 32 | bin\Release 33 | prompt 34 | 4 35 | False 36 | false 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | {F969B245-DCD2-4AF6-AE74-E95F778D2339} 51 | ECGConversion 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /apps/ECGPrint/ECGPrint.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/apps/ECGPrint/ECGPrint.ico -------------------------------------------------------------------------------- /apps/ECGStoreSCU/ECGStoreSCU.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 10.0.0 7 | 2.0 8 | {F9090239-231D-4E16-87F0-6527520A8F02} 9 | Exe 10 | ECGStoreSCU 11 | ECGStoreSCU 12 | ECGStoreSCU.ECGStoreSCU 13 | ECGStoreSCU.ico 14 | 2.2 15 | v4.7.2 16 | 17 | 18 | 19 | True 20 | full 21 | False 22 | bin\Debug 23 | DEBUG; 24 | prompt 25 | 4 26 | False 27 | false 28 | 29 | 30 | none 31 | True 32 | bin\Release 33 | prompt 34 | 4 35 | False 36 | false 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | {F969B245-DCD2-4AF6-AE74-E95F778D2339} 50 | ECGConversion 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /apps/ECGStoreSCU/ECGStoreSCU.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/apps/ECGStoreSCU/ECGStoreSCU.ico -------------------------------------------------------------------------------- /apps/ECGTool/ECGTool-core.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net8.0 6 | ECGTool 7 | ECGTool 8 | ECGTool.ECGTool 9 | ECGTool based on framework for ECG Conversion 10 | Copyright 2019-2022, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\nCopyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands\nCopyright 2008-2010, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 11 | 3.0.0.0 12 | Thoraxcentrum, Erasmus MC 13 | M.J.B. van Ettinger 14 | ECGTool based on ECGConversion 15 | en-NL 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /apps/ECGTool/ECGTool.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 10.0.0 7 | 2.0 8 | {8CDF14D1-4BFF-4E3E-A93F-8011A8940CD1} 9 | Exe 10 | ECGTool 11 | ECGTool 12 | ECGTool.ECGTool 13 | ECGViewer.ico 14 | 2.2 15 | v4.7.2 16 | 17 | 18 | 19 | True 20 | full 21 | False 22 | bin\Debug 23 | DEBUG; 24 | prompt 25 | 4 26 | False 27 | false 28 | 29 | 30 | none 31 | True 32 | bin\Release 33 | prompt 34 | 4 35 | False 36 | false 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | {F969B245-DCD2-4AF6-AE74-E95F778D2339} 53 | ECGConversion 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /apps/ECGTool/ECGToolkit.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Copyright 2012, van Ettinger Information Technology, Lopik, The Netherlands 3 | REM Copyright 2004,2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 4 | REM 5 | REM Licensed under the Apache License, Version 2.0 (the "License"); 6 | REM you may not use this file except in compliance with the License. 7 | REM You may obtain a copy of the License at 8 | REM 9 | REM http://www.apache.org/licenses/LICENSE-2.0 10 | REM 11 | REM Unless required by applicable law or agreed to in writing, software 12 | REM distributed under the License is distributed on an "AS IS" BASIS, 13 | REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | REM See the License for the specific language governing permissions and 15 | REM limitations under the License. 16 | REM 17 | REM Written by Maarten JB van Ettinger. 18 | REM 19 | 20 | set path=%PATH%%CD%; 21 | 22 | echo Can now use ECGToolkit from commandline! 23 | 24 | echo Available applications: 25 | cmd /K dir /B *.exe -------------------------------------------------------------------------------- /apps/ECGTool/ECGViewer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/apps/ECGTool/ECGViewer.ico -------------------------------------------------------------------------------- /apps/ECGViewer/Config.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/apps/ECGViewer/Config.resources -------------------------------------------------------------------------------- /apps/ECGViewer/ECGViewer-core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net8.0-windows 6 | ECGViewer 7 | true 8 | ECGViewer 9 | 3.0.0.0 10 | M.J.B. van Ettinger 11 | Thoraxcentrum, Erasmus MC 12 | ECGViewer based on ECGConversion 13 | Copyright 2019-2022, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\nCopyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands\nCopyright 2008-2010, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 14 | ECGViewer based on framework for ECG Conversion 15 | ECGViewer.ECGViewer 16 | 17 | 18 | 19 | TRACE;dotNETCore 20 | 21 | 22 | 23 | dotNETCore 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /apps/ECGViewer/ECGViewer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/apps/ECGViewer/ECGViewer.ico -------------------------------------------------------------------------------- /apps/ECGViewer/ECGViewer.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/apps/ECGViewer/ECGViewer.resources -------------------------------------------------------------------------------- /apps/ECGViewer/OpenFromECGMS.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/apps/ECGViewer/OpenFromECGMS.resources -------------------------------------------------------------------------------- /apps/ECGViewer/SaveToECGMS.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/apps/ECGViewer/SaveToECGMS.resources -------------------------------------------------------------------------------- /apps/apps-core.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31911.196 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECGTool-core", "ECGTool\ECGTool-core.csproj", "{EB655EF0-AE21-4E26-B9AA-FC4DB67D9BC1}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECGConversion-core", "..\libs\ECGConversion\ECGConversion\ECGConversion-core.csproj", "{D803C2E4-A2B7-4A32-BC2D-5D307A9D889D}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ECGViewer-core", "ECGViewer\ECGViewer-core.csproj", "{6D3A7A5E-3ACB-4BEC-8160-C466A2D701B1}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {EB655EF0-AE21-4E26-B9AA-FC4DB67D9BC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {EB655EF0-AE21-4E26-B9AA-FC4DB67D9BC1}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {EB655EF0-AE21-4E26-B9AA-FC4DB67D9BC1}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {EB655EF0-AE21-4E26-B9AA-FC4DB67D9BC1}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {D803C2E4-A2B7-4A32-BC2D-5D307A9D889D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {D803C2E4-A2B7-4A32-BC2D-5D307A9D889D}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {D803C2E4-A2B7-4A32-BC2D-5D307A9D889D}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {D803C2E4-A2B7-4A32-BC2D-5D307A9D889D}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {6D3A7A5E-3ACB-4BEC-8160-C466A2D701B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {6D3A7A5E-3ACB-4BEC-8160-C466A2D701B1}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {6D3A7A5E-3ACB-4BEC-8160-C466A2D701B1}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {6D3A7A5E-3ACB-4BEC-8160-C466A2D701B1}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {8F34D593-11F8-45E4-862D-6C5310792135} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /examples/Example.dcm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/examples/Example.dcm -------------------------------------------------------------------------------- /examples/Example.scp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/examples/Example.scp -------------------------------------------------------------------------------- /exclude.txt: -------------------------------------------------------------------------------- 1 | \libs\ClosedFormats\ 2 | \bin\ 3 | \obj\ 4 | \Release\ 5 | \Debug\ 6 | \Release-CE\ 7 | \Debug-CE\ 8 | \Release-2K5\ 9 | \Debug-2K5\ 10 | \Release-CE-2K5\ 11 | \Debug-CE-2K5\ 12 | exclude.txt 13 | release.bat 14 | .csproj.user 15 | .csproj.vspscc 16 | .scc 17 | .cvsignore 18 | .bak -------------------------------------------------------------------------------- /libs/ECGConversion/DICOM/DICOM-core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | ECGConversion 6 | ECGCpluginDICOM 7 | ECGConversion DICOM ECG plug-in 8 | DICOM ECG plug-in for the framework ECG Conversion 9 | Thoraxcentrum, Erasmus MC 10 | Copyright 2019-2024, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\nCopyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands\nCopyright 2008-2012, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 11 | 3.0.0.0 12 | M.J.B. van Ettinger 13 | true 14 | LICENSE-2.0.txt 15 | https://sourceforge.net/projects/ecgtoolkit-cs/ 16 | ecgtoolkit-icon.png 17 | 18 | https://git.code.sf.net/p/ecgtoolkit-cs/git 19 | GIT 20 | ECG Electrocardiogram EKG plug-in DICOM-ECG DICOM ECGConversion 21 | en 22 | 23 | 24 | 25 | Off 26 | none 27 | false 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | True 39 | 40 | 41 | 42 | True 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /libs/ECGConversion/DICOM/DICOM.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 10.0.0 7 | 2.0 8 | {EE266CA9-9C60-4688-8386-3F187896CED0} 9 | Library 10 | ECGConversion 11 | ECGCpluginDICOM 12 | 2.2 13 | v4.7.2 14 | 15 | 16 | 17 | True 18 | full 19 | False 20 | bin\Debug 21 | DEBUG; 22 | prompt 23 | 4 24 | False 25 | false 26 | 27 | 28 | none 29 | True 30 | bin\Release 31 | prompt 32 | 4 33 | False 34 | false 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | {F969B245-DCD2-4AF6-AE74-E95F778D2339} 52 | ECGConversion 53 | 54 | 55 | 56 | 57 | False 58 | libs\2.0\dicomcs.dll 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /libs/ECGConversion/DICOM/DICOMReader.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.IO; 21 | using ECGConversion.DICOM; 22 | 23 | namespace ECGConversion 24 | { 25 | /// 26 | /// UNIPROReader class. class to read UNIPRO format. 27 | /// 28 | public class DICOMReader : IECGReader 29 | { 30 | public DICOMReader() 31 | {} 32 | public override IECGFormat Read(string file, int offset, ECGConfig cfg) 33 | { 34 | LastError = 0; 35 | IECGFormat ret = null; 36 | if (file != null) 37 | { 38 | try 39 | { 40 | Stream input = new FileStream(file, FileMode.Open, FileAccess.Read); 41 | ret = Read(input, offset, cfg); 42 | input.Close(); 43 | } 44 | catch 45 | { 46 | LastError = 1; 47 | } 48 | } 49 | return ret; 50 | } 51 | public override IECGFormat Read(Stream input, int offset, ECGConfig cfg) 52 | { 53 | LastError = 0; 54 | IECGFormat ret = null; 55 | if ((input != null) 56 | && (input.CanRead)) 57 | { 58 | ret = new DICOMFormat(); 59 | 60 | if (ret.Config != null) 61 | { 62 | ret.Config.Set(cfg); 63 | 64 | if (!ret.Config.ConfigurationWorks()) 65 | { 66 | LastError = 3; 67 | 68 | return null; 69 | } 70 | } 71 | 72 | if (ret.CheckFormat(input, offset)) 73 | { 74 | LastError = (ret.Read(input, offset) << 2); 75 | } 76 | 77 | if (!ret.Works()) 78 | { 79 | LastError = 2; 80 | ret = null; 81 | } 82 | } 83 | else 84 | { 85 | LastError = 1; 86 | } 87 | return ret; 88 | } 89 | public override IECGFormat Read(byte[] buffer, int offset, ECGConfig cfg) 90 | { 91 | LastError = 0; 92 | IECGFormat ret = null; 93 | if (buffer != null) 94 | { 95 | ret = new DICOMFormat(); 96 | 97 | if (ret.Config != null) 98 | { 99 | ret.Config.Set(cfg); 100 | 101 | if (!ret.Config.ConfigurationWorks()) 102 | { 103 | LastError = 3; 104 | 105 | return null; 106 | } 107 | } 108 | 109 | if (ret.CheckFormat(buffer, offset)) 110 | { 111 | LastError = (ret.Read(buffer, offset) << 2); 112 | } 113 | 114 | if (!ret.Works()) 115 | { 116 | LastError = 2; 117 | ret = null; 118 | } 119 | } 120 | else 121 | { 122 | LastError = 1; 123 | } 124 | return ret; 125 | } 126 | public override string getErrorMessage() 127 | { 128 | string message = null; 129 | switch (LastError) 130 | { 131 | case 0: 132 | break; 133 | case 1: 134 | message = "No file found"; 135 | break; 136 | case 2: 137 | message = "Not a DICOM ECG file"; 138 | break; 139 | case 3: 140 | message = "Incorrect format configuration"; 141 | break; 142 | default: 143 | message = "ECG file type specific error"; 144 | break; 145 | } 146 | return message; 147 | } 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /libs/ECGConversion/DICOM/ECGLoad.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008,2017,2019, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using ECGConversion.DICOM; 20 | 21 | namespace ECGConversion 22 | { 23 | /// 24 | /// Class that will load in all supported formats added by this plugin. 25 | /// 26 | public class ECGLoad 27 | { 28 | /// 29 | /// Function that returns a list of all plugins formats in this plugin. 30 | /// 31 | /// list of all plugin formats 32 | public static ECGPlugin[] LoadPlugin() 33 | { 34 | return new ECGPlugin[] { 35 | new ECGPlugin("DICOM", "dcm", typeof(DICOMFormat), typeof(DICOMReader), true), 36 | new ECGPlugin("DICOM-PDF", "dcm", typeof(DICOMPDFFormat), null, false) 37 | }; 38 | } 39 | 40 | /// 41 | /// Function that returns a list of all ECG Management Systems in this plugin. 42 | /// 43 | /// list of all ECG Management Systems 44 | public static ECGManagementSystem.IECGManagementSystem[] LoadECGMS() 45 | { 46 | return new ECGManagementSystem.IECGManagementSystem[] {new PACS()}; 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /libs/ECGConversion/DICOM/ecgtoolkit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/DICOM/ecgtoolkit-icon.png -------------------------------------------------------------------------------- /libs/ECGConversion/DICOM/libs/1.1/dicomcs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/DICOM/libs/1.1/dicomcs.dll -------------------------------------------------------------------------------- /libs/ECGConversion/DICOM/libs/1.1/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/DICOM/libs/1.1/log4net.dll -------------------------------------------------------------------------------- /libs/ECGConversion/DICOM/libs/2.0/dicomcs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/DICOM/libs/2.0/dicomcs.dll -------------------------------------------------------------------------------- /libs/ECGConversion/DICOM/libs/net5.0/dicomcs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/DICOM/libs/net5.0/dicomcs.dll -------------------------------------------------------------------------------- /libs/ECGConversion/DICOM/libs/netstandard2.0/dicomcs.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETStandard,Version=v2.0/", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETStandard,Version=v2.0": {}, 9 | ".NETStandard,Version=v2.0/": { 10 | "dicomcs/0.4.0.0": { 11 | "dependencies": { 12 | "NETStandard.Library": "2.0.3" 13 | }, 14 | "runtime": { 15 | "dicomcs.dll": {} 16 | } 17 | }, 18 | "Microsoft.NETCore.Platforms/1.1.0": {}, 19 | "NETStandard.Library/2.0.3": { 20 | "dependencies": { 21 | "Microsoft.NETCore.Platforms": "1.1.0" 22 | } 23 | } 24 | } 25 | }, 26 | "libraries": { 27 | "dicomcs/0.4.0.0": { 28 | "type": "project", 29 | "serviceable": false, 30 | "sha512": "" 31 | }, 32 | "Microsoft.NETCore.Platforms/1.1.0": { 33 | "type": "package", 34 | "serviceable": true, 35 | "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", 36 | "path": "microsoft.netcore.platforms/1.1.0", 37 | "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" 38 | }, 39 | "NETStandard.Library/2.0.3": { 40 | "type": "package", 41 | "serviceable": true, 42 | "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", 43 | "path": "netstandard.library/2.0.3", 44 | "hashPath": "netstandard.library.2.0.3.nupkg.sha512" 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /libs/ECGConversion/DICOM/libs/netstandard2.0/dicomcs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/DICOM/libs/netstandard2.0/dicomcs.dll -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/DSP/BandpassFilterButterworthImplementation.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2020, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Code Project Open License, Version 1.02 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.codeproject.com/info/cpol10.aspx 9 | 10 | Origannly published on CodeProject.com: 11 | 12 | https://www.codeproject.com/Tips/5070936/Lowpass-Highpass-and-Bandpass-Butterworth-Filters 13 | 14 | Edited by Maarten JB van Ettinger. 15 | 16 | ****************************************************************************/ 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Web; 20 | 21 | namespace ECGConversion.DSP 22 | { 23 | public class BandpassFilterButterworthImplementation : IFilter 24 | { 25 | protected LowpassFilterButterworthImplementation lowpassFilter; 26 | protected HighpassFilterButterworthImplementation highpassFilter; 27 | 28 | public BandpassFilterButterworthImplementation 29 | (double bottomFrequencyHz, double topFrequencyHz, int numSections, double Fs) 30 | { 31 | this.lowpassFilter = new LowpassFilterButterworthImplementation 32 | (topFrequencyHz, numSections, Fs); 33 | this.highpassFilter = new HighpassFilterButterworthImplementation 34 | (bottomFrequencyHz, numSections, Fs); 35 | } 36 | 37 | public double compute(double input) 38 | { 39 | // compute the result as the cascade of the highpass and lowpass filters 40 | return this.highpassFilter.compute(this.lowpassFilter.compute(input)); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/DSP/FIRFilterImplementation.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2020, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Code Project Open License, Version 1.02 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.codeproject.com/info/cpol10.aspx 9 | 10 | Origannly published on CodeProject.com: 11 | 12 | https://www.codeproject.com/Tips/5070936/Lowpass-Highpass-and-Bandpass-Butterworth-Filters 13 | 14 | Edited by Maarten JB van Ettinger. 15 | 16 | ****************************************************************************/ 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Web; 20 | 21 | namespace ECGConversion.DSP 22 | { 23 | public class FIRFilterImplementation 24 | { 25 | protected double[] z; 26 | public FIRFilterImplementation(int order) 27 | { 28 | this.z = new double[order]; 29 | } 30 | 31 | public double compute(double input, double[] a) 32 | { 33 | // computes y(t) = a0*x(t) + a1*x(t-1) + a2*x(t-2) + ... an*x(t-n) 34 | double result = 0; 35 | 36 | for (int t = a.Length - 1; t >= 0; t--) 37 | { 38 | if (t > 0) 39 | { 40 | this.z[t] = this.z[t - 1]; 41 | } 42 | else 43 | { 44 | this.z[t] = input; 45 | } 46 | result += a[t] * this.z[t]; 47 | } 48 | return result; 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/DSP/HighpassFilterButterworthImplementation.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2020, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Code Project Open License, Version 1.02 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.codeproject.com/info/cpol10.aspx 9 | 10 | Origannly published on CodeProject.com: 11 | 12 | https://www.codeproject.com/Tips/5070936/Lowpass-Highpass-and-Bandpass-Butterworth-Filters 13 | 14 | Edited by Maarten JB van Ettinger. 15 | 16 | ****************************************************************************/ 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Web; 20 | 21 | namespace ECGConversion.DSP 22 | { 23 | public class HighpassFilterButterworthImplementation : IFilter 24 | { 25 | protected HighpassFilterButterworthSection[] section; 26 | 27 | public HighpassFilterButterworthImplementation 28 | (double cutoffFrequencyHz, int numSections, double Fs) 29 | { 30 | this.section = new HighpassFilterButterworthSection[numSections]; 31 | for (int i = 0; i < numSections; i++) 32 | { 33 | this.section[i] = new HighpassFilterButterworthSection 34 | (cutoffFrequencyHz, i + 1, numSections * 2, Fs); 35 | } 36 | } 37 | public double compute(double input) 38 | { 39 | double output = input; 40 | for (int i = 0; i < this.section.Length; i++) 41 | { 42 | output = this.section[i].compute(output); 43 | } 44 | return output; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/DSP/HighpassFilterButterworthSection.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2020, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Code Project Open License, Version 1.02 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.codeproject.com/info/cpol10.aspx 9 | 10 | Origannly published on CodeProject.com: 11 | 12 | https://www.codeproject.com/Tips/5070936/Lowpass-Highpass-and-Bandpass-Butterworth-Filters 13 | 14 | Edited by Maarten JB van Ettinger. 15 | 16 | ****************************************************************************/ 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Web; 20 | 21 | namespace ECGConversion.DSP 22 | { 23 | public class HighpassFilterButterworthSection 24 | { 25 | protected FIRFilterImplementation firFilter = new FIRFilterImplementation(3); 26 | protected IIRFilterImplementation iirFilter = new IIRFilterImplementation(2); 27 | 28 | protected double[] a = new double[3]; 29 | protected double[] b = new double[2]; 30 | protected double gain; 31 | 32 | public HighpassFilterButterworthSection(double cutoffFrequencyHz, double k, double n, double Fs) 33 | { 34 | // pre-warp omegac and invert it 35 | double omegac = 1.0 / (2.0 * Fs * Math.Tan(Math.PI * cutoffFrequencyHz / Fs)); 36 | 37 | // compute zeta 38 | double zeta = -Math.Cos(Math.PI * (2.0 * k + n - 1.0) / (2.0 * n)); 39 | 40 | // fir section 41 | this.a[0] = 4.0 * Fs * Fs; 42 | this.a[1] = -8.0 * Fs * Fs; 43 | this.a[2] = 4.0 * Fs * Fs; 44 | 45 | //iir section 46 | //normalize coefficients so that b0 = 1 47 | //and higher-order coefficients are scaled and negated 48 | double b0 = (4.0 * Fs * Fs) + (4.0 * Fs * zeta / omegac) + (1.0 / (omegac * omegac)); 49 | this.b[0] = ((2.0 / (omegac * omegac)) - (8.0 * Fs * Fs)) / (-b0); 50 | this.b[1] = ((4.0 * Fs * Fs) 51 | - (4.0 * Fs * zeta / omegac) + (1.0 / (omegac * omegac))) / (-b0); 52 | this.gain = 1.0 / b0; 53 | } 54 | 55 | public double compute(double input) 56 | { 57 | // compute the result as the cascade of the fir and iir filters 58 | return this.iirFilter.compute 59 | (this.firFilter.compute(this.gain * input, this.a), this.b); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/DSP/IFilter.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2020, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | 20 | namespace ECGConversion.DSP 21 | { 22 | public interface IFilter 23 | { 24 | double compute(double input); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/DSP/IIRFilterImplementation.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2020, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Code Project Open License, Version 1.02 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.codeproject.com/info/cpol10.aspx 9 | 10 | Origannly published on CodeProject.com: 11 | 12 | https://www.codeproject.com/Tips/5070936/Lowpass-Highpass-and-Bandpass-Butterworth-Filters 13 | 14 | Edited by Maarten JB van Ettinger. 15 | 16 | ****************************************************************************/ 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Web; 20 | 21 | namespace ECGConversion.DSP 22 | { 23 | public class IIRFilterImplementation 24 | { 25 | protected double[] z; 26 | public IIRFilterImplementation(int order) 27 | { 28 | this.z = new double[order]; 29 | } 30 | 31 | public double compute(double input, double[] a) 32 | { 33 | // computes y(t) = x(t) + a1*y(t-1) + a2*y(t-2) + ... an*y(t-n) 34 | // z-transform: H(z) = 1 / (1 - sum(1 to n) [an * y(t-n)]) 35 | // a0 is assumed to be 1 36 | // y(t) is not stored, so y(t-1) is stored at z[0], 37 | // and a1 is stored as coefficient[0] 38 | 39 | double result = input; 40 | 41 | for (int t = 0; t < a.Length; t++) 42 | { 43 | result += a[t] * this.z[t]; 44 | } 45 | for (int t = a.Length - 1; t >= 0; t--) 46 | { 47 | if (t > 0) 48 | { 49 | this.z[t] = this.z[t - 1]; 50 | } 51 | else 52 | { 53 | this.z[t] = result; 54 | } 55 | } 56 | return result; 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/DSP/LowpassFilterButterworthImplementation.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2020, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Code Project Open License, Version 1.02 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.codeproject.com/info/cpol10.aspx 9 | 10 | Origannly published on CodeProject.com: 11 | 12 | https://www.codeproject.com/Tips/5070936/Lowpass-Highpass-and-Bandpass-Butterworth-Filters 13 | 14 | Edited by Maarten JB van Ettinger. 15 | 16 | ****************************************************************************/ 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Web; 20 | 21 | namespace ECGConversion.DSP 22 | { 23 | public class LowpassFilterButterworthImplementation : IFilter 24 | { 25 | protected LowpassFilterButterworthSection[] section; 26 | 27 | public LowpassFilterButterworthImplementation 28 | (double cutoffFrequencyHz, int numSections, double Fs) 29 | { 30 | this.section = new LowpassFilterButterworthSection[numSections]; 31 | for (int i = 0; i < numSections; i++) 32 | { 33 | this.section[i] = new LowpassFilterButterworthSection 34 | (cutoffFrequencyHz, i + 1, numSections * 2, Fs); 35 | } 36 | } 37 | public double compute(double input) 38 | { 39 | double output = input; 40 | for (int i = 0; i < this.section.Length; i++) 41 | { 42 | output = this.section[i].compute(output); 43 | } 44 | return output; 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/DSP/LowpassFilterButterworthSection.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2020, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Code Project Open License, Version 1.02 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.codeproject.com/info/cpol10.aspx 9 | 10 | Origannly published on CodeProject.com: 11 | 12 | https://www.codeproject.com/Tips/5070936/Lowpass-Highpass-and-Bandpass-Butterworth-Filters 13 | 14 | Edited by Maarten JB van Ettinger. 15 | 16 | ****************************************************************************/ 17 | using System; 18 | using System.Collections.Generic; 19 | using System.Web; 20 | 21 | namespace ECGConversion.DSP 22 | { 23 | public class LowpassFilterButterworthSection 24 | { 25 | protected FIRFilterImplementation firFilter = new FIRFilterImplementation(3); 26 | protected IIRFilterImplementation iirFilter = new IIRFilterImplementation(2); 27 | 28 | protected double[] a = new double[3]; 29 | protected double[] b = new double[2]; 30 | protected double gain; 31 | 32 | public LowpassFilterButterworthSection 33 | (double cutoffFrequencyHz, double k, double n, double Fs) 34 | { 35 | // compute the fixed filter coefficients 36 | double omegac = 2.0 * Fs * Math.Tan(Math.PI * cutoffFrequencyHz / Fs); 37 | double zeta = -Math.Cos(Math.PI * (2.0 * k + n - 1.0) / (2.0 * n)); 38 | 39 | // fir section 40 | this.a[0] = omegac * omegac; 41 | this.a[1] = 2.0 * omegac * omegac; 42 | this.a[2] = omegac * omegac; 43 | 44 | //iir section 45 | //normalize coefficients so that b0 = 1, 46 | //and higher-order coefficients are scaled and negated 47 | double b0 = (4.0 * Fs * Fs) + (4.0 * Fs * zeta * omegac) + (omegac * omegac); 48 | this.b[0] = ((2.0 * omegac * omegac) - (8.0 * Fs * Fs)) / (-b0); 49 | this.b[1] = ((4.0 * Fs * Fs) - 50 | (4.0 * Fs * zeta * omegac) + (omegac * omegac)) / (-b0); 51 | this.gain = 1.0 / b0; 52 | } 53 | 54 | public double compute(double input) 55 | { 56 | // compute the result as the cascade of the fir and iir filters 57 | return this.iirFilter.compute 58 | (this.firFilter.compute(this.gain * input, this.a), this.b); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGConversion-core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | ECGConversion 6 | ECGConversion 7 | M.J.B. van Ettinger 8 | a framework for converting of ECGs 9 | Thoraxcentrum, Erasmus MC 10 | ECGConversion 11 | Copyright 2019-2024, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\nCopyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands\nCopyright 2004-2010, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 12 | en-NL 13 | 3.1.0.0 14 | ECGConversion 15 | 3.1.0.0 16 | true 17 | LICENSE-2.0.txt 18 | https://sourceforge.net/projects/ecgtoolkit-cs/ 19 | ecgtoolkit-icon.png 20 | 21 | https://git.code.sf.net/p/ecgtoolkit-cs/git 22 | GIT 23 | ECG Electrocardiogram EKG framework SCP-ECG CSV raw filters Butterworth ECGConversion 24 | en 25 | 26 | 27 | 28 | true 29 | TRACE;dotNETCore 30 | 31 | 32 | 33 | true 34 | dotNETCore 35 | Off 36 | prompt 37 | none 38 | false 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | True 53 | 54 | 55 | 56 | True 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGDemographics/AcquiringDeviceID.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | 21 | namespace ECGConversion.ECGDemographics 22 | { 23 | /// 24 | /// Device information that can be imported and exported in both SCP and UNIPRO. 25 | /// 26 | public class AcquiringDeviceID 27 | { 28 | public AcquiringDeviceID() 29 | { 30 | } 31 | public AcquiringDeviceID(bool bNoDeviceId) 32 | { 33 | if (bNoDeviceId) 34 | { 35 | InstitutionNr = 0; 36 | DepartmentNr = 11; 37 | DeviceID = 51; 38 | DeviceType = (byte) ECGConversion.ECGDemographics.DeviceType.System; 39 | ManufactorID = (byte) DeviceManufactor.Unknown; 40 | DeviceCapabilities = 0x8; 41 | ACFrequencyEnvironment = 1; 42 | Communication.IO.Tools.BytesTool.writeString("MCONV", ModelDescription, 0, ModelDescription.Length); 43 | } 44 | } 45 | 46 | private static int _ModelDescriptionLen = 6; 47 | public ushort InstitutionNr = 0; 48 | public ushort DepartmentNr = 0; 49 | public ushort DeviceID = 0; 50 | public byte DeviceType = 0; 51 | public byte ManufactorID = (byte) DeviceManufactor.Unknown; 52 | public byte DeviceCapabilities = 0; // Is defined in SCP Section1 tag 14 byte 18. 53 | public byte ACFrequencyEnvironment = 0; // Is defined in SCP Section1 tag 14 byte 19. 54 | private byte[] _ModelDescription = new byte[_ModelDescriptionLen]; 55 | public byte[] ModelDescription 56 | { 57 | get 58 | { 59 | return _ModelDescription; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGDemographics/Date.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | namespace ECGConversion.ECGDemographics 20 | { 21 | /// 22 | /// Class containing a date (format is equal to SCP). 23 | /// 24 | public class Date 25 | { 26 | // Static information for check. 27 | private static byte[] _DaysInMonth = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 28 | private static int _LeapMonth = 2; 29 | private static byte _DaysInLeapMonth = 29; 30 | 31 | // Content of date class. 32 | public ushort Year = 0; 33 | public byte Month = 0; 34 | public byte Day = 0; 35 | /// 36 | /// Constructor to make a date. 37 | /// 38 | public Date() 39 | {} 40 | /// 41 | /// Constructor to make a date. 42 | /// 43 | /// number of year 44 | /// number of month 45 | /// number of day 46 | public Date(ushort year, byte month, byte day) 47 | { 48 | Year = year; 49 | Month = month; 50 | Day = day; 51 | } 52 | /// 53 | /// Check if date is likely to be an existing date. 54 | /// 55 | /// true: is an existing date. 56 | /// false: is an non existing date. 57 | public bool isExistingDate() 58 | { 59 | // The following check will most likely work for another 7000 years at least. 60 | if ((Month > 0) 61 | && (Month <= 12) 62 | && (Year > 0)) 63 | { 64 | if ((Month == _LeapMonth) 65 | && ((Year % 4) == 0) 66 | && (((Year % 100) != 0) 67 | || ((Year % 400)) == 0)) 68 | { 69 | return ((Day > 0) && (Day <= _DaysInLeapMonth)); 70 | } 71 | else 72 | { 73 | return ((Day > 0) && (Day <= _DaysInMonth[Month])); 74 | } 75 | } 76 | return false; 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGDemographics/DemographicEnumrations.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | namespace ECGConversion.ECGDemographics 20 | { 21 | /// 22 | /// An Enumration to determine the sex. 23 | /// 24 | public enum Sex 25 | {Unspecified = 0, Male, Female, Null = 0xff} 26 | /// 27 | /// An Enumration to determine the race. 28 | /// 29 | public enum Race 30 | {Unspecified = 0, Caucasian, Black, Oriental, Null = 0xff} 31 | /// 32 | /// An Enumration to determine the age definition. 33 | /// 34 | public enum AgeDefinition 35 | {Unspecified = 0, Years, Months, Weeks, Days, Hours} 36 | /// 37 | /// An Enumration to determine the height definition. 38 | /// 39 | public enum HeightDefinition 40 | {Unspecified = 0, Centimeters, Inches, Millimeters} 41 | /// 42 | /// An Enumration to determine the weight definition. 43 | /// 44 | public enum WeightDefinition 45 | {Unspecified = 0, Kilogram, Gram, Pound, Ounce} 46 | /// 47 | /// An Enumration to determine the device type. 48 | /// 49 | public enum DeviceType 50 | {Cart = 0, System} 51 | /// 52 | /// An Enumration to determine the device manufactor. 53 | /// 54 | public enum DeviceManufactor 55 | {Unknown = 0, Burdick, Cambridge, Compumed, Datamed, Fukuda, HewlettPackard, 56 | MarquetteElectronics, MortaraInstruments, NihonKohden, Okin, Quintin, Siemens, 57 | SpaceLabs, Telemed, Hellige, ESAOTE, Schiller, PickerSchwarzer, ElettronicTrentina, 58 | Zwonitz, Other = 100} 59 | /// 60 | /// An Enumration for Electrode Configurations for 12-lead ECG 61 | /// 62 | public enum ElectrodeConfigCodeTwelveLead 63 | { 64 | Unspecified = 0, 65 | StandardTwelveLead, 66 | MasonLikarAndIndividual, 67 | MasonLikarAndPadded, 68 | AllLeadPadded, 69 | TwelveLeadDerivedXYZ, 70 | TwelveLeadDerivedNonStandard 71 | } 72 | /// 73 | /// An Enumration for Electrode Configurations for XYZ ECG 74 | /// 75 | public enum ElectrodeConfigCodeXYZ 76 | { 77 | Unspecified = 0, 78 | Frank, 79 | McFeeParungao, 80 | Cube, 81 | BipolarUncorrected, 82 | PseudoOrthogonal, 83 | XYZDerivedTwelveLead 84 | } 85 | } -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGDemographics/Drug.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | 21 | namespace ECGConversion.ECGDemographics 22 | { 23 | /// 24 | /// A class to store a drug (is very close to the implementation of both SCP and UNIPRO). 25 | /// 26 | public class Drug 27 | { 28 | public byte DrugClass; 29 | public byte ClassCode; 30 | public string TextDesciption; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGDiagnostic/IDiagnostic.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | 21 | namespace ECGConversion.ECGDiagnostic 22 | { 23 | /// 24 | /// Interface for manupalation of the diagnostic statements. 25 | /// 26 | public interface IDiagnostic 27 | { 28 | /// 29 | /// Function to get the diagnostic statements. 30 | /// 31 | /// the diagnostic statements 32 | /// 0 on success 33 | int getDiagnosticStatements(out Statements stat); 34 | /// 35 | /// Function to set the diagnostic statements. 36 | /// 37 | /// the diagnostic statements to set 38 | /// 0 on success 39 | int setDiagnosticStatements(Statements stat); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGDiagnostic/Statements.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using ECGConversion.ECGDemographics; 21 | 22 | namespace ECGConversion.ECGDiagnostic 23 | { 24 | /// 25 | /// Class containing diagnostic statements. 26 | /// 27 | public class Statements 28 | { 29 | public bool confirmed = false; 30 | public bool interpreted = false; 31 | public DateTime time = DateTime.MinValue; 32 | public string[] statement = null; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGGlobalMeasurements/IGlobalMeasurement.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | 20 | namespace ECGConversion.ECGGlobalMeasurements 21 | { 22 | /// 23 | /// Interface for manupalation of the measurements. 24 | /// 25 | public interface IGlobalMeasurement 26 | { 27 | /// 28 | /// Function to get the global measurements of ECG. 29 | /// 30 | /// global measurements 31 | /// 0 on success 32 | int getGlobalMeasurements(out GlobalMeasurements mes); 33 | /// 34 | /// Function to set the global measurements of ECG. 35 | /// 36 | /// global measurements 37 | /// 0 on success 38 | int setGlobalMeasurements(GlobalMeasurements mes); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGGlobalMeasurements/Spike.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | 21 | namespace ECGConversion.ECGGlobalMeasurements 22 | { 23 | /// 24 | /// Class containing one spike (SCP defined). 25 | /// 26 | public class Spike 27 | { 28 | public ushort Time = GlobalMeasurement.NoValue; 29 | public short Amplitude = GlobalMeasurement.NoAxisValue; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGLeadMeasurements/ILeadMeasurement.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | namespace ECGConversion.ECGLeadMeasurements 20 | { 21 | /// 22 | /// Interface for manupalation of the measurements. 23 | /// 24 | public interface ILeadMeasurement 25 | { 26 | /// 27 | /// Function to get the lead measurements of ECG. 28 | /// 29 | /// lead measurements 30 | /// 0 on success 31 | int getLeadMeasurements(out LeadMeasurements mes); 32 | /// 33 | /// Function to set the lead measurements of ECG. 34 | /// 35 | /// lead measurements 36 | /// 0 on success 37 | int setLeadMeasurements(LeadMeasurements mes); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGLeadMeasurements/LeadMeasurement.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008-2009, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System.Collections; 20 | 21 | using ECGConversion.ECGSignals; 22 | 23 | namespace ECGConversion.ECGLeadMeasurements 24 | { 25 | public class LeadMeasurement 26 | { 27 | public static short NoValue = 29999; 28 | 29 | public LeadMeasurement() 30 | {} 31 | 32 | public LeadMeasurement(LeadType lt) 33 | { 34 | LeadType = lt; 35 | } 36 | 37 | public LeadType LeadType = LeadType.Unknown; 38 | 39 | private SortedList _List = new SortedList(); 40 | 41 | public short this[MeasurementType mt] 42 | { 43 | get 44 | { 45 | int index = _List.IndexOfKey((int) mt); 46 | 47 | return index >= 0 ? (short) _List.GetByIndex(index) : NoValue; 48 | } 49 | set 50 | { 51 | int index = _List.IndexOfKey((int) mt); 52 | 53 | if (value == NoValue) 54 | { 55 | if (index >= 0) 56 | _List.RemoveAt(index); 57 | } 58 | else 59 | { 60 | if (index >= 0) 61 | _List.SetByIndex(index, value); 62 | else 63 | _List.Add((int) mt, value); 64 | } 65 | } 66 | } 67 | 68 | public int Count 69 | { 70 | get 71 | { 72 | return _List.Count; 73 | } 74 | } 75 | 76 | public short getValueByIndex(int index) 77 | { 78 | return (index >= 0) && (index < _List.Count) ? (short) _List.GetByIndex(index) : NoValue; 79 | } 80 | 81 | public MeasurementType getKeyByIndex(int index) 82 | { 83 | return (index >= 0) && (index < _List.Count) ? (MeasurementType) ((int) _List.GetKey(index)) : MeasurementType.None; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGLeadMeasurements/LeadMeasurements.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System.Collections; 20 | 21 | namespace ECGConversion.ECGLeadMeasurements 22 | { 23 | public class LeadMeasurements 24 | { 25 | public LeadMeasurements() 26 | {} 27 | 28 | public LeadMeasurements(int nr) 29 | { 30 | Measurements = new LeadMeasurement[nr]; 31 | 32 | for (int i=0;i < Measurements.Length;i++) 33 | Measurements[i] = new LeadMeasurement(); 34 | } 35 | 36 | public LeadMeasurement[] Measurements; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGLeadMeasurements/MeasurementType.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008,2021, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | namespace ECGConversion.ECGLeadMeasurements 20 | { 21 | /// 22 | /// Enumration MeasurementType for lead measurements. 23 | /// 24 | public enum MeasurementType 25 | { 26 | None = -1, 27 | Pdur = 0, 28 | PRint, 29 | QRSdur, 30 | QTint, 31 | Qdur, 32 | Rdur, 33 | Sdur, 34 | RRdur, 35 | SSdur, 36 | RRRdur, 37 | Qamp, 38 | Ramp, 39 | Samp, 40 | RRamp, 41 | SSamp, 42 | RRRamp, 43 | Jamp, 44 | Pamp_pos, 45 | Pamp_min, 46 | Tamp_pos, 47 | Tamp_min, 48 | STslope, 49 | Pmorphology, 50 | Tmorphology, 51 | IsoElectricQRSonset, 52 | IsoElectricQRSend, 53 | IntrinsicoidDeflection, 54 | QualityCode, 55 | STampJ20, 56 | STampJ60, 57 | STampJ80, 58 | STamp1_16RR, 59 | STamp1_8RR, 60 | QRSonset, 61 | QRSoffset, 62 | Qoffset, 63 | Roffset, 64 | Soffset, 65 | RRoffset, 66 | SSoffset, 67 | RRRoffset, 68 | Toffset, 69 | Pnotch, 70 | Rnotch, 71 | 72 | Ronset = Qoffset, 73 | Sonset = Roffset, 74 | RRonset = Soffset, 75 | SSonset = RRoffset, 76 | RRRonset = SSoffset, 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGLeadMeasurements/Morphology.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | namespace ECGConversion.ECGLeadMeasurements 20 | { 21 | /// 22 | /// Enumration Morphology for lead measurements. 23 | /// 24 | public enum Morphology 25 | { 26 | Unknown = 0, 27 | Positive, 28 | Negative, 29 | PositiveNegative, 30 | NegativePositive, 31 | PositiveNegativePositive, 32 | NegativePositiveNegative, 33 | NotchedMShaped, 34 | NotchedWShaped 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGManagementSysteem/ECGInfo.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | 21 | using ECGConversion.ECGDemographics; 22 | 23 | namespace ECGConversion.ECGManagementSystem 24 | { 25 | /// 26 | /// ECG Info provided by Management System. 27 | /// 28 | public class ECGInfo 29 | { 30 | public ECGInfo(object ui, string patid, string name, DateTime acqtime) 31 | { 32 | _UniqueIdentifier = ui; 33 | _PatientID = patid; 34 | _PatientName = name; 35 | _AcquisitionTime = acqtime; 36 | } 37 | 38 | public ECGInfo(object ui, string patid, string name, DateTime acqtime, Sex gender) 39 | { 40 | _UniqueIdentifier = ui; 41 | _PatientID = patid; 42 | _PatientName = name; 43 | _AcquisitionTime = acqtime; 44 | _Gender = gender; 45 | } 46 | 47 | public object UniqueIdentifier 48 | { 49 | get 50 | { 51 | return _UniqueIdentifier; 52 | } 53 | } 54 | private object _UniqueIdentifier; 55 | 56 | public string PatientID 57 | { 58 | get 59 | { 60 | return _PatientID; 61 | } 62 | } 63 | private string _PatientID; 64 | 65 | public string PatientName 66 | { 67 | get 68 | { 69 | return _PatientName; 70 | } 71 | } 72 | private string _PatientName; 73 | 74 | public DateTime AcquisitionTime 75 | { 76 | get 77 | { 78 | return _AcquisitionTime; 79 | } 80 | } 81 | 82 | private DateTime _AcquisitionTime; 83 | 84 | public Sex Gender 85 | { 86 | get 87 | { 88 | return _Gender; 89 | } 90 | } 91 | 92 | private Sex _Gender = Sex.Null; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGSignals/IBufferedSource.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2012, van Ettinger Information Technology, Lopik, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | 21 | namespace ECGConversion.ECGSignals 22 | { 23 | public interface IBufferedSource 24 | { 25 | /// 26 | /// Loads the rhythm data for buffered signal. 27 | /// 28 | /// nr of the lead 29 | /// the lead to load signal into 30 | /// the AVM used by this rhythms data 31 | /// start of section to load (0 is beginning of signal in file) 32 | /// end of section to load (0 is beginning of signal in file) 33 | /// 34 | /// returns true if signal is loaded succesfully 35 | /// 36 | bool LoadRhythmSignal(byte leadNr, Signal lead, double avm, int rhythmStart, int rhythmEnd); 37 | 38 | /// 39 | /// Loads the Median template data for buffered signal. 40 | /// 41 | /// nr of the lead 42 | /// the lead to load signal into 43 | /// the AVM used by this rhythms data 44 | /// template nr to load signal for 45 | /// 46 | /// returns true if signal is loaded succesfully 47 | /// 48 | bool LoadTemplateSignal(byte leadNr, Signal lead, double avm, int templateNr); 49 | 50 | /// 51 | /// Loads the template occurance. 52 | /// 53 | /// template nr to load occurance info for 54 | /// nr of occurance of template 55 | /// locations associated to this template 56 | void LoadTemplateOccurance(int templateNr, out int templateOccurance, out QRSZone[] templateLocations); 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGSignals/ISignal.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | 21 | namespace ECGConversion.ECGSignals 22 | { 23 | /// 24 | /// Interface for manupalation of the signals. 25 | /// 26 | public interface ISignal 27 | { 28 | /// 29 | /// Function to get the signal of an ECG. 30 | /// 31 | /// signals 32 | /// 0 on succes 33 | int getSignals(out Signals signals); 34 | /// 35 | /// Function to get the signals of an ECG and set a given Signals object. 36 | /// 37 | /// signals 38 | /// 0 on success 39 | int getSignalsToObj(Signals signals); 40 | /// 41 | /// Function to set the signals of an ECG. 42 | /// 43 | /// signals 44 | /// 0 on success 45 | int setSignals(Signals signals); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ECGSignals/QRSZone.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | 21 | namespace ECGConversion.ECGSignals 22 | { 23 | /// 24 | /// Class containing a QRS zone. 25 | /// 26 | public class QRSZone 27 | { 28 | public ushort Type = ushort.MaxValue; 29 | public int Start = 0; 30 | public int Fiducial = 0; 31 | public int End = 0; 32 | public QRSZone() 33 | {} 34 | public QRSZone(ushort type, int start, int fiducial, int end) 35 | { 36 | Type = type; 37 | Start = start; 38 | Fiducial = fiducial; 39 | End = end; 40 | } 41 | public QRSZone Clone() 42 | { 43 | return new QRSZone(this.Type, this.Start, this.Fiducial, this.End); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ========================================================================= 2 | == Example NOTICE file for use with the Apache License, Version 2.0, == 3 | == in this case for the ECG Conversion Toolkit distribution. == 4 | ========================================================================= 5 | 6 | ECG Conversion Toolkit 7 | 8 | Copyright 2016-2020, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 9 | Copyright 2012, van Ettinger Information Technology, Lopik, The Netherlands 10 | Copyright 2004-2011, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 11 | 12 | This product includes software developed at 13 | Thoraxcentrum, Erasmus MC (https://www.erasmusmc.nl/thoraxcentrum/). 14 | 15 | DICOM support is based on the DICOM# library which is open source 16 | software, available under the GNU Library or Lesser General Public 17 | License (LGPL). Written by Fang Yang. The library is available from: 18 | https://sourceforge.net/projects/dicom-cs/ 19 | 20 | PDF support is based on the iTextSharp library which is open source 21 | software, available under the GNU Library or Lesser General Public 22 | License (LGPL). Written by Bruno Lowagie and Paulo Soares. The library 23 | is available from: 24 | https://sourceforge.net/projects/itextsharp/ 25 | 26 | namespace ECGConversion.DSP is mostly licensed under CPOL 1.02 available 27 | from: 28 | https://www.codeproject.com/info/cpol10.aspx 29 | 30 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/RawECGReader.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/ECGConversion/RawECGReader.cs -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/SCP/SCPDate.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004,2009, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Runtime.InteropServices; 21 | using Communication.IO.Tools; 22 | 23 | namespace ECGConversion.SCP 24 | { 25 | /// 26 | /// class containing date in SCP format. 27 | /// 28 | public class SCPDate 29 | { 30 | public const int Size = 4; 31 | 32 | // data structure of SCP date. 33 | public ushort Year = 0; 34 | public byte Month = 0; 35 | public byte Day = 0; 36 | /// 37 | /// Constructor of a SCP date. 38 | /// 39 | public SCPDate() 40 | {} 41 | /// 42 | /// Constructor of a SCP date. 43 | /// 44 | /// number of year 45 | /// number of month 46 | /// number of day 47 | public SCPDate(int year, int month, int day) 48 | { 49 | Year = (ushort) year; 50 | Month = (byte) month; 51 | Day = (byte) day; 52 | } 53 | /// 54 | /// Function to read an SCP date from byte array. 55 | /// 56 | /// byte array to read from 57 | /// position to start reading 58 | /// 0 on success 59 | public int Read(byte[] buffer, int offset) 60 | { 61 | if ((offset + Size) > buffer.Length) 62 | { 63 | return 0x1; 64 | } 65 | 66 | Year = (ushort) BytesTool.readBytes(buffer, offset, Marshal.SizeOf(Year), true); 67 | offset += Marshal.SizeOf(Year); 68 | Month = (byte) BytesTool.readBytes(buffer, offset, Marshal.SizeOf(Month), true); 69 | offset += Marshal.SizeOf(Month); 70 | Day = (byte) BytesTool.readBytes(buffer, offset, Marshal.SizeOf(Day), true); 71 | offset += Marshal.SizeOf(Day); 72 | 73 | return 0x0; 74 | } 75 | /// 76 | /// Function to write an SCP date to a byte array. 77 | /// 78 | /// byte array to write in 79 | /// position to start writing 80 | /// 81 | public int Write(byte[] buffer, int offset) 82 | { 83 | if ((offset + Size) > buffer.Length) 84 | { 85 | return 0x1; 86 | } 87 | 88 | BytesTool.writeBytes(Year, buffer, offset, Marshal.SizeOf(Year), true); 89 | offset += Marshal.SizeOf(Year); 90 | BytesTool.writeBytes(Month, buffer, offset, Marshal.SizeOf(Month), true); 91 | offset += Marshal.SizeOf(Month); 92 | BytesTool.writeBytes(Day, buffer, offset, Marshal.SizeOf(Day), true); 93 | offset += Marshal.SizeOf(Day); 94 | 95 | return 0x0; 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/SCP/SCPSectionUnkown.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004,2010, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Runtime.InteropServices; 21 | using Communication.IO.Tools; 22 | 23 | namespace ECGConversion.SCP 24 | { 25 | /// 26 | /// SCP Unknown Section. this class is for reading and writing SCP formats without having to implement the sections that aren't needed at all. 27 | /// 28 | public class SCPSectionUnknown : SCPSection 29 | { 30 | // Part of the stored Data Structure. 31 | private byte[] _Data = null; 32 | public SCPSectionUnknown() 33 | {} 34 | public SCPSectionUnknown(ushort sectionId) 35 | { 36 | this.SectionID = sectionId; 37 | } 38 | protected override int _Read(byte[] buffer, int offset) 39 | { 40 | int length = Length - Size; 41 | if (length <= 0) 42 | { 43 | return 0x1; 44 | } 45 | _Data = new byte[length]; 46 | offset += BytesTool.copy(_Data, 0, buffer, offset, length); 47 | return 0x00; 48 | } 49 | protected override int _Write(byte[] buffer, int offset) 50 | { 51 | offset += BytesTool.copy(buffer, offset, _Data, 0, _Data.Length); 52 | return 0x00; 53 | } 54 | protected override void _Empty() 55 | { 56 | _Data = null; 57 | } 58 | protected override int _getLength() 59 | { 60 | if (Works()) 61 | { 62 | return _Data.Length; 63 | } 64 | return 0; 65 | } 66 | public override ushort getSectionID() 67 | { 68 | return SectionID; 69 | } 70 | public override bool Works() 71 | { 72 | if (_Data != null) 73 | { 74 | return true; 75 | } 76 | return false; 77 | } 78 | 79 | /// 80 | /// Get and Set the internal data of this 81 | /// 82 | public byte[] InternalData 83 | { 84 | get 85 | { 86 | return _Data; 87 | } 88 | set 89 | { 90 | _Data = value; 91 | } 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/SCP/SCPTime.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2004,2009, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Runtime.InteropServices; 21 | using Communication.IO.Tools; 22 | 23 | namespace ECGConversion.SCP 24 | { 25 | /// 26 | /// class containing time in SCP format. 27 | /// 28 | public class SCPTime 29 | { 30 | public const int Size = 3; 31 | 32 | public byte Hour = 0; 33 | public byte Min = 0; 34 | public byte Sec = 0; 35 | /// 36 | /// Constructor of a SCP time. 37 | /// 38 | public SCPTime() 39 | {} 40 | /// 41 | /// Constructor of a SCP time. 42 | /// 43 | /// number of hour 44 | /// number of minute 45 | /// number of second 46 | public SCPTime(int hour, int min, int sec) 47 | { 48 | Hour = (byte) hour; 49 | Min = (byte) min; 50 | Sec = (byte) sec; 51 | } 52 | /// 53 | /// Function to read an SCP time. 54 | /// 55 | /// byte array to read from 56 | /// position to start reading 57 | /// 0 on success 58 | public int Read(byte[] buffer, int offset) 59 | { 60 | if ((offset + Size) > buffer.Length) 61 | { 62 | return 0x1; 63 | } 64 | 65 | Hour = (byte) BytesTool.readBytes(buffer, offset, Marshal.SizeOf(Hour), true); 66 | offset += Marshal.SizeOf(Hour); 67 | Min = (byte) BytesTool.readBytes(buffer, offset, Marshal.SizeOf(Min), true); 68 | offset += Marshal.SizeOf(Min); 69 | Sec = (byte) BytesTool.readBytes(buffer, offset, Marshal.SizeOf(Sec), true); 70 | offset += Marshal.SizeOf(Sec); 71 | 72 | return 0x0; 73 | } 74 | /// 75 | /// Function to write SCP time. 76 | /// 77 | /// byte array to write into 78 | /// position to start writing 79 | /// 0 on success 80 | public int Write(byte[] buffer, int offset) 81 | { 82 | if ((offset + Size) > buffer.Length) 83 | { 84 | return 0x1; 85 | } 86 | 87 | BytesTool.writeBytes(Hour, buffer, offset, Marshal.SizeOf(Hour), true); 88 | offset += Marshal.SizeOf(Hour); 89 | BytesTool.writeBytes(Min, buffer, offset, Marshal.SizeOf(Min), true); 90 | offset += Marshal.SizeOf(Min); 91 | BytesTool.writeBytes(Sec, buffer, offset, Marshal.SizeOf(Sec), true); 92 | offset += Marshal.SizeOf(Sec); 93 | 94 | return 0x0; 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/SCPReader.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2012, van Ettinger Information Technology, Lopik, The Netherlands 3 | Copyright 2004-2005,2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | Written by Maarten JB van Ettinger. 18 | 19 | ****************************************************************************/ 20 | using System; 21 | using System.IO; 22 | using ECGConversion.SCP; 23 | 24 | namespace ECGConversion 25 | { 26 | /// 27 | /// SCPReader class. class to read SCP format. 28 | /// 29 | public class SCPReader : IECGReader 30 | { 31 | public SCPReader() 32 | {} 33 | public override IECGFormat Read(string file, int offset, ECGConfig cfg) 34 | { 35 | IECGFormat ret = null; 36 | if (file != null) 37 | { 38 | try 39 | { 40 | Stream input = new FileStream(file, FileMode.Open, FileAccess.Read); 41 | ret = Read(input, offset, cfg); 42 | input.Close(); 43 | } 44 | catch 45 | { 46 | LastError = 1; 47 | } 48 | } 49 | return ret; 50 | } 51 | public override IECGFormat Read(Stream input, int offset, ECGConfig cfg) 52 | { 53 | IECGFormat ret = null; 54 | if ((input != null) 55 | && input.CanRead) 56 | { 57 | ret = new SCPFormat(); 58 | 59 | if (ret.Config != null) 60 | { 61 | ret.Config.Set(cfg); 62 | 63 | if (!ret.Config.ConfigurationWorks()) 64 | { 65 | LastError = 3; 66 | 67 | return null; 68 | } 69 | } 70 | 71 | if (ret.CheckFormat(input, offset)) 72 | { 73 | LastError = (ret.Read(input, offset) << 2); 74 | } 75 | 76 | if (!ret.Works()) 77 | { 78 | LastError = 2; 79 | ret = null; 80 | } 81 | } 82 | else 83 | { 84 | LastError = 1; 85 | } 86 | return ret; 87 | } 88 | public override IECGFormat Read(byte[] buffer, int offset, ECGConfig cfg) 89 | { 90 | IECGFormat ret = null; 91 | if (buffer != null) 92 | { 93 | ret = new SCPFormat(); 94 | 95 | if (ret.Config != null) 96 | { 97 | ret.Config.Set(cfg); 98 | 99 | if (!ret.Config.ConfigurationWorks()) 100 | { 101 | LastError = 3; 102 | 103 | return null; 104 | } 105 | } 106 | 107 | if (ret.CheckFormat(buffer, offset)) 108 | { 109 | LastError = (ret.Read(buffer, offset) << 2); 110 | } 111 | 112 | if (!ret.Works()) 113 | { 114 | LastError = 2; 115 | ret = null; 116 | } 117 | } 118 | else 119 | { 120 | LastError = 1; 121 | } 122 | return ret; 123 | } 124 | public override string getErrorMessage() 125 | { 126 | string message = null; 127 | switch (LastError) 128 | { 129 | case 0: 130 | break; 131 | case 1: 132 | message = "No file found"; 133 | break; 134 | case 2: 135 | message = "Not a SCP ECG file"; 136 | break; 137 | case 3: 138 | message = "Incorrect format configuration"; 139 | break; 140 | default: 141 | message = "ECG file type specific error"; 142 | break; 143 | } 144 | return message; 145 | } 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /libs/ECGConversion/ECGConversion/ecgtoolkit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/ECGConversion/ecgtoolkit-icon.png -------------------------------------------------------------------------------- /libs/ECGConversion/ISHNE/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2019-2022, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\n 3 | Copyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | Written by Maarten JB van Ettinger. 18 | 19 | ****************************************************************************/ 20 | using System.Reflection; 21 | using System.Runtime.CompilerServices; 22 | // 23 | // General Information about an assembly is controlled through the following 24 | // set of attributes. Change these attribute values to modify the information 25 | // associated with an assembly. 26 | // 27 | [assembly: AssemblyTitle("ECGConversion ISHNE plug-in")] 28 | [assembly: AssemblyDescription("ISHNE plug-in for the framework ECG Conversion")] 29 | [assembly: AssemblyConfiguration("")] 30 | [assembly: AssemblyCompany("Thoraxcentrum, Erasmus MC")] 31 | [assembly: AssemblyProduct("")] 32 | [assembly: AssemblyCopyright("Copyright 2019-2022, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\nCopyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands")] 33 | [assembly: AssemblyTrademark("")] 34 | [assembly: AssemblyCulture("")] 35 | 36 | // 37 | // Version information for an assembly consists of the following four values: 38 | // 39 | // Major Version 40 | // Minor Version 41 | // Build Number 42 | // Revision 43 | // 44 | // You can specify all the values or you can default the Revision and Build Numbers 45 | // by using the '*' as shown below: 46 | 47 | [assembly: AssemblyVersion("3.0.*")] 48 | 49 | // 50 | // In order to sign your assembly you must specify a key to use. Refer to the 51 | // Microsoft .NET Framework documentation for more information on assembly signing. 52 | // 53 | // Use the attributes below to control which key is used for signing. 54 | // 55 | // Notes: 56 | // (*) If no key is specified, the assembly is not signed. 57 | // (*) KeyName refers to a key that has been installed in the Crypto Service 58 | // Provider (CSP) on your machine. KeyFile refers to a file which contains 59 | // a key. 60 | // (*) If the KeyFile and the KeyName values are both specified, the 61 | // following processing occurs: 62 | // (1) If the KeyName can be found in the CSP, that key is used. 63 | // (2) If the KeyName does not exist and the KeyFile does exist, the key 64 | // in the KeyFile is installed into the CSP and used. 65 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. 66 | // When specifying the KeyFile, the location of the KeyFile should be 67 | // relative to the project output directory which is 68 | // %Project Directory%\obj\. For example, if your KeyFile is 69 | // located in the project directory, you would specify the AssemblyKeyFile 70 | // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] 71 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework 72 | // documentation for more information on this. 73 | // 74 | [assembly: AssemblyDelaySign(false)] 75 | [assembly: AssemblyKeyFile("")] 76 | [assembly: AssemblyKeyName("")] 77 | -------------------------------------------------------------------------------- /libs/ECGConversion/ISHNE/ECGLoad.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2012, van Ettinger Information Technology, Lopik, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using ECGConversion.ISHNE; 20 | 21 | namespace ECGConversion 22 | { 23 | /// 24 | /// Class that will load in all supported formats added by this plugin. 25 | /// 26 | public class ECGLoad 27 | { 28 | /// 29 | /// Function that returns a list of all plugins formats in this plugin. 30 | /// 31 | /// list of all plugin formats 32 | public static ECGPlugin[] LoadPlugin() 33 | { 34 | return new ECGPlugin[] {new ECGPlugin("ISHNE", "ecg", typeof(ISHNEFormat), typeof(ISHNEReader), true)}; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /libs/ECGConversion/ISHNE/ISHNE-core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | ECGConversion 6 | ECGConversion ISHNE plug-in 7 | ISHNE plug-in for the framework ECG Conversion 8 | Thoraxcentrum, Erasmus MC 9 | Copyright 2019-2024, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\nCopyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands 10 | 2.7.0.0 11 | 3.0.0.0 12 | ECGCpluginISHNE 13 | M.J.B. van Ettinger 14 | true 15 | LICENSE-2.0.txt 16 | https://sourceforge.net/projects/ecgtoolkit-cs/ 17 | ecgtoolkit-icon.png 18 | 19 | https://git.code.sf.net/p/ecgtoolkit-cs/git 20 | GIT 21 | ECG Electrocardiogram EKG plug-in ISHNE ECGConversion 22 | en 23 | 24 | 25 | 26 | Off 27 | none 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | True 41 | 42 | 43 | 44 | True 45 | 46 | 47 | 48 | True 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /libs/ECGConversion/ISHNE/ISHNE.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 10.0.0 7 | 2.0 8 | {6DD429F1-1B48-475B-AC86-853395D5D862} 9 | Library 10 | ECGConversion 11 | 2.2 12 | ECGCpluginISHNE 13 | v4.7.2 14 | 15 | 16 | 17 | True 18 | full 19 | False 20 | bin\Debug 21 | DEBUG; 22 | prompt 23 | 4 24 | False 25 | false 26 | 27 | 28 | none 29 | True 30 | bin\Release 31 | prompt 32 | 4 33 | False 34 | false 35 | 36 | 37 | 38 | 39 | {F969B245-DCD2-4AF6-AE74-E95F778D2339} 40 | ECGConversion 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /libs/ECGConversion/ISHNE/ISHNEReader.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2012-2013, van Ettinger Information Technology, Lopik, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.IO; 21 | 22 | using ECGConversion.ISHNE; 23 | 24 | namespace ECGConversion 25 | { 26 | /// 27 | /// ISHNEReader class. class to read MUSEXML format. 28 | /// 29 | public class ISHNEReader : IECGReader 30 | { 31 | public ISHNEReader() 32 | {} 33 | public override IECGFormat Read(string file, int offset, ECGConfig cfg) 34 | { 35 | LastError = 0; 36 | IECGFormat ret = null; 37 | if (file != null) 38 | { 39 | try 40 | { 41 | Stream input = new FileStream(file, FileMode.Open, FileAccess.Read); 42 | ret = Read(input, offset, cfg); 43 | } 44 | catch 45 | { 46 | LastError = 1; 47 | } 48 | } 49 | return ret; 50 | } 51 | public override IECGFormat Read(Stream input, int offset, ECGConfig cfg) 52 | { 53 | LastError = 0; 54 | IECGFormat ret = null; 55 | if ((input != null) 56 | && (input.CanRead)) 57 | { 58 | ret = new ISHNEFormat(); 59 | 60 | if (ret.Config != null) 61 | { 62 | ret.Config.Set(cfg); 63 | 64 | if (!ret.Config.ConfigurationWorks()) 65 | { 66 | LastError = 3; 67 | 68 | return null; 69 | } 70 | } 71 | 72 | if (ret.CheckFormat(input, offset)) 73 | { 74 | LastError = (ret.Read(input, offset) << 2); 75 | } 76 | 77 | if (!ret.Works()) 78 | { 79 | LastError = 2; 80 | ret = null; 81 | } 82 | } 83 | else 84 | { 85 | LastError = 1; 86 | } 87 | return ret; 88 | } 89 | public override IECGFormat Read(byte[] buffer, int offset, ECGConfig cfg) 90 | { 91 | LastError = 0; 92 | IECGFormat ret = null; 93 | if (buffer != null) 94 | { 95 | ret = new ISHNEFormat(); 96 | 97 | if (ret.Config != null) 98 | { 99 | ret.Config.Set(cfg); 100 | 101 | if (!ret.Config.ConfigurationWorks()) 102 | { 103 | LastError = 3; 104 | 105 | return null; 106 | } 107 | } 108 | 109 | if (ret.CheckFormat(buffer, offset)) 110 | { 111 | LastError = (ret.Read(buffer, offset) << 2); 112 | } 113 | 114 | if (!ret.Works()) 115 | { 116 | LastError = 2; 117 | ret = null; 118 | } 119 | } 120 | else 121 | { 122 | LastError = 1; 123 | } 124 | return ret; 125 | } 126 | public override string getErrorMessage() 127 | { 128 | string message = null; 129 | switch (LastError) 130 | { 131 | case 0: 132 | break; 133 | case 1: 134 | message = "No file found"; 135 | break; 136 | case 2: 137 | message = "Not a HL7 aECG file"; 138 | break; 139 | case 3: 140 | message = "Incorrect format configuration"; 141 | break; 142 | default: 143 | message = "ECG file type specific error"; 144 | break; 145 | } 146 | return message; 147 | } 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /libs/ECGConversion/ISHNE/ecgtoolkit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/ISHNE/ecgtoolkit-icon.png -------------------------------------------------------------------------------- /libs/ECGConversion/MUSEXML/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2019-2022, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | Copyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | Written by Maarten JB van Ettinger. 18 | 19 | ****************************************************************************/ 20 | using System.Reflection; 21 | using System.Runtime.CompilerServices; 22 | // 23 | // General Information about an assembly is controlled through the following 24 | // set of attributes. Change these attribute values to modify the information 25 | // associated with an assembly. 26 | // 27 | [assembly: AssemblyTitle("ECGConversion MUSE-XML plug-in")] 28 | [assembly: AssemblyDescription("MUSE-XML plug-in for the framework ECG Conversion")] 29 | [assembly: AssemblyConfiguration("")] 30 | [assembly: AssemblyCompany("Thoraxcentrum, Erasmus MC")] 31 | [assembly: AssemblyProduct("")] 32 | [assembly: AssemblyCopyright("Copyright 2019-2022, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\nCopyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands")] 33 | [assembly: AssemblyTrademark("")] 34 | [assembly: AssemblyCulture("")] 35 | 36 | // 37 | // Version information for an assembly consists of the following four values: 38 | // 39 | // Major Version 40 | // Minor Version 41 | // Build Number 42 | // Revision 43 | // 44 | // You can specify all the values or you can default the Revision and Build Numbers 45 | // by using the '*' as shown below: 46 | 47 | [assembly: AssemblyVersion("3.0.*")] 48 | 49 | // 50 | // In order to sign your assembly you must specify a key to use. Refer to the 51 | // Microsoft .NET Framework documentation for more information on assembly signing. 52 | // 53 | // Use the attributes below to control which key is used for signing. 54 | // 55 | // Notes: 56 | // (*) If no key is specified, the assembly is not signed. 57 | // (*) KeyName refers to a key that has been installed in the Crypto Service 58 | // Provider (CSP) on your machine. KeyFile refers to a file which contains 59 | // a key. 60 | // (*) If the KeyFile and the KeyName values are both specified, the 61 | // following processing occurs: 62 | // (1) If the KeyName can be found in the CSP, that key is used. 63 | // (2) If the KeyName does not exist and the KeyFile does exist, the key 64 | // in the KeyFile is installed into the CSP and used. 65 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. 66 | // When specifying the KeyFile, the location of the KeyFile should be 67 | // relative to the project output directory which is 68 | // %Project Directory%\obj\. For example, if your KeyFile is 69 | // located in the project directory, you would specify the AssemblyKeyFile 70 | // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] 71 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework 72 | // documentation for more information on this. 73 | // 74 | [assembly: AssemblyDelaySign(false)] 75 | [assembly: AssemblyKeyFile("")] 76 | [assembly: AssemblyKeyName("")] 77 | -------------------------------------------------------------------------------- /libs/ECGConversion/MUSEXML/ECGLoad.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2012, van Ettinger Information Technology, Lopik, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using ECGConversion.MUSEXML; 20 | 21 | namespace ECGConversion 22 | { 23 | /// 24 | /// Class that will load in all supported formats added by this plugin. 25 | /// 26 | public class ECGLoad 27 | { 28 | /// 29 | /// Function that returns a list of all plugins formats in this plugin. 30 | /// 31 | /// list of all plugin formats 32 | public static ECGPlugin[] LoadPlugin() 33 | { 34 | return new ECGPlugin[] {new ECGPlugin("MUSE-XML", "xml", typeof(MUSEXMLFormat), typeof(MUSEXMLReader), true)}; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /libs/ECGConversion/MUSEXML/MUSEXML-core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | ECGConversion 6 | ECGConversion MUSE-XML plug-in 7 | MUSE-XML plug-in for the framework ECG Conversion 8 | Thoraxcentrum, Erasmus MC 9 | Copyright 2019-2024, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\nCopyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands 10 | 2.7.0.0 11 | 3.0.0.0 12 | ECGCpluginMUSEXML 13 | M.J.B. van Ettinger 14 | true 15 | LICENSE-2.0.txt 16 | https://sourceforge.net/projects/ecgtoolkit-cs/ 17 | ecgtoolkit-icon.png 18 | 19 | https://git.code.sf.net/p/ecgtoolkit-cs/git 20 | GIT 21 | ECG Electrocardiogram EKG plug-in MUSE-XML MUSE ECGConversion 22 | en 23 | 24 | 25 | 26 | Off 27 | none 28 | false 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | True 42 | 43 | 44 | 45 | True 46 | 47 | 48 | 49 | True 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /libs/ECGConversion/MUSEXML/MUSEXML.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 10.0.0 7 | 2.0 8 | {D00C648E-17F3-4BA4-82BA-57FFCCFE285F} 9 | Library 10 | ECGConversion 11 | ECGCpluginMUSEXML 12 | 2.2 13 | v4.7.2 14 | 15 | 16 | 17 | True 18 | full 19 | False 20 | bin\Debug 21 | DEBUG; 22 | prompt 23 | 4 24 | False 25 | false 26 | 27 | 28 | none 29 | True 30 | bin\Release 31 | prompt 32 | 4 33 | False 34 | false 35 | 36 | 37 | 38 | 39 | {F969B245-DCD2-4AF6-AE74-E95F778D2339} 40 | ECGConversion 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /libs/ECGConversion/MUSEXML/ecgtoolkit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/MUSEXML/ecgtoolkit-icon.png -------------------------------------------------------------------------------- /libs/ECGConversion/OmronECG/ECGLoad.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2012, van Ettinger Information Technology, Lopik, The Netherlands 3 | Copyright 2011, M.J.B. van Ettinger Jr., The Netherlands 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | Written by Maarten JB van Ettinger. 18 | 19 | ****************************************************************************/ 20 | using ECGConversion.OmronECG; 21 | 22 | namespace ECGConversion 23 | { 24 | /// 25 | /// Class that will load in all supported formats added by this plugin. 26 | /// 27 | public class ECGLoad 28 | { 29 | /// 30 | /// Function that returns a list of all plugins formats in this plugin. 31 | /// 32 | /// list of all plugin formats 33 | public static ECGPlugin[] LoadPlugin() 34 | { 35 | return new ECGPlugin[] {new ECGPlugin("OmronECG", "ecg", typeof(OmronECGFormat), typeof(OmronECGReader), true)}; 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /libs/ECGConversion/OmronECG/OmronECG-core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | ECGConversion 6 | ECGConversion Omron ECG plug-in 7 | Omron ECG plug-in for the framework ECG Conversion 8 | Thoraxcentrum, Erasmus MC 9 | Copyright 2019-2024, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\nCopyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands 10 | 3.0.0.0 11 | 3.0.0.0 12 | ECGCpluginOmronECG 13 | M.J.B. van Ettinger 14 | true 15 | LICENSE-2.0.txt 16 | https://sourceforge.net/projects/ecgtoolkit-cs/ 17 | ecgtoolkit-icon.png 18 | 19 | https://git.code.sf.net/p/ecgtoolkit-cs/git 20 | GIT 21 | ECG Electrocardiogram EKG plug-in OmronECG Omron ECGConversion 22 | en 23 | 24 | 25 | 26 | none 27 | Off 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | True 41 | 42 | 43 | 44 | True 45 | 46 | 47 | 48 | True 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /libs/ECGConversion/OmronECG/OmronECG.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 10.0.0 7 | 2.0 8 | {59C6F998-1BA1-44A1-9999-C8A5BB718F15} 9 | Library 10 | ECGConversion 11 | ECGCpluginOmron 12 | 2.2 13 | v4.7.2 14 | 15 | 16 | 17 | True 18 | full 19 | False 20 | bin\Debug 21 | DEBUG; 22 | prompt 23 | 4 24 | False 25 | false 26 | 27 | 28 | none 29 | True 30 | bin\Release 31 | prompt 32 | 4 33 | False 34 | false 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | {F969B245-DCD2-4AF6-AE74-E95F778D2339} 50 | ECGConversion 51 | 52 | 53 | -------------------------------------------------------------------------------- /libs/ECGConversion/OmronECG/ecgtoolkit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/OmronECG/ecgtoolkit-icon.png -------------------------------------------------------------------------------- /libs/ECGConversion/PDF/ECGLoad.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using ECGConversion.PDF; 20 | 21 | namespace ECGConversion 22 | { 23 | /// 24 | /// Class that will load in all supported formats added by this plugin. 25 | /// 26 | public class ECGLoad 27 | { 28 | /// 29 | /// Function that returns a list of all plugins formats in this plugin. 30 | /// 31 | /// list of all plugin formats 32 | public static ECGPlugin[] LoadPlugin() 33 | { 34 | return new ECGPlugin[] {new ECGPlugin("PDF", "pdf", typeof(PDF.PDFFormat), null, false)}; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /libs/ECGConversion/PDF/PDF-core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | ECGConversion 6 | ECGCpluginPDF 7 | ECGConversion PDF plug-in 8 | PDF plug-in for the framework ECG Conversion 9 | M.J.B. van Ettinger 10 | Copyright 2019-2024, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\nCopyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands\nCopyright 2008-2010, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 11 | 3.0.0.0 12 | Thoraxcentrum, Erasmus MC 13 | true 14 | LICENSE-2.0.txt 15 | https://sourceforge.net/projects/ecgtoolkit-cs/ 16 | ecgtoolkit-icon.png 17 | 18 | https://git.code.sf.net/p/ecgtoolkit-cs/git 19 | GIT 20 | ECG Electrocardiogram EKG plug-in PDF ECGConversion 21 | en 22 | 23 | 24 | 25 | none 26 | false 27 | Off 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | True 39 | 40 | 41 | 42 | True 43 | 44 | 45 | 46 | True 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | libs\netstandard2.0\itextsharp.dll 62 | true 63 | 64 | 65 | 66 | 67 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /libs/ECGConversion/PDF/PDF.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 10.0.0 7 | 2.0 8 | {7DD5A8F9-185B-4463-8684-B7EC99700774} 9 | Library 10 | ECGConversion 11 | ECGCpluginPDF 12 | v4.7.2 13 | 2.2 14 | 15 | 16 | 17 | True 18 | full 19 | False 20 | bin\Debug 21 | DEBUG; 22 | prompt 23 | 4 24 | False 25 | false 26 | 27 | 28 | none 29 | True 30 | bin\Release 31 | prompt 32 | 4 33 | False 34 | false 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | {F969B245-DCD2-4AF6-AE74-E95F778D2339} 51 | ECGConversion 52 | 53 | 54 | 55 | 56 | False 57 | libs\2.0\itextsharp.dll 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /libs/ECGConversion/PDF/ecgtoolkit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/PDF/ecgtoolkit-icon.png -------------------------------------------------------------------------------- /libs/ECGConversion/PDF/libs/1.1/itextsharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/PDF/libs/1.1/itextsharp.dll -------------------------------------------------------------------------------- /libs/ECGConversion/PDF/libs/2.0/itextsharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/PDF/libs/2.0/itextsharp.dll -------------------------------------------------------------------------------- /libs/ECGConversion/PDF/libs/net5.0/itextsharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/PDF/libs/net5.0/itextsharp.dll -------------------------------------------------------------------------------- /libs/ECGConversion/PDF/libs/netstandard2.0/itextsharp.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETStandard,Version=v2.0/", 4 | "signature": "" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETStandard,Version=v2.0": {}, 9 | ".NETStandard,Version=v2.0/": { 10 | "itextsharp/4.1.6": { 11 | "dependencies": { 12 | "NETStandard.Library": "2.0.3", 13 | "System.Drawing.Common": "5.0.3" 14 | }, 15 | "runtime": { 16 | "itextsharp.dll": {} 17 | } 18 | }, 19 | "Microsoft.NETCore.Platforms/1.1.0": {}, 20 | "NETStandard.Library/2.0.3": { 21 | "dependencies": { 22 | "Microsoft.NETCore.Platforms": "1.1.0" 23 | } 24 | }, 25 | "System.Drawing.Common/5.0.3": { 26 | "runtime": { 27 | "lib/netstandard2.0/System.Drawing.Common.dll": { 28 | "assemblyVersion": "4.0.0.2", 29 | "fileVersion": "4.6.29719.1" 30 | } 31 | } 32 | } 33 | } 34 | }, 35 | "libraries": { 36 | "itextsharp/4.1.6": { 37 | "type": "project", 38 | "serviceable": false, 39 | "sha512": "" 40 | }, 41 | "Microsoft.NETCore.Platforms/1.1.0": { 42 | "type": "package", 43 | "serviceable": true, 44 | "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", 45 | "path": "microsoft.netcore.platforms/1.1.0", 46 | "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" 47 | }, 48 | "NETStandard.Library/2.0.3": { 49 | "type": "package", 50 | "serviceable": true, 51 | "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", 52 | "path": "netstandard.library/2.0.3", 53 | "hashPath": "netstandard.library.2.0.3.nupkg.sha512" 54 | }, 55 | "System.Drawing.Common/5.0.3": { 56 | "type": "package", 57 | "serviceable": true, 58 | "sha512": "sha512-rEQZuslijqdsO0pkJn7LtGBaMc//YVA8de0meGihkg9oLPaN+w+/Pb5d71lgp0YjPoKgBKNMvdq0IPnoW4PEng==", 59 | "path": "system.drawing.common/5.0.3", 60 | "hashPath": "system.drawing.common.5.0.3.nupkg.sha512" 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /libs/ECGConversion/PDF/libs/netstandard2.0/itextsharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/PDF/libs/netstandard2.0/itextsharp.dll -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/ECGLoad.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using ECGConversion.aECG; 20 | 21 | namespace ECGConversion 22 | { 23 | /// 24 | /// Class that will load in all supported formats added by this plugin. 25 | /// 26 | public class ECGLoad 27 | { 28 | /// 29 | /// Function that returns a list of all plugins formats in this plugin. 30 | /// 31 | /// list of all plugin formats 32 | public static ECGPlugin[] LoadPlugin() 33 | { 34 | return new ECGPlugin[] {new ECGPlugin("aECG", "xml", typeof(aECGFormat), typeof(aECGReader), true)}; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG-core.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | ECGConversion 6 | ECGCpluginaECG 7 | 3.0.0.0 8 | M.J.B. van Ettinger 9 | ECGConversion HL7 Annotated ECG plug-in 10 | Copyright 2019-2024, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands\nCopyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands\nCopyright 2008-2010, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 11 | HL7 Annotated ECG plug-in for the framework ECG Conversion 12 | Thoraxcentrum, Erasmus MC 13 | true 14 | LICENSE-2.0.txt 15 | https://sourceforge.net/projects/ecgtoolkit-cs/ 16 | ecgtoolkit-icon.png 17 | 18 | https://git.code.sf.net/p/ecgtoolkit-cs/git 19 | GIT 20 | ECG Electrocardiogram EKG plug-in HL7aECG aECG AnnotatedECG HL7 ECGConversion 21 | en 22 | 23 | 24 | 25 | Off 26 | none 27 | false 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | True 41 | 42 | 43 | 44 | True 45 | 46 | 47 | 48 | True 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGAddress.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Xml; 21 | 22 | namespace ECGConversion.aECG 23 | { 24 | public sealed class aECGAddress : aECGElement 25 | { 26 | public string city; 27 | public string state; 28 | public string country; 29 | 30 | public string additionalLocator; 31 | public string censusTract; 32 | public string delimiter; 33 | public string houseNumber; 34 | public string postalCode; 35 | public string postBox; 36 | public string streetAddressLine; 37 | public string streetName; 38 | public aECGTime ValidTime = new aECGTime("validTime"); 39 | 40 | 41 | 42 | public aECGAddress() : base("addr") 43 | { 44 | Empty(); 45 | } 46 | 47 | public override int Read(XmlReader reader) 48 | { 49 | if (reader.IsEmptyElement) 50 | return 0; 51 | 52 | int ret = 0; 53 | 54 | while (reader.Read()) 55 | { 56 | if ((reader.NodeType == XmlNodeType.Comment) 57 | || (reader.NodeType == XmlNodeType.Whitespace)) 58 | continue; 59 | 60 | if (String.Compare(reader.Name, Name) == 0) 61 | { 62 | if (reader.NodeType == XmlNodeType.EndElement) 63 | break; 64 | else 65 | return 3; 66 | } 67 | 68 | ret = aECGElement.ReadOne(this, reader); 69 | 70 | if (ret != 0) 71 | return ret > 0 ? 3 + ret : ret; 72 | } 73 | 74 | return 0; 75 | } 76 | 77 | public override int Write(XmlWriter writer) 78 | { 79 | if (!Works()) 80 | return 0; 81 | 82 | writer.WriteStartElement(Name); 83 | 84 | aECGElement.WriteAll(this, writer); 85 | 86 | writer.WriteEndElement(); 87 | 88 | return 0; 89 | } 90 | 91 | public override bool Works() 92 | { 93 | return true; 94 | } 95 | } 96 | } -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGAssignedAuthorType.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGAssignedAuthorType : aECGElement 26 | { 27 | public aECGDevice AssignedDevice = null; 28 | public aECGPerson AssignedPerson = null; 29 | 30 | public aECGAssignedAuthorType() : base("assignedAuthorType") 31 | { 32 | } 33 | 34 | public override int Read(System.Xml.XmlReader reader) 35 | { 36 | while (reader.Read()) 37 | { 38 | if ((reader.NodeType == XmlNodeType.Comment) 39 | || (reader.NodeType == XmlNodeType.Whitespace)) 40 | continue; 41 | 42 | if ((string.Compare(reader.Name, Name) == 0) 43 | && (reader.NodeType == XmlNodeType.EndElement)) 44 | return 0; 45 | 46 | int ret = 0; 47 | 48 | if (string.Compare(reader.Name, "assignedDevice") == 0) 49 | { 50 | AssignedDevice = new aECGDevice("assignedDevice"); 51 | 52 | ret = AssignedDevice.Read(reader); 53 | } 54 | else if (string.Compare(reader.Name, "assignedPerson") == 0) 55 | { 56 | AssignedPerson = new aECGPerson("assignedPerson"); 57 | 58 | ret = AssignedPerson.Read(reader); 59 | } 60 | 61 | if (ret != 0) 62 | return ret; 63 | } 64 | 65 | return -1; 66 | } 67 | 68 | public override int Write(XmlWriter writer) 69 | { 70 | if (!Works()) 71 | return 0; 72 | 73 | writer.WriteStartElement(Name); 74 | 75 | aECGElement.WriteAll(this, writer); 76 | 77 | writer.WriteEndElement(); 78 | 79 | return 0; 80 | } 81 | 82 | public override bool Works() 83 | { 84 | if (AssignedDevice != null) 85 | return AssignedDevice.Works(); 86 | else if (AssignedPerson != null) 87 | return AssignedPerson.Works(); 88 | 89 | return false; 90 | } 91 | 92 | public void Set(aECGAssignedAuthorType aat) 93 | { 94 | if ((aat.AssignedDevice != null) 95 | && (aat.AssignedPerson == null)) 96 | { 97 | this.AssignedDevice = new aECGDevice("assignedDevice"); 98 | 99 | this.AssignedDevice.Set(aat.AssignedDevice); 100 | } 101 | else if ((aat.AssignedDevice == null) 102 | && (aat.AssignedPerson != null)) 103 | { 104 | this.AssignedPerson = new aECGPerson("assignedPerson"); 105 | 106 | this.AssignedPerson.Set(aat.AssignedPerson); 107 | } 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGBoundary.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGBoundary : aECGElement 26 | { 27 | private string _InnerName = null; 28 | 29 | public aECGCode Code = new aECGCode(); 30 | public aECGValuePair Value = new aECGValuePair("value"); 31 | 32 | public aECGBoundary() : base("component") 33 | { 34 | _InnerName = "boundary"; 35 | } 36 | 37 | public override int Read(System.Xml.XmlReader reader) 38 | { 39 | int sequence = 0; 40 | 41 | while (reader.Read()) 42 | { 43 | if ((reader.NodeType == XmlNodeType.Comment) 44 | || (reader.NodeType == XmlNodeType.Whitespace)) 45 | continue; 46 | 47 | if (sequence == 0) 48 | { 49 | if ((string.Compare(reader.Name, _InnerName) != 0) 50 | || (reader.NodeType != XmlNodeType.Element)) 51 | return 1; 52 | 53 | sequence += reader.IsEmptyElement ? 2 : 1; 54 | } 55 | else if (sequence == 1) 56 | { 57 | int ret = aECGElement.ReadOne(this, reader); 58 | 59 | if (ret != 0) 60 | return (ret > 0) ? 2 + ret : ret; 61 | 62 | if ((string.Compare(reader.Name, _InnerName) == 0) 63 | && (reader.NodeType == XmlNodeType.EndElement)) 64 | sequence++; 65 | } 66 | else 67 | { 68 | if ((string.Compare(reader.Name, Name) != 0) 69 | || (reader.NodeType != XmlNodeType.EndElement) 70 | || reader.IsEmptyElement) 71 | return 2; 72 | 73 | return 0; 74 | } 75 | } 76 | 77 | return -1; 78 | } 79 | 80 | public override int Write(XmlWriter writer) 81 | { 82 | if (!Works()) 83 | return 0; 84 | 85 | writer.WriteStartElement(Name); 86 | writer.WriteStartElement(_InnerName); 87 | 88 | aECGElement.WriteAll(this, writer); 89 | 90 | writer.WriteEndElement(); 91 | writer.WriteEndElement(); 92 | 93 | return 0; 94 | } 95 | 96 | public override bool Works() 97 | { 98 | return Code.Works(); 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGClinicalTrial.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGClinicalTrial : aECGElement 26 | { 27 | private string _InnerName = null; 28 | 29 | public aECGId Id = new aECGId(true); 30 | public string title = null; 31 | public aECGTime ActivityTime = new aECGTime("activityTime"); 32 | public aECGSite TrialSite = new aECGSite("trialSite"); 33 | 34 | public aECGClinicalTrial() : base("componentOf") 35 | { 36 | _InnerName = "clinicalTrial"; 37 | } 38 | 39 | public override int Read(System.Xml.XmlReader reader) 40 | { 41 | int sequence = 0; 42 | 43 | while (reader.Read()) 44 | { 45 | if ((reader.NodeType == XmlNodeType.Comment) 46 | || (reader.NodeType == XmlNodeType.Whitespace)) 47 | continue; 48 | 49 | if (sequence == 0) 50 | { 51 | if ((string.Compare(reader.Name, _InnerName) != 0) 52 | || (reader.NodeType != XmlNodeType.Element)) 53 | return 1; 54 | 55 | sequence += reader.IsEmptyElement ? 2 : 1; 56 | } 57 | else if (sequence == 1) 58 | { 59 | int ret = aECGElement.ReadOne(this, reader); 60 | 61 | if (ret != 0) 62 | return (ret > 0) ? 2 + ret : ret; 63 | 64 | if ((string.Compare(reader.Name, _InnerName) == 0) 65 | && (reader.NodeType == XmlNodeType.EndElement)) 66 | sequence++; 67 | } 68 | else 69 | { 70 | if ((string.Compare(reader.Name, Name) != 0) 71 | || (reader.NodeType != XmlNodeType.EndElement) 72 | || reader.IsEmptyElement) 73 | return 2; 74 | 75 | return 0; 76 | } 77 | } 78 | 79 | return -1; 80 | } 81 | 82 | public override int Write(XmlWriter writer) 83 | { 84 | if (!Works()) 85 | return 0; 86 | 87 | writer.WriteStartElement(Name); 88 | writer.WriteStartElement(_InnerName); 89 | 90 | aECGElement.WriteAll(this, writer); 91 | 92 | writer.WriteEndElement(); 93 | writer.WriteEndElement(); 94 | 95 | return 0; 96 | } 97 | 98 | public override bool Works() 99 | { 100 | return Id.Works() 101 | || (title != null) 102 | || ActivityTime.Works() 103 | || TrialSite.Works(); 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGCode.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Xml; 21 | 22 | namespace ECGConversion.aECG 23 | { 24 | public sealed class aECGCode : aECGElement 25 | { 26 | public string Code; 27 | public string CodeSystem; 28 | public string CodeSystemName; 29 | public string DisplayName; 30 | 31 | private bool _Must = false; 32 | 33 | public aECGCode() : base("code") 34 | {} 35 | 36 | public aECGCode(bool must) : base("code") 37 | { 38 | _Must = must; 39 | } 40 | 41 | public aECGCode(string name) : base(name) 42 | {} 43 | 44 | public aECGCode(string name, bool must) : base(name) 45 | { 46 | _Must = must; 47 | } 48 | 49 | public override int Read(XmlReader reader) 50 | { 51 | Code = reader.GetAttribute("code"); 52 | CodeSystem = reader.GetAttribute("codeSystem"); 53 | CodeSystemName = reader.GetAttribute("codeSystemName"); 54 | DisplayName = reader.GetAttribute("displayName"); 55 | 56 | if (!reader.IsEmptyElement) 57 | { 58 | int depth = reader.Depth; 59 | 60 | while (reader.Read()) 61 | { 62 | if ((depth == reader.Depth) 63 | && (string.Compare(reader.Name, Name) == 0) 64 | && (reader.NodeType == XmlNodeType.EndElement)) 65 | break; 66 | } 67 | } 68 | 69 | return 0; 70 | } 71 | 72 | public override int Write(XmlWriter writer) 73 | { 74 | if (!Works()) 75 | return 0; 76 | 77 | writer.WriteStartElement(Name); 78 | 79 | if (Code != null) 80 | writer.WriteAttributeString("code", Code); 81 | 82 | if (CodeSystem != null) 83 | writer.WriteAttributeString("codeSystem", CodeSystem); 84 | 85 | if (CodeSystemName != null) 86 | writer.WriteAttributeString("codeSystemName", CodeSystemName); 87 | 88 | if (DisplayName != null) 89 | writer.WriteAttributeString("displayName", DisplayName); 90 | 91 | writer.WriteEndElement(); 92 | 93 | return 0; 94 | } 95 | 96 | public override bool Works() 97 | { 98 | return (Code != null) 99 | || _Must; 100 | } 101 | 102 | public override void Empty() 103 | { 104 | Code = null; 105 | CodeSystem = null; 106 | CodeSystemName = null; 107 | DisplayName = null; 108 | } 109 | } 110 | } -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGDemographicPerson.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | Modified CH09 19 | 20 | ****************************************************************************/ 21 | using System; 22 | using System.Xml; 23 | 24 | namespace ECGConversion.aECG 25 | { 26 | public sealed class aECGDemographicPerson : aECGElement 27 | { 28 | public aECGName PersonName = new aECGName(); 29 | public aECGCode AdministrativeGenderCode = new aECGCode("administrativeGenderCode", true); 30 | public aECGValuePair BirthTime = new aECGValuePair("birthTime"); 31 | public aECGCode RaceCode = new aECGCode("raceCode", true); 32 | 33 | public aECGDemographicPerson(string name) 34 | : base(name) 35 | {} 36 | 37 | public override int Read(XmlReader reader) 38 | { 39 | if (reader.IsEmptyElement) 40 | return 0; 41 | 42 | int ret = 0; 43 | 44 | while (reader.Read()) 45 | { 46 | if ((reader.NodeType == XmlNodeType.Comment) 47 | || (reader.NodeType == XmlNodeType.Whitespace)) 48 | continue; 49 | 50 | if (String.Compare(reader.Name, Name) == 0) 51 | { 52 | if (reader.NodeType == XmlNodeType.EndElement) 53 | break; 54 | else 55 | return 3; 56 | } 57 | 58 | ret = aECGElement.ReadOne(this, reader); 59 | 60 | if (ret != 0) 61 | break; 62 | } 63 | 64 | return ret; 65 | } 66 | 67 | public override int Write(XmlWriter writer) 68 | { 69 | if (!Works()) 70 | return 0; 71 | 72 | writer.WriteStartElement(Name); 73 | 74 | aECGElement.WriteAll(this, writer); 75 | 76 | writer.WriteEndElement(); 77 | 78 | return 0; 79 | } 80 | 81 | public override bool Works() 82 | { 83 | return PersonName.Works() 84 | || AdministrativeGenderCode.Works() 85 | || BirthTime.Works() 86 | || RaceCode.Works(); 87 | } 88 | 89 | public void Set(aECGDemographicPerson pers) 90 | { 91 | this.PersonName.family = pers.PersonName.family; 92 | this.PersonName.given = pers.PersonName.given; 93 | this.PersonName.prefix = pers.PersonName.prefix; 94 | this.PersonName.suffix = pers.PersonName.suffix; 95 | 96 | this.AdministrativeGenderCode.Code = pers.AdministrativeGenderCode.Code; 97 | this.AdministrativeGenderCode.CodeSystem = pers.AdministrativeGenderCode.CodeSystem; 98 | this.AdministrativeGenderCode.CodeSystemName = pers.AdministrativeGenderCode.CodeSystemName; 99 | this.AdministrativeGenderCode.DisplayName = pers.AdministrativeGenderCode.DisplayName; 100 | 101 | this.BirthTime.Set(pers.BirthTime); 102 | 103 | this.RaceCode.Code = pers.RaceCode.Code; 104 | this.RaceCode.CodeSystem = pers.RaceCode.CodeSystem; 105 | this.RaceCode.CodeSystemName = pers.RaceCode.CodeSystemName; 106 | this.RaceCode.DisplayName = pers.RaceCode.DisplayName; 107 | } 108 | } 109 | } -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGDevice.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGDevice : aECGElement 26 | { 27 | public aECGId Id = null; 28 | public aECGCode Code = new aECGCode(); 29 | public string manufacturerModelName; 30 | public string softwareName; 31 | public aECGPlayedManufacturedDevice PlayedManufacturedDevice = null; 32 | 33 | public aECGDevice() : base("manufacturedSeriesDevice") 34 | { 35 | Id = new aECGId(); 36 | } 37 | 38 | public aECGDevice(string name) : base(name) 39 | { 40 | if (string.Compare(name, "manufacturedSeriesDevice") == 0) 41 | { 42 | Id = new aECGId(); 43 | } 44 | else if (string.Compare(name, "assignedDevice") == 0) 45 | { 46 | PlayedManufacturedDevice = new aECGPlayedManufacturedDevice(); 47 | } 48 | } 49 | 50 | public override int Read(System.Xml.XmlReader reader) 51 | { 52 | while (reader.Read()) 53 | { 54 | if ((reader.NodeType == XmlNodeType.Comment) 55 | || (reader.NodeType == XmlNodeType.Whitespace)) 56 | continue; 57 | 58 | if ((string.Compare(reader.Name, Name) == 0) 59 | && (reader.NodeType == XmlNodeType.EndElement)) 60 | return 0; 61 | 62 | int ret = aECGElement.ReadOne(this, reader); 63 | 64 | if (ret != 0) 65 | return ret; 66 | } 67 | 68 | return -1; 69 | } 70 | 71 | public override int Write(XmlWriter writer) 72 | { 73 | if (!Works()) 74 | return 0; 75 | 76 | writer.WriteStartElement(Name); 77 | 78 | aECGElement.WriteAll(this, writer); 79 | 80 | writer.WriteEndElement(); 81 | 82 | return 0; 83 | } 84 | 85 | public override bool Works() 86 | { 87 | return true; 88 | } 89 | 90 | public void Set(aECGDevice msd) 91 | { 92 | if ((this.Id != null) 93 | && (msd.Id != null)) 94 | { 95 | this.Id.Root = msd.Id.Root; 96 | this.Id.Extension = msd.Id.Extension; 97 | } 98 | 99 | this.Code.Code = msd.Code.Code; 100 | this.Code.CodeSystem = msd.Code.CodeSystem; 101 | this.Code.CodeSystemName = msd.Code.CodeSystemName; 102 | this.Code.DisplayName = msd.Code.DisplayName; 103 | 104 | this.manufacturerModelName = msd.manufacturerModelName; 105 | this.softwareName = msd.softwareName; 106 | 107 | if ((this.PlayedManufacturedDevice != null) 108 | && (msd.PlayedManufacturedDevice != null)) 109 | { 110 | this.PlayedManufacturedDevice.ManufacturerOrganization.Set(msd.PlayedManufacturedDevice.ManufacturerOrganization); 111 | } 112 | } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGId.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Xml; 21 | 22 | namespace ECGConversion.aECG 23 | { 24 | public sealed class aECGId : aECGElement 25 | { 26 | public string Root; 27 | public string Extension; 28 | private bool _Must = false; 29 | 30 | public aECGId() : base("id") 31 | {} 32 | 33 | public aECGId(bool must) : base("id") 34 | { 35 | _Must = must; 36 | } 37 | 38 | public override int Read(XmlReader reader) 39 | { 40 | Root = reader.GetAttribute("root"); 41 | Extension = reader.GetAttribute("extension"); 42 | 43 | if (!reader.IsEmptyElement) 44 | { 45 | int depth = reader.Depth; 46 | 47 | while (reader.Read()) 48 | { 49 | if ((depth == reader.Depth) 50 | && (string.Compare(reader.Name, Name) == 0) 51 | && (reader.NodeType == XmlNodeType.EndElement)) 52 | break; 53 | } 54 | } 55 | 56 | return 0; 57 | } 58 | 59 | public override int Write(XmlWriter writer) 60 | { 61 | if (!Works()) 62 | return 0; 63 | 64 | writer.WriteStartElement(Name); 65 | 66 | if (Root != null) 67 | writer.WriteAttributeString("root", Root); 68 | 69 | if (Extension != null) 70 | writer.WriteAttributeString("extension", Extension); 71 | 72 | writer.WriteEndElement(); 73 | 74 | return 0; 75 | } 76 | 77 | public override bool Works() 78 | { 79 | return (Root != null) 80 | || (Extension != null) 81 | || _Must; 82 | } 83 | 84 | public override void Empty() 85 | { 86 | Root = null; 87 | Extension = null; 88 | 89 | base.Empty(); 90 | } 91 | 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGIdentification.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGIdentification : aECGElement 26 | { 27 | public aECGId Id = new aECGId(); 28 | 29 | public aECGIdentification() : base("identification") 30 | { 31 | } 32 | 33 | public override int Read(System.Xml.XmlReader reader) 34 | { 35 | if (reader.IsEmptyElement) 36 | return 0; 37 | 38 | while (reader.Read()) 39 | { 40 | if ((reader.NodeType == XmlNodeType.Comment) 41 | || (reader.NodeType == XmlNodeType.Whitespace)) 42 | continue; 43 | 44 | if ((string.Compare(reader.Name, Name) == 0) 45 | && (reader.NodeType == XmlNodeType.EndElement)) 46 | return 0; 47 | 48 | int ret = aECGElement.ReadOne(this, reader); 49 | 50 | if (ret != 0) 51 | return ret; 52 | } 53 | 54 | return -1; 55 | } 56 | 57 | public override int Write(XmlWriter writer) 58 | { 59 | if (!Works()) 60 | return 0; 61 | 62 | writer.WriteStartElement(Name); 63 | 64 | aECGElement.WriteAll(this, writer); 65 | 66 | writer.WriteEndElement(); 67 | 68 | return 0; 69 | } 70 | 71 | public override bool Works() 72 | { 73 | return true; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGLocation.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Xml; 21 | 22 | namespace ECGConversion.aECG 23 | { 24 | public sealed class aECGLocation : aECGElement 25 | { 26 | public string name; 27 | public aECGAddress Address = new aECGAddress(); 28 | 29 | public aECGLocation() : base("location") 30 | {} 31 | 32 | public override int Read(XmlReader reader) 33 | { 34 | if (reader.IsEmptyElement) 35 | return 0; 36 | 37 | int ret = 0; 38 | 39 | while (reader.Read()) 40 | { 41 | if ((reader.NodeType == XmlNodeType.Comment) 42 | || (reader.NodeType == XmlNodeType.Whitespace)) 43 | continue; 44 | 45 | if (String.Compare(reader.Name, Name) == 0) 46 | { 47 | if (reader.NodeType == XmlNodeType.EndElement) 48 | break; 49 | else 50 | return 3; 51 | } 52 | 53 | ret = aECGElement.ReadOne(this, reader); 54 | 55 | if (ret != 0) 56 | break; 57 | } 58 | 59 | return ret; 60 | } 61 | 62 | public override int Write(XmlWriter writer) 63 | { 64 | if (!Works()) 65 | return 0; 66 | 67 | writer.WriteStartElement(Name); 68 | 69 | aECGElement.WriteAll(this, writer); 70 | 71 | writer.WriteEndElement(); 72 | 73 | return 0; 74 | } 75 | 76 | public override bool Works() 77 | { 78 | return (name != null) 79 | && (Address.Works()); 80 | } 81 | } 82 | } -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGName.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Xml; 21 | 22 | namespace ECGConversion.aECG 23 | { 24 | public sealed class aECGName : aECGElement 25 | { 26 | public string family; 27 | public string given; 28 | public string prefix; 29 | public string suffix; 30 | 31 | public aECGName() : base("name") 32 | { 33 | Empty(); 34 | } 35 | 36 | public override int Read(XmlReader reader) 37 | { 38 | if (reader.IsEmptyElement) 39 | return 0; 40 | 41 | int ret = 0; 42 | 43 | while (reader.Read()) 44 | { 45 | if ((reader.NodeType == XmlNodeType.Comment) 46 | || (reader.NodeType == XmlNodeType.Whitespace)) 47 | continue; 48 | 49 | if (reader.NodeType == XmlNodeType.Text) 50 | { 51 | family = reader.Value; 52 | 53 | continue; 54 | } 55 | 56 | if (String.Compare(reader.Name, Name) == 0) 57 | { 58 | if (reader.NodeType == XmlNodeType.EndElement) 59 | break; 60 | else 61 | return 3; 62 | } 63 | 64 | ret = aECGElement.ReadOne(this, reader); 65 | 66 | if (ret != 0) 67 | break; 68 | } 69 | 70 | return ret; 71 | } 72 | 73 | public override int Write(XmlWriter writer) 74 | { 75 | if (!Works()) 76 | return 0; 77 | 78 | writer.WriteStartElement(Name); 79 | 80 | if ((family != null) 81 | && (given == null) 82 | && (prefix == null) 83 | && (suffix == null)) 84 | writer.WriteString(family); 85 | else 86 | aECGElement.WriteAll(this, writer); 87 | 88 | writer.WriteEndElement(); 89 | 90 | return 0; 91 | } 92 | 93 | public override bool Works() 94 | { 95 | return (family != null); 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGOrganization.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGOrganization : aECGElement 26 | { 27 | public aECGId Id = new aECGId(); 28 | public string name; 29 | public aECGIdentification Identification = null; 30 | 31 | public aECGOrganization() : base("manufacturerOrganization") 32 | { 33 | } 34 | 35 | public aECGOrganization(string name) : base(name) 36 | { 37 | if (string.Compare(name, "representedAuthoringOrganization") == 0) 38 | { 39 | Identification = new aECGIdentification(); 40 | } 41 | } 42 | 43 | public override int Read(System.Xml.XmlReader reader) 44 | { 45 | while (reader.Read()) 46 | { 47 | if ((reader.NodeType == XmlNodeType.Comment) 48 | || (reader.NodeType == XmlNodeType.Whitespace)) 49 | continue; 50 | 51 | if ((string.Compare(reader.Name, Name) == 0) 52 | && (reader.NodeType == XmlNodeType.EndElement)) 53 | return 0; 54 | 55 | int ret = aECGElement.ReadOne(this, reader); 56 | 57 | if (ret != 0) 58 | return ret; 59 | } 60 | 61 | return -1; 62 | } 63 | 64 | public override int Write(XmlWriter writer) 65 | { 66 | if (!Works()) 67 | return 0; 68 | 69 | writer.WriteStartElement(Name); 70 | 71 | aECGElement.WriteAll(this, writer); 72 | 73 | writer.WriteEndElement(); 74 | 75 | return 0; 76 | } 77 | 78 | public override bool Works() 79 | { 80 | return true; 81 | } 82 | 83 | public void Set(aECGOrganization mo) 84 | { 85 | this.Id.Root = mo.Id.Root; 86 | this.Id.Extension = mo.Id.Extension; 87 | 88 | this.name = mo.name; 89 | 90 | if ((this.Identification != null) 91 | && (mo.Identification != null)) 92 | { 93 | this.Identification.Id.Root = mo.Identification.Id.Root; 94 | this.Identification.Id.Extension = mo.Identification.Id.Extension; 95 | } 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGPerformer.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGPerformer : aECGElement 26 | { 27 | private string _InnerName = null; 28 | 29 | public aECGId Id = new aECGId(); 30 | public aECGPerson AssignedPerson = new aECGPerson("assignedPerson"); 31 | 32 | public aECGPerformer() : base("performer") 33 | { 34 | _InnerName = "studyEventPerformer"; 35 | } 36 | 37 | public override int Read(System.Xml.XmlReader reader) 38 | { 39 | int sequence = 0; 40 | 41 | while (reader.Read()) 42 | { 43 | if ((reader.NodeType == XmlNodeType.Comment) 44 | || (reader.NodeType == XmlNodeType.Whitespace)) 45 | continue; 46 | 47 | if (sequence == 0) 48 | { 49 | if ((string.Compare(reader.Name, _InnerName) != 0) 50 | || (reader.NodeType != XmlNodeType.Element)) 51 | return 1; 52 | 53 | sequence += reader.IsEmptyElement ? 2 : 1; 54 | } 55 | else if (sequence == 1) 56 | { 57 | int ret = aECGElement.ReadOne(this, reader); 58 | 59 | if (ret != 0) 60 | return (ret > 0) ? 2 + ret : ret; 61 | 62 | if ((string.Compare(reader.Name, _InnerName) == 0) 63 | && (reader.NodeType == XmlNodeType.EndElement)) 64 | sequence++; 65 | } 66 | else 67 | { 68 | if ((string.Compare(reader.Name, Name) != 0) 69 | || (reader.NodeType != XmlNodeType.EndElement) 70 | || reader.IsEmptyElement) 71 | return 2; 72 | 73 | return 0; 74 | } 75 | } 76 | 77 | return -1; 78 | } 79 | 80 | public override int Write(XmlWriter writer) 81 | { 82 | if (!Works()) 83 | return 0; 84 | 85 | writer.WriteStartElement(Name); 86 | writer.WriteStartElement(_InnerName); 87 | 88 | aECGElement.WriteAll(this, writer); 89 | 90 | writer.WriteEndElement(); 91 | writer.WriteEndElement(); 92 | 93 | return 0; 94 | } 95 | 96 | public override bool Works() 97 | { 98 | return Id.Works() 99 | || AssignedPerson.Works(); 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGPerson.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | Modified CH09 19 | 20 | ****************************************************************************/ 21 | using System; 22 | using System.Xml; 23 | 24 | namespace ECGConversion.aECG 25 | { 26 | public sealed class aECGPerson : aECGElement 27 | { 28 | public aECGName PersonName = new aECGName(); 29 | 30 | public aECGPerson(string name) : base(name) 31 | {} 32 | 33 | public override int Read(XmlReader reader) 34 | { 35 | if (reader.IsEmptyElement) 36 | return 0; 37 | 38 | int ret = 0; 39 | 40 | while (reader.Read()) 41 | { 42 | if ((reader.NodeType == XmlNodeType.Comment) 43 | || (reader.NodeType == XmlNodeType.Whitespace)) 44 | continue; 45 | 46 | if (String.Compare(reader.Name, Name) == 0) 47 | { 48 | if (reader.NodeType == XmlNodeType.EndElement) 49 | break; 50 | else 51 | return 3; 52 | } 53 | 54 | ret = aECGElement.ReadOne(this, reader); 55 | 56 | if (ret != 0) 57 | break; 58 | } 59 | 60 | return ret; 61 | } 62 | 63 | public override int Write(XmlWriter writer) 64 | { 65 | if (!Works()) 66 | return 0; 67 | 68 | writer.WriteStartElement(Name); 69 | 70 | aECGElement.WriteAll(this, writer); 71 | 72 | writer.WriteEndElement(); 73 | 74 | return 0; 75 | } 76 | 77 | public override bool Works() 78 | { 79 | return PersonName.Works(); 80 | } 81 | 82 | public void Set(aECGPerson pers) 83 | { 84 | this.PersonName.family = pers.PersonName.family; 85 | this.PersonName.given = pers.PersonName.given; 86 | this.PersonName.prefix = pers.PersonName.prefix; 87 | this.PersonName.suffix = pers.PersonName.suffix; 88 | } 89 | } 90 | } -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGPlayedManufacturedDevice.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGPlayedManufacturedDevice : aECGElement 26 | { 27 | public aECGOrganization ManufacturerOrganization = new aECGOrganization("manufacturerOrganization"); 28 | 29 | public aECGPlayedManufacturedDevice() : base("playedManufacturedDevice") 30 | { 31 | } 32 | 33 | public override int Read(System.Xml.XmlReader reader) 34 | { 35 | while (reader.Read()) 36 | { 37 | if ((reader.NodeType == XmlNodeType.Comment) 38 | || (reader.NodeType == XmlNodeType.Whitespace)) 39 | continue; 40 | 41 | if ((string.Compare(reader.Name, Name) == 0) 42 | && (reader.NodeType == XmlNodeType.EndElement)) 43 | return 0; 44 | 45 | int ret = aECGElement.ReadOne(this, reader); 46 | 47 | if (ret != 0) 48 | return ret; 49 | } 50 | 51 | return -1; 52 | } 53 | 54 | public override int Write(XmlWriter writer) 55 | { 56 | if (!Works()) 57 | return 0; 58 | 59 | writer.WriteStartElement(Name); 60 | 61 | aECGElement.WriteAll(this, writer); 62 | 63 | writer.WriteEndElement(); 64 | 65 | return 0; 66 | } 67 | 68 | public override bool Works() 69 | { 70 | return ManufacturerOrganization.Works(); 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGRelatedObservation.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGRelatedObservation : aECGElement 26 | { 27 | public const string RelatedObservationName = "relatedObservation"; 28 | 29 | public aECGCode Code = new aECGCode(); 30 | public aECGValuePair Value = new aECGValuePair("value"); 31 | 32 | public aECGRelatedObservation() : base(RelatedObservationName) 33 | { 34 | } 35 | 36 | public override int Read(System.Xml.XmlReader reader) 37 | { 38 | while (reader.Read()) 39 | { 40 | if ((reader.NodeType == XmlNodeType.Comment) 41 | || (reader.NodeType == XmlNodeType.Whitespace)) 42 | continue; 43 | 44 | if ((string.Compare(reader.Name, Name) == 0) 45 | && (reader.NodeType == XmlNodeType.EndElement)) 46 | return 0; 47 | 48 | int ret = aECGElement.ReadOne(this, reader); 49 | 50 | if (ret != 0) 51 | return ret; 52 | } 53 | 54 | return -1; 55 | } 56 | 57 | public override int Write(XmlWriter writer) 58 | { 59 | if (!Works()) 60 | return 0; 61 | 62 | writer.WriteStartElement(Name); 63 | 64 | aECGElement.WriteAll(this, writer); 65 | 66 | writer.WriteEndElement(); 67 | 68 | return 0; 69 | } 70 | 71 | public override bool Works() 72 | { 73 | return Code.Works() 74 | && Value.Works(); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGSite.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | Modified CH09 19 | 20 | ****************************************************************************/ 21 | using System; 22 | using System.Collections; 23 | using System.Xml; 24 | 25 | namespace ECGConversion.aECG 26 | { 27 | public sealed class aECGSite : aECGElement 28 | { 29 | private string _InnerName = null; 30 | 31 | public aECGId Id = new aECGId(true); 32 | public aECGLocation Location = new aECGLocation(); 33 | 34 | public aECGSite(string innerName) : base("location") 35 | { 36 | _InnerName = innerName; 37 | } 38 | 39 | public override int Read(System.Xml.XmlReader reader) 40 | { 41 | int sequence = 0; 42 | 43 | while (reader.Read()) 44 | { 45 | if ((reader.NodeType == XmlNodeType.Comment) 46 | || (reader.NodeType == XmlNodeType.Whitespace)) 47 | continue; 48 | 49 | if (sequence == 0) 50 | { 51 | if ((string.Compare(reader.Name, _InnerName) != 0) 52 | || (reader.NodeType != XmlNodeType.Element)) 53 | return 1; 54 | 55 | sequence += reader.IsEmptyElement ? 2 : 1; 56 | } 57 | else if (sequence == 1) 58 | { 59 | int ret = aECGElement.ReadOne(this, reader); 60 | 61 | if (ret != 0) 62 | return (ret > 0) ? 2 + ret : ret; 63 | 64 | if ((string.Compare(reader.Name, _InnerName) == 0) 65 | && (reader.NodeType == XmlNodeType.EndElement)) 66 | sequence++; 67 | } 68 | else 69 | { 70 | if ((string.Compare(reader.Name, Name) != 0) 71 | || (reader.NodeType != XmlNodeType.EndElement) 72 | || reader.IsEmptyElement) 73 | return 2; 74 | 75 | return 0; 76 | } 77 | } 78 | 79 | return -1; 80 | } 81 | 82 | public override int Write(XmlWriter writer) 83 | { 84 | if (!Works()) 85 | return 0; 86 | 87 | writer.WriteStartElement(Name); 88 | writer.WriteStartElement(_InnerName); 89 | 90 | aECGElement.WriteAll(this, writer); 91 | 92 | writer.WriteEndElement(); 93 | writer.WriteEndElement(); 94 | 95 | return 0; 96 | } 97 | 98 | public override bool Works() 99 | { 100 | return true; 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGSubjectAssignment.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGSubjectAssignment : aECGElement 26 | { 27 | private string _InnerName = null; 28 | 29 | public aECGTrialSubject Subject = new aECGTrialSubject(); 30 | public aECGSubjectAssignmentDefinition Definition = new aECGSubjectAssignmentDefinition(); 31 | public aECGClinicalTrial ClinicalTrial = new aECGClinicalTrial(); 32 | 33 | public aECGSubjectAssignment() : base("componentOf") 34 | { 35 | _InnerName = "subjectAssignment"; 36 | } 37 | 38 | public override int Read(System.Xml.XmlReader reader) 39 | { 40 | int sequence = 0; 41 | 42 | while (reader.Read()) 43 | { 44 | if ((reader.NodeType == XmlNodeType.Comment) 45 | || (reader.NodeType == XmlNodeType.Whitespace)) 46 | continue; 47 | 48 | if (sequence == 0) 49 | { 50 | if ((string.Compare(reader.Name, _InnerName) != 0) 51 | || (reader.NodeType != XmlNodeType.Element)) 52 | return 1; 53 | 54 | sequence += reader.IsEmptyElement ? 2 : 1; 55 | } 56 | else if (sequence == 1) 57 | { 58 | int ret = aECGElement.ReadOne(this, reader); 59 | 60 | if (ret != 0) 61 | return (ret > 0) ? 2 + ret : ret; 62 | 63 | if ((string.Compare(reader.Name, _InnerName) == 0) 64 | && (reader.NodeType == XmlNodeType.EndElement)) 65 | sequence++; 66 | } 67 | else 68 | { 69 | if ((string.Compare(reader.Name, Name) != 0) 70 | || (reader.NodeType != XmlNodeType.EndElement) 71 | || reader.IsEmptyElement) 72 | return 2; 73 | 74 | return 0; 75 | } 76 | } 77 | 78 | return -1; 79 | } 80 | 81 | public override int Write(XmlWriter writer) 82 | { 83 | if (!Works()) 84 | return 0; 85 | 86 | writer.WriteStartElement(Name); 87 | writer.WriteStartElement(_InnerName); 88 | 89 | aECGElement.WriteAll(this, writer); 90 | 91 | writer.WriteEndElement(); 92 | writer.WriteEndElement(); 93 | 94 | return 0; 95 | } 96 | 97 | public override bool Works() 98 | { 99 | return Subject.Works() 100 | || Definition.Works() 101 | || ClinicalTrial.Works(); 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGSubjectAssignmentDefinition.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGSubjectAssignmentDefinition : aECGElement 26 | { 27 | private string _InnerName = null; 28 | 29 | public aECGCode Code = new aECGCode(true); 30 | 31 | public aECGSubjectAssignmentDefinition() : base("definition") 32 | { 33 | _InnerName = "treatmentGroupAssignment"; 34 | } 35 | 36 | public override int Read(System.Xml.XmlReader reader) 37 | { 38 | int sequence = 0; 39 | 40 | while (reader.Read()) 41 | { 42 | if ((reader.NodeType == XmlNodeType.Comment) 43 | || (reader.NodeType == XmlNodeType.Whitespace)) 44 | continue; 45 | 46 | if (sequence == 0) 47 | { 48 | if ((string.Compare(reader.Name, _InnerName) != 0) 49 | || (reader.NodeType != XmlNodeType.Element)) 50 | return 1; 51 | 52 | sequence += reader.IsEmptyElement ? 2 : 1; 53 | } 54 | else if (sequence == 1) 55 | { 56 | int ret = aECGElement.ReadOne(this, reader); 57 | 58 | if (ret != 0) 59 | return (ret > 0) ? 2 + ret : ret; 60 | 61 | if ((string.Compare(reader.Name, _InnerName) == 0) 62 | && (reader.NodeType == XmlNodeType.EndElement)) 63 | sequence++; 64 | } 65 | else 66 | { 67 | if ((string.Compare(reader.Name, Name) != 0) 68 | || (reader.NodeType != XmlNodeType.EndElement) 69 | || reader.IsEmptyElement) 70 | return 2; 71 | 72 | return 0; 73 | } 74 | } 75 | 76 | return -1; 77 | } 78 | 79 | public override int Write(XmlWriter writer) 80 | { 81 | if (!Works()) 82 | return 0; 83 | 84 | writer.WriteStartElement(Name); 85 | writer.WriteStartElement(_InnerName); 86 | 87 | aECGElement.WriteAll(this, writer); 88 | 89 | writer.WriteEndElement(); 90 | writer.WriteEndElement(); 91 | 92 | return 0; 93 | } 94 | 95 | public override bool Works() 96 | { 97 | return Code.Works(); 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGSubjectFindingComment.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGSubjectFindingComment : aECGElement 26 | { 27 | private string _InnerName = null; 28 | 29 | public aECGCode Code = new aECGCode(); 30 | public string text; 31 | public aECGValue Value = new aECGValue(); 32 | 33 | public aECGSubjectFindingComment() : base("pertainsTo") 34 | { 35 | _InnerName = "subjectFindingComment"; 36 | } 37 | 38 | public override int Read(System.Xml.XmlReader reader) 39 | { 40 | int sequence = 0; 41 | 42 | while (reader.Read()) 43 | { 44 | if ((reader.NodeType == XmlNodeType.Comment) 45 | || (reader.NodeType == XmlNodeType.Whitespace)) 46 | continue; 47 | 48 | if (sequence == 0) 49 | { 50 | if ((string.Compare(reader.Name, _InnerName) != 0) 51 | || (reader.NodeType != XmlNodeType.Element)) 52 | return 1; 53 | 54 | sequence += reader.IsEmptyElement ? 2 : 1; 55 | } 56 | else if (sequence == 1) 57 | { 58 | int ret = aECGElement.ReadOne(this, reader); 59 | 60 | if (ret != 0) 61 | return (ret > 0) ? 2 + ret : ret; 62 | 63 | if ((string.Compare(reader.Name, _InnerName) == 0) 64 | && (reader.NodeType == XmlNodeType.EndElement)) 65 | sequence++; 66 | } 67 | else 68 | { 69 | if ((string.Compare(reader.Name, Name) != 0) 70 | || (reader.NodeType != XmlNodeType.EndElement) 71 | || reader.IsEmptyElement) 72 | return 2; 73 | 74 | return 0; 75 | } 76 | } 77 | 78 | return -1; 79 | } 80 | 81 | public override int Write(XmlWriter writer) 82 | { 83 | if (!Works()) 84 | return 0; 85 | 86 | writer.WriteStartElement(Name); 87 | writer.WriteStartElement(_InnerName); 88 | 89 | aECGElement.WriteAll(this, writer); 90 | 91 | writer.WriteEndElement(); 92 | writer.WriteEndElement(); 93 | 94 | return 0; 95 | } 96 | 97 | public override bool Works() 98 | { 99 | return text != null; 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGSupportingROI.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGSupportingROI : aECGElement 26 | { 27 | private string _InnerName = null; 28 | 29 | public aECGCode Code = new aECGCode(); 30 | public aECGBoundary[] Boundary = new aECGBoundary[128]; 31 | 32 | public aECGSupportingROI() : base("support") 33 | { 34 | _InnerName = "supportingROI"; 35 | } 36 | 37 | public override int Read(System.Xml.XmlReader reader) 38 | { 39 | int sequence = 0; 40 | 41 | while (reader.Read()) 42 | { 43 | if ((reader.NodeType == XmlNodeType.Comment) 44 | || (reader.NodeType == XmlNodeType.Whitespace)) 45 | continue; 46 | 47 | if (sequence == 0) 48 | { 49 | if ((string.Compare(reader.Name, _InnerName) != 0) 50 | || (reader.NodeType != XmlNodeType.Element)) 51 | return 1; 52 | 53 | sequence += reader.IsEmptyElement ? 2 : 1; 54 | } 55 | else if (sequence == 1) 56 | { 57 | int ret = aECGElement.ReadOne(this, reader); 58 | 59 | if (ret != 0) 60 | return (ret > 0) ? 2 + ret : ret; 61 | 62 | if ((string.Compare(reader.Name, _InnerName) == 0) 63 | && (reader.NodeType == XmlNodeType.EndElement)) 64 | sequence++; 65 | } 66 | else 67 | { 68 | if ((string.Compare(reader.Name, Name) != 0) 69 | || (reader.NodeType != XmlNodeType.EndElement) 70 | || reader.IsEmptyElement) 71 | return 2; 72 | 73 | return 0; 74 | } 75 | } 76 | 77 | return -1; 78 | } 79 | 80 | public override int Write(XmlWriter writer) 81 | { 82 | if (!Works()) 83 | return 0; 84 | 85 | writer.WriteStartElement(Name); 86 | writer.WriteStartElement(_InnerName); 87 | 88 | aECGElement.WriteAll(this, writer); 89 | 90 | writer.WriteEndElement(); 91 | writer.WriteEndElement(); 92 | 93 | return 0; 94 | } 95 | 96 | public override bool Works() 97 | { 98 | int i=0; 99 | for (;i < Boundary.Length;i++) 100 | { 101 | if (Boundary[i] == null) 102 | break; 103 | 104 | if (!Boundary[i].Works()) 105 | return false; 106 | } 107 | 108 | return Code.Works() 109 | && (i > 0); 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGTimepointEvent.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGTimepointEvent : aECGElement 26 | { 27 | private string _InnerName = null; 28 | 29 | public aECGCode Code = new aECGCode(); 30 | public aECGTime EffectiveTime = new aECGTime(); 31 | public aECGCode ReasonCode = new aECGCode("reasonCode"); 32 | public aECGPerformer Performer = new aECGPerformer(); 33 | public aECGSubjectAssignment SubjectAssignment = new aECGSubjectAssignment(); 34 | 35 | public aECGTimepointEvent() : base("componentOf") 36 | { 37 | _InnerName = "timepointEvent"; 38 | } 39 | 40 | public override int Read(System.Xml.XmlReader reader) 41 | { 42 | int sequence = 0; 43 | 44 | while (reader.Read()) 45 | { 46 | if ((reader.NodeType == XmlNodeType.Comment) 47 | || (reader.NodeType == XmlNodeType.Whitespace)) 48 | continue; 49 | 50 | if (sequence == 0) 51 | { 52 | if ((string.Compare(reader.Name, _InnerName) != 0) 53 | || (reader.NodeType != XmlNodeType.Element)) 54 | return 1; 55 | 56 | sequence += reader.IsEmptyElement ? 2 : 1; 57 | } 58 | else if (sequence == 1) 59 | { 60 | int ret = aECGElement.ReadOne(this, reader); 61 | 62 | if (ret != 0) 63 | return (ret > 0) ? 2 + ret : ret; 64 | 65 | if ((string.Compare(reader.Name, _InnerName) == 0) 66 | && (reader.NodeType == XmlNodeType.EndElement)) 67 | sequence++; 68 | } 69 | else 70 | { 71 | if ((string.Compare(reader.Name, Name) != 0) 72 | || (reader.NodeType != XmlNodeType.EndElement) 73 | || reader.IsEmptyElement) 74 | return 2; 75 | 76 | return 0; 77 | } 78 | } 79 | 80 | return -1; 81 | } 82 | 83 | public override int Write(XmlWriter writer) 84 | { 85 | if (!Works()) 86 | return 0; 87 | 88 | writer.WriteStartElement(Name); 89 | writer.WriteStartElement(_InnerName); 90 | 91 | aECGElement.WriteAll(this, writer); 92 | 93 | writer.WriteEndElement(); 94 | writer.WriteEndElement(); 95 | 96 | return 0; 97 | } 98 | 99 | public override bool Works() 100 | { 101 | return Code.Works() 102 | || EffectiveTime.Works() 103 | || ReasonCode.Works() 104 | || Performer.Works() 105 | || SubjectAssignment.Works(); 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGTransactionType.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGTransactionType : aECGElement 26 | { 27 | public const string TransactionTypeName = "transactionType"; 28 | 29 | public aECGCode Code = new aECGCode(); 30 | public aECGValuePair Value = new aECGValuePair("value"); 31 | 32 | public aECGTransactionType() : base(TransactionTypeName) 33 | { 34 | } 35 | 36 | public override int Read(System.Xml.XmlReader reader) 37 | { 38 | while (reader.Read()) 39 | { 40 | if ((reader.NodeType == XmlNodeType.Comment) 41 | || (reader.NodeType == XmlNodeType.Whitespace)) 42 | continue; 43 | 44 | if ((string.Compare(reader.Name, Name) == 0) 45 | && (reader.NodeType == XmlNodeType.EndElement)) 46 | return 0; 47 | 48 | int ret = aECGElement.ReadOne(this, reader); 49 | 50 | if (ret != 0) 51 | return ret; 52 | } 53 | 54 | return -1; 55 | } 56 | 57 | public override int Write(XmlWriter writer) 58 | { 59 | if (!Works()) 60 | return 0; 61 | 62 | writer.WriteStartElement(Name); 63 | 64 | aECGElement.WriteAll(this, writer); 65 | 66 | writer.WriteEndElement(); 67 | 68 | return 0; 69 | } 70 | 71 | public override bool Works() 72 | { 73 | return Code.Works() 74 | && Value.Works(); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGTrialSubject.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | Modified CH09 19 | 20 | ****************************************************************************/ 21 | using System; 22 | using System.Collections; 23 | using System.Xml; 24 | 25 | namespace ECGConversion.aECG 26 | { 27 | public sealed class aECGTrialSubject : aECGElement 28 | { 29 | private string _InnerName = null; 30 | 31 | public aECGId Id = new aECGId(true); 32 | public aECGCode Code = new aECGCode(); 33 | public aECGDemographicPerson Demographic = new aECGDemographicPerson("subjectDemographicPerson"); 34 | 35 | public aECGTrialSubject() : base("subject") 36 | { 37 | _InnerName = "trialSubject"; 38 | } 39 | 40 | public override int Read(System.Xml.XmlReader reader) 41 | { 42 | int sequence = 0; 43 | 44 | while (reader.Read()) 45 | { 46 | if ((reader.NodeType == XmlNodeType.Comment) 47 | || (reader.NodeType == XmlNodeType.Whitespace)) 48 | continue; 49 | 50 | if (sequence == 0) 51 | { 52 | if ((string.Compare(reader.Name, _InnerName) != 0) 53 | || (reader.NodeType != XmlNodeType.Element)) 54 | return 1; 55 | 56 | sequence += reader.IsEmptyElement ? 2 : 1; 57 | } 58 | else if (sequence == 1) 59 | { 60 | int ret = aECGElement.ReadOne(this, reader); 61 | 62 | if (ret != 0) 63 | return (ret > 0) ? 2 + ret : ret; 64 | 65 | if ((string.Compare(reader.Name, _InnerName) == 0) 66 | && (reader.NodeType == XmlNodeType.EndElement)) 67 | sequence++; 68 | } 69 | else 70 | { 71 | if ((string.Compare(reader.Name, Name) != 0) 72 | || (reader.NodeType != XmlNodeType.EndElement) 73 | || reader.IsEmptyElement) 74 | return 2; 75 | 76 | return 0; 77 | } 78 | } 79 | 80 | return -1; 81 | } 82 | 83 | public override int Write(XmlWriter writer) 84 | { 85 | if (!Works()) 86 | return 0; 87 | 88 | writer.WriteStartElement(Name); 89 | writer.WriteStartElement(_InnerName); 90 | 91 | aECGElement.WriteAll(this, writer); 92 | 93 | writer.WriteEndElement(); 94 | writer.WriteEndElement(); 95 | 96 | return 0; 97 | } 98 | 99 | public override bool Works() 100 | { 101 | return Id.Works() 102 | || Code.Works() 103 | || Demographic.Works(); 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/aECG/aECGUnknownElement.cs: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | Copyright 2008, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | Written by Maarten JB van Ettinger. 17 | 18 | ****************************************************************************/ 19 | using System; 20 | using System.Collections; 21 | using System.Xml; 22 | 23 | namespace ECGConversion.aECG 24 | { 25 | public sealed class aECGUnknownElement : aECGElement 26 | { 27 | public SortedList Attributes = new SortedList(); 28 | public string Value = null; 29 | 30 | public aECGUnknownElement(string name) : base(name) 31 | { 32 | Empty(); 33 | } 34 | 35 | public override int Read(XmlReader reader) 36 | { 37 | int depth = reader.Depth; 38 | 39 | bool isEmpty = reader.IsEmptyElement; 40 | 41 | if (reader.HasAttributes) 42 | { 43 | try 44 | { 45 | for (int i=0;i < reader.AttributeCount;i++) 46 | { 47 | reader.MoveToAttribute(i); 48 | 49 | Attributes.Add(reader.Name, reader.Value); 50 | } 51 | } 52 | catch 53 | { 54 | return -2; 55 | } 56 | } 57 | 58 | if (isEmpty) 59 | return 0; 60 | 61 | while (reader.Read()) 62 | { 63 | if ((reader.NodeType == XmlNodeType.Comment) 64 | || (reader.NodeType == XmlNodeType.Whitespace)) 65 | continue; 66 | 67 | if (reader.NodeType == XmlNodeType.Text) 68 | { 69 | Value = reader.Value; 70 | 71 | continue; 72 | } 73 | 74 | if ((reader.Depth == depth) 75 | && (String.Compare(reader.Name, Name) == 0)) 76 | { 77 | if (reader.NodeType == XmlNodeType.EndElement) 78 | return 0; 79 | else 80 | return 3; 81 | } 82 | 83 | if (Value != null) 84 | return 4; 85 | 86 | int ret = aECGElement.ReadOne(this, reader); 87 | 88 | if (ret != 0) 89 | return (ret > 0 ? 4 + ret : ret); 90 | } 91 | 92 | return -1; 93 | } 94 | 95 | public override int Write(XmlWriter writer) 96 | { 97 | if (!Works()) 98 | return 0; 99 | 100 | writer.WriteStartElement(Name); 101 | 102 | for (int i=0;i < Attributes.Count;i++) 103 | writer.WriteAttributeString((string) Attributes.GetKey(i), (string) Attributes.GetByIndex(i)); 104 | 105 | if (Value != null) 106 | writer.WriteString(Value); 107 | else 108 | aECGElement.WriteAll(this, writer); 109 | 110 | writer.WriteEndElement(); 111 | 112 | return 0; 113 | } 114 | 115 | public override bool Works() 116 | { 117 | return true; 118 | } 119 | 120 | public override void Empty() 121 | { 122 | Attributes.Clear(); 123 | Value = null; 124 | 125 | base.Empty(); 126 | } 127 | } 128 | } -------------------------------------------------------------------------------- /libs/ECGConversion/aECG/ecgtoolkit-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Refactoring/ECGToolkit/78970784934e92e54f6ed4e0c29063b13a46eddc/libs/ECGConversion/aECG/ecgtoolkit-icon.png -------------------------------------------------------------------------------- /package/ECGConversionToolkit/ECGToolkit.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Copyright 2004,2008,2019, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 3 | REM 4 | REM Licensed under the Apache License, Version 2.0 (the "License"); 5 | REM you may not use this file except in compliance with the License. 6 | REM You may obtain a copy of the License at 7 | REM 8 | REM http://www.apache.org/licenses/LICENSE-2.0 9 | REM 10 | REM Unless required by applicable law or agreed to in writing, software 11 | REM distributed under the License is distributed on an "AS IS" BASIS, 12 | REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | REM See the License for the specific language governing permissions and 14 | REM limitations under the License. 15 | REM 16 | REM Written by Maarten JB van Ettinger. 17 | REM 18 | 19 | set path=%PATH%%CD%; 20 | 21 | echo Can now use ECGToolkit from commandline! 22 | 23 | echo Available applications: 24 | cmd /K dir /B *.exe -------------------------------------------------------------------------------- /package/ECGConversionToolkit/NOTICE.txt: -------------------------------------------------------------------------------- 1 | ========================================================================= 2 | == Example NOTICE file for use with the Apache License, Version 2.0, == 3 | == in this case for the ECG Conversion Toolkit distribution. == 4 | ========================================================================= 5 | 6 | ECG Conversion Toolkit 7 | Copyright 2019-2022, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 8 | Copyright 2012-2014, van Ettinger Information Technology, Lopik, The Netherlands 9 | Copyright 2004-2010, Thoraxcentrum, Erasmus MC, Rotterdam, The Netherlands 10 | 11 | This product includes software developed at 12 | Thoraxcentrum, Erasmus MC (http://www.erasmusmc.nl/thoraxcentrum/). 13 | 14 | DICOM support is based on the DICOM# library which is open source 15 | software, available under the GNU Library or Lesser General Public 16 | License (LGPL). Written by Fang Yang. The library is available from: 17 | http://sourceforge.net/projects/dicom-cs/ 18 | 19 | PDF support is based on the iTextSharp library which is open source 20 | software, available under the GNU Library or Lesser General Public 21 | License (LGPL). Written by Bruno Lowagie and Paulo Soares. The library 22 | is available from: 23 | http://sourceforge.net/projects/itextsharp/ 24 | 25 | -------------------------------------------------------------------------------- /package/ECGToolkit/ECGToolkit.mdproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PackagingProject 5 | 10.0.0 6 | 2.0 7 | {C61C0E4F-D5C3-445A-B87A-4C5AC78F0EFA} 8 | 2.2 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /release.bat: -------------------------------------------------------------------------------- 1 | rmdir /Q /S ..\Release 2 | mkdir ..\Release 3 | mkdir ..\Release\ECGToolkit 4 | 5 | xcopy /E /EXCLUDE:exclude.txt . ..\Release\ECGToolkit --------------------------------------------------------------------------------