Building a DICOM Library in C - PowerPoint PPT Presentation

About This Presentation
Title:

Building a DICOM Library in C

Description:

Building a DICOM Library in C# Victor Derks GE Healthcare The second design challenge, I like to present is about doing C-STORE on a Wide Area Network * * Most DICOM ... – PowerPoint PPT presentation

Number of Views:122
Avg rating:3.0/5.0
Slides: 22
Provided by: medicalNe
Learn more at: https://dicom.nema.org
Category:

less

Transcript and Presenter's Notes

Title: Building a DICOM Library in C


1
Building a DICOM Library in C
  • Victor Derks
  • GE Healthcare

2
Contents
  • Introduction
  • Design Goals
  • Inception
  • Approach and Effort
  • Design Challenges
  • Character Encoding
  • DICOM C-STORE on a Wide Area Network (WAN)
  • DICOM Operations on a Wide Area Network
  • Conclusions
  • Recommendations

3
Introduction
  • Microsoft .NET Platform Group within GE
    Healthcare
  • Provide Microsoft .NET components to applications
    teams
  • Internal DICOM library is a one of these
    components
  • The preferred programming language of our group
    is C

4
Design Goals
  • Requirements
  • DICOM File I/O
  • DICOM Communication
  • Focus Areas
  • Internationalization
  • Service Oriented Architecture
  • Easy to use for C programmers

5
Inception
  • Started in 2007 building prototypes
  • Wrap existing C internal implementation in .NET
    layer?
  • Create new C implementation?
  • Findings
  • .NET \ C Memory Management Models are
    conflicting
  • Mixed solution doesnt work well due to high
    interaction between the layers
  • No option to leverage new .NET patterns
  • Asynchronous Programming Model
  • Thread pool

6
Approach and Effort
  • Test Driven Development (TDD)
  • DICOM Standard defines expected behavior
  • 50 of these unit tests check for bad cases
  • About 2000 unit tests
  • Note Lines Of Code counted with CLOC 1.52.
    Average is 60 K Lines.

7
  • Design Challenge 1
  • Character Encoding

8
DICOM Character Sets
  • Originally only support for ASCII (IR-6)
  • 1993 Latin 1\2\3\4\5, Arabic, Hebrew, Cyrillic,
    Greek, Japanese,..
  • 1999 \ 2000 Thai, Korean
  • 2003 UTF8 (ISO_IR 192), but this is an option
  • Most modern applications use internally UTF16
    Unicode strings (C \ .NET \ Java)
  • .NET provides standard text encoders
  • UTF8
  • Many code page based encoders

9
Text Conversions
  • Input (decoding)
  • Read and convert DICOM text values to .NET
    strings.
  • Output (encode)
  • Many use cases require text updates to the DICOM
    data. For example Patient Information
    Reconciliation.
  • Output would be easy if all DICOM systems would
    support UTF8

.NET Strings
encode
DICOM values
DICOM values
decode
10
LegacyCharacter Set Encoding
  • Steps needed to serialize DICOM text data to an
    output device that doesnt support UTF8
  • Application needs to define encoding method
  • Application needs to define allowed character
    sets and preferred order
  • Library needs to scan all characters
  • Library computes required character sets and
    serialize data
  • Recommendation design / use systems that support
    UTF8

11
  • Design Challenge 2
  • DICOM C-STORE on a Wide Area Network

12
C-STORE on a WAN Intro
  • Historically most DICOM communicationis on a
    local network
  • Trend is to store images in regional and national
    DICOM data centers
  • Wide Area Network (WAN)
  • Bandwidth 1 Mbit/s up to 1 Gbit/s
  • Round Trip Time (RTT) 10 ms up to 1 s for
    satellite connections

13
C-STORE Example
  • Example
  • Sending a study of 2000 compressed instances of
    125 Kbyte on a local network
  • Bandwidth 100 Mbit/s, Round Trip Time 1 ms,
  • N (Tx Trtt) 27 seconds
  • Sending same study on a Wide Area Network
  • Bandwidth 100 Mbit/s, Round Trip Time 200 ms,
  • N (Tx Trtt) 425 seconds
  • 425 seconds vs 27 seconds 15 times slower!

14
C-STORE on a WANRoot Cause
  • Local
    92
  • WAN
    6
  • Solutions (within the Standard)
  • Open more connections
  • Supports DICOM Asynchronous Operations (PS 3.7
    Annex D.3.3.3)

1
1
15
C-STORE on a WAN Solution

  • 99
  • Transmission time (N Tx) Trtt 25 seconds
  • Both DICOM systems need to support asynchronous
    operations
  • Maximum number of pending requests is 65536
  • Responses can arrive out of order

3
6
5
4
8
7
9
1
2
16
  • Design Challenge 3
  • DICOM Operations on aWide Area Network

17
DICOM Operationson a WAN
  • Same WAN sample configuration
  • Round Trip Time 200 ms
  • Secure DICOM (TLS)
  • Connection Establishment is slow
  • TCP / IP Protocol slow start algorithm

18
DICOM Association pool
  • Pooling is automatic
  • Pool will reuse a suitable open association
  • If no association available, pool will open a new
    association
  • Auto learning which presentation contexts are
    required
  • Number of open associations is managed
  • Associations are closed after idle timeout
  • Compatible with Asynchronous Operations
  • CP-948 C-STORE sub operations (Std 2008)

19
Conclusions
  • Conclusions
  • Having a GE DICOM library in .NET allows us to
    quickly adapt to changes in the Standard.
  • We have seen good performance
  • .NET provides a rich set of libraries which makes
    it relatively easy to develop DICOM applications

20
Recommendations
  • Recommendations
  • Use the Microsoft .NET Guidelines to ensure a
    library is consistent with .NET (FxCop)
  • Use UTF8 as the default character encoding
  • Great if DICOM Standard would make this required
    in the future (roadmap)
  • To be Internet / Wide Area Network ready
  • Support Asynchronous Operations
  • Support re-use of open DICOM associations

21
Questions \ Perguntas
  • Questions ?
  • Contact
  • victor.derks_at_ge.com
  • http//groups.google.com/group/comp.protocols.dico
    m
Write a Comment
User Comments (0)
About PowerShow.com