Presentation is loading. Please wait.

Presentation is loading. Please wait.

DICOM INTERNATIONAL CONFERENCE & SEMINAR Oct 9-11, 2010 Rio de Janeiro, Brazil Building a DICOM Library in C# Victor Derks GE Healthcare.

Similar presentations


Presentation on theme: "DICOM INTERNATIONAL CONFERENCE & SEMINAR Oct 9-11, 2010 Rio de Janeiro, Brazil Building a DICOM Library in C# Victor Derks GE Healthcare."— Presentation transcript:

1 DICOM INTERNATIONAL CONFERENCE & SEMINAR Oct 9-11, 2010 Rio de Janeiro, Brazil 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 doesn’t 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 Average is 60 K Lines. NameLines Of CodeLines Of Test Code GE DICOM Library (C#)34,63733,707 Comparable Open Source: ClearCanvas (C#)87,738 Dcm4che (Java)40,954 PixelMed (Java)86,864

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, \ 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… DICOM values.NET Strings DICOM values decode encode

10 Legacy Character Set Encoding Steps needed to serialize DICOM text data to an output device that doesn’t 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 communication is 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 * (T x + T rtt ) = 27 seconds Sending same study on a Wide Area Network –Bandwidth = 100 Mbit/s, Round Trip Time = 200 ms, –N * (T x + T rtt ) = 425 seconds 425 seconds vs 27 seconds: 15 times slower!

14 C-STORE on a WAN: Root 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 * T x )+ T rtt = 25 seconds Both DICOM systems need to support asynchronous operations Maximum number of pending requests is Responses can arrive out of order

16 Design Challenge 3: DICOM Operations on a Wide Area Network

17 DICOM Operations on a WAN Same WAN sample configuration: –Round Trip Time = 200 ms –Secure DICOM (TLS) Connection Establishment is slow TCP / IP Protocol: slow start algorithm NameTime TCP / IP Handshake200 ms TLS / SSL Handshake400 ms DICOM Handshake200 ms DICOM Request \ Response200 ms

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 –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 –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


Download ppt "DICOM INTERNATIONAL CONFERENCE & SEMINAR Oct 9-11, 2010 Rio de Janeiro, Brazil Building a DICOM Library in C# Victor Derks GE Healthcare."

Similar presentations


Ads by Google