Sie sind auf Seite 1von 597

imebra

0.0.48

Generated by Doxygen 1.5.9

Wed Aug 12 22:31:02 2009


Contents

1 Imebra open source Dicom library 1


1.1 Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 What Imebra does NOT do? . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Where to start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5 Changes log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5.1 Changes since version 0.0.47 . . . . . . . . . . . . . . . . . . 2
1.5.2 Changes since version 0.0.46 . . . . . . . . . . . . . . . . . . 3
1.5.3 Changes since version 0.0.45 . . . . . . . . . . . . . . . . . . 3
1.5.4 Changes since version 0.0.44 (Beta) . . . . . . . . . . . . . . 4
1.5.5 Changes since version 0.0.41 (Alpha) . . . . . . . . . . . . . 4
1.5.6 Changes since version 0.0.40 (Alpha) . . . . . . . . . . . . . 5
1.5.7 Changes since version 0.0.38 (Alpha) . . . . . . . . . . . . . 5
1.5.8 Changes since version 0.0.36 (Alpha) . . . . . . . . . . . . . 5
1.5.9 Changes since version 0.0.35 (Alpha) . . . . . . . . . . . . . 5
1.5.10 Changes since version 0.0.34 (Alpha) . . . . . . . . . . . . . 6
1.5.11 Changes since version 0.0.33 (Alpha) . . . . . . . . . . . . . 6
1.5.12 Changes since version 0.0.32 (Alpha) . . . . . . . . . . . . . 6
1.5.13 Changes since version 0.0.31 (Alpha) . . . . . . . . . . . . . 6
1.5.14 Changes since version 0.0.30 (Alpha) . . . . . . . . . . . . . 6
1.5.15 Changes since version 0.0.29 (Alpha) . . . . . . . . . . . . . 7
1.5.16 Changes since version 0.0.28 (Alpha) . . . . . . . . . . . . . 7
1.5.17 Changes since version 0.0.27 (Alpha) . . . . . . . . . . . . . 7
1.5.18 Changes since version 0.0.26 (Alpha) . . . . . . . . . . . . . 8
1.5.19 Changes since version 0.0.25 (Alpha) . . . . . . . . . . . . . 8
ii CONTENTS

1.5.20 Changes since version 0.0.24 (Alpha) . . . . . . . . . . . . . 8


1.5.21 Changes since version 0.0.22 (Alpha) . . . . . . . . . . . . . 8
1.5.22 Changes since version 0.0.21 (Alpha) . . . . . . . . . . . . . 9
1.6 New smart pointer’s behaviour . . . . . . . . . . . . . . . . . . . . . 9

2 License agreement 11
2.1 GNU AFFERO GENERAL PUBLIC LICENSE (Version 3, 19
November 2007) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1.2 TERMS AND CONDITIONS . . . . . . . . . . . . . . . . . 13
2.1.2.1 0. Definitions. . . . . . . . . . . . . . . . . . . . . 13
2.1.2.2 1. Source Code. . . . . . . . . . . . . . . . . . . . 14
2.1.2.3 2. Basic Permissions. . . . . . . . . . . . . . . . . 14
2.1.2.4 3. Protecting Users’ Legal Rights From Anti-
Circumvention Law. . . . . . . . . . . . . . . . . . 15
2.1.2.5 4. Conveying Verbatim Copies. . . . . . . . . . . . 15
2.1.2.6 5. Conveying Modified Source Versions. . . . . . . 15
2.1.2.7 6. Conveying Non-Source Forms. . . . . . . . . . . 16
2.1.2.8 7. Additional Terms. . . . . . . . . . . . . . . . . . 17
2.1.2.9 8. Termination. . . . . . . . . . . . . . . . . . . . 18
2.1.2.10 9. Acceptance Not Required for Having Copies. . . 19
2.1.2.11 10. Automatic Licensing of Downstream Recipients. 19
2.1.2.12 11. Patents. . . . . . . . . . . . . . . . . . . . . . 20
2.1.2.13 12. No Surrender of Others’ Freedom. . . . . . . . 21
2.1.2.14 13. Remote Network Interaction; Use with the GNU
General Public License. . . . . . . . . . . . . . . . 21
2.1.2.15 14. Revised Versions of this License. . . . . . . . . 21
2.1.2.16 15. Disclaimer of Warranty. . . . . . . . . . . . . . 22
2.1.2.17 16. Limitation of Liability. . . . . . . . . . . . . . 22
2.1.2.18 17. Interpretation of Sections 15 and 16. . . . . . . 22
2.2 Imebra Commercial License Version 1 . . . . . . . . . . . . . . . . . 23

3 The imebra’s structure 25


3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.2 The dataSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3 The groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS iii

3.4 The tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27


3.5 The buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.6 The data handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

4 Quick tour 29
4.1 Adding the Imebra library to your project . . . . . . . . . . . . . . . 30
4.2 Let’s read a dataSet . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3 Let’s read or set a tag in the dataSet . . . . . . . . . . . . . . . . . . 31
4.4 Let’s read an image . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.5 How to access the image’s pixels . . . . . . . . . . . . . . . . . . . . 32

5 Adding Imebra to your project 35


5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.2 Prerequisites (common to all the platorms) . . . . . . . . . . . . . . . 36
5.3 Prerequisites for Windows (desktop version) . . . . . . . . . . . . . . 36
5.4 Prerequisites for Embedded Visual C++ 4 (EVC4) . . . . . . . . . . . 36
5.5 Prerequisites for the Posix systems . . . . . . . . . . . . . . . . . . . 36
5.6 Adding the source files to your project . . . . . . . . . . . . . . . . . 37
5.7 Adding Imebra to your project: Checklist . . . . . . . . . . . . . . . 37
5.8 Calling an imebra function from your application . . . . . . . . . . . 38
5.9 The Imebra objects reference counter . . . . . . . . . . . . . . . . . . 38
5.10 The Imebra smart pointer . . . . . . . . . . . . . . . . . . . . . . . . 38
5.11 The namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.12 Managing the Imebra exceptions . . . . . . . . . . . . . . . . . . . . 39

6 Imebra & Unicode 41


6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
6.2 How to initalize the dataSet . . . . . . . . . . . . . . . . . . . . . . . 42

7 Transactions and common locks 43


7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.2 The common locks . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.3 The transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

8 Namespace Index 47
8.1 Namespace List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


iv CONTENTS

9 Class Index 49
9.1 Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

10 Class Index 53
10.1 Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

11 File Index 61
11.1 File List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

12 Namespace Documentation 67
12.1 puntoexe Namespace Reference . . . . . . . . . . . . . . . . . . . . 67
12.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 70
12.2 puntoexe::imebra Namespace Reference . . . . . . . . . . . . . . . . 71
12.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 74
12.3 puntoexe::imebra::codecs Namespace Reference . . . . . . . . . . . . 75
12.3.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 76
12.4 puntoexe::imebra::handlers Namespace Reference . . . . . . . . . . . 77
12.4.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 78
12.4.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . 78
12.4.2.1 imageHandler . . . . . . . . . . . . . . . . . . . . 78
12.5 puntoexe::imebra::transforms Namespace Reference . . . . . . . . . 79
12.5.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 81
12.6 puntoexe::imebra::transforms::colorTransforms Namespace Reference 82
12.6.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 83

13 Class Documentation 85
13.1 puntoexe::baseObject Class Reference . . . . . . . . . . . . . . . . . 85
13.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 86
13.1.2 Constructor & Destructor Documentation . . . . . . . . . . . 87
13.1.2.1 baseObject . . . . . . . . . . . . . . . . . . . . . . 87
13.1.2.2 baseObject . . . . . . . . . . . . . . . . . . . . . . 87
13.1.3 Member Function Documentation . . . . . . . . . . . . . . . 87
13.1.3.1 isReferencedOnce . . . . . . . . . . . . . . . . . . 87
13.2 puntoexe::baseStream Class Reference . . . . . . . . . . . . . . . . . 89
13.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 89

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS v

13.2.2 Member Function Documentation . . . . . . . . . . . . . . . 90


13.2.2.1 read . . . . . . . . . . . . . . . . . . . . . . . . . 90
13.2.2.2 write . . . . . . . . . . . . . . . . . . . . . . . . . 90
13.3 puntoexe::charsetConversionException Class Reference . . . . . . . . 91
13.3.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 91
13.4 puntoexe::charsetConversionExceptionNoSupportedTable Class Ref-
erence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
13.4.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 92
13.5 puntoexe::charsetConversionExceptionNoTable Class Reference . . . 93
13.5.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 93
13.6 puntoexe::charsetConversionExceptionUtfSizeNotSupported Class
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
13.6.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 94
13.7 puntoexe::criticalSection Class Reference . . . . . . . . . . . . . . . 95
13.7.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 95
13.7.2 Constructor & Destructor Documentation . . . . . . . . . . . 95
13.7.2.1 criticalSection . . . . . . . . . . . . . . . . . . . . 95
13.7.2.2 ∼criticalSection . . . . . . . . . . . . . . . . . . . 95
13.7.3 Member Function Documentation . . . . . . . . . . . . . . . 96
13.7.3.1 lock . . . . . . . . . . . . . . . . . . . . . . . . . 96
13.7.3.2 tryLock . . . . . . . . . . . . . . . . . . . . . . . 96
13.7.3.3 unlock . . . . . . . . . . . . . . . . . . . . . . . . 96
13.8 puntoexe::exceptionInfo Class Reference . . . . . . . . . . . . . . . 97
13.8.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 97
13.8.2 Constructor & Destructor Documentation . . . . . . . . . . . 98
13.8.2.1 exceptionInfo . . . . . . . . . . . . . . . . . . . . 98
13.8.3 Member Function Documentation . . . . . . . . . . . . . . . 98
13.8.3.1 getMessage . . . . . . . . . . . . . . . . . . . . . 98
13.8.4 Member Data Documentation . . . . . . . . . . . . . . . . . 98
13.8.4.1 m_exceptionMessage . . . . . . . . . . . . . . . . 98
13.8.4.2 m_exceptionType . . . . . . . . . . . . . . . . . . 98
13.8.4.3 m_fileName . . . . . . . . . . . . . . . . . . . . . 98
13.8.4.4 m_functionName . . . . . . . . . . . . . . . . . . 98
13.8.4.5 m_lineNumber . . . . . . . . . . . . . . . . . . . . 99

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


vi CONTENTS

13.9 puntoexe::exceptionsManager Class Reference . . . . . . . . . . . . 100


13.9.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 100
13.9.2 Member Typedef Documentation . . . . . . . . . . . . . . . 101
13.9.2.1 tExceptionInfoList . . . . . . . . . . . . . . . . . . 101
13.9.3 Member Function Documentation . . . . . . . . . . . . . . . 101
13.9.3.1 addExceptionInfo . . . . . . . . . . . . . . . . . . 101
13.9.3.2 clearExceptionInfo . . . . . . . . . . . . . . . . . 101
13.9.3.3 getExceptionInfo . . . . . . . . . . . . . . . . . . 101
13.9.3.4 getMessage . . . . . . . . . . . . . . . . . . . . . 102
13.10puntoexe::huffmanTable Class Reference . . . . . . . . . . . . . . . 103
13.10.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 104
13.10.2 Constructor & Destructor Documentation . . . . . . . . . . . 104
13.10.2.1 huffmanTable . . . . . . . . . . . . . . . . . . . . 104
13.10.3 Member Function Documentation . . . . . . . . . . . . . . . 104
13.10.3.1 calcHuffmanCodesLength . . . . . . . . . . . . . . 104
13.10.3.2 calcHuffmanTables . . . . . . . . . . . . . . . . . 104
13.10.3.3 incValueFreq . . . . . . . . . . . . . . . . . . . . . 105
13.10.3.4 readHuffmanCode . . . . . . . . . . . . . . . . . . 105
13.10.3.5 removeLastCode . . . . . . . . . . . . . . . . . . . 105
13.10.3.6 reset . . . . . . . . . . . . . . . . . . . . . . . . . 105
13.10.3.7 writeHuffmanCode . . . . . . . . . . . . . . . . . 106
13.11puntoexe::imebra::buffer Class Reference . . . . . . . . . . . . . . . 107
13.11.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 108
13.11.2 Constructor & Destructor Documentation . . . . . . . . . . . 108
13.11.2.1 buffer . . . . . . . . . . . . . . . . . . . . . . . . . 108
13.11.2.2 buffer . . . . . . . . . . . . . . . . . . . . . . . . . 109
13.11.3 Member Function Documentation . . . . . . . . . . . . . . . 109
13.11.3.1 getBufferSizeBytes . . . . . . . . . . . . . . . . . 109
13.11.3.2 getCharsetsList . . . . . . . . . . . . . . . . . . . 109
13.11.3.3 getDataHandler . . . . . . . . . . . . . . . . . . . 110
13.11.3.4 getDataHandlerRaw . . . . . . . . . . . . . . . . . 110
13.11.3.5 getDataType . . . . . . . . . . . . . . . . . . . . . 111
13.11.3.6 getStreamReader . . . . . . . . . . . . . . . . . . . 111
13.11.3.7 getStreamWriter . . . . . . . . . . . . . . . . . . . 111

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS vii

13.11.3.8 setCharsetsList . . . . . . . . . . . . . . . . . . . . 111


13.12puntoexe::imebra::bufferException Class Reference . . . . . . . . . . 113
13.12.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 113
13.12.2 Constructor & Destructor Documentation . . . . . . . . . . . 113
13.12.2.1 bufferException . . . . . . . . . . . . . . . . . . . 113
13.13puntoexe::imebra::bufferExceptionUnknownType Class Reference . . 114
13.13.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 114
13.13.2 Constructor & Destructor Documentation . . . . . . . . . . . 114
13.13.2.1 bufferExceptionUnknownType . . . . . . . . . . . 114
13.14puntoexe::imebra::charsetsList::charsetListExceptionDiffDefault
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
13.14.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 115
13.15puntoexe::imebra::charsetsList::charsetsListException Class Reference 116
13.15.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 116
13.16puntoexe::imebra::codecs::codec Class Reference . . . . . . . . . . . 117
13.16.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 118
13.16.2 Member Enumeration Documentation . . . . . . . . . . . . . 119
13.16.2.1 quality . . . . . . . . . . . . . . . . . . . . . . . . 119
13.16.3 Member Function Documentation . . . . . . . . . . . . . . . 119
13.16.3.1 canHandleTransferSyntax . . . . . . . . . . . . . . 119
13.16.3.2 createCodec . . . . . . . . . . . . . . . . . . . . . 120
13.16.3.3 encapsulated . . . . . . . . . . . . . . . . . . . . . 120
13.16.3.4 getImage . . . . . . . . . . . . . . . . . . . . . . . 120
13.16.3.5 getMaxHighBit . . . . . . . . . . . . . . . . . . . 121
13.16.3.6 read . . . . . . . . . . . . . . . . . . . . . . . . . 121
13.16.3.7 setImage . . . . . . . . . . . . . . . . . . . . . . . 122
13.16.3.8 suggestAllocatedBits . . . . . . . . . . . . . . . . 123
13.16.3.9 write . . . . . . . . . . . . . . . . . . . . . . . . . 123
13.17puntoexe::imebra::codecs::codecException Class Reference . . . . . . 124
13.17.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 124
13.17.2 Constructor & Destructor Documentation . . . . . . . . . . . 124
13.17.2.1 codecException . . . . . . . . . . . . . . . . . . . 124
13.18puntoexe::imebra::codecs::codecExceptionCorruptedFile Class Refer-
ence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


viii CONTENTS

13.18.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 125


13.18.2 Constructor & Destructor Documentation . . . . . . . . . . . 125
13.18.2.1 codecExceptionCorruptedFile . . . . . . . . . . . . 125
13.19puntoexe::imebra::codecs::codecExceptionWrongFormat Class Refer-
ence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
13.19.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 126
13.19.2 Constructor & Destructor Documentation . . . . . . . . . . . 126
13.19.2.1 codecExceptionWrongFormat . . . . . . . . . . . . 126
13.20puntoexe::imebra::codecs::codecExceptionWrongTransferSyntax
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
13.20.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 127
13.20.2 Constructor & Destructor Documentation . . . . . . . . . . . 127
13.20.2.1 codecExceptionWrongTransferSyntax . . . . . . . 127
13.21puntoexe::imebra::codecs::codecFactory Class Reference . . . . . . . 128
13.21.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 128
13.21.2 Member Function Documentation . . . . . . . . . . . . . . . 129
13.21.2.1 getCodec . . . . . . . . . . . . . . . . . . . . . . . 129
13.21.2.2 getCodecFactory . . . . . . . . . . . . . . . . . . . 129
13.21.2.3 load . . . . . . . . . . . . . . . . . . . . . . . . . 129
13.21.2.4 registerCodec . . . . . . . . . . . . . . . . . . . . 130
13.22puntoexe::imebra::codecs::dicomCodec Class Reference . . . . . . . 131
13.22.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 131
13.22.2 Member Function Documentation . . . . . . . . . . . . . . . 131
13.22.2.1 buildStream . . . . . . . . . . . . . . . . . . . . . 131
13.22.2.2 parseStream . . . . . . . . . . . . . . . . . . . . . 132
13.23puntoexe::imebra::codecs::dicomCodecException Class Reference . . 134
13.23.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 134
13.23.2 Constructor & Destructor Documentation . . . . . . . . . . . 134
13.23.2.1 dicomCodecException . . . . . . . . . . . . . . . . 134
13.24puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
13.24.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 135
13.24.2 Constructor & Destructor Documentation . . . . . . . . . . . 135
13.24.2.1 dicomCodecExceptionDepthLimitReached . . . . . 135
13.25puntoexe::imebra::codecs::jpegCodec Class Reference . . . . . . . . 136

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS ix

13.25.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 136


13.26puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax Class Ref-
erence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
13.26.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 137
13.26.2 Constructor & Destructor Documentation . . . . . . . . . . . 137
13.26.2.1 jpegCodecCannotHandleSyntax . . . . . . . . . . . 137
13.27puntoexe::imebra::codecs::jpegCodecException Class Reference . . . 138
13.27.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 138
13.28puntoexe::imebra::data Class Reference . . . . . . . . . . . . . . . . 139
13.28.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 140
13.28.2 Member Function Documentation . . . . . . . . . . . . . . . 140
13.28.2.1 appendDataSet . . . . . . . . . . . . . . . . . . . . 140
13.28.2.2 bufferExists . . . . . . . . . . . . . . . . . . . . . 141
13.28.2.3 deleteBuffer . . . . . . . . . . . . . . . . . . . . . 141
13.28.2.4 getBufferSize . . . . . . . . . . . . . . . . . . . . 141
13.28.2.5 getDataHandler . . . . . . . . . . . . . . . . . . . 141
13.28.2.6 getDataHandlerRaw . . . . . . . . . . . . . . . . . 142
13.28.2.7 getDataSet . . . . . . . . . . . . . . . . . . . . . . 143
13.28.2.8 getDataType . . . . . . . . . . . . . . . . . . . . . 143
13.28.2.9 getStreamReader . . . . . . . . . . . . . . . . . . . 143
13.28.2.10getStreamWriter . . . . . . . . . . . . . . . . . . . 144
13.28.2.11setDataSet . . . . . . . . . . . . . . . . . . . . . . 144
13.29puntoexe::imebra::dataCollection< collectionType > Class Template
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
13.29.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 145
13.29.2 Member Function Documentation . . . . . . . . . . . . . . . 145
13.29.2.1 getDataIterator . . . . . . . . . . . . . . . . . . . . 145
13.30puntoexe::imebra::dataCollectionIterator< collectionType > Class
Template Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
13.30.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 147
13.30.2 Member Function Documentation . . . . . . . . . . . . . . . 148
13.30.2.1 getData . . . . . . . . . . . . . . . . . . . . . . . . 148
13.30.2.2 getId . . . . . . . . . . . . . . . . . . . . . . . . . 148
13.30.2.3 getOrder . . . . . . . . . . . . . . . . . . . . . . . 148
13.30.2.4 incIterator . . . . . . . . . . . . . . . . . . . . . . 149

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


x CONTENTS

13.30.2.5 isValid . . . . . . . . . . . . . . . . . . . . . . . . 149


13.30.2.6 reset . . . . . . . . . . . . . . . . . . . . . . . . . 149
13.31puntoexe::imebra::dataGroup Class Reference . . . . . . . . . . . . . 150
13.31.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 150
13.31.2 Member Function Documentation . . . . . . . . . . . . . . . 151
13.31.2.1 getDataHandler . . . . . . . . . . . . . . . . . . . 151
13.31.2.2 getDataHandlerRaw . . . . . . . . . . . . . . . . . 151
13.31.2.3 getDataType . . . . . . . . . . . . . . . . . . . . . 152
13.31.2.4 getStreamReader . . . . . . . . . . . . . . . . . . . 152
13.31.2.5 getStreamWriter . . . . . . . . . . . . . . . . . . . 153
13.31.2.6 getTag . . . . . . . . . . . . . . . . . . . . . . . . 153
13.32puntoexe::imebra::dataSet Class Reference . . . . . . . . . . . . . . . 155
13.32.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 158
13.32.2 Member Function Documentation . . . . . . . . . . . . . . . 158
13.32.2.1 getDataHandler . . . . . . . . . . . . . . . . . . . 158
13.32.2.2 getDataHandlerRaw . . . . . . . . . . . . . . . . . 159
13.32.2.3 getDataType . . . . . . . . . . . . . . . . . . . . . 160
13.32.2.4 getDefaultDataType . . . . . . . . . . . . . . . . . 160
13.32.2.5 getDouble . . . . . . . . . . . . . . . . . . . . . . 160
13.32.2.6 getFirstAvailFrameBufferId . . . . . . . . . . . . . 161
13.32.2.7 getFrameBufferId . . . . . . . . . . . . . . . . . . 161
13.32.2.8 getFrameBufferIds . . . . . . . . . . . . . . . . . . 161
13.32.2.9 getFrameOffset . . . . . . . . . . . . . . . . . . . 162
13.32.2.10getGroup . . . . . . . . . . . . . . . . . . . . . . . 162
13.32.2.11getImage . . . . . . . . . . . . . . . . . . . . . . . 163
13.32.2.12getItemOffset . . . . . . . . . . . . . . . . . . . . 163
13.32.2.13getLut . . . . . . . . . . . . . . . . . . . . . . . . 163
13.32.2.14getSequenceItem . . . . . . . . . . . . . . . . . . . 164
13.32.2.15getSignedLong . . . . . . . . . . . . . . . . . . . . 164
13.32.2.16getStreamReader . . . . . . . . . . . . . . . . . . . 165
13.32.2.17getStreamWriter . . . . . . . . . . . . . . . . . . . 165
13.32.2.18getString . . . . . . . . . . . . . . . . . . . . . . . 166
13.32.2.19getTag . . . . . . . . . . . . . . . . . . . . . . . . 166
13.32.2.20getUnicodeString . . . . . . . . . . . . . . . . . . 167

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xi

13.32.2.21getUnsignedLong . . . . . . . . . . . . . . . . . . 168
13.32.2.22getWaveform . . . . . . . . . . . . . . . . . . . . . 168
13.32.2.23setDouble . . . . . . . . . . . . . . . . . . . . . . 168
13.32.2.24setGroup . . . . . . . . . . . . . . . . . . . . . . . 169
13.32.2.25setImage . . . . . . . . . . . . . . . . . . . . . . . 169
13.32.2.26setItemOffset . . . . . . . . . . . . . . . . . . . . 170
13.32.2.27setSignedLong . . . . . . . . . . . . . . . . . . . . 170
13.32.2.28setString . . . . . . . . . . . . . . . . . . . . . . . 170
13.32.2.29setUnicodeString . . . . . . . . . . . . . . . . . . 171
13.32.2.30setUnsignedLong . . . . . . . . . . . . . . . . . . 172
13.32.2.31updateCharsetTag . . . . . . . . . . . . . . . . . . 172
13.32.2.32updateTagsCharset . . . . . . . . . . . . . . . . . . 172
13.33puntoexe::imebra::dataSetCorruptedOffsetTable Class Reference . . . 173
13.33.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 173
13.33.2 Constructor & Destructor Documentation . . . . . . . . . . . 173
13.33.2.1 dataSetCorruptedOffsetTable . . . . . . . . . . . . 173
13.34puntoexe::imebra::dataSetException Class Reference . . . . . . . . . 174
13.34.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 174
13.35puntoexe::imebra::dataSetExceptionDifferentFormat Class Reference 175
13.35.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 175
13.36puntoexe::imebra::dataSetExceptionOldFormat Class Reference . . . 176
13.36.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 176
13.37puntoexe::imebra::dataSetExceptionUnknownTransferSyntax Class
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
13.37.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 177
13.38puntoexe::imebra::dataSetExceptionWrongFrame Class Reference . . 178
13.38.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 178
13.39puntoexe::imebra::dataSetImageDoesntExist Class Reference . . . . . 179
13.39.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 179
13.39.2 Constructor & Destructor Documentation . . . . . . . . . . . 179
13.39.2.1 dataSetImageDoesntExist . . . . . . . . . . . . . . 179
13.40puntoexe::imebra::dicomDictionary Class Reference . . . . . . . . . 180
13.40.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 180
13.40.2 Member Function Documentation . . . . . . . . . . . . . . . 181

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xii CONTENTS

13.40.2.1 getDicomDictionary . . . . . . . . . . . . . . . . . 181


13.40.2.2 getLongLength . . . . . . . . . . . . . . . . . . . 181
13.40.2.3 getMaxSize . . . . . . . . . . . . . . . . . . . . . 181
13.40.2.4 getTagName . . . . . . . . . . . . . . . . . . . . . 181
13.40.2.5 getTagType . . . . . . . . . . . . . . . . . . . . . 182
13.40.2.6 getWordSize . . . . . . . . . . . . . . . . . . . . . 182
13.40.2.7 isDataTypeValid . . . . . . . . . . . . . . . . . . . 182
13.41puntoexe::imebra::dicomDir Class Reference . . . . . . . . . . . . . 183
13.41.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 183
13.41.2 Constructor & Destructor Documentation . . . . . . . . . . . 184
13.41.2.1 dicomDir . . . . . . . . . . . . . . . . . . . . . . . 184
13.41.3 Member Function Documentation . . . . . . . . . . . . . . . 184
13.41.3.1 buildDataSet . . . . . . . . . . . . . . . . . . . . . 184
13.41.3.2 getDirectoryDataSet . . . . . . . . . . . . . . . . . 185
13.41.3.3 getFirstRootRecord . . . . . . . . . . . . . . . . . 185
13.41.3.4 getNewRecord . . . . . . . . . . . . . . . . . . . . 185
13.41.3.5 setFirstRootRecord . . . . . . . . . . . . . . . . . 185
13.42puntoexe::imebra::dicomDirCircularReferenceException Class Refer-
ence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
13.42.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 187
13.42.2 Constructor & Destructor Documentation . . . . . . . . . . . 187
13.42.2.1 dicomDirCircularReferenceException . . . . . . . 187
13.43puntoexe::imebra::dicomDirException Class Reference . . . . . . . . 188
13.43.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 188
13.43.2 Constructor & Destructor Documentation . . . . . . . . . . . 188
13.43.2.1 dicomDirException . . . . . . . . . . . . . . . . . 188
13.44puntoexe::imebra::dicomDirUnknownDirectoryRecordType Class
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
13.44.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 189
13.44.2 Constructor & Destructor Documentation . . . . . . . . . . . 189
13.44.2.1 dicomDirUnknownDirectoryRecordType . . . . . . 189
13.45puntoexe::imebra::directoryRecord Class Reference . . . . . . . . . . 190
13.45.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 191
13.45.2 Member Enumeration Documentation . . . . . . . . . . . . . 191

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xiii

13.45.2.1 tDirectoryRecordType . . . . . . . . . . . . . . . . 191


13.45.3 Member Function Documentation . . . . . . . . . . . . . . . 191
13.45.3.1 getFilePart . . . . . . . . . . . . . . . . . . . . . . 191
13.45.3.2 getFirstChildRecord . . . . . . . . . . . . . . . . . 192
13.45.3.3 getNextRecord . . . . . . . . . . . . . . . . . . . . 192
13.45.3.4 getRecordDataSet . . . . . . . . . . . . . . . . . . 192
13.45.3.5 getReferencedRecord . . . . . . . . . . . . . . . . 192
13.45.3.6 getType . . . . . . . . . . . . . . . . . . . . . . . 193
13.45.3.7 getTypeString . . . . . . . . . . . . . . . . . . . . 193
13.45.3.8 setFirstChildRecord . . . . . . . . . . . . . . . . . 193
13.45.3.9 setNextRecord . . . . . . . . . . . . . . . . . . . . 193
13.45.3.10setReferencedRecord . . . . . . . . . . . . . . . . 193
13.45.3.11setType . . . . . . . . . . . . . . . . . . . . . . . . 194
13.45.3.12setTypeString . . . . . . . . . . . . . . . . . . . . 194
13.46puntoexe::imebra::handlers::dataHandler Class Reference . . . . . . . 195
13.46.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 198
13.46.2 Member Function Documentation . . . . . . . . . . . . . . . 198
13.46.2.1 abort . . . . . . . . . . . . . . . . . . . . . . . . . 198
13.46.2.2 commit . . . . . . . . . . . . . . . . . . . . . . . . 198
13.46.2.3 copyBack . . . . . . . . . . . . . . . . . . . . . . 198
13.46.2.4 copyFromInt32 . . . . . . . . . . . . . . . . . . . 199
13.46.2.5 copyToInt32 . . . . . . . . . . . . . . . . . . . . . 199
13.46.2.6 getDataType . . . . . . . . . . . . . . . . . . . . . 199
13.46.2.7 getDate . . . . . . . . . . . . . . . . . . . . . . . . 200
13.46.2.8 getDouble . . . . . . . . . . . . . . . . . . . . . . 200
13.46.2.9 getDoubleIncPointer . . . . . . . . . . . . . . . . . 200
13.46.2.10getPaddingByte . . . . . . . . . . . . . . . . . . . 201
13.46.2.11getSignedLong . . . . . . . . . . . . . . . . . . . . 201
13.46.2.12getSignedLongIncPointer . . . . . . . . . . . . . . 201
13.46.2.13getSize . . . . . . . . . . . . . . . . . . . . . . . . 201
13.46.2.14getString . . . . . . . . . . . . . . . . . . . . . . . 202
13.46.2.15getUnicodeString . . . . . . . . . . . . . . . . . . 202
13.46.2.16getUnitSize . . . . . . . . . . . . . . . . . . . . . 202
13.46.2.17getUnsignedLong . . . . . . . . . . . . . . . . . . 203

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xiv CONTENTS

13.46.2.18getUnsignedLongIncPointer . . . . . . . . . . . . . 203
13.46.2.19incPointer . . . . . . . . . . . . . . . . . . . . . . 203
13.46.2.20pointerIsValid . . . . . . . . . . . . . . . . . . . . 203
13.46.2.21setDate . . . . . . . . . . . . . . . . . . . . . . . . 204
13.46.2.22setDouble . . . . . . . . . . . . . . . . . . . . . . 204
13.46.2.23setDoubleIncPointer . . . . . . . . . . . . . . . . . 204
13.46.2.24setPointer . . . . . . . . . . . . . . . . . . . . . . 205
13.46.2.25setSignedLong . . . . . . . . . . . . . . . . . . . . 205
13.46.2.26setSignedLongIncPointer . . . . . . . . . . . . . . 205
13.46.2.27setSize . . . . . . . . . . . . . . . . . . . . . . . . 206
13.46.2.28setString . . . . . . . . . . . . . . . . . . . . . . . 206
13.46.2.29setUnicodeString . . . . . . . . . . . . . . . . . . 206
13.46.2.30setUnsignedLong . . . . . . . . . . . . . . . . . . 206
13.46.2.31setUnsignedLongIncPointer . . . . . . . . . . . . . 207
13.46.2.32skip . . . . . . . . . . . . . . . . . . . . . . . . . 207
13.47puntoexe::imebra::handlers::dataHandlerDate Class Reference . . . . 208
13.47.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 208
13.47.2 Member Function Documentation . . . . . . . . . . . . . . . 208
13.47.2.1 getUnicodeString . . . . . . . . . . . . . . . . . . 208
13.47.2.2 setUnicodeString . . . . . . . . . . . . . . . . . . 209
13.48puntoexe::imebra::handlers::dataHandlerDateTimeBase Class Reference 210
13.48.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 210
13.49puntoexe::imebra::handlers::dataHandlerNumeric< dataHandlerType
> Class Template Reference . . . . . . . . . . . . . . . . . . . . . . 211
13.49.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 212
13.49.2 Member Function Documentation . . . . . . . . . . . . . . . 212
13.49.2.1 at . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
13.49.2.2 copyFromInt32Interleaved . . . . . . . . . . . . . 212
13.49.2.3 copyToInt32Interleaved . . . . . . . . . . . . . . . 213
13.49.2.4 getMemory . . . . . . . . . . . . . . . . . . . . . 214
13.49.2.5 getMemoryBuffer . . . . . . . . . . . . . . . . . . 214
13.49.2.6 operator[] . . . . . . . . . . . . . . . . . . . . . . 214
13.50puntoexe::imebra::handlers::dataHandlerRaw Class Reference . . . . 216
13.50.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 216

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xv

13.51puntoexe::imebra::handlers::dataHandlerString Class Reference . . . 217


13.51.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 217
13.52puntoexe::imebra::handlers::dataHandlerStringAE Class Reference . . 218
13.52.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 218
13.53puntoexe::imebra::handlers::dataHandlerStringAS Class Reference . . 219
13.53.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 220
13.53.2 Member Enumeration Documentation . . . . . . . . . . . . . 220
13.53.2.1 tAgeUnit . . . . . . . . . . . . . . . . . . . . . . . 220
13.53.3 Member Function Documentation . . . . . . . . . . . . . . . 220
13.53.3.1 getAge . . . . . . . . . . . . . . . . . . . . . . . . 220
13.53.3.2 getDouble . . . . . . . . . . . . . . . . . . . . . . 221
13.53.3.3 getSignedLong . . . . . . . . . . . . . . . . . . . . 221
13.53.3.4 getUnsignedLong . . . . . . . . . . . . . . . . . . 221
13.53.3.5 setAge . . . . . . . . . . . . . . . . . . . . . . . . 222
13.53.3.6 setDouble . . . . . . . . . . . . . . . . . . . . . . 222
13.53.3.7 setSignedLong . . . . . . . . . . . . . . . . . . . . 222
13.53.3.8 setUnsignedLong . . . . . . . . . . . . . . . . . . 222
13.54puntoexe::imebra::handlers::dataHandlerStringCS Class Reference . . 224
13.54.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 224
13.55puntoexe::imebra::handlers::dataHandlerStringDS Class Reference . . 225
13.55.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 225
13.56puntoexe::imebra::handlers::dataHandlerStringIS Class Reference . . 226
13.56.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 226
13.57puntoexe::imebra::handlers::dataHandlerStringPN Class Reference . . 227
13.57.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 227
13.58puntoexe::imebra::handlers::dataHandlerStringUnicode Class Reference 229
13.58.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 229
13.59puntoexe::imebra::handlers::dataHandlerTime Class Reference . . . . 230
13.59.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 230
13.59.2 Member Function Documentation . . . . . . . . . . . . . . . 230
13.59.2.1 getUnicodeString . . . . . . . . . . . . . . . . . . 230
13.59.2.2 setUnicodeString . . . . . . . . . . . . . . . . . . 231
13.60puntoexe::imebra::image Class Reference . . . . . . . . . . . . . . . 232
13.60.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 233

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xvi CONTENTS

13.60.2 Member Enumeration Documentation . . . . . . . . . . . . . 233


13.60.2.1 bitDepth . . . . . . . . . . . . . . . . . . . . . . . 233
13.60.3 Member Function Documentation . . . . . . . . . . . . . . . 234
13.60.3.1 create . . . . . . . . . . . . . . . . . . . . . . . . . 234
13.60.3.2 getChannelsNumber . . . . . . . . . . . . . . . . . 234
13.60.3.3 getColorSpace . . . . . . . . . . . . . . . . . . . . 234
13.60.3.4 getDataHandler . . . . . . . . . . . . . . . . . . . 235
13.60.3.5 getDepth . . . . . . . . . . . . . . . . . . . . . . . 235
13.60.3.6 getHighBit . . . . . . . . . . . . . . . . . . . . . . 235
13.60.3.7 getSize . . . . . . . . . . . . . . . . . . . . . . . . 236
13.60.3.8 getSizeMm . . . . . . . . . . . . . . . . . . . . . . 236
13.60.3.9 setSizeMm . . . . . . . . . . . . . . . . . . . . . . 236
13.61puntoexe::imebra::imageException Class Reference . . . . . . . . . . 237
13.61.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 237
13.61.2 Constructor & Destructor Documentation . . . . . . . . . . . 237
13.61.2.1 imageException . . . . . . . . . . . . . . . . . . . 237
13.62puntoexe::imebra::imageExceptionInvalidSize Class Reference . . . . 238
13.62.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 238
13.63puntoexe::imebra::imageExceptionUnknownColorSpace Class Refer-
ence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
13.63.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 239
13.64puntoexe::imebra::imageExceptionUnknownDepth Class Reference . 240
13.64.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 240
13.65puntoexe::imebra::lut Class Reference . . . . . . . . . . . . . . . . . 241
13.65.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 242
13.65.2 Member Function Documentation . . . . . . . . . . . . . . . 242
13.65.2.1 checkValidDataRange . . . . . . . . . . . . . . . . 242
13.65.2.2 copyToInt32 . . . . . . . . . . . . . . . . . . . . . 242
13.65.2.3 create . . . . . . . . . . . . . . . . . . . . . . . . . 243
13.65.2.4 fillHandlers . . . . . . . . . . . . . . . . . . . . . 243
13.65.2.5 getBits . . . . . . . . . . . . . . . . . . . . . . . . 243
13.65.2.6 getDescription . . . . . . . . . . . . . . . . . . . . 243
13.65.2.7 getFirstMapped . . . . . . . . . . . . . . . . . . . 244
13.65.2.8 getSize . . . . . . . . . . . . . . . . . . . . . . . . 244

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xvii

13.65.2.9 mappedValue . . . . . . . . . . . . . . . . . . . . 244


13.65.2.10mappedValueRev . . . . . . . . . . . . . . . . . . 244
13.65.2.11setLut . . . . . . . . . . . . . . . . . . . . . . . . 244
13.65.2.12setLutValue . . . . . . . . . . . . . . . . . . . . . 245
13.66puntoexe::imebra::lutException Class Reference . . . . . . . . . . . . 246
13.66.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 246
13.67puntoexe::imebra::lutExceptionCorrupted Class Reference . . . . . . 247
13.67.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 247
13.68puntoexe::imebra::lutExceptionWrongIndex Class Reference . . . . . 248
13.68.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 248
13.69puntoexe::imebra::transaction Class Reference . . . . . . . . . . . . . 249
13.69.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 249
13.69.2 Constructor & Destructor Documentation . . . . . . . . . . . 250
13.69.2.1 transaction . . . . . . . . . . . . . . . . . . . . . . 250
13.69.2.2 ∼transaction . . . . . . . . . . . . . . . . . . . . . 250
13.69.3 Member Function Documentation . . . . . . . . . . . . . . . 250
13.69.3.1 abort . . . . . . . . . . . . . . . . . . . . . . . . . 250
13.70puntoexe::imebra::transforms::colorTransforms::colorTransform Class
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
13.70.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 251
13.70.2 Member Function Documentation . . . . . . . . . . . . . . . 252
13.70.2.1 createColorTransform . . . . . . . . . . . . . . . . 252
13.70.2.2 getFinalColorSpace . . . . . . . . . . . . . . . . . 252
13.70.2.3 getInitialColorSpace . . . . . . . . . . . . . . . . . 252
13.71puntoexe::imebra::transforms::colorTransforms::colorTransformsFactory
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
13.71.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 254
13.71.2 Member Function Documentation . . . . . . . . . . . . . . . 254
13.71.2.1 canSubsample . . . . . . . . . . . . . . . . . . . . 254
13.71.2.2 getColorTransformsFactory . . . . . . . . . . . . . 255
13.71.2.3 getNumberOfChannels . . . . . . . . . . . . . . . 255
13.71.2.4 getTransform . . . . . . . . . . . . . . . . . . . . 255
13.71.2.5 isMonochrome . . . . . . . . . . . . . . . . . . . . 256
13.71.2.6 isSubsampledX . . . . . . . . . . . . . . . . . . . 256

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xviii CONTENTS

13.71.2.7 isSubsampledY . . . . . . . . . . . . . . . . . . . 257


13.71.2.8 makeSubsampled . . . . . . . . . . . . . . . . . . 257
13.71.2.9 normalizeColorSpace . . . . . . . . . . . . . . . . 257
13.72puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryException
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
13.72.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 259
13.73puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryExceptionNoTransform
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
13.73.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 260
13.74puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToMONOCHROME2
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
13.74.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 261
13.75puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToRGB
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
13.75.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 262
13.76puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToMONOCHROME1
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
13.76.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 263
13.77puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToRGB
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
13.77.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 264
13.78puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToYBRFULL
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
13.78.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 265
13.79puntoexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
13.79.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 266
13.79.2 Member Function Documentation . . . . . . . . . . . . . . . 267
13.79.2.1 setLut . . . . . . . . . . . . . . . . . . . . . . . . 267
13.80puntoexe::imebra::transforms::colorTransforms::RGBToMONOCHROME2
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
13.80.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 268
13.81puntoexe::imebra::transforms::colorTransforms::RGBToPALETTECOLOR
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
13.81.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 269
13.82puntoexe::imebra::transforms::colorTransforms::RGBToYBRFULL
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xix

13.82.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 270


13.83puntoexe::imebra::transforms::colorTransforms::RGBToYBRPARTIAL
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
13.83.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 271
13.84puntoexe::imebra::transforms::colorTransforms::YBRFULLToMONOCHROME2
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
13.84.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 272
13.85puntoexe::imebra::transforms::colorTransforms::YBRFULLToRGB
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
13.85.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 273
13.86puntoexe::imebra::transforms::colorTransforms::YBRPARTIALToRGB
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
13.86.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 274
13.87puntoexe::imebra::transforms::drawBitmap Class Reference . . . . . 275
13.87.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 275
13.87.2 Member Function Documentation . . . . . . . . . . . . . . . 276
13.87.2.1 declareBitmapType . . . . . . . . . . . . . . . . . 276
13.87.2.2 getOutputBitmap . . . . . . . . . . . . . . . . . . 276
13.88puntoexe::imebra::transforms::drawBitmapException Class Reference 278
13.88.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 278
13.89puntoexe::imebra::transforms::drawBitmapExceptionDataSetNotDeclared
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
13.89.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 279
13.90puntoexe::imebra::transforms::drawBitmapExceptionImageNotDeclared
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
13.90.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 280
13.91puntoexe::imebra::transforms::drawBitmapExceptionInvalidAlignByte
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
13.91.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 281
13.92puntoexe::imebra::transforms::drawBitmapExceptionInvalidArea
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
13.92.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 282
13.93puntoexe::imebra::transforms::modalityVOILUT Class Reference . . 283
13.93.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 283
13.94puntoexe::imebra::transforms::modalityVOILUTInverse Class Reference284
13.94.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 284

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xx CONTENTS

13.95puntoexe::imebra::transforms::transform Class Reference . . . . . . . 285


13.95.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 286
13.95.2 Member Function Documentation . . . . . . . . . . . . . . . 286
13.95.2.1 declareDataSet . . . . . . . . . . . . . . . . . . . . 286
13.95.2.2 declareInputImage . . . . . . . . . . . . . . . . . . 286
13.95.2.3 declareOutputImage . . . . . . . . . . . . . . . . . 286
13.95.2.4 doTransform . . . . . . . . . . . . . . . . . . . . . 287
13.95.2.5 getDataSet . . . . . . . . . . . . . . . . . . . . . . 287
13.95.2.6 getInputImage . . . . . . . . . . . . . . . . . . . . 287
13.95.2.7 getOutputImage . . . . . . . . . . . . . . . . . . . 287
13.95.2.8 isEmpty . . . . . . . . . . . . . . . . . . . . . . . 288
13.96puntoexe::imebra::transforms::transformBuffers Class Reference . . . 289
13.96.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 289
13.96.2 Member Function Documentation . . . . . . . . . . . . . . . 289
13.96.2.1 processDataBuffers . . . . . . . . . . . . . . . . . 289
13.97puntoexe::imebra::transforms::transformBuffersInPlace Class Reference 291
13.97.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 291
13.98puntoexe::imebra::transforms::transformBuffersInputOutput Class
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
13.98.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 292
13.99puntoexe::imebra::transforms::transformException Class Reference . 293
13.99.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 293
13.100puntoexe::imebra::transforms::transformExceptionDataInputImageDefined
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
13.100.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 294
13.101puntoexe::imebra::transforms::transformExceptionDataSetNotDefined
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
13.101.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 295
13.102puntoexe::imebra::transforms::transformExceptionOutputImageNotDefined
Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
13.102.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 296
13.103puntoexe::imebra::transforms::transformHighBit Class Reference . . . 297
13.103.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 297
13.104puntoexe::imebra::transforms::transformsChain Class Reference . . . 298
13.104.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 298

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xxi

13.104.2Member Function Documentation . . . . . . . . . . . . . . . 299


13.104.2.1addTransform . . . . . . . . . . . . . . . . . . . . 299
13.104.2.2endTransformsChain . . . . . . . . . . . . . . . . 299
13.104.2.3isEmpty . . . . . . . . . . . . . . . . . . . . . . . 299
13.105puntoexe::imebra::transforms::VOILUT Class Reference . . . . . . . 300
13.105.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 301
13.105.2Member Function Documentation . . . . . . . . . . . . . . . 301
13.105.2.1getCenterWidth . . . . . . . . . . . . . . . . . . . 301
13.105.2.2getVOILUTDescription . . . . . . . . . . . . . . . 301
13.105.2.3getVOILUTId . . . . . . . . . . . . . . . . . . . . 301
13.105.2.4setCenterWidth . . . . . . . . . . . . . . . . . . . 302
13.105.2.5setLUT . . . . . . . . . . . . . . . . . . . . . . . . 302
13.105.2.6setVOILUT . . . . . . . . . . . . . . . . . . . . . 302
13.106puntoexe::imebra::transforms::VOILUTInverse Class Reference . . . 304
13.106.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 304
13.107puntoexe::imebra::view Class Reference . . . . . . . . . . . . . . . . 305
13.107.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 308
13.107.2Constructor & Destructor Documentation . . . . . . . . . . . 308
13.107.2.1view . . . . . . . . . . . . . . . . . . . . . . . . . 308
13.107.3Member Function Documentation . . . . . . . . . . . . . . . 308
13.107.3.1draw . . . . . . . . . . . . . . . . . . . . . . . . . 308
13.107.3.2drawBitmap . . . . . . . . . . . . . . . . . . . . . 309
13.107.3.3drawCursorLine . . . . . . . . . . . . . . . . . . . 309
13.107.3.4drawRectangle . . . . . . . . . . . . . . . . . . . . 310
13.107.3.5getBackgroundColor . . . . . . . . . . . . . . . . . 310
13.107.3.6getImage . . . . . . . . . . . . . . . . . . . . . . . 311
13.107.3.7getImageRect . . . . . . . . . . . . . . . . . . . . 311
13.107.3.8getScreenDPI . . . . . . . . . . . . . . . . . . . . 311
13.107.3.9getScrollPosition . . . . . . . . . . . . . . . . . . . 311
13.107.3.10
getScrollSize . . . . . . . . . . . . . . . . . . . . . 312
13.107.3.11
getWindowSize . . . . . . . . . . . . . . . . . . . 312
13.107.3.12
getZoomFactor . . . . . . . . . . . . . . . . . . . 312
13.107.3.13
imagePosToMillimitersX . . . . . . . . . . . . . . 313
13.107.3.14
imagePosToMillimitersY . . . . . . . . . . . . . . 313

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xxii CONTENTS

13.107.3.15
invalidate . . . . . . . . . . . . . . . . . . . . . . . 313
13.107.3.16
isAutoZoom . . . . . . . . . . . . . . . . . . . . . 314
13.107.3.17
millimitersToImagePosX . . . . . . . . . . . . . . 314
13.107.3.18
millimitersToImagePosY . . . . . . . . . . . . . . 314
13.107.3.19
setBackgroundColor . . . . . . . . . . . . . . . . . 315
13.107.3.20
setImage . . . . . . . . . . . . . . . . . . . . . . . 315
13.107.3.21
setScrollPosition . . . . . . . . . . . . . . . . . . . 315
13.107.3.22
setScrollSize . . . . . . . . . . . . . . . . . . . . . 316
13.107.3.23
setZoomFactor . . . . . . . . . . . . . . . . . . . . 316
13.107.3.24
setZoomRect . . . . . . . . . . . . . . . . . . . . . 316
13.107.3.25
updateWindow . . . . . . . . . . . . . . . . . . . . 317
13.107.3.26
windowPosToImageX . . . . . . . . . . . . . . . . 317
13.107.3.27
windowPosToImageY . . . . . . . . . . . . . . . . 317
13.107.3.28
zoomInOut . . . . . . . . . . . . . . . . . . . . . . 318
13.108puntoexe::imebra::waveform Class Reference . . . . . . . . . . . . . 319
13.108.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 319
13.108.2Constructor & Destructor Documentation . . . . . . . . . . . 320
13.108.2.1waveform . . . . . . . . . . . . . . . . . . . . . . 320
13.108.3Member Function Documentation . . . . . . . . . . . . . . . 320
13.108.3.1getBitsAllocated . . . . . . . . . . . . . . . . . . . 320
13.108.3.2getBitsStored . . . . . . . . . . . . . . . . . . . . 320
13.108.3.3getChannels . . . . . . . . . . . . . . . . . . . . . 320
13.108.3.4getIntegerData . . . . . . . . . . . . . . . . . . . . 321
13.108.3.5getInterpretation . . . . . . . . . . . . . . . . . . . 321
13.108.3.6getSamples . . . . . . . . . . . . . . . . . . . . . . 321
13.108.3.7GetWaveformItem . . . . . . . . . . . . . . . . . . 322
13.109puntoexe::lockCriticalSection Class Reference . . . . . . . . . . . . . 323
13.109.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 323
13.109.2Constructor & Destructor Documentation . . . . . . . . . . . 323
13.109.2.1lockCriticalSection . . . . . . . . . . . . . . . . . 323
13.109.2.2∼lockCriticalSection . . . . . . . . . . . . . . . . 323
13.110puntoexe::lockMultipleObjects Class Reference . . . . . . . . . . . . 324
13.110.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 324
13.110.2Member Typedef Documentation . . . . . . . . . . . . . . . 324

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xxiii

13.110.2.1tObjectsList . . . . . . . . . . . . . . . . . . . . . 324
13.110.3Constructor & Destructor Documentation . . . . . . . . . . . 325
13.110.3.1lockMultipleObjects . . . . . . . . . . . . . . . . . 325
13.110.3.2∼lockMultipleObjects . . . . . . . . . . . . . . . . 325
13.110.4Member Function Documentation . . . . . . . . . . . . . . . 325
13.110.4.1unlock . . . . . . . . . . . . . . . . . . . . . . . . 325
13.111puntoexe::lockObject Class Reference . . . . . . . . . . . . . . . . . 326
13.111.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 326
13.111.2Constructor & Destructor Documentation . . . . . . . . . . . 326
13.111.2.1lockObject . . . . . . . . . . . . . . . . . . . . . . 326
13.111.2.2∼lockObject . . . . . . . . . . . . . . . . . . . . . 326
13.111.3Member Function Documentation . . . . . . . . . . . . . . . 326
13.111.3.1unlock . . . . . . . . . . . . . . . . . . . . . . . . 326
13.112puntoexe::memory Class Reference . . . . . . . . . . . . . . . . . . 328
13.112.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 329
13.112.2Member Function Documentation . . . . . . . . . . . . . . . 329
13.112.2.1assign . . . . . . . . . . . . . . . . . . . . . . . . 329
13.112.2.2clear . . . . . . . . . . . . . . . . . . . . . . . . . 329
13.112.2.3copyFrom . . . . . . . . . . . . . . . . . . . . . . 329
13.112.2.4data . . . . . . . . . . . . . . . . . . . . . . . . . 329
13.112.2.5empty . . . . . . . . . . . . . . . . . . . . . . . . 330
13.112.2.6reserve . . . . . . . . . . . . . . . . . . . . . . . . 330
13.112.2.7resize . . . . . . . . . . . . . . . . . . . . . . . . . 330
13.112.2.8size . . . . . . . . . . . . . . . . . . . . . . . . . . 330
13.112.2.9transfer . . . . . . . . . . . . . . . . . . . . . . . . 330
13.113puntoexe::memoryPool Class Reference . . . . . . . . . . . . . . . . 332
13.113.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 332
13.113.2Member Function Documentation . . . . . . . . . . . . . . . 333
13.113.2.1flush . . . . . . . . . . . . . . . . . . . . . . . . . 333
13.113.2.2getMemory . . . . . . . . . . . . . . . . . . . . . 333
13.113.2.3getMemoryPool . . . . . . . . . . . . . . . . . . . 333
13.114puntoexe::memoryStream Class Reference . . . . . . . . . . . . . . . 334
13.114.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 334
13.114.2Constructor & Destructor Documentation . . . . . . . . . . . 334

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xxiv CONTENTS

13.114.2.1memoryStream . . . . . . . . . . . . . . . . . . . 334
13.115puntoexe::nullStream Class Reference . . . . . . . . . . . . . . . . . 335
13.115.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 335
13.116puntoexe::ptr< objectType > Class Template Reference . . . . . . . 336
13.116.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 337
13.116.2Constructor & Destructor Documentation . . . . . . . . . . . 337
13.116.2.1ptr . . . . . . . . . . . . . . . . . . . . . . . . . . 337
13.116.2.2ptr . . . . . . . . . . . . . . . . . . . . . . . . . . 337
13.116.2.3ptr . . . . . . . . . . . . . . . . . . . . . . . . . . 337
13.116.3Member Function Documentation . . . . . . . . . . . . . . . 338
13.116.3.1get . . . . . . . . . . . . . . . . . . . . . . . . . . 338
13.116.3.2operator destType ∗ . . . . . . . . . . . . . . . . . 338
13.116.3.3operator ptr< destType > . . . . . . . . . . . . . . 338
13.116.3.4operator-> . . . . . . . . . . . . . . . . . . . . . . 338
13.116.3.5operator= . . . . . . . . . . . . . . . . . . . . . . . 339
13.116.3.6operator== . . . . . . . . . . . . . . . . . . . . . . 339
13.116.3.7operator== . . . . . . . . . . . . . . . . . . . . . . 339
13.117puntoexe::stream Class Reference . . . . . . . . . . . . . . . . . . . 340
13.117.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 340
13.117.2Member Function Documentation . . . . . . . . . . . . . . . 340
13.117.2.1openFile . . . . . . . . . . . . . . . . . . . . . . . 340
13.118puntoexe::streamController Class Reference . . . . . . . . . . . . . . 342
13.118.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 343
13.118.2Member Enumeration Documentation . . . . . . . . . . . . . 343
13.118.2.1tByteOrdering . . . . . . . . . . . . . . . . . . . . 343
13.118.3Constructor & Destructor Documentation . . . . . . . . . . . 344
13.118.3.1streamController . . . . . . . . . . . . . . . . . . . 344
13.118.4Member Function Documentation . . . . . . . . . . . . . . . 344
13.118.4.1adjustEndian . . . . . . . . . . . . . . . . . . . . . 344
13.118.4.2getControlledStream . . . . . . . . . . . . . . . . . 345
13.118.4.3getControlledStreamPosition . . . . . . . . . . . . 345
13.118.4.4position . . . . . . . . . . . . . . . . . . . . . . . 345
13.118.5Member Data Documentation . . . . . . . . . . . . . . . . . 345
13.118.5.1m_bJpegTags . . . . . . . . . . . . . . . . . . . . 345

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xxv

13.118.5.2m_dataBuffer . . . . . . . . . . . . . . . . . . . . 346
13.118.5.3m_pControlledStream . . . . . . . . . . . . . . . . 346
13.118.5.4m_virtualLength . . . . . . . . . . . . . . . . . . . 346
13.118.5.5m_virtualStart . . . . . . . . . . . . . . . . . . . . 346
13.119puntoexe::streamException Class Reference . . . . . . . . . . . . . . 347
13.119.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 347
13.120puntoexe::streamExceptionClose Class Reference . . . . . . . . . . . 348
13.120.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 348
13.121puntoexe::streamExceptionEOF Class Reference . . . . . . . . . . . 349
13.121.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 349
13.122puntoexe::streamExceptionOpen Class Reference . . . . . . . . . . . 350
13.122.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 350
13.123puntoexe::streamExceptionRead Class Reference . . . . . . . . . . . 351
13.123.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 351
13.124puntoexe::streamExceptionWrite Class Reference . . . . . . . . . . . 352
13.124.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 352
13.125puntoexe::streamJpegTagInStream Class Reference . . . . . . . . . . 353
13.125.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 353
13.126puntoexe::streamReader Class Reference . . . . . . . . . . . . . . . . 354
13.126.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 355
13.126.2Constructor & Destructor Documentation . . . . . . . . . . . 355
13.126.2.1streamReader . . . . . . . . . . . . . . . . . . . . 355
13.126.3Member Function Documentation . . . . . . . . . . . . . . . 355
13.126.3.1addBit . . . . . . . . . . . . . . . . . . . . . . . . 355
13.126.3.2endReached . . . . . . . . . . . . . . . . . . . . . 356
13.126.3.3read . . . . . . . . . . . . . . . . . . . . . . . . . 356
13.126.3.4readBit . . . . . . . . . . . . . . . . . . . . . . . . 356
13.126.3.5readBits . . . . . . . . . . . . . . . . . . . . . . . 356
13.126.3.6readByte . . . . . . . . . . . . . . . . . . . . . . . 357
13.126.3.7resetInBitsBuffer . . . . . . . . . . . . . . . . . . 357
13.126.3.8seek . . . . . . . . . . . . . . . . . . . . . . . . . 357
13.127puntoexe::streamWriter Class Reference . . . . . . . . . . . . . . . . 359
13.127.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 360
13.127.2Constructor & Destructor Documentation . . . . . . . . . . . 360

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xxvi CONTENTS

13.127.2.1streamWriter . . . . . . . . . . . . . . . . . . . . . 360
13.127.2.2∼streamWriter . . . . . . . . . . . . . . . . . . . . 360
13.127.3Member Function Documentation . . . . . . . . . . . . . . . 360
13.127.3.1flushDataBuffer . . . . . . . . . . . . . . . . . . . 360
13.127.3.2resetOutBitsBuffer . . . . . . . . . . . . . . . . . . 361
13.127.3.3write . . . . . . . . . . . . . . . . . . . . . . . . . 361
13.127.3.4writeBits . . . . . . . . . . . . . . . . . . . . . . . 361
13.127.3.5writeByte . . . . . . . . . . . . . . . . . . . . . . 361
13.128puntoexe::thread Class Reference . . . . . . . . . . . . . . . . . . . . 363
13.128.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 364
13.128.2Constructor & Destructor Documentation . . . . . . . . . . . 364
13.128.2.1thread . . . . . . . . . . . . . . . . . . . . . . . . 364
13.128.3Member Function Documentation . . . . . . . . . . . . . . . 364
13.128.3.1getThreadId . . . . . . . . . . . . . . . . . . . . . 364
13.128.3.2isRunning . . . . . . . . . . . . . . . . . . . . . . 364
13.128.3.3shouldTerminate . . . . . . . . . . . . . . . . . . . 365
13.128.3.4start . . . . . . . . . . . . . . . . . . . . . . . . . 365
13.128.3.5terminate . . . . . . . . . . . . . . . . . . . . . . . 365
13.128.3.6threadFunction . . . . . . . . . . . . . . . . . . . . 365
13.128.3.7yield . . . . . . . . . . . . . . . . . . . . . . . . . 365
13.129puntoexe::threadException Class Reference . . . . . . . . . . . . . . 366
13.129.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 366
13.130puntoexe::threadExceptionAlreadyRunning Class Reference . . . . . 367
13.130.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 367

14 File Documentation 369


14.1 baseObject.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 369
14.1.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 369
14.2 baseObject.h File Reference . . . . . . . . . . . . . . . . . . . . . . 370
14.2.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 370
14.3 baseStream.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 371
14.3.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 371
14.4 baseStream.h File Reference . . . . . . . . . . . . . . . . . . . . . . 372
14.4.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 372

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xxvii

14.5 buffer.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . 373


14.5.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 374
14.6 buffer.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 375
14.6.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 375
14.7 charsetConversion.cpp File Reference . . . . . . . . . . . . . . . . . 376
14.7.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 376
14.8 charsetConversion.h File Reference . . . . . . . . . . . . . . . . . . 377
14.8.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 377
14.9 charsetsList.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 378
14.9.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 378
14.10charsetsList.h File Reference . . . . . . . . . . . . . . . . . . . . . . 379
14.10.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 379
14.11codec.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . 380
14.11.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 380
14.12codec.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 381
14.12.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 381
14.13codecFactory.cpp File Reference . . . . . . . . . . . . . . . . . . . . 382
14.13.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 382
14.14codecFactory.h File Reference . . . . . . . . . . . . . . . . . . . . . 383
14.14.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 383
14.15colorTransform.cpp File Reference . . . . . . . . . . . . . . . . . . . 384
14.15.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 384
14.16colorTransform.h File Reference . . . . . . . . . . . . . . . . . . . . 385
14.16.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 385
14.17colorTransformsFactory.cpp File Reference . . . . . . . . . . . . . . 386
14.17.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 386
14.18colorTransformsFactory.h File Reference . . . . . . . . . . . . . . . 387
14.18.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 388
14.19configuration.h File Reference . . . . . . . . . . . . . . . . . . . . . 389
14.19.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 389
14.19.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . 389
14.19.2.1 imbxInt16 . . . . . . . . . . . . . . . . . . . . . . 389
14.19.2.2 imbxInt32 . . . . . . . . . . . . . . . . . . . . . . 389
14.19.2.3 imbxInt8 . . . . . . . . . . . . . . . . . . . . . . . 389

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xxviii CONTENTS

14.19.2.4 imbxUint16 . . . . . . . . . . . . . . . . . . . . . 390


14.19.2.5 imbxUint32 . . . . . . . . . . . . . . . . . . . . . 390
14.19.2.6 imbxUint8 . . . . . . . . . . . . . . . . . . . . . . 390
14.20criticalSection.cpp File Reference . . . . . . . . . . . . . . . . . . . 391
14.20.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 391
14.21criticalSection.h File Reference . . . . . . . . . . . . . . . . . . . . . 392
14.21.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 392
14.22data.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 393
14.22.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 393
14.23data.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 394
14.23.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 394
14.24dataCollection.h File Reference . . . . . . . . . . . . . . . . . . . . . 395
14.24.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 395
14.25dataGroup.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 396
14.25.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 396
14.26dataGroup.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 397
14.26.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 397
14.27dataHandler.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 398
14.27.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 398
14.28dataHandler.h File Reference . . . . . . . . . . . . . . . . . . . . . . 399
14.28.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 399
14.29dataHandlerDate.cpp File Reference . . . . . . . . . . . . . . . . . . 400
14.29.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 400
14.30dataHandlerDate.h File Reference . . . . . . . . . . . . . . . . . . . 401
14.30.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 401
14.31dataHandlerDateTime.cpp File Reference . . . . . . . . . . . . . . . 402
14.31.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 402
14.32dataHandlerDateTime.h File Reference . . . . . . . . . . . . . . . . 403
14.32.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 403
14.33dataHandlerDateTimeBase.cpp File Reference . . . . . . . . . . . . . 404
14.33.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 404
14.34dataHandlerDateTimeBase.h File Reference . . . . . . . . . . . . . . 405
14.34.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 405
14.35dataHandlerNumeric.h File Reference . . . . . . . . . . . . . . . . . 406

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xxix

14.35.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 406


14.36dataHandlerString.cpp File Reference . . . . . . . . . . . . . . . . . 407
14.36.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 407
14.37dataHandlerString.h File Reference . . . . . . . . . . . . . . . . . . . 408
14.37.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 408
14.38dataHandlerStringAE.cpp File Reference . . . . . . . . . . . . . . . 409
14.38.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 409
14.39dataHandlerStringAE.h File Reference . . . . . . . . . . . . . . . . . 410
14.39.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 410
14.40dataHandlerStringAS.cpp File Reference . . . . . . . . . . . . . . . . 411
14.40.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 411
14.41dataHandlerStringAS.h File Reference . . . . . . . . . . . . . . . . . 412
14.41.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 412
14.42dataHandlerStringCS.cpp File Reference . . . . . . . . . . . . . . . . 413
14.42.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 413
14.43dataHandlerStringCS.h File Reference . . . . . . . . . . . . . . . . . 414
14.43.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 414
14.44dataHandlerStringDS.cpp File Reference . . . . . . . . . . . . . . . . 415
14.44.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 415
14.45dataHandlerStringDS.h File Reference . . . . . . . . . . . . . . . . . 416
14.45.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 416
14.46dataHandlerStringIS.cpp File Reference . . . . . . . . . . . . . . . . 417
14.46.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 417
14.47dataHandlerStringIS.h File Reference . . . . . . . . . . . . . . . . . 418
14.47.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 418
14.48dataHandlerStringLO.cpp File Reference . . . . . . . . . . . . . . . 419
14.48.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 419
14.49dataHandlerStringLO.h File Reference . . . . . . . . . . . . . . . . . 420
14.49.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 420
14.50dataHandlerStringLT.cpp File Reference . . . . . . . . . . . . . . . . 421
14.50.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 421
14.51dataHandlerStringLT.h File Reference . . . . . . . . . . . . . . . . . 422
14.51.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 422
14.52dataHandlerStringPN.cpp File Reference . . . . . . . . . . . . . . . . 423

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xxx CONTENTS

14.52.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 423


14.53dataHandlerStringPN.h File Reference . . . . . . . . . . . . . . . . . 424
14.53.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 424
14.54dataHandlerStringSH.cpp File Reference . . . . . . . . . . . . . . . . 425
14.54.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 425
14.55dataHandlerStringSH.h File Reference . . . . . . . . . . . . . . . . . 426
14.55.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 426
14.56dataHandlerStringST.cpp File Reference . . . . . . . . . . . . . . . . 427
14.56.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 427
14.57dataHandlerStringST.h File Reference . . . . . . . . . . . . . . . . . 428
14.57.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 428
14.58dataHandlerStringUI.cpp File Reference . . . . . . . . . . . . . . . . 429
14.58.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 429
14.59dataHandlerStringUI.h File Reference . . . . . . . . . . . . . . . . . 430
14.59.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 430
14.60dataHandlerStringUnicode.cpp File Reference . . . . . . . . . . . . . 431
14.60.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 431
14.61dataHandlerStringUnicode.h File Reference . . . . . . . . . . . . . . 432
14.61.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 432
14.62dataHandlerStringUT.cpp File Reference . . . . . . . . . . . . . . . . 433
14.62.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 433
14.63dataHandlerStringUT.h File Reference . . . . . . . . . . . . . . . . . 434
14.63.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 434
14.64dataHandlerTime.cpp File Reference . . . . . . . . . . . . . . . . . . 435
14.64.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 435
14.65dataHandlerTime.h File Reference . . . . . . . . . . . . . . . . . . . 436
14.65.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 436
14.66dataSet.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . 437
14.66.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 437
14.67dataSet.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . 438
14.67.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 439
14.68dicomCodec.cpp File Reference . . . . . . . . . . . . . . . . . . . . 440
14.68.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 440
14.69dicomCodec.h File Reference . . . . . . . . . . . . . . . . . . . . . . 441

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xxxi

14.69.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 442


14.69.2 Define Documentation . . . . . . . . . . . . . . . . . . . . . 442
14.69.2.1 IMEBRA_DATASET_MAX_DEPTH . . . . . . . 442
14.70dicomDict.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 443
14.70.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 443
14.71dicomDict.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 444
14.71.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 444
14.72dicomDir.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 445
14.72.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 445
14.73dicomDir.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 446
14.73.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 447
14.74drawBitmap.cpp File Reference . . . . . . . . . . . . . . . . . . . . 448
14.74.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 448
14.75drawBitmap.h File Reference . . . . . . . . . . . . . . . . . . . . . . 449
14.75.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 450
14.76exception.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 451
14.76.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 451
14.77exception.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 452
14.77.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 453
14.77.2 Define Documentation . . . . . . . . . . . . . . . . . . . . . 453
14.77.2.1 PUNTOEXE_FUNCTION_END . . . . . . . . . . 453
14.77.2.2 PUNTOEXE_FUNCTION_START . . . . . . . . . 453
14.77.2.3 PUNTOEXE_RETHROW . . . . . . . . . . . . . . 454
14.77.2.4 PUNTOEXE_THROW . . . . . . . . . . . . . . . 454
14.78huffmanTable.cpp File Reference . . . . . . . . . . . . . . . . . . . . 456
14.78.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 456
14.79huffmanTable.h File Reference . . . . . . . . . . . . . . . . . . . . . 457
14.79.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 457
14.80image.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . 458
14.80.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 458
14.81image.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 459
14.81.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 460
14.82imebra.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 461
14.82.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 463

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xxxii CONTENTS

14.83jpegCodec.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 464


14.83.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 464
14.84jpegCodec.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 465
14.84.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 465
14.85LUT.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 466
14.85.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 466
14.86LUT.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 467
14.86.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 467
14.87memory.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . 468
14.87.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 468
14.88memory.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . 469
14.88.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 469
14.89memoryStream.cpp File Reference . . . . . . . . . . . . . . . . . . . 470
14.89.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 470
14.90memoryStream.h File Reference . . . . . . . . . . . . . . . . . . . . 471
14.90.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 471
14.91modalityVOILUT.cpp File Reference . . . . . . . . . . . . . . . . . 472
14.91.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 472
14.92modalityVOILUT.h File Reference . . . . . . . . . . . . . . . . . . . 473
14.92.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 473
14.93MONOCHROME1ToMONOCHROME2.cpp File Reference . . . . . 474
14.93.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 474
14.94MONOCHROME1ToMONOCHROME2.h File Reference . . . . . . 475
14.94.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 475
14.95MONOCHROME1ToRGB.cpp File Reference . . . . . . . . . . . . . 476
14.95.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 476
14.96MONOCHROME1ToRGB.h File Reference . . . . . . . . . . . . . . 477
14.96.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 477
14.97MONOCHROME2ToRGB.cpp File Reference . . . . . . . . . . . . . 478
14.97.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 478
14.98MONOCHROME2ToRGB.h File Reference . . . . . . . . . . . . . . 479
14.98.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 479
14.99MONOCHROME2ToYBRFULL.cpp File Reference . . . . . . . . . 480
14.99.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . 480

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xxxiii

14.100MONOCHROME2ToYBRFULL.h File Reference . . . . . . . . . . 481


14.100.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 481
14.101nullStream.h File Reference . . . . . . . . . . . . . . . . . . . . . . 482
14.101.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 482
14.102PALETTECOLORToRGB.cpp File Reference . . . . . . . . . . . . . 483
14.102.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 483
14.103PALETTECOLORToRGB.h File Reference . . . . . . . . . . . . . . 484
14.103.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 484
14.104RGBToMONOCHROME2.cpp File Reference . . . . . . . . . . . . . 485
14.104.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 485
14.105RGBToMONOCHROME2.h File Reference . . . . . . . . . . . . . . 486
14.105.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 486
14.106RGBToPALETTECOLOR.cpp File Reference . . . . . . . . . . . . . 487
14.106.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 487
14.107RGBToPALETTECOLOR.h File Reference . . . . . . . . . . . . . . 488
14.107.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 488
14.108RGBToYBRFULL.cpp File Reference . . . . . . . . . . . . . . . . . 489
14.108.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 489
14.109RGBToYBRFULL.h File Reference . . . . . . . . . . . . . . . . . . 490
14.109.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 490
14.110RGBToYBRPARTIAL.cpp File Reference . . . . . . . . . . . . . . . 491
14.110.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 491
14.111RGBToYBRPARTIAL.h File Reference . . . . . . . . . . . . . . . . 492
14.111.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 492
14.112stream.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . 493
14.112.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 493
14.113stream.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 494
14.113.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 494
14.114streamController.cpp File Reference . . . . . . . . . . . . . . . . . . 495
14.114.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 495
14.115streamController.h File Reference . . . . . . . . . . . . . . . . . . . 496
14.115.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 496
14.116streamReader.cpp File Reference . . . . . . . . . . . . . . . . . . . . 497
14.116.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 497

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


xxxiv CONTENTS

14.117streamReader.h File Reference . . . . . . . . . . . . . . . . . . . . . 498


14.117.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 498
14.118streamWriter.cpp File Reference . . . . . . . . . . . . . . . . . . . . 499
14.118.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 499
14.119streamWriter.h File Reference . . . . . . . . . . . . . . . . . . . . . 500
14.119.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 500
14.120thread.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . . . 501
14.120.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 501
14.121thread.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 502
14.121.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 502
14.122transaction.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 503
14.122.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 503
14.123transaction.h File Reference . . . . . . . . . . . . . . . . . . . . . . 504
14.123.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 505
14.123.2Define Documentation . . . . . . . . . . . . . . . . . . . . . 505
14.123.2.1IMEBRA_COMMIT_TRANSACTION_START . . 505
14.123.2.2IMEBRA_TRANSACTION_ABORT . . . . . . . 505
14.123.2.3IMEBRA_TRANSACTION_END . . . . . . . . . 505
14.123.2.4IMEBRA_TRANSACTION_START . . . . . . . . 506
14.124transform.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 507
14.124.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 507
14.125transform.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 508
14.125.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 509
14.126transformBuffers.cpp File Reference . . . . . . . . . . . . . . . . . . 510
14.126.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 510
14.127transformBuffers.h File Reference . . . . . . . . . . . . . . . . . . . 511
14.127.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 511
14.128transformHighBit.cpp File Reference . . . . . . . . . . . . . . . . . . 512
14.128.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 512
14.129transformHighBit.h File Reference . . . . . . . . . . . . . . . . . . . 513
14.129.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 513
14.130transformsChain.cpp File Reference . . . . . . . . . . . . . . . . . . 514
14.130.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 514
14.131transformsChain.h File Reference . . . . . . . . . . . . . . . . . . . 515

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


CONTENTS xxxv

14.131.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 515


14.132viewHelper.cpp File Reference . . . . . . . . . . . . . . . . . . . . . 516
14.132.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 516
14.133viewHelper.h File Reference . . . . . . . . . . . . . . . . . . . . . . 517
14.133.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 517
14.134VOILUT.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 518
14.134.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 518
14.135VOILUT.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 519
14.135.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 519
14.136waveform.cpp File Reference . . . . . . . . . . . . . . . . . . . . . . 520
14.136.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 520
14.137waveform.h File Reference . . . . . . . . . . . . . . . . . . . . . . . 521
14.137.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 521
14.138YBRFULLToMONOCHROME2.cpp File Reference . . . . . . . . . 522
14.138.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 522
14.139YBRFULLToMONOCHROME2.h File Reference . . . . . . . . . . . 523
14.139.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 523
14.140YBRFULLToRGB.cpp File Reference . . . . . . . . . . . . . . . . . 524
14.140.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 524
14.141YBRFULLToRGB.h File Reference . . . . . . . . . . . . . . . . . . 525
14.141.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 525
14.142YBRPARTIALToRGB.cpp File Reference . . . . . . . . . . . . . . . 526
14.142.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 526
14.143YBRPARTIALToRGB.h File Reference . . . . . . . . . . . . . . . . 527
14.143.1Detailed Description . . . . . . . . . . . . . . . . . . . . . . 527

15 Example Documentation 529


15.1 dicom2jpeg/dicom2jpeg.cpp . . . . . . . . . . . . . . . . . . . . . . 529
15.2 dicomdirItems/dicomdirItems.cpp . . . . . . . . . . . . . . . . . . . 536

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 1

Imebra open source Dicom


library

1.1 Copyright
Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by Paolo Brandoli.
The online version of this document can be found here:
http://imebra.com/documentation/html/index.html

1.2 Introduction
Please read the License agreement (p. 11) first!
Imebra is an open source Dicom library. The library has been designed to handle
Dicom files, but it includes also some classes that manage jpeg and other image files.
At the moment the library provides the following features:

• multi platform
• self contained (the library uses only functions from the standard C library and
the standard template library)
• dicom files parser and builder
• jpeg files parser and builder
• image decompression and compression in the following formats:
– jpeg baseline (8 bits per color channel lossy)
– jpeg baseline extended (12 bits per color channel lossy)
– jpeg lossless (up to 16 bits per color channel lossless)
– raw dicom (up to 16 bits per color channel lossless)
2 Imebra open source Dicom library

– rle dicom (up to 16 bits per color channel lossless)


All the formats are supported both in compression and decompression mode
• color space conversion
• support for nested datasets (sequences)
• support for Unicode and different Dicom charsets
• DICOMDIR parser and writer
• support for transactions
• load the larger tags only when necessary

Other features have been planned but have not been included in this release. The missed
features are the following:

• support for dicom objects (like patient, procedure, image, and so on)
• network support for communication between Dicom devices

1.3 What Imebra does NOT do?


The library doesn’t check for a Dicom stream validity; this feature will be introduced
with the support for dicom objects.

1.4 Where to start


After reading the License agreement (p. 11), you should read the Quick tour (p. 29)
and the section The imebra’s structure (p. 25).
A guide that will help you to include Imebra in your project can be found in Adding
Imebra to your project (p. 35).
A detailed reference of the C++ classes that compose Imebra is included in this manual.

1.5 Changes log

1.5.1 Changes since version 0.0.47

• Fixes #44 (Add the "const" modifier to all the relevant functions in the data
handlers)
• Fixes #55 (Add const qualifier to functions that require them)
• Fixes #56 (The external lock in baseObject may create circular references)
• Fixes #57 (RGBToPALETTECOLOR causes memory leaks)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


1.5 Changes log 3

• Fixes #58 (The destructors of objects derived from baseObject must be protected,
since they can be deleted only by themself)

• Increased the speed of CopyFromInt32Interleaved

• Increased the speed of dicomCodec::ReadPixel when bitsAllocated == 8 or 16

• Improved the speed of streamWriter::write()

• Increased the speed of streamWriter::writeBits

• The file reading related function now return the read byte or bits by value

1.5.2 Changes since version 0.0.46

• Makefiles for the example applications are being provided

• Fixes #33 (When launched without parameters, dicomdirItems should display


the version)

• Fixes #42 (When a dicomdir destructor is called, the it delete all the children
elements. This may cause a stack overflow when an element call release on the
next sibling item and the number of siblings is high)

• Fixes #46 (Checking for LUT validity will help dicom2jpeg to ignore the LUT
if it contains invalid data)

• Fixes #49 (The codepage "CHAR" used to indicate the locale charset in charset-
Conversion.cpp (p. 376) causes an exception during the initialization of ICONV.
The usage of "" instead of "char" works properly)

• Fixes #50 (mbxInt32 and imbxUint32 are wrongly mapped to long and unsigned
long. It should be mapped to int and unsigned int)

• Fixes #51 (wrong parameters in memset)

• Fixes #52 (The charset conversion uses different error reporting in ICONV and
Windows API)

1.5.3 Changes since version 0.0.45

• Fixes #32 (When launched without parameters, dicom2jpeg should display the
version)

• Fixes #34 (The on-line documentation should have to Google Analytics tracking
code)

• Fixes #37 (Change the title of the documentation to: Imebra - Open source dicom
library)

• Fixes #39 (The class dataHandlerNumeric calculates the wrong size)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


4 Imebra open source Dicom library

1.5.4 Changes since version 0.0.44 (Beta)

• Fixes #1 (The library’s version should be visible in the source code)

• Added DICOMDIR creator/parser

• Added an example that extract a DICOMDIR to an XML file

• Fixes #4 (A sequence tag should have the type set to SQ, but the writer uses the
first buffer’s type, therefore the data type is incorrect)

• Fixes #5 (When writing sequences, the tag’s length is not calculated correctly)

• Fixes #6 (dicomCodec::getDataSetLength doesn’t calculate the correct size)

• dicom2jpeg can now invoke ffmpeg and create movies

• Mercurial is now used as version control (was SVN)

• Corrected documentation

• Changed open source license to Affero GPL 3

1.5.5 Changes since version 0.0.41 (Alpha)

• Added the function puntoexe::imebra::transforms::VOILUT::getCenterWidth()


(p. 301)

• The jpegCodec returns an image with color space "YBR_FULL" when the image
is compressed in lossy mode and the dataset specifies the color space "RGB"

• Enhanced precision in the RGB to YBR_FULL color conversion

• Enhanced precision in the YBR_FULL to RGB color conversion

• Several optimization in the uncompressed Dicom image decoder

• Added the class puntoexe::imebra::trasforms::transformBuffersInPlace

• puntoexe::imebra::VOILUT and puntoexe::imebra::modalityVOILUT now de-


rive from puntoexe::imebra::trasforms::transformBuffersInPlace

• puntoexe::imebra::viewHelper releases the dataset when no images are displayed

• Several optimizations in the Jpeg image decoder

• puntoexe::streamReader::read() (p. 356) throws an exception when the end of


file is reached

• added puntoexe::streamReader::endReached() (p. 356)

• Several optimizations in puntoexe::streamReader (p. 354)

• Several optimizations in the Huffman decoder

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


1.5 Changes log 5

1.5.6 Changes since version 0.0.40 (Alpha)

• Added the example dicom2jpeg

1.5.7 Changes since version 0.0.38 (Alpha)

• Closes #12 (Subsampled images are saved/loaded incorrectly by the jpeg codec)

• Closes #13 (When saving a jpeg image from a dataset and it doesn’t need to be
converted an exception is thrown)

• Closes #14 (When saving an image the subsampling flags don’t match the qual-
ity)

1.5.8 Changes since version 0.0.36 (Alpha)

• Removed dependence from charsetsList in data, buffer, dataSet, dataGroup, data-


Handler

• Closes #9 (The lossless jpeg codec saves corrupted images)

• Closes #10 (A basic offset table is added even when it shouldn’t)

• Now non encapsulated images are saved one after another even when their length
is odd: no padding bytes are inserted

• closes #11 (The 32 bits tag’s length is truncated (only the lower 16 bits are cor-
rect) )

• The images build during the test units had a reduced range. Corrected

• Now the jpeg codec creates the offset table when loading an image

1.5.9 Changes since version 0.0.35 (Alpha)

• Closes #7 (memoryPool isn’t thread safe)

• The memory string now is managed by an auto_ptr

• In the memoryPool minimized the number of moved pointers when a memory


object is reused

• The dataSet doesn’t need to retrieve the images handlers anymore when updating
the offsets table

• The dicom codec doesn’t need to retrieve the handlers anymore when calculating
the tag size

• viewHelper now accepts a null pointer as image

• VOILUT now returns the right voilut description

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


6 Imebra open source Dicom library

• puntoexe::memory (p. 328) hides the string of bytes


• Added the class puntoexe::imebra::waveform (p. 319) to handle waveforms
embedded in puntoexe::imebra::dataSet (p. 155)
• Added SWIG headers (partial)

1.5.10 Changes since version 0.0.34 (Alpha)

• Closes #4 (The function jpegCodec::writeTag() always writes a tagId=0 on high-


endian architectures)
• Closes #5 (The unit test streamBitsTest doesn’t flush the write buffer)
• puntoexe::imebra::transforms::VOILUT (p. 300) now disables any VOI/LUT
if puntoexe::imebra::transforms::VOILUT::setVOILUT (p. 302) is called
with an ID=0

1.5.11 Changes since version 0.0.33 (Alpha)

• Closes #2 (The code assumes that wchar_t is 2 bytes long, while some systems
have wchar_t=4 bytes long)
• Closes #3 (Usage of ICONV should check for return value E2BIG)
• Added casting operators () to puntoexe::ptr (p. 336)

1.5.12 Changes since version 0.0.32 (Alpha)

• Corrected the ptr class so baseObject compiles on GCC


• Corrected thread (removed orphan functions)
• Now charsetConversion throws an exception if a charset is not supported by the
system

1.5.13 Changes since version 0.0.31 (Alpha)

• The PDF documentation is back

1.5.14 Changes since version 0.0.30 (Alpha)

• The smart pointer puntoexe::ptr (p. 336) is able to cast the object’s type. See
New smart pointer’s behaviour (p. 9) for more information.
• The reference counter in puntoexe::baseObject (p. 85) now is set to 0 at con-
struction time and should be increased by the application. It doesn’t affect your
code if you used the smart pointer puntoexe::ptr (p. 336). See New smart
pointer’s behaviour (p. 9) for more information.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


1.5 Changes log 7

• Updated the documentation to reflect recent changes


• The criticalSection now has its own class
• Added the class thread

1.5.15 Changes since version 0.0.29 (Alpha)

• Now the library doesn’t fail when the dataset has an empty images’ offset table
• Now the Dicom codec doesn’t switch to implicit datatype when a tag without
datatype is found in the group 0x0002.
The tag without datatype is still recognized. This solves a problem with dicom
files generated by DicomWorks

1.5.16 Changes since version 0.0.28 (Alpha)

• Added the function puntoexe::imebra::handlers::data::getBufferSize()


• Added the function puntoexe::imebra::buffer::getBufferSizeBytes() (p. 109)
• Now the functions in puntoexe::imebra::dataSet (p. 155) that need the buffer
size use the new buffer’s functions instead of retrieving a data handler

1.5.17 Changes since version 0.0.27 (Alpha)

• Breaking change: introduced the puntoexe::streamReader (p. 354) and the


puntoexe::streamWriter (p. 359) to control the puntoexe::baseStream (p. 89)
objects
• Breaking change: now puntoexe::imebra::dataSet (p. 155) throws the excep-
tion puntoexe::imebra::dataSetImageDoesntExist (p. 179) when a non exist-
ing frame is requested with puntoexe::imebra::dataSet::getImage() (p. 163)
• corrected a bug that was crashing the library when an empty tag was read
• corrected a bug that was causing a deadlock when pun-
toexe::WaitForMultipleObjects was used (used by the transactions)
• Added the load on demand for the bigger tags
• Now the library handles correcly the images that are fragmented in several data
items
• Improvement in the Jpeg codec’s performances
• Now image::create() returns a writable datahandler: this avoid the need to ask
for a writable data handler and improves the speed
• added puntoexe::memoryPool::flush() (p. 333)
• now the stream names can be in unicode format

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


8 Imebra open source Dicom library

1.5.18 Changes since version 0.0.26 (Alpha)

• Corrected the sample Let’s read an image (p. 31)

• Corrected a bug in the memoryManager’s destructor

• Now the memory manager’s parameters can be configured with preprocessor


definitions

1.5.19 Changes since version 0.0.25 (Alpha)

• Replaced "informations" with "information" and "infos" with "info"


The function exceptionsManager::getExceptionInfos became exceptionsMan-
ager::getExceptionInfo
The function exceptionsManager::clearExceptionInfos became exceptionsMan-
ager::clearExceptionInfo

• Corrected an issue in the RLE Dicom codec:


after reading a segment the decoder was seeking to the wrong position in the
dicom file, while writing it was writing wrong offsets

• Improved performances in the Jpeg IDCT function

1.5.20 Changes since version 0.0.24 (Alpha)

• Introduced common lock objects

• Introduced the transactions

• Compiles also on Embedded Visual C++ 4 (requires STLPORT, see source-


forge.net/projects/stlport)

• Introduced the view helper class

1.5.21 Changes since version 0.0.22 (Alpha)

• Introduced support for Unicode and different dicom charsets

• Modified several files to solve problems with Borland C++ Builder 2006

• The dicom codec now uses a dataHandlerRaw to read the tags from the file (pre-
viously it was using a normal dataHandler)

• Updated the documentation

• Modified the exceptionManager: now it store a list of objects instead of a list of


strings

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


1.6 New smart pointer’s behaviour 9

1.5.22 Changes since version 0.0.21 (Alpha)

• Corrected the transformHighBit class


• Modified the exceptionsManager (now it stores the messages per thread and not
per exception)

1.6 New smart pointer’s behaviour


Several users had difficulties in understanding the behaviour of the smart pointer imple-
mented by the puntoexe::ptr (p. 336) class and the reference count mechanism in the
puntoexe::baseObject (p. 85). To solve the reported problems the reference counter
mechanism has been changed from the version 0.0.31.
Up to the version 0.0.30 the reference counter was initialized to 1 by the constructor
of puntoexe::baseObject (p. 85), so a call to puntoexe::baseObject::addRef() wasn’t
necessary after the construction of a baseObject.
This was intended to simplify the usage of the reference counter (one less call to ad-
dRef()), but ended up adding more complications to the product. Anyway the final
application shouldn’t had made any call to addRef() and release() if the proper smart
pointer was used.
Also, the smart pointer wasn’t able to cast the objects’ types when copying data from
other smart pointer: in the beginning this behaviour was intentional (I wanted the end
programmer to specify his intentions and use the casting operators when needed), but
most of the users expected the smart pointer to take care of this.
Now the reference counter is initialized to 0 and not to 1 during the baseObject’s con-
struction: this implies that puntoexe::baseObject::addRef() has to be called immediatly
after the object construction: anyway this operation is performed automatically by the
smart pointer puntoexe::ptr (p. 336).
This simplified the behaviour of other functions in the ptr class: for instance the func-
tion puntoexe::ptr::get() (p. 338) doesn’t need to increase the reference counter any-
more.
Also the user is now forced to use the smart pointer because more baseObject’s func-
tions have been made protected or private (addRef() and release() now are callable by
the smart pointers only).
The smart pointer is now able to cast the object containing in other smart pointers
during the assignment or the construction of a new pointer.
The changes shouldn’t affect your old source code if you used the puntoexe::ptr
(p. 336) class to control the puntoexe::baseObject (p. 85) derived objects.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


10 Imebra open source Dicom library

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 2

License agreement
12 License agreement

Since Puntoexe owns the copyright to the Imebra’s source code, it is able to employ
Dual Licensing, which means that the same product is available under GPL and under
a commercial license. This does not in any way affect the Open Source commitment
of Puntoexe.
Imebra is available for free under the GNU AFFERO GENERAL PUBLIC LI-
CENSE (Version 3, 19 November 2007) (p. 12).
If you do not want to be bound by the GPL terms (such as the requirement that your
application must also be GPL), you may purchase a commercial license (see Ime-
bra Commercial License Version 1 (p. 23)) for Imebra from the puntoexe’s website
(http://www.puntoexe.com).

2.1 GNU AFFERO GENERAL PUBLIC LICENSE


(Version 3, 19 November 2007)

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>


Everyone is permitted to copy and distribute verbatim copies of this license document,
but changing it is not allowed.

2.1.1 Preamble

The GNU Affero General Public License is a free, copyleft license for software and
other kinds of works, specifically designed to ensure cooperation with the community
in the case of network server software.
The licenses for most software and other practical works are designed to take away your
freedom to share and change the works. By contrast, our General Public Licenses are
intended to guarantee your freedom to share and change all versions of a program–to
make sure it remains free software for all its users.
When we speak of free software, we are referring to freedom, not price. Our General
Public Licenses are designed to make sure that you have the freedom to distribute
copies of free software (and charge for them if you wish), that you receive source code
or can get it if you want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights with two steps: (1)
assert copyright on the software, and (2) offer you this License which gives you legal
permission to copy, distribute and/or modify the software.
A secondary benefit of defending all users’ freedom is that improvements made in
alternate versions of the program, if they receive widespread use, become available for
other developers to incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of software used on
network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and letting the
public access it on a server without ever releasing its source code to the public.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


2.1 GNU AFFERO GENERAL PUBLIC LICENSE (Version 3, 19 November
2007) 13

The GNU Affero General Public License is designed specifically to ensure that, in such
cases, the modified source code becomes available to the community. It requires the
operator of a network server to provide the source code of the modified version running
there to the users of that server. Therefore, public use of a modified version, on a
publicly accessible server, gives the public access to the source code of the modified
version.
An older license, called the Affero General Public License and published by Affero,
was designed to accomplish similar goals. This is a different license, not a version
of the Affero GPL, but Affero has released a new version of the Affero GPL which
permits relicensing under this license.
The precise terms and conditions for copying, distribution and modification follow.

2.1.2 TERMS AND CONDITIONS

2.1.2.1 0. Definitions.

"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of works, such as
semiconductor masks.
"The Program" refers to any copyrightable work licensed under this License. Each
licensee is addressed as "you". "Licensees" and "recipients" may be individuals or
organizations.
To "modify" a work means to copy from or adapt all or part of the work in a fashion
requiring copyright permission, other than the making of an exact copy. The resulting
work is called a "modified version" of the earlier work or a work "based on" the earlier
work.
A "covered work" means either the unmodified Program or a work based on the Pro-
gram.
To "propagate" a work means to do anything with it that, without permission, would
make you directly or secondarily liable for infringement under applicable copyright
law, except executing it on a computer or modifying a private copy. Propagation in-
cludes copying, distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other parties to make
or receive copies. Mere interaction with a user through a computer network, with no
transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices" to the extent that it
includes a convenient and prominently visible feature that (1) displays an appropriate
copyright notice, and (2) tells the user that there is no warranty for the work (except to
the extent that warranties are provided), that licensees may convey the work under this
License, and how to view a copy of this License. If the interface presents a list of user
commands or options, such as a menu, a prominent item in the list meets this criterion.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14 License agreement

2.1.2.2 1. Source Code.

The "source code" for a work means the preferred form of the work for making modi-
fications to it. "Object code" means any non-source form of a work.
A "Standard Interface" means an interface that either is an official standard defined
by a recognized standards body, or, in the case of interfaces specified for a particular
programming language, one that is widely used among developers working in that
language.
The "System Libraries" of an executable work include anything, other than the work
as a whole, that (a) is included in the normal form of packaging a Major Component,
but which is not part of that Major Component, and (b) serves only to enable use of the
work with that Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A "Major Component",
in this context, means a major essential component (kernel, window system, and so
on) of the specific operating system (if any) on which the executable work runs, or a
compiler used to produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all the source code
needed to generate, install, and (for an executable work) run the object code and to
modify the work, including scripts to control those activities. However, it does not
include the work’s System Libraries, or general-purpose tools or generally available
free programs which are used unmodified in performing those activities but which are
not part of the work. For example, Corresponding Source includes interface definition
files associated with source files for the work, and the source code for shared libraries
and dynamically linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those subprograms
and other parts of the work.
The Corresponding Source need not include anything that users can regenerate auto-
matically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.

2.1.2.3 2. Basic Permissions.

All rights granted under this License are granted for the term of copyright on the Pro-
gram, and are irrevocable provided the stated conditions are met. This License explic-
itly affirms your unlimited permission to run the unmodified Program. The output from
running a covered work is covered by this License only if the output, given its content,
constitutes a covered work. This License acknowledges your rights of fair use or other
equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without con-
ditions so long as your license otherwise remains in force. You may convey covered
works to others for the sole purpose of having them make modifications exclusively for
you, or provide you with facilities for running those works, provided that you comply
with the terms of this License in conveying all material for which you do not control
copyright. Those thus making or running the covered works for you must do so ex-
clusively on your behalf, under your direction and control, on terms that prohibit them
from making any copies of your copyrighted material outside their relationship with

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


2.1 GNU AFFERO GENERAL PUBLIC LICENSE (Version 3, 19 November
2007) 15

you.
Conveying under any other circumstances is permitted solely under the conditions
stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

2.1.2.4 3. Protecting Users’ Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological measure under


any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty
adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention
of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention
of technological measures to the extent such circumvention is effected by exercising
rights under this License with respect to the covered work, and you disclaim any inten-
tion to limit operation or modification of the work as a means of enforcing, against the
work’s users, your or third parties’ legal rights to forbid circumvention of technological
measures.

2.1.2.5 4. Conveying Verbatim Copies.

You may convey verbatim copies of the Program’s source code as you receive it, in any
medium, provided that you conspicuously and appropriately publish on each copy an
appropriate copyright notice; keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code; keep intact all
notices of the absence of any warranty; and give all recipients a copy of this License
along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer
support or warranty protection for a fee.

2.1.2.6 5. Conveying Modified Source Versions.

You may convey a work based on the Program, or the modifications to produce it from
the Program, in the form of source code under the terms of section 4, provided that you
also meet all of these conditions:

• a) The work must carry prominent notices stating that you modified it, and giving
a relevant date.
• b) The work must carry prominent notices stating that it is released under this
License and any conditions added under section 7. This requirement modifies
the requirement in section 4 to "keep intact all notices".
• c) You must license the entire work, as a whole, under this License to anyone
who comes into possession of a copy. This License will therefore apply, along
with any applicable section 7 additional terms, to the whole of the work, and all
its parts, regardless of how they are packaged. This License gives no permission
to license the work in any other way, but it does not invalidate such permission
if you have separately received it.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


16 License agreement

• d) If the work has interactive user interfaces, each must display Appropriate
Legal Notices; however, if the Program has interactive interfaces that do not
display Appropriate Legal Notices, your work need not make them do so.

A compilation of a covered work with other separate and independent works, which are
not by their nature extensions of the covered work, and which are not combined with it
such as to form a larger program, in or on a volume of a storage or distribution medium,
is called an "aggregate" if the compilation and its resulting copyright are not used to
limit the access or legal rights of the compilation’s users beyond what the individual
works permit. Inclusion of a covered work in an aggregate does not cause this License
to apply to the other parts of the aggregate.

2.1.2.7 6. Conveying Non-Source Forms.

You may convey a covered work in object code form under the terms of sections 4 and
5, provided that you also convey the machine-readable Corresponding Source under
the terms of this License, in one of these ways:

• a) Convey the object code in, or embodied in, a physical product (including a
physical distribution medium), accompanied by the Corresponding Source fixed
on a durable physical medium customarily used for software interchange.
• b) Convey the object code in, or embodied in, a physical product (including a
physical distribution medium), accompanied by a written offer, valid for at least
three years and valid for as long as you offer spare parts or customer support
for that product model, to give anyone who possesses the object code either
(1) a copy of the Corresponding Source for all the software in the product that
is covered by this License, on a durable physical medium customarily used for
software interchange, for a price no more than your reasonable cost of physically
performing this conveying of source, or (2) access to copy the Corresponding
Source from a network server at no charge.
• c) Convey individual copies of the object code with a copy of the written offer to
provide the Corresponding Source. This alternative is allowed only occasionally
and noncommercially, and only if you received the object code with such an
offer, in accord with subsection 6b.
• d) Convey the object code by offering access from a designated place (gratis or
for a charge), and offer equivalent access to the Corresponding Source in the
same way through the same place at no further charge. You need not require
recipients to copy the Corresponding Source along with the object code. If the
place to copy the object code is a network server, the Corresponding Source may
be on a different server (operated by you or a third party) that supports equivalent
copying facilities, provided you maintain clear directions next to the object code
saying where to find the Corresponding Source. Regardless of what server hosts
the Corresponding Source, you remain obligated to ensure that it is available for
as long as needed to satisfy these requirements.
• e) Convey the object code using peer-to-peer transmission, provided you inform
other peers where the object code and Corresponding Source of the work are
being offered to the general public at no charge under subsection 6d.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


2.1 GNU AFFERO GENERAL PUBLIC LICENSE (Version 3, 19 November
2007) 17

A separable portion of the object code, whose source code is excluded from the Cor-
responding Source as a System Library, need not be included in conveying the object
code work.
A "User Product" is either (1) a "consumer product", which means any tangible per-
sonal property which is normally used for personal, family, or household purposes, or
(2) anything designed or sold for incorporation into a dwelling. In determining whether
a product is a consumer product, doubtful cases shall be resolved in favor of coverage.
For a particular product received by a particular user, "normally used" refers to a typical
or common use of that class of product, regardless of the status of the particular user or
of the way in which the particular user actually uses, or expects or is expected to use,
the product. A product is a consumer product regardless of whether the product has
substantial commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods, procedures, autho-
rization keys, or other information required to install and execute modified versions
of a covered work in that User Product from a modified version of its Corresponding
Source. The information must suffice to ensure that the continued functioning of the
modified object code is in no case prevented or interfered with solely because modifi-
cation has been made.
If you convey an object code work under this section in, or with, or specifically for use
in, a User Product, and the conveying occurs as part of a transaction in which the right
of possession and use of the User Product is transferred to the recipient in perpetuity or
for a fixed term (regardless of how the transaction is characterized), the Corresponding
Source conveyed under this section must be accompanied by the Installation Informa-
tion. But this requirement does not apply if neither you nor any third party retains the
ability to install modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a requirement
to continue to provide support service, warranty, or updates for a work that has been
modified or installed by the recipient, or for the User Product in which it has been
modified or installed. Access to a network may be denied when the modification itself
materially and adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with
this section must be in a format that is publicly documented (and with an implementa-
tion available to the public in source code form), and must require no special password
or key for unpacking, reading or copying.

2.1.2.8 7. Additional Terms.

"Additional permissions" are terms that supplement the terms of this License by mak-
ing exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall be treated as
though they were included in this License, to the extent that they are valid under appli-
cable law. If additional permissions apply only to part of the Program, that part may be
used separately under those permissions, but the entire Program remains governed by

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


18 License agreement

this License without regard to the additional permissions.


When you convey a copy of a covered work, you may at your option remove any
additional permissions from that copy, or from any part of it. (Additional permissions
may be written to require their own removal in certain cases when you modify the
work.) You may place additional permissions on material, added by you to a covered
work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered
work, you may (if authorized by the copyright holders of that material) supplement the
terms of this License with terms:

• a) Disclaiming warranty or limiting liability differently from the terms of sec-


tions 15 and 16 of this License; or
• b) Requiring preservation of specified reasonable legal notices or author attri-
butions in that material or in the Appropriate Legal Notices displayed by works
containing it; or
• c) Prohibiting misrepresentation of the origin of that material, or requiring that
modified versions of such material be marked in reasonable ways as different
from the original version; or
• d) Limiting the use for publicity purposes of names of licensors or authors of the
material; or
• e) Declining to grant rights under trademark law for use of some trade names,
trademarks, or service marks; or
• f) Requiring indemnification of licensors and authors of that material by anyone
who conveys the material (or modified versions of it) with contractual assump-
tions of liability to the recipient, for any liability that these contractual assump-
tions directly impose on those licensors and authors.

All other non-permissive additional terms are considered "further restrictions" within
the meaning of section 10. If the Program as you received it, or any part of it, contains
a notice stating that it is governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains a further restric-
tion but permits relicensing or conveying under this License, you may add to a covered
work material governed by the terms of that license document, provided that the further
restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the
relevant source files, a statement of the additional terms that apply to those files, or a
notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a sep-
arately written license, or stated as exceptions; the above requirements apply either
way.

2.1.2.9 8. Termination.

You may not propagate or modify a covered work except as expressly provided un-
der this License. Any attempt otherwise to propagate or modify it is void, and will

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


2.1 GNU AFFERO GENERAL PUBLIC LICENSE (Version 3, 19 November
2007) 19

automatically terminate your rights under this License (including any patent licenses
granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular
copyright holder is reinstated (a) provisionally, unless and until the copyright holder
explicitly and finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means prior to 60 days
after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if
the copyright holder notifies you of the violation by some reasonable means, this is the
first time you have received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after your receipt of the
notice.
Termination of your rights under this section does not terminate the licenses of parties
who have received copies or rights from you under this License. If your rights have
been terminated and not permanently reinstated, you do not qualify to receive new
licenses for the same material under section 10.

2.1.2.10 9. Acceptance Not Required for Having Copies.

You are not required to accept this License in order to receive or run a copy of the Pro-
gram. Ancillary propagation of a covered work occurring solely as a consequence of
using peer-to-peer transmission to receive a copy likewise does not require acceptance.
However, nothing other than this License grants you permission to propagate or modify
any covered work. These actions infringe copyright if you do not accept this License.
Therefore, by modifying or propagating a covered work, you indicate your acceptance
of this License to do so.

2.1.2.11 10. Automatic Licensing of Downstream Recipients.

Each time you convey a covered work, the recipient automatically receives a license
from the original licensors, to run, modify and propagate that work, subject to this
License. You are not responsible for enforcing compliance by third parties with this
License.
An "entity transaction" is a transaction transferring control of an organization, or sub-
stantially all assets of one, or subdividing an organization, or merging organizations.
If propagation of a covered work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever licenses to the work
the party’s predecessor in interest had or could give under the previous paragraph, plus
a right to possession of the Corresponding Source of the work from the predecessor in
interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or
affirmed under this License. For example, you may not impose a license fee, royalty,
or other charge for exercise of rights granted under this License, and you may not
initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for sale, or importing
the Program or any portion of it.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


20 License agreement

2.1.2.12 11. Patents.

A "contributor" is a copyright holder who authorizes use under this License of the
Program or a work on which the Program is based. The work thus licensed is called
the contributor’s "contributor version".
A contributor’s "essential patent claims" are all patent claims owned or controlled by
the contributor, whether already acquired or hereafter acquired, that would be infringed
by some manner, permitted by this License, of making, using, or selling its contributor
version, but do not include claims that would be infringed only as a consequence of fur-
ther modification of the contributor version. For purposes of this definition, "control"
includes the right to grant patent sublicenses in a manner consistent with the require-
ments of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license
under the contributor’s essential patent claims, to make, use, sell, offer for sale, import
and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express agreement or com-
mitment, however denominated, not to enforce a patent (such as an express permission
to practice a patent or covenant not to sue for patent infringement). To "grant" such
a patent license to a party means to make such an agreement or commitment not to
enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corre-
sponding Source of the work is not available for anyone to copy, free of charge and
under the terms of this License, through a publicly available network server or other
readily accessible means, then you must either (1) cause the Corresponding Source to
be so available, or (2) arrange to deprive yourself of the benefit of the patent license for
this particular work, or (3) arrange, in a manner consistent with the requirements of this
License, to extend the patent license to downstream recipients. "Knowingly relying"
means you have actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient’s use of the covered work in a country,
would infringe one or more identifiable patents in that country that you have reason to
believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey,
or propagate by procuring conveyance of, a covered work, and grant a patent license
to some of the parties receiving the covered work authorizing them to use, propagate,
modify or convey a specific copy of the covered work, then the patent license you grant
is automatically extended to all recipients of the covered work and works based on it.
A patent license is "discriminatory" if it does not include within the scope of its cover-
age, prohibits the exercise of, or is conditioned on the non-exercise of one or more of
the rights that are specifically granted under this License. You may not convey a cov-
ered work if you are a party to an arrangement with a third party that is in the business
of distributing software, under which you make payment to the third party based on the
extent of your activity of conveying the work, and under which the third party grants,
to any of the parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work conveyed by you (or
copies made from those copies), or (b) primarily for and in connection with specific
products or compilations that contain the covered work, unless you entered into that
arrangement, or that patent license was granted, prior to 28 March 2007.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


2.1 GNU AFFERO GENERAL PUBLIC LICENSE (Version 3, 19 November
2007) 21

Nothing in this License shall be construed as excluding or limiting any implied license
or other defenses to infringement that may otherwise be available to you under appli-
cable patent law.

2.1.2.13 12. No Surrender of Others’ Freedom.

If conditions are imposed on you (whether by court order, agreement or otherwise) that
contradict the conditions of this License, they do not excuse you from the conditions
of this License. If you cannot convey a covered work so as to satisfy simultaneously
your obligations under this License and any other pertinent obligations, then as a con-
sequence you may not convey it at all. For example, if you agree to terms that obligate
you to collect a royalty for further conveying from those to whom you convey the Pro-
gram, the only way you could satisfy both those terms and this License would be to
refrain entirely from conveying the Program.

2.1.2.14 13. Remote Network Interaction; Use with the GNU General Public
License.

Notwithstanding any other provision of this License, if you modify the Program, your
modified version must prominently offer all users interacting with it remotely through a
computer network (if your version supports such interaction) an opportunity to receive
the Corresponding Source of your version by providing access to the Corresponding
Source from a network server at no charge, through some standard or customary means
of facilitating copying of software. This Corresponding Source shall include the Corre-
sponding Source for any work covered by version 3 of the GNU General Public License
that is incorporated pursuant to the following paragraph.
Notwithstanding any other provision of this License, you have permission to link or
combine any covered work with a work licensed under version 3 of the GNU General
Public License into a single combined work, and to convey the resulting work. The
terms of this License will continue to apply to the part which is the covered work, but
the work with which it is combined will remain governed by version 3 of the GNU
General Public License.

2.1.2.15 14. Revised Versions of this License.

The Free Software Foundation may publish revised and/or new versions of the GNU
Affero General Public License from time to time. Such new versions will be similar
in spirit to the present version, but may differ in detail to address new problems or
concerns.
Each version is given a distinguishing version number. If the Program specifies that
a certain numbered version of the GNU Affero General Public License "or any later
version" applies to it, you have the option of following the terms and conditions ei-
ther of that numbered version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the GNU Affero Gen-
eral Public License, you may choose any version ever published by the Free Software
Foundation.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


22 License agreement

If the Program specifies that a proxy can decide which future versions of the GNU
Affero General Public License can be used, that proxy’s public statement of acceptance
of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no
additional obligations are imposed on any author or copyright holder as a result of your
choosing to follow a later version.

2.1.2.16 15. Disclaimer of Warranty.

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PER-


MITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN
WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE
THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EX-
PRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR COR-
RECTION.

2.1.2.17 16. Limitation of Liability.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN


WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO
MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUS-
TAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAM-
AGES.

2.1.2.18 17. Interpretation of Sections 15 and 16.

If the disclaimer of warranty and limitation of liability provided above cannot be given
local legal effect according to their terms, reviewing courts shall apply local law that
most closely approximates an absolute waiver of all civil liability in connection with
the Program, unless a warranty or assumption of liability accompanies a copy of the
Program in return for a fee.

END OF TERMS AND CONDITIONS

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


2.2 Imebra Commercial License Version 1 23

2.2 Imebra Commercial License Version 1


Definitions

The Imebra Commercial License will be referred to as "The license" in the remainder
of this text. The Imebra Library will be referred to as "Imebra". The software based on
Imebra and developed by the license holder will be referred to as "The product".

License grant

1. This license allows the usage of Imebra by an unlimited number of developers


on an unlimited number of CPUs for the development of one major version of
one product.

2. This license allows the distribution of an unlimited numbed of copies of one


major version of the product based on Imebra.

3. The product based on Imebra must add significant and primary functionality to
the functionalities provided by Imebra.

4. The license holder is allowed to make modifications to the Imebra source code
but in no event will the original copyright holders of this library be held respon-
sible for action or actions resulting from any modifications of the source.

5. The license holder is not required to publicize or otherwise make available any
software used in conjunction with Imebra.

6. In no event shall the copyright notice in any of the source files supplied in Imebra
be removed or modified.

Redistributables

The Imebra’s source code doesn’t need to be redistributed with your application.

Termination

This license is effective until terminated. You may terminate it at any point by destroy-
ing the Imebra source code together with all copies Imebra. Also, Puntoexe has the
option to terminate if you fail to comply with any term or conditions of this Agree-
ment. You agree upon such termination to destroy Imebra together with all copies of
the Imebra.

Rental

You cannot rent, lease or lend Imebra.

Copyright

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


24 License agreement

The software is protected by copyright law and international treaty provisions. You
acknowledge that no title to the intellectual property in the Imebra is transferred to
you. You further acknowledge that title and full ownership rights to the Imebra will
remain the exclusive property of Puntoexe or its suppliers, and you will not acquire
any rights to the Imebra library except as expressly set forth in this license. You agree
that any copies of Imebra will contain the same proprietary notices which appear on
and in the Imebra distribution.

Limitations of Liability

In no event shall the initial developers or copyright holders be liable for any damages
whatsoever, including - but not restricted to - lost revenue or profits or other direct,
indirect, special, incidental or consequential damages, even if they have been advised
of the possibility of such damages, except to the extent invariable law, if any, provides
otherwise.

FAIL-SAFE PERFORMANCE

Imebra IS NOT DESIGNED, MANUFACTURED OR INTENDED FOR USE OR


RESALE AS ONLINE CONTROL EQUIPMENT IN HAZARDOUS ENVIRON-
MENTS REQUIRING FAIL-SAFE PERFORMANCE, SUCH AS IN THE OPER-
ATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMU-
NICATIONS SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE SUPPORT
MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF Imebra
COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYS-
ICAL OR ENVIRONMENTAL DAMAGE.

Severability

In the event of invalidity of any provision of this license, the parties agree that such
invalidity shall not affect the validity of the remaining portions of this license.

Governing law

This license will be governed by the laws of Italy and is subject to the exclusive juris-
diction of the Italy courts.

Entire agreement

This is the entire agreement between you and Puntoexe which supersedes any prior
agreement or understanding, whether written or oral, relating to the subject matter of
this license.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 3

The imebra’s structure


26 The imebra’s structure

3.1 Introduction
Imebra has been designed to work with Dicom structures, but because images have a
great importance in the Dicom world, it also includes some image compression and
decompression functions.
At the moment, 2 codecs are distributed with imebra:

• a Dicom codec

• a Jpeg codec

When a codec reads a stream, it generates a Dicom structure (from now "dataSet", see
puntoexe::imebra::dataSet (p. 155)) in memory and fill it with all the informations
available in the stream; please note that also the jpeg codec generates a Dicom structure.
If some images are embedded in the stream being parsed, then they are embedded
into the puntoexe::imebra::dataSet (p. 155), but they are not decompressed nor in-
terpreted; in order to retrieve an image from the dataSet, the application must call
the function puntoexe::imebra::dataSet::getImage() (p. 163) that retrieves the image
from the dataSet and decompresses it using the appropriate codec.
Other functions in the dataSet allow the application to read or write into the Dicom
tags, or to store new images into the dataSet (puntoexe::imebra::dataSet (p. 155)).

3.2 The dataSet


The dataSet is a collection of Dicom tags organized in groups. Each group is repre-
sented by its ID, which doesn’t have to be unique; for instance, if several images are
embedded in the dataSet, then several groups with the same ID could be present (actu-
ally, this happens only with older Dicom streams, since the new streams should use the
sequences in order to achieve the same result).
The information stored in the dataSet (puntoexe::imebra::dataSet (p. 155)) represent
the content of one or more related Dicom objects: for instance it could include the
informations of a patient and the images of one of its exams.
The information related to one object could be distributed in several groups, and the
dataSet has access to all the groups and tags it contains: this is why the dataSet
supplies several functions that pick up related informations with one function call.
For instance, the images (the attributes are stored in the group 0x28 while the pix-
els are in the group 0x7fe0) can be retrieved from the dataSet with a call to pun-
toexe::imebra::dataSet::getImage() (p. 163).

3.3 The groups


One group is a collection of Dicom tags. Each group is identified by a numeric ID.
When a group appears several times in a dataSet, then it is identified also by a progres-
sive number (called order in the library), which usually is 0 for the groups that appear

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


3.4 The tags 27

only once. The information about the order is not stored in the Dicom stream but is
generated by the library while a Dicom structure is created.
The tags that belong to the same group are stored together in a Dicom stream.

3.4 The tags


A tag stores an information related to a single attribute of the Dicom stream. For in-
stance, one tag could store the patient’s name while another tag could store the patient’s
age.
Each tag is identified by a numeric ID: the tag’s ID inside a group (see The groups
(p. 26)) must be unique.
The couple group’s ID/tag’s ID defines the purpose of the tag: for instance, the tag
0010,0010 (groupId=0x0010 and tagId=0x0010) is used to store the patient’s name,
and cannot be used for other purposes.
Some tags can store several records of the same type: for instance, the tag 7fe0,0010
(groupId=0x7fe0, tagId=0x0010) can store the data of several images.

3.5 The buffers


Usually, a dicom tag (see The tags (p. 27)) stores only one item of information, but
sometimes they can store more items; this happens when the tag has an undefined
length in the data stream.
Each item is stored in a buffer, so when there are several items then several buffers are
allocated in the tag.

3.6 The data handlers


A dataHandler (see puntoexe::imebra::handlers::dataHandler (p. 195)) is con-
nected to a buffer and reads or writes data into it.
The dataHandler works on a local copy of the buffer; this avoid multithreading related
problems.
The data handler can read or write the data in several formats (string, number, date, ...).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


28 The imebra’s structure

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 4

Quick tour
30 Quick tour

4.1 Adding the Imebra library to your project

You should read Adding Imebra to your project (p. 35) to learn how to include Imebra
to your project.
A quick explanation:

• Add all the files in the directories library/base and library/imebra to your project

• Disable the use of the precompiled header for all the Imebra source files (.cpp)

• Include the file "library/imebra/include/imebra.h" in all the files that use the Ime-
bra classes, or include it in the precompiled headers

• If you are compiling the application on Windows, then define the preprocessor
symbol WIN32

4.2 Let’s read a dataSet

A dataSet can be created by reading a Dicom stream or a Jpeg stream; Imebra can
detect automatically the stream format.
The first operation to perform is creating a stream; this can be a file or a memory buffer.
In this example we use a file stream. The following code creates a file stream and open
the file "d:\test.dcm" in read mode:

using namespace puntoexe;


ptr<stream> readStream(new stream);
readStream->openFile("d:\\test.dcm", std::ios::in);

With the previous code the application used a smart pointer (see puntoexe::ptr
(p. 336)) that tracks the usage of a stream object; when the smart pointer (the variable
readStream) goes out of scope then the reference counter of the stream is decreased.
Eventually the stream is deleted when the reference counter reaches 0.
With the following code we parse the content of the file managed by the stream and we
create a dataSet structure that contains the dicom tags defined in the file. We create a
streamReader object, which accesses the stream and gets data from it. Several stream-
Reader objects can share a single baseStream, even in multithread environments.

ptr<streamReader> reader(new streamReader(readStream));


ptr<imebra::dataSet> testDataSet =
imebra::codecs::codecFactory::getCodecFactory()->load(reader);

The previous code gets the pointer to the puntoexe::imebra::codecs::codecFactory


(p. 128), which in turn loads the data from the specified stream. The codecs factory
automatically detects the data format (dicom or jpeg).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


4.3 Let’s read or set a tag in the dataSet 31

4.3 Let’s read or set a tag in the dataSet


Once the dataSet has been created or loaded, your application can load or write values
into the dataSet’s tags.
In the following example we read the the patient’s name. A person name can have up
to 5 components (last name, middle name, first name,...) separated by ∧ and can be
represented in 3 different ways (character representation, ideographic representation or
phonetic representation) separated by a =.
Refer to the Dicom standard for more informations regarding the person name.
The Person Name handler in Imebra automatically separates the name’s representation,
while the name’s components have to be separated by the application.

std::string patientNameCharacter = testDataSet->getString(0x0010, 0, 0x0010, 0);


std::string patientNameIdeographic = testDataSet->getString(0x0010, 0, 0x0010, 1)
;

4.4 Let’s read an image


The dataSet provides a function that can easily (for your application) decompress an
image embedded into a dataSet.
The following example reads the first image embedded into a dataSet:

ptr<imebra::image> firstImage = testDataSet->getImage(0);

Note that an image should be processed by the modalityVOILUT transform to convert


its pixel values into meaningful values.
The following example apply the modalityVOILUT transform to the image:

ptr<imebra::transforms::transform> modVOILUT(
new imebra::transforms::modalityVOILUT);
modVOILUT->declareInputImage(0, firstImage);
modVOILUT->declareDataSet(testDataSet);
modVOILUT->doTransform();
ptr<imebra::image> convertedImage = modVOILUT->getOutputImage(0);

Further processing may be required to convert the convertedImage into an image suit-
able for the presentation on the screen. The VOILUT transform applies the contrast
suggested by the dataSet to the image. For instance:

ptr<imebra::transforms::transform> myVoiLut(
new imebra::transforms::VOILUT);
myVoiLut->declareInputImage(0, convertedImage);
myVoiLut->declareDataSet(testDataSet);

// Apply the first VOI or LUT


imbxUint32 lutId = myVoiLut->getVOILUTId(0);
myVoiLut->setVOILUT(lutId);

myVoiLut->doTransform();
ptr<imebra::image> presentationImage = myVoiLut->getOutputImage(0);

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


32 Quick tour

And do you need the image in an RGB format? Here you go:

using namespace puntoexe::imebra;


transforms::colorTransforms::colorTransformsFactory* pFactory = transforms::color
Transforms::colorTransformsFactory::getColorTransformsFactory();
ptr<transforms::transform> myColorTransform = pFactory->getTransform(presentation
Image->getColorSpace(), L"RGB");
if(myColorTransform != 0) // color transform not needed if the factory returns 0
{
myColorTransform->declareInputImage(presentationImage);
myColorTransform->declareDataSet(imageDataSet);
myColorTransform->doTransform();
presentationImage = myColorTransform->getOutputImage(0);
}

Now the variable presentationImage contains an RGB image ready to be displayed.

4.5 How to access the image’s pixels


You have to retrieve an image data handler to access to the pixels:

imbxUint32 rowSize, channelPixelSize, channelsNumber;


ptr<imebra::handlers::imageHandler> myHandler = presentationImage->getDataHandler
(false, &rowSize, &channelPixelSize, &channelsNumber);

// Retrieve the image’s size in pixels


imbxUint32 sizeX, sizeY;
presentationImage->getSize(&sizeX, &sizeY);

// Scan all the rows


for(imbxUint32 scanY = 0; scanY < sizeY; ++scanY)
{
// Scan all the columns
for(imbxUint32 scanX = 0; scanX < sizeX; ++scanX)
{
// Scan all the channels
for(imbxUint32 scanChannel = 0; scanChannel < channelsNumber; ++s
canChannel)
{
imbxInt32 channelValue = myHandler->getSignedLongIncPoint
er();

// Do something with the channel’s value


//--------------------------------------
}
}
}

A faster function accesses directly to the memory:

imbxUint32 rowSize, channelPixelSize, channelsNumber;


ptr<imebra::handlers::imageHandler> myHandler = presentationImage->getDataHandler
(false, &rowSize, &channelPixelSize, &channelsNumber);
imbxInt32* pBuffer = myHandler->getMemoryBuffer();

// Retrieve the image’s size in pixels

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


4.5 How to access the image’s pixels 33

imbxUint32 sizeX, sizeY;


presentationImage->getSize(&sizeX, &sizeY);

// Scan all the rows


for(imbxUint32 scanY = 0; scanY < sizeY; ++scanY)
{
// Scan all the columns
for(imbxUint32 scanX = 0; scanX < sizeX; ++scanX)
{
// Scan all the channels
for(imbxUint32 scanChannel = 0; scanChannel < channelsNumber; ++s
canChannel)
{
imbxInt32 channelValue = *(pBuffer++);

// Do something with the channel’s value


//--------------------------------------
}
}
}

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


34 Quick tour

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 5

Adding Imebra to your project


36 Adding Imebra to your project

5.1 Introduction
Imebra is not distributed as a dynamic module and probably will never be. This is due
to the CPP language used to build the library and to the different conventions used by
different compilers when they deal with the C++ function names.
Because of this, all the Imebra source files must be linked to your project by you. If
you use the same C++ compiler to build your application and the Imebra library then
you could create a dynamic module that includes the Imebra library.
The following sections describes how to include the Imebra source code in your project
and how to call its functions.

5.2 Prerequisites (common to all the platorms)


Imebra heavily uses the stl library; if your development environment doesn’t provide
a modern stl, try to install stlport (http://www.stlport.org). Visual Studio 6
and Embedded Visual C++ 4 need stlport.
Imebra also needs the standard C library.

5.3 Prerequisites for Windows (desktop version)


The path to the window.h file must be in the list of paths searched by the "include"
statement.
The library uses the functions TryEnterCriticalSection() and SwitchToThread() which
require the definition of the symbol _WIN32_WINNT in the C++ preprocessor. _-
WIN32_WINNT has to be set to 0x0400 or greater. If you are compiling the library
for Windows CE then the symbol _WIN32_WINNT doesn’t have to be defined.

5.4 Prerequisites for Embedded Visual C++ 4 (EVC4)


In order to compile the Imebra library with Embedded Visual C++ 4 (EVC4), a reliable
STL library must be installed.
The suggested STL library is STLPort (http://www.stlport.org). Please note
that the STLPort library needs the EVC4 service pack 4 and the RTTI patch for EVC4,
available on the Microsoft’s website and called RITTI.EXE.

5.5 Prerequisites for the Posix systems


Imebra uses the iconv and the pthreads libraries. Please take care of updating the list
of paths searched by the "include" statement. The following headers are necessary:

• iconv.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


5.6 Adding the source files to your project 37

• pthread.h

• sched.h

The application must be linked to the iconv and the pthread libraries.

5.6 Adding the source files to your project


Imebra is part of the Puntoexe Library and all its source code files are located in sub-
folders of the "library" directory, included in the distribution package.
The first step to add the Imebra library to your project is to add all the files in the
following directories to your project:

• library/imebra/src

• library/base/src

The files in those directories are cpp source files. You must disable the use of the
precompiled header for all the imebra source files.
The files in the following directories are header files and don’t need to be included
in your project, but nothing harmful happen if you do include them (please note that
EVC4 needs them):

• library/imebra/include

• library/base/include

The compiler must support the RTTI.


If you are compiling the application on Windows, define the preprocessor symbol
WIN32 (_WIN32_WCE on EVC4) in your project’s properties.
If you are compiling the application for Windows NT, 2000, XP or Vista, then define
the preprocessor symbol _WIN32_WINNT to 0x0400 or greater.

5.7 Adding Imebra to your project: Checklist


Please check that all the following tasks have been performed:

• A modern STL library is available and the path to its header files has been added
to the paths searched by the "include" statement

• Iconv and Pthread are available on Posix systems (non necessary on Windows
systems)

• All the cpp files in the directory "library/base/src" have been added to your
project

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


38 Adding Imebra to your project

• All the cpp files in the directory "library/imebra/src" have been added to your
project

• When compiling on Windows (desktop versions) define the symbol WIN32 in


the preprocessor definitions

• When compiling for Windows Mobile define the symbol _WIN32_WCE in the
preprocessor definitions

• When compiling for windows Desktop define the symbol _WIN32_WINNT to


0x0400 or greater

• Enable the RTTI informations in the C++ compiler

• Include the file "library/imebra/imebra.h" in all the files that reference an imebra
class

5.8 Calling an imebra function from your application


If you want to call or reference an Imebra class or function you have to include the
Imebra header to all the files that intend to deal with Imebra.
For your convenience, a single include file called "imebra.h" is available in the direc-
tory "library/imebra/include". The "imebra.h" file includes all the main header files
used by the Imebra sources.
If your compiler supports the precompiled headers, then a better place where to include
"imebra.h" could be the source file used to generate the precompiled headers (usually
"stdafx.h" in the Microsoft Visual C++ compiler).

5.9 The Imebra objects reference counter


Most of the Imebra classes derive from the object puntoexe::baseObject (p. 85). This
object has a reference counter that keeps track of he number of variables that reference
it. When the reference counter reaches 0 it means that no variable is referencing the
object and it can be deleted.
Your application should not try to increase/decrease the reference counter "manually"
by using the addRef() and release() methods, but it should use the smart pointer pro-
vided by Imebra (see The Imebra smart pointer (p. 38)).

5.10 The Imebra smart pointer


Most of the Imebra functions use a smart pointer in order to count the references to an
object.
The smart pointer is declared in the namespace puntoexe (p. 67) and is a class called
ptr (puntoexe::ptr (p. 336)).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


5.11 The namespaces 39

Why does Imebra use a custom implementation of the smart pointer when there are
already some out there? Because the pointer is used also to track object that should be
removed but in practice are not; for instance, the puntoexe::memory (p. 328) classes
sometime are not deleted when they counter reaches 0, but they are stored in pun-
toexe::memoryPool (p. 332) and reused later. Each Imebra object can veto its deletion
by returning false when a call to puntoexe::baseObject::preDelete() is made.
So, your application should use puntoexe::ptr (p. 336) instead of increasing/decreas-
ing the reference counters "manually" by calling puntoexe::baseObject::addRef() and
puntoexe::baseObject::release().

5.11 The namespaces


All the base services classes of the Imebra library are declared in the namespace pun-
toexe (p. 67), while the normal classes are in the namespace puntoexe::imebra (p. 71).
So, to create a dataSet, you should use the following line:

puntoexe::ptr<puntoexe::imebra::dataSet> myDataset(new puntoexe::imebra::dataSet)


;

Or you could use the C++ statement "using" in order to declare the namespace that
your application is going to use.

5.12 Managing the Imebra exceptions


When an error occurs the Imebra library throws an exception. Some exceptions are
catched and solved by the library, but some of them could reach your application.
In this case, your application should catch the exception and try to resolve the error or
display a message to the user or, in the worst case, quit.
All the Imebra exceptions are tracked by the statically allocated object pun-
toexe::exceptionsManager (p. 100). This object follows an exception while it travels
through all the functions until it finally reach your application: when your application
catch an Imebra exception it MUST query the puntoexe::exceptionsManager (p. 100)
in order to retrieve extended informations related to the exception.
The informations returned by puntoexe::exceptionsManager (p. 100) include the
complete stack dump at the moment of the creation of the exception and the reason
of the error. Those informations could be logged somewhere by your application, spe-
cially if the exception cannot be handled and the application will quit.
Please note that your application MUST query puntoexe::exceptionsManager
(p. 100) for the extend informations even if they are not used.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


40 Adding Imebra to your project

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 6

Imebra & Unicode


42 Imebra & Unicode

6.1 Introduction
The Dicom standard supports several charsets, including the unicode (UTF8 encoded).
Imebra uses the following approach when dealing with tags that could have been en-
coded using one of the Dicom charsets:

• when the dataset is loaded (see puntoexe::imebra::dataSet (p. 155)), a special


attribute in all the tags is updated with the charsets supported by the dataset.
• when a dataset is created, the application can decide the charsets that can be used
in the dataset: all the new tags will use the charsets specified in the dataset

• when an application writes a value in a tag, it can change the tag’s charsets:
before a dataset is saved all the tag’s charsets are analyzed and checked for in-
consistence or invalid charsets combinations and the tag 0008,0005 is updated
with the dataset’s charsets.

The conversion from/to the dataSet defined charsets happens when a dataHandler is
created or destroyed: while the dataHandler is "alive", the strings are kept in unicode
format and converted to ansi if a non-unicode function is called.
The conversion uses MultiByteToWideChars/WideCharsToMultiByte on Windows and
iconv on Posix systems.

6.2 How to initalize the dataSet


When the dataSet is loaded (see puntoexe::imebra::dataSet (p. 155)) from a stream,
then the list of used charsets will be set automatically: immediatly after the download
the tag 0008,0005 is checked and its content is transferred in the charsets list.
If the dataSet is created by the application then the list of charsets should be
specified: just create a list with the type puntoexe::imebra::tCharsetsList (is a
std::list of std::wstring) and fill the list with the charsets that should be stored
in the tag 0008,0005, then pass the list to the function dataSet::setCharsetsList()
(see puntoexe::imebra::charsetsList::setCharsetsList() since dataSet derives from pun-
toexe::imebra::charsetsList).
If the application writes in the dataSet some values that need different charsets from
the ones already specified, then new charsets will be added to the dataSet if they are
compatible with the charsets already specified. If the needed charsets cannot be added
then an exception of type puntoexe::imebra::charsetsListException will be thrown; if
a transaction is active when the exception is thrown then all the modifications will be
rolled back (see The transactions (p. 44)).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 7

Transactions and common locks


44 Transactions and common locks

7.1 Introduction
In order to keep the dataSet in a consistent state while several threads read and write
into it, the following features have been introduced in Imebra:

• The common locks (p. 44)

• The transactions (p. 44)

A common lock is a mutex shared by several objects; it is used


by puntoexe::imebra::dataSet (p. 155) and all its components
(puntoexe::imebra::dataGroup (p. 150) and puntoexe::imebra::data
(p. 139) objects) and by the puntoexe::imebra::image (p. 232) and its buffer
(puntoexe::imebra::buffer (p. 107)).
The transactions objects force the update of several elements in "one go". This means
that when several writing handlers are deallocated, the modifications are kept on hold
until the transaction object is deallocated; if one of the modifications doesn’t complete
successfully then all the modifications are rolled back and the dataSet remains in a
consistent state.

7.2 The common locks


It is used by the dataSet and by the image objects: it is a mutex that is shared by all
the objects owned by the dataSet and by the image. For instance, if when a single tag
is locked by using the puntoexe::lockObject (p. 326) class then all the dataSet where
the tag is contained is also locked, together with all the groups and tags contained by
the dataSet.
This is useful when an application has to read several tags and has to be sure that all
the retrieved tags represents that dataSet’s status at the same moment in time. In order
to do this the application must lock the dataSet object; this will lock all the groups and
the tags contained in the dataSet and will ensure that other threads will be paused when
they try to modify the dataSet. Once the dataSet has been locked the application can
read all the tags and rest assured that all of them represents a consistent status of the
dataSet.
The shared lock should be released as soon as possible in order to minimize the pause
time in the threads that are trying to access to the dataSet.

7.3 The transactions


The application can include several dataSets update in one or more nested transactions:
if one of the updates included in one transaction fails then all the updates included in
the same transaction are rolled back.
A single transaction can involve updates on different dataSets.
Imebra provides two kind of transactions:

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


7.3 The transactions 45

• committing transactions
• non-committing transactions

A committing transaction tries to commits all the changes made to the tags when the
transaction is closed, while a non-committing transaction delegates the commit to the
parent transaction; this means that only a nested transaction can be a non-committing
transaction and Imebra will always create a committing transaction for non nested ones.
In order to include one or more write operations in a transaction the application
has to enclose them in a transaction block. A transaction block is initiated by the
macro IMEBRA_TRANSACTION_START() (p. 506) or IMEBRA_COMMIT_-
TRANSACTION_START() (p. 505) and is terminated by the macro IMEBRA_-
TRANSACTION_END() (p. 505).
For instance, the following code tries to write a value in the tags 0010,0010 (patient’s
name) and 0010,1010 (patient’s age). If an error occurs inside the transaction block
then both the tags will retain their initial value.

using namespace puntoexe;


// Create the dataset and setup the charset
ptr<imebra::dataSet> myDataSet(new dataSet);
imebra::tCharsetsList myCharsets;
myCharsets.push_back(L"ISO_IR 192"); // UTF-8
myDataSet->setCharsetsList(&myCharsets);

// Write the initial values in the


myDataSet->setUnicodeString(0x0010, 0, 0x0010, 0, L"Initial^name");
myDataSet->setUnsignedLong(0x0010, 0, 0x1010, 0, 10); // ten years old

IMEBRA_TRANSACTION_START();
// If an error occurs here then the two tags will retain their
// initial state
myDataSet->setUnicodeString(0x0010, 0, 0x0010, 0, L"Surname^name");
myDataSet->setUnsignedLong(0x0010, 0, 0x1010, 0, 20); // twenty years old

// The values have not been written yet, only when the transaction
// commits them they will be transferred into the dataset
IMEBRA_TRANSACTION_END();

// The transaction wrote the new values in the dataset.


// If an error occurred during the transaction, an exception
// has been thrown and must be handled.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


46 Transactions and common locks

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 8

Namespace Index

8.1 Namespace List


Here is a list of all documented namespaces with brief descriptions:
puntoexe (The base services and classes are defined in this namespace ) . . . 67
puntoexe::imebra (All the functions related to the dicom standard are de-
fined in this namespace ) . . . . . . . . . . . . . . . . . . . . . . . 71
puntoexe::imebra::codecs (This namespace is used to define the classes that
implement a codec (p. 117) and their helper classes ) . . . . . . . . 75
puntoexe::imebra::handlers (All the data (p. 139) handlers (p. 77) re-
turned by the class buffer (p. 107) are defined in this namespace
) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
puntoexe::imebra::transforms (This namespace contains all the trans-
forms (p. 79) of the imebra (p. 71) library ) . . . . . . . . . . . . . 79
puntoexe::imebra::transforms::colorTransforms (This namespace con-
tains all the classes involved in the transformation between several
color spaces ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
48 Namespace Index

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 9

Class Index

9.1 Class Hierarchy


This inheritance list is sorted roughly, but not completely, alphabetically:
puntoexe::ptr< data > . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
puntoexe::ptr< dataGroup > . . . . . . . . . . . . . . . . . . . . . . . . . . 336
puntoexe::ptr< memory > . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
puntoexe::baseObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
puntoexe::imebra::dataCollection< data > . . . . . . . . . . . . . . . . . 145
puntoexe::imebra::dataGroup . . . . . . . . . . . . . . . . . . . . . . 150
puntoexe::imebra::dataCollection< dataGroup > . . . . . . . . . . . . . 145
puntoexe::imebra::dataSet . . . . . . . . . . . . . . . . . . . . . . . . 155
puntoexe::baseStream . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
puntoexe::memoryStream . . . . . . . . . . . . . . . . . . . . . . . . 334
puntoexe::nullStream . . . . . . . . . . . . . . . . . . . . . . . . . . 335
puntoexe::stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
puntoexe::exceptionsManager . . . . . . . . . . . . . . . . . . . . . . . 100
puntoexe::huffmanTable . . . . . . . . . . . . . . . . . . . . . . . . . . 103
puntoexe::imebra::buffer . . . . . . . . . . . . . . . . . . . . . . . . . . 107
puntoexe::imebra::codecs::codec . . . . . . . . . . . . . . . . . . . . . . 117
puntoexe::imebra::codecs::dicomCodec . . . . . . . . . . . . . . . . 131
puntoexe::imebra::codecs::jpegCodec . . . . . . . . . . . . . . . . . 136
puntoexe::imebra::codecs::codecFactory . . . . . . . . . . . . . . . . . . 128
puntoexe::imebra::data . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
puntoexe::imebra::dataCollection< collectionType > . . . . . . . . . . . 145
puntoexe::imebra::dataCollectionIterator< collectionType > . . . . . . . 147
puntoexe::imebra::dicomDir . . . . . . . . . . . . . . . . . . . . . . . . 183
puntoexe::imebra::directoryRecord . . . . . . . . . . . . . . . . . . . . . 190
puntoexe::imebra::handlers::dataHandler . . . . . . . . . . . . . . . . . . 195
puntoexe::imebra::handlers::dataHandlerNumeric< imbxUint8 > . . . 211
puntoexe::imebra::handlers::dataHandlerRaw . . . . . . . . . . . 216
puntoexe::imebra::handlers::dataHandlerNumeric< dataHandler-
Type > . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
50 Class Index

puntoexe::imebra::handlers::dataHandlerString . . . . . . . . . . . . 217
puntoexe::imebra::handlers::dataHandlerDateTimeBase . . . . . . 210
puntoexe::imebra::handlers::dataHandlerDate . . . . . . . . . 208
puntoexe::imebra::handlers::dataHandlerTime . . . . . . . . . 230
puntoexe::imebra::handlers::dataHandlerStringAE . . . . . . . . . 218
puntoexe::imebra::handlers::dataHandlerStringAS . . . . . . . . . 219
puntoexe::imebra::handlers::dataHandlerStringCS . . . . . . . . . 224
puntoexe::imebra::handlers::dataHandlerStringDS . . . . . . . . . 225
puntoexe::imebra::handlers::dataHandlerStringIS . . . . . . . . . 226
puntoexe::imebra::handlers::dataHandlerStringUnicode . . . . . . 229
puntoexe::imebra::handlers::dataHandlerStringPN . . . . . . . 227
puntoexe::imebra::image . . . . . . . . . . . . . . . . . . . . . . . . . . 232
puntoexe::imebra::lut . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
puntoexe::imebra::transforms::colorTransforms::colorTransformsFactory . 253
puntoexe::imebra::transforms::transform . . . . . . . . . . . . . . . . . . 285
puntoexe::imebra::transforms::colorTransforms::colorTransform . . . 251
puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToMONOCHROME2261
puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToMONOCHROME1263
puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToRGB262
puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToRGB264
puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToYBRFULL265
puntoexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB266
puntoexe::imebra::transforms::colorTransforms::RGBToPALETTECOLOR269
puntoexe::imebra::transforms::colorTransforms::RGBToMONOCHROME2268
puntoexe::imebra::transforms::colorTransforms::RGBToYBRFULL 270
puntoexe::imebra::transforms::colorTransforms::RGBToYBRPARTIAL271
puntoexe::imebra::transforms::colorTransforms::YBRFULLToMONOCHROME2272
puntoexe::imebra::transforms::colorTransforms::YBRFULLToRGB 273
puntoexe::imebra::transforms::colorTransforms::YBRPARTIALToRGB274
puntoexe::imebra::transforms::drawBitmap . . . . . . . . . . . . . . 275
puntoexe::imebra::transforms::transformBuffers . . . . . . . . . . . . 289
puntoexe::imebra::transforms::transformBuffersInPlace . . . . . . 291
puntoexe::imebra::transforms::modalityVOILUT . . . . . . . 283
puntoexe::imebra::transforms::modalityVOILUTInverse . . 284
puntoexe::imebra::transforms::transformHighBit . . . . . . . . 297
puntoexe::imebra::transforms::VOILUT . . . . . . . . . . . . 300
puntoexe::imebra::transforms::VOILUTInverse . . . . . . 304
puntoexe::imebra::transforms::transformBuffersInputOutput . . . 292
puntoexe::imebra::transforms::transformsChain . . . . . . . . . . . . 298
puntoexe::imebra::waveform . . . . . . . . . . . . . . . . . . . . . . . . 319
puntoexe::memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
puntoexe::streamController . . . . . . . . . . . . . . . . . . . . . . . . . 342
puntoexe::streamReader . . . . . . . . . . . . . . . . . . . . . . . . . 354
puntoexe::streamWriter . . . . . . . . . . . . . . . . . . . . . . . . . 359
puntoexe::thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
puntoexe::charsetConversionException . . . . . . . . . . . . . . . . . . . . . 91
puntoexe::charsetConversionExceptionNoSupportedTable . . . . . . . . . 92
puntoexe::charsetConversionExceptionNoTable . . . . . . . . . . . . . . 93

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


9.1 Class Hierarchy 51

puntoexe::charsetConversionExceptionUtfSizeNotSupported . . . . . . . 94
puntoexe::criticalSection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
puntoexe::exceptionInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
puntoexe::imebra::bufferException . . . . . . . . . . . . . . . . . . . . . . . 113
puntoexe::imebra::bufferExceptionUnknownType . . . . . . . . . . . . . 114
puntoexe::imebra::charsetsList::charsetsListException . . . . . . . . . . . . . 116
puntoexe::imebra::charsetsList::charsetListExceptionDiffDefault . . . . . 115
puntoexe::imebra::codecs::codecException . . . . . . . . . . . . . . . . . . . 124
puntoexe::imebra::codecs::codecExceptionCorruptedFile . . . . . . . . . 125
puntoexe::imebra::codecs::codecExceptionWrongFormat . . . . . . . . . 126
puntoexe::imebra::codecs::codecExceptionWrongTransferSyntax . . . . . 127
puntoexe::imebra::codecs::dicomCodecException . . . . . . . . . . . . . 134
puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached 135
puntoexe::imebra::codecs::jpegCodecException . . . . . . . . . . . . . . 138
puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax . . . . . . 137
puntoexe::imebra::dataSetException . . . . . . . . . . . . . . . . . . . . . . 174
puntoexe::imebra::dataSetCorruptedOffsetTable . . . . . . . . . . . . . . 173
puntoexe::imebra::dataSetExceptionDifferentFormat . . . . . . . . . . . 175
puntoexe::imebra::dataSetExceptionOldFormat . . . . . . . . . . . . . . 176
puntoexe::imebra::dataSetExceptionUnknownTransferSyntax . . . . . . . 177
puntoexe::imebra::dataSetExceptionWrongFrame . . . . . . . . . . . . . 178
puntoexe::imebra::dataSetImageDoesntExist . . . . . . . . . . . . . . . . 179
puntoexe::imebra::dicomDictionary . . . . . . . . . . . . . . . . . . . . . . 180
puntoexe::imebra::dicomDirException . . . . . . . . . . . . . . . . . . . . . 188
puntoexe::imebra::dicomDirCircularReferenceException . . . . . . . . . 187
puntoexe::imebra::dicomDirUnknownDirectoryRecordType . . . . . . . . 189
puntoexe::imebra::imageException . . . . . . . . . . . . . . . . . . . . . . . 237
puntoexe::imebra::imageExceptionInvalidSize . . . . . . . . . . . . . . . 238
puntoexe::imebra::imageExceptionUnknownColorSpace . . . . . . . . . 239
puntoexe::imebra::imageExceptionUnknownDepth . . . . . . . . . . . . 240
puntoexe::imebra::lutException . . . . . . . . . . . . . . . . . . . . . . . . . 246
puntoexe::imebra::lutExceptionCorrupted . . . . . . . . . . . . . . . . . 247
puntoexe::imebra::lutExceptionWrongIndex . . . . . . . . . . . . . . . . 248
puntoexe::imebra::transaction . . . . . . . . . . . . . . . . . . . . . . . . . . 249
puntoexe::imebra::transforms::transformException . . . . . . . . . . . . . . 293
puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryException259
puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryExceptionNoTransform260
puntoexe::imebra::transforms::drawBitmapException . . . . . . . . . . . 278
puntoexe::imebra::transforms::drawBitmapExceptionDataSetNotDeclared279
puntoexe::imebra::transforms::drawBitmapExceptionImageNotDeclared280
puntoexe::imebra::transforms::drawBitmapExceptionInvalidAlignByte 281
puntoexe::imebra::transforms::drawBitmapExceptionInvalidArea . . . 282
puntoexe::imebra::transforms::transformExceptionDataInputImageDefined 294
puntoexe::imebra::transforms::transformExceptionDataSetNotDefined . . 295
puntoexe::imebra::transforms::transformExceptionOutputImageNotDefined296
puntoexe::imebra::view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
puntoexe::lockCriticalSection . . . . . . . . . . . . . . . . . . . . . . . . . . 323

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


52 Class Index

puntoexe::lockMultipleObjects . . . . . . . . . . . . . . . . . . . . . . . . . 324
puntoexe::lockObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
puntoexe::memoryPool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
puntoexe::ptr< objectType > . . . . . . . . . . . . . . . . . . . . . . . . . . 336
puntoexe::streamException . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
puntoexe::streamExceptionClose . . . . . . . . . . . . . . . . . . . . . . 348
puntoexe::streamExceptionEOF . . . . . . . . . . . . . . . . . . . . . . 349
puntoexe::streamExceptionOpen . . . . . . . . . . . . . . . . . . . . . . 350
puntoexe::streamExceptionRead . . . . . . . . . . . . . . . . . . . . . . 351
puntoexe::streamExceptionWrite . . . . . . . . . . . . . . . . . . . . . . 352
puntoexe::streamJpegTagInStream . . . . . . . . . . . . . . . . . . . . . 353
puntoexe::threadException . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
puntoexe::threadExceptionAlreadyRunning . . . . . . . . . . . . . . . . 367

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 10

Class Index

10.1 Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
puntoexe::baseObject (This is the base class of the library. Almost all the
classes in the library are derived from this one ) . . . . . . . . . . . 85
puntoexe::baseStream (This class represents a stream (p. 340) ) . . . . . . . 89
puntoexe::charsetConversionException (Base class for the exceptions
thrown by charsetConversion ) . . . . . . . . . . . . . . . . . . . . 91
puntoexe::charsetConversionExceptionNoSupportedTable (Exception
thrown when the requested charset is not supported by the system ) . 92
puntoexe::charsetConversionExceptionNoTable (Exception thrown when
the requested charset is not supported by the DICOM standard ) . . 93
puntoexe::charsetConversionExceptionUtfSizeNotSupported (Exception
thrown when the system doesn’t have a supported size for wchar_t ) 94
puntoexe::criticalSection (This class represents a critical section ) . . . . . . 95
puntoexe::exceptionInfo (This class is used to store the information related
to the points where the exceptions are being caught&thrown ) . . . . 97
puntoexe::exceptionsManager (One statically allocated instance of this
class logs the stack positions while an exception is being processed ) 100
puntoexe::huffmanTable (This class calculates the huffman table from a set
of values and their frequency, and can read or write huffman codes
from/to a baseStream (p. 89) object ) . . . . . . . . . . . . . . . . 103
puntoexe::imebra::buffer (This class manages a memory (p. 328) area con-
taining data (p. 139) in dicom format ) . . . . . . . . . . . . . . . . 107
puntoexe::imebra::bufferException (This is the base class for the excep-
tions thrown by the buffer (p. 107) class ) . . . . . . . . . . . . . . 113
puntoexe::imebra::bufferExceptionUnknownType (This exception is
throw by the buffer (p. 107) when an handler for an unknown data
(p. 139) type is asked ) . . . . . . . . . . . . . . . . . . . . . . . . 114
puntoexe::imebra::charsetsList::charsetListExceptionDiffDefault (This
exception is thrown when a conversion from an unicode string
causes the dicom dataSet (p. 155) to change its default charset ) . . 115
54 Class Index

puntoexe::imebra::charsetsList::charsetsListException (This is the base


class for the exceptions thrown by the class charsetsList ) . . . . . . 116
puntoexe::imebra::codecs::codec (This is the base class for all the imebra
(p. 71) codecs (p. 75) ) . . . . . . . . . . . . . . . . . . . . . . . . 117
puntoexe::imebra::codecs::codecException (This is the base class for the
exceptions thrown by the codec (p. 117) derived classes ) . . . . . . 124
puntoexe::imebra::codecs::codecExceptionCorruptedFile (This excep-
tion is thrown when the file being parsed is corrupted ) . . . . . . . 125
puntoexe::imebra::codecs::codecExceptionWrongFormat (This excep-
tion is thrown when the file being parsed is not valid for the codec
(p. 117) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
puntoexe::imebra::codecs::codecExceptionWrongTransferSyntax (This
exception is thrown when the transfer syntax is not recognized by
the codec (p. 117) ) . . . . . . . . . . . . . . . . . . . . . . . . . . 127
puntoexe::imebra::codecs::codecFactory (This class maintains a list of the
available codecs (p. 75) ) . . . . . . . . . . . . . . . . . . . . . . . 128
puntoexe::imebra::codecs::dicomCodec (The Dicom codec (p. 117) ) . . . 131
puntoexe::imebra::codecs::dicomCodecException (This is the base
class for the exceptions thrown by the dicom codec (p. 117)
(dicomCodec (p. 131)) ) . . . . . . . . . . . . . . . . . . . . . . . 134
puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached
(This exception is thrown when dicomCodec::parseStream
(p. 132) reaches the maximum depth for embedded datasets ) . . . . 135
puntoexe::imebra::codecs::jpegCodec (The Jpeg codec (p. 117) ) . . . . . . 136
puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax (Exception
thrown when the jpeg variant cannot be handled ) . . . . . . . . . . 137
puntoexe::imebra::codecs::jpegCodecException (Base class for the ex-
ceptions thrown by the jpeg codec (p. 117) ) . . . . . . . . . . . . . 138
puntoexe::imebra::data (Represents a single Dicom Tag ) . . . . . . . . . . 139
puntoexe::imebra::dataCollection< collectionType > (This class
stores a collection of Dicom tags or groups (classes pun-
toexe::imebra::data (p. 139) or puntoexe::imebra::dataGroup
(p. 150)). It is used as base class by dataGroup (p. 150) and
dataSet (p. 155) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
puntoexe::imebra::dataCollectionIterator< collectionType > (This class
accesses to all the data stored in a dataCollection (p. 145) derived
class (dataGroup (p. 150) or dataSet (p. 155)) ) . . . . . . . . . . . 147
puntoexe::imebra::dataGroup (Represents a Dicom group which stores a
group of Dicom tags ) . . . . . . . . . . . . . . . . . . . . . . . . . 150
puntoexe::imebra::dataSet (A data (p. 139) set is a collection of groups of
tags (see dataGroup (p. 150)) ) . . . . . . . . . . . . . . . . . . . . 155
puntoexe::imebra::dataSetCorruptedOffsetTable (This exception is
thrown when the basic offset table is corrupted ) . . . . . . . . . . . 173
puntoexe::imebra::dataSetException (This is the base class for the excep-
tions thrown by the dataSet (p. 155) ) . . . . . . . . . . . . . . . . 174
puntoexe::imebra::dataSetExceptionDifferentFormat (This exception is
thrown when the application is trying to store an image (p. 232) in
the dataSet (p. 155) but the dataSet (p. 155) already stores other
images that have different attributes ) . . . . . . . . . . . . . . . . . 175

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


10.1 Class List 55

puntoexe::imebra::dataSetExceptionOldFormat (This exception is


thrown when the application is trying to store an image (p. 232) in
an old Dicom format ) . . . . . . . . . . . . . . . . . . . . . . . . . 176
puntoexe::imebra::dataSetExceptionUnknownTransferSyntax (This ex-
ception is thrown when an unknown transfer syntax is being used
while reading or writing a stream (p. 340) ) . . . . . . . . . . . . . 177
puntoexe::imebra::dataSetExceptionWrongFrame (This exception is
thrown when the application is storing several images in the
dataSet (p. 155) but doesn’t store them in the right order ) . . . . . 178
puntoexe::imebra::dataSetImageDoesntExist (This exception is thrown
when the an image (p. 232) that doesn’t exist is requested ) . . . . . 179
puntoexe::imebra::dicomDictionary (The Dicom Dictionary ) . . . . . . . 180
puntoexe::imebra::dicomDir (A dicomDir (p. 183) object contains the in-
formation about the tree structure of a DICOMDIR dataset ) . . . . 183
puntoexe::imebra::dicomDirCircularReferenceException (This excep-
tion is thrown when a call to dicomDir::setFirstRootRecord()
(p. 185) or directoryRecord::setNextRecord() (p. 193) or
directoryRecord::setFirstChildRecord() (p. 193) or directo-
ryRecord::setReferencedRecord() (p. 193) causes a circular
reference between directoryRecord (p. 190) objects ) . . . . . . . . 187
puntoexe::imebra::dicomDirException (Base class from which the excep-
tions thrown by directoryRecord (p. 190) and dicomDir (p. 183)
derive ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
puntoexe::imebra::dicomDirUnknownDirectoryRecordType
(Exception thrown when an unknown record type
is detected in directoryRecord::getType() (p. 193),
directoryRecord::getTypeString() (p. 193), di-
rectoryRecord::setType() (p. 194) or directo-
ryRecord::setTypeString() (p. 194) ) . . . . . . . . . . . . . . . . 189
puntoexe::imebra::directoryRecord (DirectoryRecord represents a single
record in a DICOMDIR structure (see dicomDir (p. 183)) ) . . . . . 190
puntoexe::imebra::handlers::dataHandler (This is the base class for all
the imebra (p. 71) data (p. 139) handlers (p. 77). A data (p. 139)
handler allows to read/write the data (p. 139) stored in a pun-
toexe::imebra::buffer (p. 107) object without worrying about the
data format ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
puntoexe::imebra::handlers::dataHandlerDate (This data handler is re-
turned by the class buffer (p. 107) when the application wants to
deal with a dicom tag of type "DA" (date) ) . . . . . . . . . . . . . 208
puntoexe::imebra::handlers::dataHandlerDateTimeBase (This class is
used as base class by the handlers (p. 77) that manage the date
and the time ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
puntoexe::imebra::handlers::dataHandlerNumeric< dataHandlerType
> (This data (p. 139) handler accesses to the numeric data (p. 139)
stored in a puntoexe::imebra::buffer (p. 107) class ) . . . . . . . . 211
puntoexe::imebra::handlers::dataHandlerRaw (A dataHandlerRaw
(p. 216) always "sees" the data (p. 139) as a collection of bytes, no
matter what the Dicom data (p. 139) type is ) . . . . . . . . . . . . 216
puntoexe::imebra::handlers::dataHandlerString (This is the base class
for all the data (p. 139) handlers (p. 77) that manage strings ) . . . 217

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


56 Class Index

puntoexe::imebra::handlers::dataHandlerStringAE (Handles the Dicom


data (p. 139) type "AE" (application entity ) . . . . . . . . . . . . . 218
puntoexe::imebra::handlers::dataHandlerStringAS (Handles the Dicom
data (p. 139) type "AS" (age string) ) . . . . . . . . . . . . . . . . 219
puntoexe::imebra::handlers::dataHandlerStringCS (Handles the Dicom
data (p. 139) type "CS" (code string) ) . . . . . . . . . . . . . . . . 224
puntoexe::imebra::handlers::dataHandlerStringDS (Handles the Dicom
type "DS" (decimal string) ) . . . . . . . . . . . . . . . . . . . . . 225
puntoexe::imebra::handlers::dataHandlerStringIS (Handles the Dicom
type "IS" (integer string) ) . . . . . . . . . . . . . . . . . . . . . . 226
puntoexe::imebra::handlers::dataHandlerStringPN (Handles the Dicom
type "PN" (person name) ) . . . . . . . . . . . . . . . . . . . . . . 227
puntoexe::imebra::handlers::dataHandlerStringUnicode (This is the
base class for all the data (p. 139) handlers (p. 77) that manage
strings that need to be converted from different unicode charsets ) . 229
puntoexe::imebra::handlers::dataHandlerTime (This data handler is re-
turned by the class buffer (p. 107) when the application wants to
deal with a dicom tag of type "TM" (time) ) . . . . . . . . . . . . . 230
puntoexe::imebra::image (Represents a single image (p. 232) of a dicom
data (p. 139) set ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
puntoexe::imebra::imageException (This is the base class for the excep-
tions thrown by the image (p. 232) class ) . . . . . . . . . . . . . . 237
puntoexe::imebra::imageExceptionInvalidSize (This exception is thrown
when an invalid size in pixels is specified in the function create() ) . 238
puntoexe::imebra::imageExceptionUnknownColorSpace (This excep-
tion is thrown when an unknown color space is specified in the
function create() ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
puntoexe::imebra::imageExceptionUnknownDepth (This exception is
thrown when an unknown depth is specified as a parameter ) . . . . 240
puntoexe::imebra::lut (Represents a Lookup table (LUT) ) . . . . . . . . . 241
puntoexe::imebra::lutException (This is the base class for the exceptions
thrown by the lut (p. 241) class ) . . . . . . . . . . . . . . . . . . . 246
puntoexe::imebra::lutExceptionCorrupted (This exception is thrown by
the lut (p. 241) class when the the LUT information is corrupted ) . 247
puntoexe::imebra::lutExceptionWrongIndex (This exception is thrown
by the lut (p. 241) class when the wrong index or id is specified
as a parameter ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
puntoexe::imebra::transaction (Represents a single transaction (p. 249) ) . 249
puntoexe::imebra::transforms::colorTransforms::colorTransform (This
is the base class used by the color transforms (p. 79) classes ) . . . 251
puntoexe::imebra::transforms::colorTransforms::colorTransformsFactory
(This class maintains a list of all the available colorTransform
(p. 251) classes and retrieve the most appropriate transform
(p. 285) class (or classes) when a color space conversion is needed ) 253
puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryException
(This is the base class for the exceptions thrown by colorTrans-
formsFactory (p. 253) ) . . . . . . . . . . . . . . . . . . . . . . . . 259

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


10.1 Class List 57

puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryExceptionNoTransform
(This exception is thrown by the function colorTransformsFac-
tory::getTransform() (p. 255) when it cannot find any transform
(p. 285) that can convert the specified color spaces ) . . . . . . . . . 260
puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToMONOCHROME2
(Transforms an image (p. 232) from the colorspace
MONOCHROME1 into the color space MONOCHROME2
) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToRGB
(Transforms an image (p. 232) from the colorspace
MONOCHROME1 into the color space RGB ) . . . . . . . . . . . 262
puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToMONOCHROME1
(Transforms an image (p. 232) from the colorspace
MONOCHROME2 into the color space MONOCHROME1
) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToRGB
(Transforms an image (p. 232) from the colorspace
MONOCHROME2 into the color space RGB ) . . . . . . . . . . . 264
puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToYBRFULL
(Transforms an image (p. 232) from the colorspace
MONOCHROME2 into the color space YBR_FULL ) . . . . . . . 265
puntoexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB
(Transforms an image (p. 232) from the colorspace PALETTE
COLOR into the color space RGB ) . . . . . . . . . . . . . . . . . 266
puntoexe::imebra::transforms::colorTransforms::RGBToMONOCHROME2
(Transforms an image (p. 232) from the colorspace RGB into the
color space MONOCHROME2 ) . . . . . . . . . . . . . . . . . . . 268
puntoexe::imebra::transforms::colorTransforms::RGBToPALETTECOLOR
(Transforms an image (p. 232) from the colorspace RGB into the
color space PALETTE COLOR ) . . . . . . . . . . . . . . . . . . . 269
puntoexe::imebra::transforms::colorTransforms::RGBToYBRFULL
(Transforms an image (p. 232) from the colorspace RGB into the
color space YBR_FULL ) . . . . . . . . . . . . . . . . . . . . . . . 270
puntoexe::imebra::transforms::colorTransforms::RGBToYBRPARTIAL
(Transforms an image (p. 232) from the colorspace RGB into the
color space YBR_PARTIAL ) . . . . . . . . . . . . . . . . . . . . 271
puntoexe::imebra::transforms::colorTransforms::YBRFULLToMONOCHROME2
(Transforms an image (p. 232) from the colorspace YBR_FULL
into the color space MONOCHROME2 ) . . . . . . . . . . . . . . . 272
puntoexe::imebra::transforms::colorTransforms::YBRFULLToRGB
(Transforms an image (p. 232) from the colorspace YBR_FULL
into the color space RGB ) . . . . . . . . . . . . . . . . . . . . . . 273
puntoexe::imebra::transforms::colorTransforms::YBRPARTIALToRGB
(Transforms an image (p. 232) from the colorspace YBR_-
PARTIAL into the color space RGB ) . . . . . . . . . . . . . . . . 274
puntoexe::imebra::transforms::drawBitmap (This transform (p. 285)
takes an image (p. 232) as an input and returns an 8 bit RGB bitmap
of the requested image’s area; the image’s area is expanded or re-
duced to fit into the destination bitmap’s size ) . . . . . . . . . . . . 275

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


58 Class Index

puntoexe::imebra::transforms::drawBitmapException (Base class used


for the exceptions thrown by drawBitmap (p. 275) ) . . . . . . . . 278
puntoexe::imebra::transforms::drawBitmapExceptionDataSetNotDeclared
(This exception is thrown by declareInputImage() if the dataSet
(p. 155) hasn’t been declared yet ) . . . . . . . . . . . . . . . . . . 279
puntoexe::imebra::transforms::drawBitmapExceptionImageNotDeclared
(This exception is thrown by doTransform() if the image (p. 232)
hasn’t been declared yet ) . . . . . . . . . . . . . . . . . . . . . . . 280
puntoexe::imebra::transforms::drawBitmapExceptionInvalidAlignByte
(This exception is thrown by declareBitmapType() if the align byte
is illegal (1, 2 and 4 are the typical values) ) . . . . . . . . . . . . . 281
puntoexe::imebra::transforms::drawBitmapExceptionInvalidArea
(This exception is thrown by declareBitmapType() if the image’s
area that has to be generated is not valid ) . . . . . . . . . . . . . . 282
puntoexe::imebra::transforms::modalityVOILUT (This class trans-
forms (p. 79) the pixel values of the image (p. 232) retrieved from
the dataset into values that are meaningful to th application ) . . . . 283
puntoexe::imebra::transforms::modalityVOILUTInverse (Executes the
inverse modality VOI/LUT transformation (see modalityVOILUT
(p. 283)) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
puntoexe::imebra::transforms::transform (This is the base class for the
transforms (p. 79) ) . . . . . . . . . . . . . . . . . . . . . . . . . . 285
puntoexe::imebra::transforms::transformBuffers (This class is used as a
base class by some transforms (p. 79) that work on the image’s
pixels ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
puntoexe::imebra::transforms::transformBuffersInPlace (This class is
used as a base class by some transforms (p. 79) that work on the
image’s pixels and don’t need two different buffers (input & output)
but can work on a single buffer (p. 107) that contains the input and
output data (p. 139) ) . . . . . . . . . . . . . . . . . . . . . . . . . 291
puntoexe::imebra::transforms::transformBuffersInputOutput (This
class is used as a base class by some transforms (p. 79) that work
on the image’s pixels and need two different buffers (one for the
input image (p. 232) and one for the outpu image (p. 232)) ) . . . . 292
puntoexe::imebra::transforms::transformException (This is the base
class of the exceptions thrown by the classes derived from trans-
form (p. 285) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
puntoexe::imebra::transforms::transformExceptionDataInputImageDefined
(This exception is thrown by a transforms (p. 79) when an in-
put image (p. 232) is required but hasn’t been defined (see
declareInputImage()) ) . . . . . . . . . . . . . . . . . . . . . . . . 294
puntoexe::imebra::transforms::transformExceptionDataSetNotDefined
(This exception is thrown by the transforms (p. 79) that need a
defined dataSet (p. 155) (see declareDataSet()) but don’t have any ) 295
puntoexe::imebra::transforms::transformExceptionOutputImageNotDefined
(This exception is thrown by a transforms (p. 79) when an out-
put image (p. 232) is required but hasn’t been defined (see
declareOutputImage()) ) . . . . . . . . . . . . . . . . . . . . . . . 296
puntoexe::imebra::transforms::transformHighBit (Shift the image’s con-
tent to adapt it to the specified high bit ) . . . . . . . . . . . . . . . 297

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


10.1 Class List 59

puntoexe::imebra::transforms::transformsChain (Executes a sequence


of transforms (p. 79) ) . . . . . . . . . . . . . . . . . . . . . . . . 298
puntoexe::imebra::transforms::VOILUT (Transform the value of the in-
put image’s pixels by using the presentation VOI/LUT defined in
the dataSet (p. 155) ) . . . . . . . . . . . . . . . . . . . . . . . . . 300
puntoexe::imebra::transforms::VOILUTInverse (Execute the inverse of
the transformation executed by VOILUT (p. 300) ) . . . . . . . . . 304
puntoexe::imebra::view (This class can be used as a base class by the win-
dows that need to display a Dicom image (p. 232) ) . . . . . . . . . 305
puntoexe::imebra::waveform (Represents a single waveform (p. 319) of a
dicom dataset ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
puntoexe::lockCriticalSection (This class locks a critical section in the con-
structor and unlocks it in the destructor ) . . . . . . . . . . . . . . . 323
puntoexe::lockMultipleObjects (Locks the access to several objects of type
baseObject (p. 85) ) . . . . . . . . . . . . . . . . . . . . . . . . . . 324
puntoexe::lockObject (Locks the access to an object of type baseObject
(p. 85) ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
puntoexe::memory (This class is used to supply a reference counter to a
string of bytes ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
puntoexe::memoryPool (Stores unused memory (p. 328) objects (see pun-
toexe::memory (p. 328)) so they can be reused when needed ) . . . 332
puntoexe::memoryStream (This class derives from the baseStream (p. 89)
class and implements a memory (p. 328) stream (p. 340) ) . . . . . 334
puntoexe::nullStream (This class derives from the baseStream (p. 89) class
and implements a null stream (p. 340) ) . . . . . . . . . . . . . . . 335
puntoexe::ptr< objectType > (This class must be used to allocate objects
derived from the class baseObject (p. 85) ) . . . . . . . . . . . . . 336
puntoexe::stream (This class derives from the baseStream (p. 89) class and
implements a file stream (p. 340) ) . . . . . . . . . . . . . . . . . . 340
puntoexe::streamController (This class represents a stream (p. 340) con-
troller. A stream (p. 340) controller can read or write data from/to
a stream (p. 340) ) . . . . . . . . . . . . . . . . . . . . . . . . . . 342
puntoexe::streamException (The base exception for all the exceptions
thrown by the function in baseStream (p. 89) ) . . . . . . . . . . . 347
puntoexe::streamExceptionClose (Exception thrown when there are prob-
lems during the closure of the stream (p. 340) ) . . . . . . . . . . . 348
puntoexe::streamExceptionEOF (Exception thrown when an attempt to
read past the end of the file is made ) . . . . . . . . . . . . . . . . . 349
puntoexe::streamExceptionOpen (Exception thrown when the stream
(p. 340) cannot be open ) . . . . . . . . . . . . . . . . . . . . . . . 350
puntoexe::streamExceptionRead (Exception thrown when there is an error
during the read phase ) . . . . . . . . . . . . . . . . . . . . . . . . 351
puntoexe::streamExceptionWrite (Exception thrown when there is an error
during the write phase ) . . . . . . . . . . . . . . . . . . . . . . . . 352
puntoexe::streamJpegTagInStream (Exception thrown when a jpeg tag is
found but wasn’t expected ) . . . . . . . . . . . . . . . . . . . . . . 353
puntoexe::streamReader (Represents a stream (p. 340) reader. A stream
(p. 340) reader can read data from a stream (p. 340). Several
stream (p. 340) readers can share a single baseStream (p. 89) de-
rived object ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


60 Class Index

puntoexe::streamWriter (Use this class to write into a baseStream (p. 89)


derived class ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
puntoexe::thread (This class represents a thread (p. 363) ) . . . . . . . . . . 363
puntoexe::threadException (This is used as the base class for the excep-
tions thrown by the class thread (p. 363) ) . . . . . . . . . . . . . . 366
puntoexe::threadExceptionAlreadyRunning (Exception thrown by
thread (p. 363) when an attempt to run an already running thread
(p. 363) is made ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 11

File Index

11.1 File List

Here is a list of all documented files with brief descriptions:


baseObject.cpp (Implementation of the baseObject class ) . . . . . . . . . . 369
baseObject.h (Declaration of the base classes used by the puntoexe (p. 67)
library ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
baseStream.cpp (Implementation of the baseStream class ) . . . . . . . . . . 371
baseStream.h (Declaration of the the base class for the streams (memory,
file, ...) used by the puntoexe (p. 67) library ) . . . . . . . . . . . . 372
buffer.cpp (Implementation of the buffer class ) . . . . . . . . . . . . . . . . 373
buffer.h (Declaration of the buffer class ) . . . . . . . . . . . . . . . . . . . 375
charsetConversion.cpp (Implementation of the charsetConversion class ) . . 376
charsetConversion.h (Declaration of the class used to convert a string be-
tween different charsets ) . . . . . . . . . . . . . . . . . . . . . . . 377
charsetsList.cpp (Implementation of the basic class for the classes that han-
dles the charsets ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
charsetsList.h (Declaration of the the base class for the classes that need to
be aware of the Dicom charsets ) . . . . . . . . . . . . . . . . . . . 379
codec.cpp (Implementation of the base class for the codecs ) . . . . . . . . . 380
codec.h (Declaration of the base class used by the codecs ) . . . . . . . . . . 381
codecFactory.cpp (Implementation of the codecFactory class ) . . . . . . . . 382
codecFactory.h (Declaration of the class used to retrieve the codec able to
handle the requested transfer syntax ) . . . . . . . . . . . . . . . . 383
colorTransform.cpp (Implementation of the base class for the color trans-
forms ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
colorTransform.h (Declaration of the base class used by all the color trans-
forms ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
colorTransformsFactory.cpp (Implementation of the colorTransformsFac-
tory class ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
colorTransformsFactory.h (Declaration of the class used to retrieve a color
transform able to handle the requested color spaces ) . . . . . . . . 387
62 File Index

configuration.h (Declaration of the basic data types and of the platform flags
(Posix or Windows) ) . . . . . . . . . . . . . . . . . . . . . . . . . 389
criticalSection.cpp (Implementation of the critical sections ) . . . . . . . . . 391
criticalSection.h (Declaration of the functions that handle the the mutexes ) . 392
data.cpp (Implementation of the data class ) . . . . . . . . . . . . . . . . . . 393
data.h (Declaration of class used to store a single tag ) . . . . . . . . . . . . 394
dataCollection.h (Declaration of the base class used by the dataSet and the
dataGroup classes ) . . . . . . . . . . . . . . . . . . . . . . . . . . 395
dataGroup.cpp (Implementation of the dataGroup class ) . . . . . . . . . . . 396
dataGroup.h (Declaration of the class used to store a single dicom group ) . 397
dataHandler.cpp (Implementation of the base class for the data handlers ) . . 398
dataHandler.h (Declaration of the base class used by all the data handlers ) . 399
dataHandlerDate.cpp (Implementation of the dataHandlerDate class ) . . . 400
dataHandlerDate.h (Declaration of the data handler able to handle the di-
com tags of type "DA" (date) ) . . . . . . . . . . . . . . . . . . . . 401
dataHandlerDateTime.cpp (Implementation of the dataHandlerDateTime
class ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
dataHandlerDateTime.h (Declaration of the handler for the date and time ) . 403
dataHandlerDateTimeBase.cpp (Implementation of the base class for the
date/time handlers ) . . . . . . . . . . . . . . . . . . . . . . . . . . 404
dataHandlerDateTimeBase.h (Declaration of the base class for the time/-
date handlers ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
dataHandlerNumeric.h (Declaration of the handler for the numeric tags ) . . 406
dataHandlerString.cpp (Implementation of the base class for the string han-
dlers ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
dataHandlerString.h (Declaration of the base class used by the string han-
dlers ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
dataHandlerStringAE.cpp (Implementation of the class dataHandler-
StringAE ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
dataHandlerStringAE.h (Declaration of the class dataHandlerStringAE ) . . 410
dataHandlerStringAS.cpp (Implementation of the class dataHandler-
StringAS ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
dataHandlerStringAS.h (Declaration of the class dataHandlerStringAS ) . . 412
dataHandlerStringCS.cpp (Implementation of the class dataHandler-
StringCS ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
dataHandlerStringCS.h (Declaration of the class dataHandlerStringCS ) . . 414
dataHandlerStringDS.cpp (Implementation of the class dataHandler-
StringDS ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
dataHandlerStringDS.h (Declaration of the class dataHandlerStringDS ) . . 416
dataHandlerStringIS.cpp (Implementation of the class dataHandler-
StringIS ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
dataHandlerStringIS.h (Declaration of the class dataHandlerStringIS ) . . . 418
dataHandlerStringLO.cpp (Implementation of the class dataHandler-
StringLO ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
dataHandlerStringLO.h (Declaration of the class dataHandlerStringLO ) . . 420
dataHandlerStringLT.cpp (Implementation of the class dataHandler-
StringLT ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
dataHandlerStringLT.h (Declaration of the class dataHandlerStringLT ) . . 422
dataHandlerStringPN.cpp (Implementation of the class dataHandler-
StringPN ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


11.1 File List 63

dataHandlerStringPN.h (Declaration of the class dataHandlerStringPN ) . . 424


dataHandlerStringSH.cpp (Implementation of the class dataHandler-
StringSH ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
dataHandlerStringSH.h (Declaration of the class dataHandlerStringSH ) . . 426
dataHandlerStringST.cpp (Implementation of the class dataHandler-
StringST ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
dataHandlerStringST.h (Declaration of the class dataHandlerStringST ) . . 428
dataHandlerStringUI.cpp (Implementation of the class dataHandler-
StringUI ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
dataHandlerStringUI.h (Declaration of the class dataHandlerStringUI ) . . . 430
dataHandlerStringUnicode.cpp (Implementation of the base class used by
the string handlers that need to handle several charsets ) . . . . . . . 431
dataHandlerStringUnicode.h (Declaration of the base class used by the
string handlers that need to work with different charsets ) . . . . . . 432
dataHandlerStringUT.cpp (Implementation of the class dataHandler-
StringUT ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
dataHandlerStringUT.h (Declaration of the class dataHandlerStringUT ) . . 434
dataHandlerTime.cpp (Implementation of the class dataHandlerTime ) . . . 435
dataHandlerTime.h (Declaration of the class dataHandlerTime ) . . . . . . . 436
dataSet.cpp (Implementation of the class dataSet ) . . . . . . . . . . . . . . 437
dataSet.h (Declaration of the class dataSet ) . . . . . . . . . . . . . . . . . . 438
dicomCodec.cpp (Implementation of the class dicomCodec ) . . . . . . . . . 440
dicomCodec.h (Declaration of the class dicomCodec ) . . . . . . . . . . . . 441
dicomDict.cpp (Implementation of the class dicomDict ) . . . . . . . . . . . 443
dicomDict.h (Declaration of the class dicomDict ) . . . . . . . . . . . . . . . 444
dicomDir.cpp (Implementation of the classes dicomDir and directoryRecord ) 445
dicomDir.h (Declaration of the classes that parse/create a DICOMDIR struc-
ture (dicomDir and directoryRecord) ) . . . . . . . . . . . . . . . . 446
drawBitmap.cpp (Implementation of the transform drawBitmap ) . . . . . . 448
drawBitmap.h (Declaration of the a class that draw an image into a bitmap ) 449
exception.cpp (Implementation of the exception classes ) . . . . . . . . . . . 451
exception.h (Defines the classes and the macros used to handle the excep-
tions in the library ) . . . . . . . . . . . . . . . . . . . . . . . . . . 452
huffmanTable.cpp (Implementation of the huffman codec ) . . . . . . . . . 456
huffmanTable.h (Declaration of the huffman codec ) . . . . . . . . . . . . . 457
image.cpp (Implementation of the class image ) . . . . . . . . . . . . . . . . 458
image.h (Declaration of the class image ) . . . . . . . . . . . . . . . . . . . 459
imebra.h (Includes all the headers needed to build an application that uses
imebra ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
jpegCodec.cpp (Implementation of the class jpegCodec ) . . . . . . . . . . . 464
jpegCodec.h (Declaration of the class jpegCodec ) . . . . . . . . . . . . . . 465
LUT.cpp (Implementation of the class lut ) . . . . . . . . . . . . . . . . . . 466
LUT.h (Declaration of the class lut ) . . . . . . . . . . . . . . . . . . . . . . 467
memory.cpp (Implementation of the memory manager and the memory class )468
memory.h (Declaration of the memory manager and the memory class ) . . . 469
memoryStream.cpp (Implementation of the memoryStream class ) . . . . . 470
memoryStream.h (Declaration of the memoryStream class ) . . . . . . . . . 471
modalityVOILUT.cpp (Implementation of the class modalityVOILUT ) . . . 472
modalityVOILUT.h (Declaration of the class modalityVOILUT ) . . . . . . 473

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


64 File Index

MONOCHROME1ToMONOCHROME2.cpp (Implementation of the


classes for conversion between 2 monochrome color spaces ) . . . . 474
MONOCHROME1ToMONOCHROME2.h (Declaration of the class
MONOCHROME1ToMONOCHROME2 ) . . . . . . . . . . . . . 475
MONOCHROME1ToRGB.cpp (Implementation of the class
MONOCHROME1ToRGB ) . . . . . . . . . . . . . . . . . . . . . 476
MONOCHROME1ToRGB.h (Declaration of the class
MONOCHROME1ToRGB ) . . . . . . . . . . . . . . . . . . . . . 477
MONOCHROME2ToRGB.cpp (Implementation of the class
MONOCHROME2ToRGB ) . . . . . . . . . . . . . . . . . . . . . 478
MONOCHROME2ToRGB.h (Declaration of the class
MONOCHROME2ToRGB ) . . . . . . . . . . . . . . . . . . . . . 479
MONOCHROME2ToYBRFULL.cpp (Implementation of the class
MONOCHROMEToYBRFULL ) . . . . . . . . . . . . . . . . . . 480
MONOCHROME2ToYBRFULL.h (Declaration of the class
MONOCHROME2ToYBRFULL ) . . . . . . . . . . . . . . . . . . 481
nullStream.h (Declaration of the nullStream class ) . . . . . . . . . . . . . . 482
PALETTECOLORToRGB.cpp (Implementation of the class PALETTE-
COLORToRGB ) . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
PALETTECOLORToRGB.h (Declaration of the class PALETTECOLOR-
ToRGB ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
RGBToMONOCHROME2.cpp (Implementation of the class RG-
BToMONOCHROME2 ) . . . . . . . . . . . . . . . . . . . . . . . 485
RGBToMONOCHROME2.h (Declaration of the class RG-
BToMONOCHROME2 ) . . . . . . . . . . . . . . . . . . . . . . . 486
RGBToPALETTECOLOR.cpp (Implementation of the class RG-
BToPALETTECOLOR ) . . . . . . . . . . . . . . . . . . . . . . . 487
RGBToPALETTECOLOR.h (Declaration of the class RGBToPALETTE-
COLOR ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
RGBToYBRFULL.cpp (Implementation of the class RGBToYBRFULL ) . . 489
RGBToYBRFULL.h (Declaration of the class RGBToYBRFULL ) . . . . . 490
RGBToYBRPARTIAL.cpp (Implementation of the class RGBToYBRPAR-
TIAL ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
RGBToYBRPARTIAL.h (Declaration of the class RGBToYBRPARTIAL ) . 492
stream.cpp (Implementation of the stream class ) . . . . . . . . . . . . . . . 493
stream.h (Declaration of the stream class ) . . . . . . . . . . . . . . . . . . . 494
streamController.cpp (Implementation of the streamController class ) . . . . 495
streamController.h (Declaration of the the class used to control the streams ) 496
streamReader.cpp (Implementation of the streamReader class ) . . . . . . . 497
streamReader.h (Declaration of the the class used to read the streams ) . . . 498
streamWriter.cpp (Implementation of the streamWriter class ) . . . . . . . . 499
streamWriter.h (Declaration of the the class used to write the streams ) . . . 500
thread.cpp (Implementation of the thread-related functions ) . . . . . . . . . 501
thread.h (Declaration of a class that represents the threads ) . . . . . . . . . 502
transaction.cpp (Implementation of the class transaction ) . . . . . . . . . . 503
transaction.h (Declaration of the classes that allow to use the transactions
on the writing handlers (see dataHandler) ) . . . . . . . . . . . . . . 504
transform.cpp (Implementation of the base class used by the transforms ) . . 507
transform.h (Declaration of the base class used by all the transforms ) . . . . 508
transformBuffers.cpp (Implementation of the class transformBuffers ) . . . 510

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


11.1 File List 65

transformBuffers.h (Declaration of the class transformBuffers ) . . . . . . . 511


transformHighBit.cpp (Implementation of the class transformHighBit ) . . . 512
transformHighBit.h (Declaration of the class transformHighBit ) . . . . . . 513
transformsChain.cpp (Implementation of the class transformsChain ) . . . . 514
transformsChain.h (Declaration of the class transformsChain ) . . . . . . . 515
viewHelper.cpp (Implementation of the class view ) . . . . . . . . . . . . . 516
viewHelper.h (Declaration of the a class that help a view or window class to
draw a dicom image on the screen ) . . . . . . . . . . . . . . . . . 517
VOILUT.cpp (Implementation of the class VOILUT ) . . . . . . . . . . . . 518
VOILUT.h (Declaration of the class VOILUT ) . . . . . . . . . . . . . . . . 519
waveform.cpp (Implementation of the class waveform ) . . . . . . . . . . . 520
waveform.h (Declaration of the class waveform ) . . . . . . . . . . . . . . . 521
YBRFULLToMONOCHROME2.cpp (Implementation of the class YBR-
FULLToMONOCHROME2 ) . . . . . . . . . . . . . . . . . . . . . 522
YBRFULLToMONOCHROME2.h (Declaration of the class YBRFULL-
ToMONOCHROME2 ) . . . . . . . . . . . . . . . . . . . . . . . . 523
YBRFULLToRGB.cpp (Implementation of the class YBRFULLToRGB ) . . 524
YBRFULLToRGB.h (Declaration of the class YBRFULLToRGB ) . . . . . 525
YBRPARTIALToRGB.cpp (Implementation of the class YBRPARTIAL-
ToRGB ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526
YBRPARTIALToRGB.h (Declaration of the class YBRPARTIALToRGB ) . 527

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


66 File Index

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 12

Namespace Documentation

12.1 puntoexe Namespace Reference


The base services and classes are defined in this namespace.

Namespaces
• namespace imebra
All the functions related to the dicom standard are defined in this namespace.

Classes
• class ptr
This class must be used to allocate objects derived from the class baseObject (p. 85).

• class baseObject
This is the base class of the library. Almost all the classes in the library are derived
from this one.

• class lockObject
Locks the access to an object of type baseObject (p. 85).

• class lockMultipleObjects
Locks the access to several objects of type baseObject (p. 85).

• class baseStream
This class represents a stream (p. 340).

• class streamException
The base exception for all the exceptions thrown by the function in baseStream (p. 89).
68 Namespace Documentation

• class streamExceptionOpen
Exception thrown when the stream (p. 340) cannot be open.

• class streamExceptionRead
Exception thrown when there is an error during the read phase.

• class streamExceptionWrite
Exception thrown when there is an error during the write phase.

• class streamExceptionClose
Exception thrown when there are problems during the closure of the stream (p. 340).

• class charsetConversionException
Base class for the exceptions thrown by charsetConversion.

• class charsetConversionExceptionNoTable
Exception thrown when the requested charset is not supported by the DICOM stan-
dard.

• class charsetConversionExceptionNoSupportedTable
Exception thrown when the requested charset is not supported by the system.

• class charsetConversionExceptionUtfSizeNotSupported
Exception thrown when the system doesn’t have a supported size for wchar_t.

• class criticalSection
This class represents a critical section.

• class lockCriticalSection
This class locks a critical section in the constructor and unlocks it in the destructor.

• class exceptionInfo
This class is used to store the information related to the points where the exceptions
are being caught&thrown.

• class exceptionsManager
One statically allocated instance of this class logs the stack positions while an excep-
tion is being processed.

• class huffmanTable
This class calculates the huffman table from a set of values and their frequency, and
can read or write huffman codes from/to a baseStream (p. 89) object.

• class memory
This class is used to supply a reference counter to a string of bytes.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


12.1 puntoexe Namespace Reference 69

• class memoryPool
Stores unused memory (p. 328) objects (see puntoexe::memory (p. 328)) so they can
be reused when needed.

• class memoryStream
This class derives from the baseStream (p. 89) class and implements a memory
(p. 328) stream (p. 340).

• class nullStream
This class derives from the baseStream (p. 89) class and implements a null stream
(p. 340).

• class stream
This class derives from the baseStream (p. 89) class and implements a file stream
(p. 340).

• class streamController
This class represents a stream (p. 340) controller. A stream (p. 340) controller can
read or write data from/to a stream (p. 340).

• class streamExceptionEOF
Exception thrown when an attempt to read past the end of the file is made.

• class streamJpegTagInStream
Exception thrown when a jpeg tag is found but wasn’t expected.

• class streamReader
Represents a stream (p. 340) reader. A stream (p. 340) reader can read data from
a stream (p. 340). Several stream (p. 340) readers can share a single baseStream
(p. 89) derived object.

• class streamWriter
Use this class to write into a baseStream (p. 89) derived class.

• class thread
This class represents a thread (p. 363).

• class threadException
This is used as the base class for the exceptions thrown by the class thread (p. 363).

• class threadExceptionAlreadyRunning
Exception thrown by thread (p. 363) when an attempt to run an already running
thread (p. 363) is made.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


70 Namespace Documentation

12.1.1 Detailed Description

The base services and classes are defined in this namespace.


Other namespace in the library are usually children of this namespace.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


12.2 puntoexe::imebra Namespace Reference 71

12.2 puntoexe::imebra Namespace Reference


All the functions related to the dicom standard are defined in this namespace.

Namespaces
• namespace codecs
This namespace is used to define the classes that implement a codec (p. 117) and their
helper classes.

• namespace handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

• namespace transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

Classes
• class buffer
This class manages a memory (p. 328) area containing data (p. 139) in dicom format.

• class bufferException
This is the base class for the exceptions thrown by the buffer (p. 107) class.

• class bufferExceptionUnknownType
This exception is throw by the buffer (p. 107) when an handler for an unknown data
(p. 139) type is asked.

• class data
Represents a single Dicom Tag.

• class dataCollectionIterator
This class accesses to all the data stored in a dataCollection (p. 145) derived class
(dataGroup (p. 150) or dataSet (p. 155)).

• class dataCollection
This class stores a collection of Dicom tags or groups (classes pun-
toexe::imebra::data (p. 139) or puntoexe::imebra::dataGroup (p. 150)). It is used
as base class by dataGroup (p. 150) and dataSet (p. 155).

• class dataGroup
Represents a Dicom group which stores a group of Dicom tags.

• class dataSet

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


72 Namespace Documentation

A data (p. 139) set is a collection of groups of tags (see dataGroup (p. 150)).

• class dataSetException
This is the base class for the exceptions thrown by the dataSet (p. 155).

• class dataSetExceptionDifferentFormat
This exception is thrown when the application is trying to store an image (p. 232) in
the dataSet (p. 155) but the dataSet (p. 155) already stores other images that have
different attributes.

• class dataSetExceptionUnknownTransferSyntax
This exception is thrown when an unknown transfer syntax is being used while reading
or writing a stream (p. 340).

• class dataSetExceptionWrongFrame
This exception is thrown when the application is storing several images in the dataSet
(p. 155) but doesn’t store them in the right order.

• class dataSetExceptionOldFormat
This exception is thrown when the application is trying to store an image (p. 232) in
an old Dicom format.

• class dataSetImageDoesntExist
This exception is thrown when the an image (p. 232) that doesn’t exist is requested.

• class dataSetCorruptedOffsetTable
This exception is thrown when the basic offset table is corrupted.

• class dicomDictionary
The Dicom Dictionary.

• class directoryRecord
directoryRecord (p. 190) represents a single record in a DICOMDIR structure (see
dicomDir (p. 183)).

• class dicomDir
A dicomDir (p. 183) object contains the information about the tree structure of a
DICOMDIR dataset.

• class dicomDirException
Base class from which the exceptions thrown by directoryRecord (p. 190) and di-
comDir (p. 183) derive.

• class dicomDirCircularReferenceException
This exception is thrown when a call to dicomDir::setFirstRootRecord()
(p. 185) or directoryRecord::setNextRecord() (p. 193) or di-
rectoryRecord::setFirstChildRecord() (p. 193) or directo-
ryRecord::setReferencedRecord() (p. 193) causes a circular reference between
directoryRecord (p. 190) objects.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


12.2 puntoexe::imebra Namespace Reference 73

• class dicomDirUnknownDirectoryRecordType
Exception thrown when an unknown record type is detected in directo-
ryRecord::getType() (p. 193), directoryRecord::getTypeString() (p. 193), directo-
ryRecord::setType() (p. 194) or directoryRecord::setTypeString() (p. 194).

• class image
Represents a single image (p. 232) of a dicom data (p. 139) set.

• class imageException
This is the base class for the exceptions thrown by the image (p. 232) class.

• class imageExceptionUnknownDepth
This exception is thrown when an unknown depth is specified as a parameter.

• class imageExceptionUnknownColorSpace
This exception is thrown when an unknown color space is specified in the function
create().

• class imageExceptionInvalidSize
This exception is thrown when an invalid size in pixels is specified in the function
create().

• class lut
Represents a Lookup table (LUT).

• class lutException
This is the base class for the exceptions thrown by the lut (p. 241) class.

• class lutExceptionWrongIndex
This exception is thrown by the lut (p. 241) class when the wrong index or id is speci-
fied as a parameter.

• class lutExceptionCorrupted
This exception is thrown by the lut (p. 241) class when the the LUT information is
corrupted.

• class transaction
Represents a single transaction (p. 249).

• class view
This class can be used as a base class by the windows that need to display a Dicom
image (p. 232).

• class waveform
Represents a single waveform (p. 319) of a dicom dataset.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


74 Namespace Documentation

12.2.1 Detailed Description

All the functions related to the dicom standard are defined in this namespace.
Some of the classes are grouped in namespaces that are children of this one (like
puntoexe::imebra::codecs (p. 75), puntoexe::imebra::handlers (p. 77) and pun-
toexe::imebra::transforms (p. 79)).
The functions in this namespace may use some classes defined in the parent namespace
puntoexe (p. 67).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


12.3 puntoexe::imebra::codecs Namespace Reference 75

12.3 puntoexe::imebra::codecs Namespace Reference


This namespace is used to define the classes that implement a codec (p. 117) and their
helper classes.

Classes
• class codec
This is the base class for all the imebra (p. 71) codecs (p. 75).

• class codecException
This is the base class for the exceptions thrown by the codec (p. 117) derived classes.

• class codecExceptionWrongFormat
This exception is thrown when the file being parsed is not valid for the codec (p. 117).

• class codecExceptionCorruptedFile
This exception is thrown when the file being parsed is corrupted.

• class codecExceptionWrongTransferSyntax
This exception is thrown when the transfer syntax is not recognized by the codec
(p. 117).

• class codecFactory
This class maintains a list of the available codecs (p. 75).

• class dicomCodec
The Dicom codec (p. 117).

• class dicomCodecException
This is the base class for the exceptions thrown by the dicom codec (p. 117) (dicom-
Codec (p. 131)).

• class dicomCodecExceptionDepthLimitReached
This exception is thrown when dicomCodec::parseStream (p. 132) reaches the maxi-
mum depth for embedded datasets.

• class jpegCodec
The Jpeg codec (p. 117).

• class jpegCodecException
Base class for the exceptions thrown by the jpeg codec (p. 117).

• class jpegCodecCannotHandleSyntax
Exception thrown when the jpeg variant cannot be handled.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


76 Namespace Documentation

12.3.1 Detailed Description

This namespace is used to define the classes that implement a codec (p. 117) and their
helper classes.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


12.4 puntoexe::imebra::handlers Namespace Reference 77

12.4 puntoexe::imebra::handlers Namespace Refer-


ence
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

Classes
• class dataHandler
This is the base class for all the imebra (p. 71) data (p. 139) handlers (p. 77).
A data (p. 139) handler allows to read/write the data (p. 139) stored in a pun-
toexe::imebra::buffer (p. 107) object without worrying about the data format.

• class dataHandlerDate
This data handler is returned by the class buffer (p. 107) when the application wants
to deal with a dicom tag of type "DA" (date).

• class dataHandlerDateTimeBase
This class is used as base class by the handlers (p. 77) that manage the date and the
time.

• class dataHandlerNumeric
This data (p. 139) handler accesses to the numeric data (p. 139) stored in a pun-
toexe::imebra::buffer (p. 107) class.

• class dataHandlerRaw
A dataHandlerRaw (p. 216) always "sees" the data (p. 139) as a collection of bytes,
no matter what the Dicom data (p. 139) type is.

• class dataHandlerString
This is the base class for all the data (p. 139) handlers (p. 77) that manage strings.

• class dataHandlerStringAE
Handles the Dicom data (p. 139) type "AE" (application entity.

• class dataHandlerStringAS
Handles the Dicom data (p. 139) type "AS" (age string).

• class dataHandlerStringCS
Handles the Dicom data (p. 139) type "CS" (code string).

• class dataHandlerStringDS
Handles the Dicom type "DS" (decimal string).

• class dataHandlerStringIS
Handles the Dicom type "IS" (integer string).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


78 Namespace Documentation

• class dataHandlerStringPN
Handles the Dicom type "PN" (person name).

• class dataHandlerStringUnicode
This is the base class for all the data (p. 139) handlers (p. 77) that manage strings
that need to be converted from different unicode charsets.

• class dataHandlerTime
This data handler is returned by the class buffer (p. 107) when the application wants
to deal with a dicom tag of type "TM" (time).

Typedefs
• typedef dataHandlerNumeric< imbxInt32 > imageHandler
Represents an handler specialized to work with the image (p. 232) data (p. 139).

12.4.1 Detailed Description

All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

12.4.2 Typedef Documentation

12.4.2.1 typedef dataHandlerNumeric<imbxInt32>


puntoexe::imebra::handlers::imageHandler

Represents an handler specialized to work with the image (p. 232) data (p. 139).
The image (p. 232) data (p. 139) is always interleaved and is never subsampled.
The application never needs to resize the data (p. 139) managed by this handler because
the image (p. 232) object does this.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


12.5 puntoexe::imebra::transforms Namespace Reference 79

12.5 puntoexe::imebra::transforms Namespace Refer-


ence
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

Namespaces
• namespace colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

Classes
• class drawBitmap
This transform (p. 285) takes an image (p. 232) as an input and returns an 8 bit RGB
bitmap of the requested image’s area; the image’s area is expanded or reduced to fit
into the destination bitmap’s size.

• class drawBitmapException
Base class used for the exceptions thrown by drawBitmap (p. 275).

• class drawBitmapExceptionDataSetNotDeclared
This exception is thrown by declareInputImage() if the dataSet (p. 155) hasn’t been
declared yet.

• class drawBitmapExceptionImageNotDeclared
This exception is thrown by doTransform() if the image (p. 232) hasn’t been declared
yet.

• class drawBitmapExceptionInvalidArea
This exception is thrown by declareBitmapType() if the image’s area that has to be
generated is not valid.

• class drawBitmapExceptionInvalidAlignByte
This exception is thrown by declareBitmapType() if the align byte is illegal (1, 2 and
4 are the typical values).

• class modalityVOILUT
This class transforms (p. 79) the pixel values of the image (p. 232) retrieved from the
dataset into values that are meaningful to th application.

• class modalityVOILUTInverse
Executes the inverse modality VOI/LUT transformation (see modalityVOILUT
(p. 283)).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


80 Namespace Documentation

• class transform
This is the base class for the transforms (p. 79).

• class transformException
This is the base class of the exceptions thrown by the classes derived from transform
(p. 285).

• class transformExceptionDataSetNotDefined
This exception is thrown by the transforms (p. 79) that need a defined dataSet (p. 155)
(see declareDataSet()) but don’t have any.

• class transformExceptionDataInputImageDefined
This exception is thrown by a transforms (p. 79) when an input image (p. 232) is
required but hasn’t been defined (see declareInputImage()).

• class transformExceptionOutputImageNotDefined
This exception is thrown by a transforms (p. 79) when an output image (p. 232) is
required but hasn’t been defined (see declareOutputImage()).

• class transformBuffers
This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels.

• class transformBuffersInputOutput
This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels and need two different buffers (one for the input image (p. 232) and one for the
outpu image (p. 232)).

• class transformBuffersInPlace
This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels and don’t need two different buffers (input & output) but can work on a single
buffer (p. 107) that contains the input and output data (p. 139).

• class transformHighBit
Shift the image’s content to adapt it to the specified high bit.

• class transformsChain
Executes a sequence of transforms (p. 79).

• class VOILUT
Transform the value of the input image’s pixels by using the presentation VOI/LUT
defined in the dataSet (p. 155).

• class VOILUTInverse
Execute the inverse of the transformation executed by VOILUT (p. 300).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


12.5 puntoexe::imebra::transforms Namespace Reference 81

12.5.1 Detailed Description

This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.
A transform (p. 285) is an object that takes some images as input parameters and
returns some images as a result of a transformation or analysis.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


82 Namespace Documentation

12.6 puntoexe::imebra::transforms::colorTransforms
Namespace Reference
This namespace contains all the classes involved in the transformation between several
color spaces.

Classes
• class colorTransform
This is the base class used by the color transforms (p. 79) classes.

• class colorTransformsFactory
This class maintains a list of all the available colorTransform (p. 251) classes and
retrieve the most appropriate transform (p. 285) class (or classes) when a color space
conversion is needed.

• class colorTransformsFactoryException
This is the base class for the exceptions thrown by colorTransformsFactory (p. 253).

• class colorTransformsFactoryExceptionNoTransform
This exception is thrown by the function colorTransformsFactory::getTransform()
(p. 255) when it cannot find any transform (p. 285) that can convert the specified
color spaces.

• class MONOCHROME1ToMONOCHROME2
Transforms an image (p. 232) from the colorspace MONOCHROME1 into the color
space MONOCHROME2.

• class MONOCHROME2ToMONOCHROME1
Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space MONOCHROME1.

• class MONOCHROME1ToRGB
Transforms an image (p. 232) from the colorspace MONOCHROME1 into the color
space RGB.

• class MONOCHROME2ToRGB
Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space RGB.

• class MONOCHROME2ToYBRFULL
Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space YBR_FULL.

• class PALETTECOLORToRGB
Transforms an image (p. 232) from the colorspace PALETTE COLOR into the color
space RGB.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


12.6 puntoexe::imebra::transforms::colorTransforms Namespace Reference 83

• class RGBToMONOCHROME2
Transforms an image (p. 232) from the colorspace RGB into the color space
MONOCHROME2.

• class RGBToPALETTECOLOR
Transforms an image (p. 232) from the colorspace RGB into the color space
PALETTE COLOR.

• class RGBToYBRFULL
Transforms an image (p. 232) from the colorspace RGB into the color space YBR_-
FULL.

• class RGBToYBRPARTIAL
Transforms an image (p. 232) from the colorspace RGB into the color space YBR_-
PARTIAL.

• class YBRFULLToMONOCHROME2
Transforms an image (p. 232) from the colorspace YBR_FULL into the color space
MONOCHROME2.

• class YBRFULLToRGB
Transforms an image (p. 232) from the colorspace YBR_FULL into the color space
RGB.

• class YBRPARTIALToRGB
Transforms an image (p. 232) from the colorspace YBR_PARTIAL into the color space
RGB.

12.6.1 Detailed Description

This namespace contains all the classes involved in the transformation between several
color spaces.
The color transformation is performed on images (see puntoexe::imebra::image
(p. 232)).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


84 Namespace Documentation

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 13

Class Documentation

13.1 puntoexe::baseObject Class Reference

This is the base class of the library. Almost all the classes in the library are derived
from this one.
#include <baseObject.h>
Inheritance diagram for puntoexe::baseObject::
86 Class Documentation

puntoexe::baseObject

puntoexe::imebra::dataCollection< data >

puntoexe::imebra::dataCollection< dataGroup >

puntoexe::baseStream

puntoexe::exceptionsManager

puntoexe::huffmanTable

puntoexe::imebra::buffer

puntoexe::imebra::codecs::codec

puntoexe::imebra::codecs::codecFactory

puntoexe::imebra::data

puntoexe::imebra::dataCollection< collectionType >

puntoexe::imebra::dataCollectionIterator< collectionType >

puntoexe::imebra::dicomDir

puntoexe::imebra::directoryRecord

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::image

puntoexe::imebra::lut

puntoexe::imebra::transforms::colorTransforms::colorTransformsFactory

puntoexe::imebra::transforms::transform

puntoexe::imebra::waveform

puntoexe::memory

puntoexe::streamController

puntoexe::thread

Public Member Functions


• baseObject ()
Creates the baseObject (p. 85) object. The reference counter is set to 0.

• baseObject (const ptr< baseObject > &externalLock)


Creates the baseObject (p. 85) object and set an external object to be used for the
lock. The reference counter is set to 0.

• bool isReferencedOnce ()
Returns one if the reference count is set to 1.

13.1.1 Detailed Description

This is the base class of the library. Almost all the classes in the library are derived
from this one.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.1 puntoexe::baseObject Class Reference 87

The class supplies a basic mechanism for multithrading locking and a reference
counter, used by the helper class ptr (p. 336).
At construction time the reference counter is set to 0 and must be incremented with
addRef(); the helper class ptr (p. 336) does this automatically.
Use release() to decrement the reference counter.
The object automatically destroy itself when the reference counter reaches 0, but only
if the function preDelete() returns true.
An object of type baseObject (p. 85) should never be deleted using the C++ statement
"delete".
In order to manage the reference counter easily your application should use the objects
derived from baseObject (p. 85) through the helper class ptr (p. 336).
The locking mechanism is exposed through the class lockObject (p. 326).

13.1.2 Constructor & Destructor Documentation

13.1.2.1 puntoexe::baseObject::baseObject ()

Creates the baseObject (p. 85) object. The reference counter is set to 0.
The object should be unallocated by the release() function, not by deleting it using the
C++ instruction delete.
In order to avoid mistakes and memory (p. 328) leaks, objects derived from baseOb-
ject (p. 85) should be assigned to a ptr (p. 336) object.

13.1.2.2 puntoexe::baseObject::baseObject (const ptr< baseObject > &


externalLock)

Creates the baseObject (p. 85) object and set an external object to be used for the lock.
The reference counter is set to 0.
The object should be unallocated by the release() function, not by deleting it using the
C++ instruction delete.
In order to avoid mistakes and memory (p. 328) leaks, objects derived from baseOb-
ject (p. 85) should be assigned to a ptr (p. 336) object.

Parameters:
externalLock a pointer to the object to use to lock this one

13.1.3 Member Function Documentation

13.1.3.1 bool puntoexe::baseObject::isReferencedOnce ()

Returns one if the reference count is set to 1.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


88 Class Documentation

Returns:
true if the reference counter is set to 1

The documentation for this class was generated from the following files:

• baseObject.h
• baseObject.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.2 puntoexe::baseStream Class Reference 89

13.2 puntoexe::baseStream Class Reference


This class represents a stream (p. 340).
#include <baseStream.h>
Inheritance diagram for puntoexe::baseStream::

puntoexe::baseObject

puntoexe::baseStream

puntoexe::memoryStream puntoexe::nullStream puntoexe::stream

Public Member Functions

• virtual void write (imbxUint32 startPosition, const imbxUint8 ∗pBuffer, im-


bxUint32 bufferLength)=0
Writes raw data into the stream (p. 340).

• virtual imbxUint32 read (imbxUint32 startPosition, imbxUint8 ∗pBuffer, im-


bxUint32 bufferLength)=0
Read raw data from the stream (p. 340).

13.2.1 Detailed Description

This class represents a stream (p. 340).


Specialized classes derived from this class can read/write from/to files stored on the
computer’s disks, on the network or in memory (p. 328).
The application can read or write into the stream (p. 340) by using the streamReader
(p. 354) or the streamWriter (p. 359).
While this class can be used across several threads, the streamReader (p. 354) and
the streamWriter (p. 359) can be used in one thread (p. 363) only. This is not a
big deal, since one stream (p. 340) can be connected to several streamReaders and
streamWriters.
The library supplies two specialized streams derived from this class:

• puntoexe::stream (p. 340) (used to read or write into physical files)

• puntoexe::memoryStream (p. 334) (used to read or write into pun-


toexe::memory (p. 328) objects)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


90 Class Documentation

13.2.2 Member Function Documentation

13.2.2.1 virtual imbxUint32 puntoexe::baseStream::read (imbxUint32


startPosition, imbxUint8 ∗ pBuffer, imbxUint32 bufferLength)
[pure virtual]

Read raw data from the stream (p. 340).


The function is multithreading-safe and is called by the streamReader (p. 354) class
when its buffer has to be refilled.

Parameters:
startPosition the position in the file from which the data has to be read
pBuffer a pointer to the memory (p. 328) where the read data has to be placed
bufferLength the number of bytes to read from the file

Returns:
the number of bytes read from the file. When it is 0 then the end of the file has
been reached

13.2.2.2 virtual void puntoexe::baseStream::write (imbxUint32 startPosition,


const imbxUint8 ∗ pBuffer, imbxUint32 bufferLength) [pure
virtual]

Writes raw data into the stream (p. 340).


The function is multithreading-safe and is called by the streamWriter (p. 359) class
when its buffer has to be flushed.

Parameters:
startPosition the position in the file where the data has to be written
pBuffer pointer to the data that has to be written
bufferLength number of bytes in the data buffer that has to be written

The documentation for this class was generated from the following file:

• baseStream.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.3 puntoexe::charsetConversionException Class Reference 91

13.3 puntoexe::charsetConversionException Class


Reference
Base class for the exceptions thrown by charsetConversion.
#include <charsetConversion.h>
Inheritance diagram for puntoexe::charsetConversionException::

puntoexe::charsetConversionException

puntoexe::charsetConversionExceptionNoSupportedTable puntoexe::charsetConversionExceptionNoTable puntoexe::charsetConversionExceptionUtfSizeNotSupported

13.3.1 Detailed Description

Base class for the exceptions thrown by charsetConversion.


The documentation for this class was generated from the following file:

• charsetConversion.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


92 Class Documentation

13.4 puntoexe::charsetConversionExceptionNoSupportedTable
Class Reference
Exception thrown when the requested charset is not supported by the system.
#include <charsetConversion.h>
Inheritance diagram for puntoexe::charsetConversionExceptionNoSupportedTable::

puntoexe::charsetConversionException

puntoexe::charsetConversionExceptionNoSupportedTable

13.4.1 Detailed Description

Exception thrown when the requested charset is not supported by the system.
The documentation for this class was generated from the following file:

• charsetConversion.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.5 puntoexe::charsetConversionExceptionNoTable Class Reference 93

13.5 puntoexe::charsetConversionExceptionNoTable
Class Reference
Exception thrown when the requested charset is not supported by the DICOM standard.
#include <charsetConversion.h>
Inheritance diagram for puntoexe::charsetConversionExceptionNoTable::

puntoexe::charsetConversionException

puntoexe::charsetConversionExceptionNoTable

13.5.1 Detailed Description

Exception thrown when the requested charset is not supported by the DICOM standard.
The documentation for this class was generated from the following file:

• charsetConversion.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


94 Class Documentation

13.6 puntoexe::charsetConversionExceptionUtfSizeNotSupported
Class Reference
Exception thrown when the system doesn’t have a supported size for wchar_t.
#include <charsetConversion.h>
Inheritance diagram for puntoexe::charsetConversionExceptionUtfSizeNotSupported::

puntoexe::charsetConversionException

puntoexe::charsetConversionExceptionUtfSizeNotSupported

13.6.1 Detailed Description

Exception thrown when the system doesn’t have a supported size for wchar_t.
The documentation for this class was generated from the following file:

• charsetConversion.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.7 puntoexe::criticalSection Class Reference 95

13.7 puntoexe::criticalSection Class Reference


This class represents a critical section.
#include <criticalSection.h>

Public Member Functions


• criticalSection ()
Construct and initializes the critical section.

• virtual ∼criticalSection ()
Deallocates the critical section.

• void lock ()
Lock the critical section.

• void unlock ()
Decreases the reference counter of the critical section and unlocks it if the counter
reaches 0.

• bool tryLock ()
Try to lock a critical section.

13.7.1 Detailed Description

This class represents a critical section.


Critical sections can be used by different threads to lock the access to shared resources.
Use the class lockCriticalSection (p. 323) to safely lock a critical section; lockCriti-
calSection (p. 323) unlocks the locked critical section in its destructor, therefore it is
safe to use it in code that throw exceptions.

13.7.2 Constructor & Destructor Documentation

13.7.2.1 puntoexe::criticalSection::criticalSection ()

Construct and initializes the critical section.


The critical section is initially not locked. It can be locked by calling lock() (p. 96) or
tryLock() (p. 96) or by using the class lockCriticalSection (p. 323) (preferred).

13.7.2.2 puntoexe::criticalSection::∼criticalSection () [virtual]

Deallocates the critical section.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


96 Class Documentation

A system crash is likely to happens in the case a critical section is destroyed while it is
in a locked state. For this reason the class lockCriticalSection (p. 323) should be used
instead of calling directly lock() (p. 96), unlock() (p. 96) or tryLock() (p. 96).

13.7.3 Member Function Documentation

13.7.3.1 void puntoexe::criticalSection::lock ()

Lock the critical section.


If the critical section is already locked by another thread (p. 363) then the function
waits for the critical section to become available and then locks it and set its reference
conter to 1.
If the critical section is unlocked then the fuction locks it and set its reference counter
to 1.
If the critical section is already locked by the same thread (p. 363) that called lock()
(p. 96), then the function simply increases the reference counter by one.
Use unlock() (p. 96) to unlock a locked critical section.

13.7.3.2 bool puntoexe::criticalSection::tryLock ()

Try to lock a critical section.


If the critical section is already locked in another thread (p. 363) then the function
returns immediatly the value false.
If the critical section is not locked, then the function locks the critical section, set the
reference counter to 1 and returns true.
If the critical section is locked by the same thread (p. 363) that called tryLock() (p. 96)
then the reference counter is increased by one and the function returns true.

Returns:
true if the section has been succesfully locked or false otherwise

13.7.3.3 void puntoexe::criticalSection::unlock ()

Decreases the reference counter of the critical section and unlocks it if the counter
reaches 0.
Use lock() (p. 96) to lock the critical section.
The documentation for this class was generated from the following files:

• criticalSection.h
• criticalSection.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.8 puntoexe::exceptionInfo Class Reference 97

13.8 puntoexe::exceptionInfo Class Reference


This class is used to store the information related to the points where the exceptions
are being caught&thrown.
#include <exception.h>

Public Member Functions


• exceptionInfo (const std::wstring &functionName, const std::string &fileName,
const long lineNumber, const std::string &exceptionType, const std::string &ex-
ceptionMessage)
Construct the exceptionInfo (p. 97) object.

• std::wstring getMessage ()
Return the object’s content formatted in a string.

Public Attributes
• std::wstring m_functionName
The name of the function where the catch&throw is happening.

• std::string m_fileName
The name of the file where the catch&throw is happening.

• long m_lineNumber
The number of the line where the catch&throw is happening.

• std::string m_exceptionType
The type of the exception being rethrown.

• std::string m_exceptionMessage
The message embedded in the exception.

13.8.1 Detailed Description

This class is used to store the information related to the points where the exceptions
are being caught&thrown.
The application can use the macros PUNTOEXE_FUNCTION_START() (p. 453),
PUNTOEXE_FUNCTION_END() (p. 453), PUNTOEXE_THROW() (p. 454) and
PUNTOEXE_RETHROW() (p. 454) inside its function: the macros take care of log-
ging in the exceptions manager the source code’s lines travelled by an exception while
it is being thrown to the catch point.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


98 Class Documentation

13.8.2 Constructor & Destructor Documentation

13.8.2.1 puntoexe::exceptionInfo::exceptionInfo (const std::wstring


& functionName, const std::string & fileName, const long
lineNumber, const std::string & exceptionType, const std::string &
exceptionMessage)

Construct the exceptionInfo (p. 97) object.

Parameters:
functionName the name of the function where the catch&throw is happening
fileName the name of the file where the catch&throw is happening
lineNumber the line where the catch&throw is happening
exceptionType the type of the exception being rethrown
exceptionMessage the message embedded in the exception being rethrown

13.8.3 Member Function Documentation

13.8.3.1 std::wstring puntoexe::exceptionInfo::getMessage ()

Return the object’s content formatted in a string.

Returns:
the object’s content formatted in a string

13.8.4 Member Data Documentation

13.8.4.1 std::string puntoexe::exceptionInfo::m_exceptionMessage

The message embedded in the exception.

13.8.4.2 std::string puntoexe::exceptionInfo::m_exceptionType

The type of the exception being rethrown.

13.8.4.3 std::string puntoexe::exceptionInfo::m_fileName

The name of the file where the catch&throw is happening.

13.8.4.4 std::wstring puntoexe::exceptionInfo::m_functionName

The name of the function where the catch&throw is happening.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.8 puntoexe::exceptionInfo Class Reference 99

13.8.4.5 long puntoexe::exceptionInfo::m_lineNumber

The number of the line where the catch&throw is happening.


The documentation for this class was generated from the following files:

• exception.h
• exception.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


100 Class Documentation

13.9 puntoexe::exceptionsManager Class Reference


One statically allocated instance of this class logs the stack positions while an exception
is being processed.
#include <exception.h>
Inheritance diagram for puntoexe::exceptionsManager::

puntoexe::baseObject

puntoexe::exceptionsManager

Public Types
• typedef std::list< exceptionInfo > tExceptionInfoList
Defines a list of exceptionInfo (p. 97) objects.

Static Public Member Functions


• static void addExceptionInfo (const exceptionInfo &info)
Add an exceptionInfo (p. 97) object to the active thread’s information list.

• static std::wstring getMessage ()


Returns the same information returned by getExceptionInfo() (p. 101), but formatted
in a text message.

• static void getExceptionInfo (tExceptionInfoList ∗pList)


Fill the list with all the collected exceptionInfo (p. 97) objects for the current thread
(p. 363).

• static void clearExceptionInfo ()


Clear the information list for the active thread (p. 363).

13.9.1 Detailed Description

One statically allocated instance of this class logs the stack positions while an exception
is being processed.
In order to log the stack position the application must use the following macros inside
its functions:

• PUNTOEXE_FUNCTION_START() (p. 453)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.9 puntoexe::exceptionsManager Class Reference 101

• PUNTOEXE_FUNCTION_END() (p. 453)

• PUNTOEXE_THROW() (p. 454)

The final catch block that processes the exception and doesn’t rethrow it should call ex-
ceptionsManager::getMessage() (p. 102) in order to retrieve the exception’s history.
The retrieved message will contain the position of the first throw statement and the
positions of the PUNTOEXE_FUNCTION_END() (p. 453) macros that rethrown the
exception.
All the catch blocks that don’t rethrow the catched exception and solve the exception’s
cause should call exceptionsManager::getMessage() (p. 102) to empty the messages
stack.

13.9.2 Member Typedef Documentation

13.9.2.1 typedef std::list<exceptionInfo> pun-


toexe::exceptionsManager::tExceptionInfoList

Defines a list of exceptionInfo (p. 97) objects.

13.9.3 Member Function Documentation

13.9.3.1 void puntoexe::exceptionsManager::addExceptionInfo (const


exceptionInfo & info) [static]

Add an exceptionInfo (p. 97) object to the active thread’s information list.
This function is called by PUNTOEXE_FUNCTION_END() (p. 453) when an un-
caught exception is found.

Parameters:
info the info object that must be added to the active thread’s information list

13.9.3.2 void puntoexe::exceptionsManager::clearExceptionInfo ()


[static]

Clear the information list for the active thread (p. 363).

13.9.3.3 void puntoexe::exceptionsManager::getExceptionInfo


(tExceptionInfoList ∗ pList) [static]

Fill the list with all the collected exceptionInfo (p. 97) objects for the current thread
(p. 363).
The function also clears the information list of the current thread (p. 363).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


102 Class Documentation

Parameters:
pList a pointer to the list that will be filled with a copy of the exceptionInfo (p. 97)
objects collected before the call.

13.9.3.4 std::wstring puntoexe::exceptionsManager::getMessage ()


[static]

Returns the same information returned by getExceptionInfo() (p. 101), but formatted
in a text message.
The function also clears the information list for the current thread (p. 363).

Returns:
the information formatted as a text message

The documentation for this class was generated from the following files:

• exception.h
• exception.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.10 puntoexe::huffmanTable Class Reference 103

13.10 puntoexe::huffmanTable Class Reference


This class calculates the huffman table from a set of values and their frequency, and
can read or write huffman codes from/to a baseStream (p. 89) object.
#include <huffmanTable.h>
Inheritance diagram for puntoexe::huffmanTable::

puntoexe::baseObject

puntoexe::huffmanTable

Public Member Functions


Initialization

• huffmanTable (imbxUint32 maxValueLength)


Construct the huffman table and specify the maximum numbed of bits used by the
values to be encoded.

• void reset ()
Reset the internal data of the huffmanTable (p. 103) class.

Huffman table generation


First, call incValueFreq() (p. 105) the right number of times for each value that
appears in the stream (p. 340), then call calcHuffmanCodesLength() (p. 104) and
then calcHuffmanTables() (p. 104).
• void incValueFreq (const imbxUint32 value)
Increase the frequency of a value that will be huffman encoded.

• void calcHuffmanCodesLength (const imbxUint32 maxCodeLength)


Calculates the length of the huffman codes.

• void calcHuffmanTables ()
Generates the huffman table used by readHuffmanCode() (p. 105) and writeHuff-
manCode() (p. 106).

• void removeLastCode ()
Remove the code with the higher value and the longer code from the code lengths
table.

Huffman I/O

• imbxUint32 readHuffmanCode (streamReader ∗pStream)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


104 Class Documentation

Read and decode an huffman code from the specified stream (p. 340).

• void writeHuffmanCode (const imbxUint32 code, streamWriter


∗pStream)
Write an huffman code to the specified stream (p. 340).

13.10.1 Detailed Description

This class calculates the huffman table from a set of values and their frequency, and
can read or write huffman codes from/to a baseStream (p. 89) object.

13.10.2 Constructor & Destructor Documentation

13.10.2.1 puntoexe::huffmanTable::huffmanTable (imbxUint32


maxValueLength)

Construct the huffman table and specify the maximum numbed of bits used by the
values to be encoded.

Parameters:
maxValueLength the maximum lenght, in bits, of the value that must be encoded.
Please note that this is not the length of the huffman values

13.10.3 Member Function Documentation

13.10.3.1 void puntoexe::huffmanTable::calcHuffmanCodesLength (const


imbxUint32 maxCodeLength)

Calculates the length of the huffman codes.


This function must be called after incValueFreq() (p. 105) has been called to set the
frequency of the values to be encoded.
After this function calculates the codes length, call calcHuffmanTables() (p. 104) to
calculate the huffman codes used by readHuffmanCode() (p. 105) and writeHuff-
manCode() (p. 106).

Parameters:
maxCodeLength the maximum length in bits of the generated huffman codes.

13.10.3.2 void puntoexe::huffmanTable::calcHuffmanTables ()

Generates the huffman table used by readHuffmanCode() (p. 105) and writeHuff-
manCode() (p. 106).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.10 puntoexe::huffmanTable Class Reference 105

This function need the codes length generated by calcHuffmanCodesLength()


(p. 104): it will not work if the code lengths are not available.

13.10.3.3 void puntoexe::huffmanTable::incValueFreq (const imbxUint32


value)

Increase the frequency of a value that will be huffman encoded.


This function must be called for each time a value appears in a stream (p. 340). Values
with an higher frequency will have a shorted huffman code.
After the function has been called the right amount of times for every value that must
be encoded, call calcHuffmanCodesLength() (p. 104) and then calcHuffmanTables()
(p. 104).

Parameters:
value the value for wich the frequency must be increased. The number of bits that
form the value must be less or equal to the number of bits specified in the
constructor huffmanTable() (p. 104)

13.10.3.4 imbxUint32 puntoexe::huffmanTable::readHuffmanCode


(streamReader ∗ pStream)

Read and decode an huffman code from the specified stream (p. 340).
The function throws a huffmanExceptionRead exception if the read code cannot be
decoded.

Parameters:
pStream a pointer to the stream (p. 340) reader used to read the code

Returns:
the decoded value

13.10.3.5 void puntoexe::huffmanTable::removeLastCode ()

Remove the code with the higher value and the longer code from the code lengths table.
This function is usefull when extra data has been inserted through incValueFreq()
(p. 105) but must not generate an huffman code.
E.g.: the jpeg coded insert an extra value with low frequency to reserve the last gener-
ated huffman code, so the reserver huffman code will never be generated

13.10.3.6 void puntoexe::huffmanTable::reset ()

Reset the internal data of the huffmanTable (p. 103) class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


106 Class Documentation

The function removes all the calculated tables. The I/O functions readHuffmanCode()
(p. 105) and writeHuffmanCode() (p. 106) will not work until the tables are calculated
by calcHuffmanCodesLength and calcHuffmanTables() (p. 104).

13.10.3.7 void puntoexe::huffmanTable::writeHuffmanCode (const imbxUint32


code, streamWriter ∗ pStream)

Write an huffman code to the specified stream (p. 340).


The function throws a huffmanExceptionWrite exception if the specified value cannot
be encoded.

Parameters:
code the value to be encoded and written to the stream (p. 340)
pStream a pointer to the stream (p. 340) writer used to write the code

The documentation for this class was generated from the following files:

• huffmanTable.h
• huffmanTable.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.11 puntoexe::imebra::buffer Class Reference 107

13.11 puntoexe::imebra::buffer Class Reference


This class manages a memory (p. 328) area containing data (p. 139) in dicom format.
#include <buffer.h>
Inheritance diagram for puntoexe::imebra::buffer::

puntoexe::baseObject

puntoexe::imebra::buffer

Public Member Functions


Constructor

• buffer (const ptr< baseObject > &externalLock, const std::string &default-


Type="")
Constructor. Initialize the buffer (p. 107) object and set the default data (p. 139)
type.

• buffer (const ptr< baseObject > &externalLock, const std::string &de-


faultType, const ptr< baseStream > &originalStream, imbxUint32 buffer-
Position, imbxUint32 bufferLength, imbxUint32 wordLength, streamCon-
troller::tByteOrdering endianType)
Constructor. Initialize the buffer (p. 107) object and declare the buffer’s content
on demand.

Data handlers

• ptr< handlers::dataHandler > getDataHandler (bool bWrite, im-


bxUint32 size=0)
Retrieve a data (p. 139) handler that can be used to read, write and resize the
memory (p. 328) controlled by the buffer (p. 107).

• ptr< handlers::dataHandlerRaw > getDataHandlerRaw (bool bWrite,


imbxUint32 size=0)
Retrieve a raw data (p. 139) handler that can be used to read, write and resize the
memory (p. 328) controlled by the buffer (p. 107).

Stream

• imbxUint32 getBufferSizeBytes ()
Return the current buffer’s size in bytes.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


108 Class Documentation

Stream

• ptr< streamReader > getStreamReader ()


Return a stream (p. 340) reader connected to the buffer’s content.

• ptr< streamWriter > getStreamWriter ()


Return a stream (p. 340) writer connected to the buffer’s content.

Buffer’s data type

• std::string getDataType ()
Returns the buffer’s data (p. 139) type.

Charsets

• virtual void setCharsetsList (charsetsList::tCharsetsList ∗pCharsetsList)


Defines the charsets that should be used by the object.

• virtual void getCharsetsList (charsetsList::tCharsetsList ∗pCharsetsList)


Retrieve the charsets used by the dicom object.

13.11.1 Detailed Description

This class manages a memory (p. 328) area containing data (p. 139) in dicom format.
A buffer (p. 107) also stores the data (p. 139) type of the elements stored in it. The
data (p. 139) type is in Dicom format (two upper case chars).
The memory (p. 328) can be accessed through a handlers::dataHandler (p. 195) de-
rived object obtained by calling the function getDataHandler() (p. 110).
Data handlers (p. 77) work on a copy of the buffer (p. 107), then most of the problem
related to the multithreading enviroments are avoided.
The data (p. 139) handlers (p. 77) supply several functions that allow to access to the
data (p. 139) in several formats (strings, numeric, time, and so on).

13.11.2 Constructor & Destructor Documentation

13.11.2.1 puntoexe::imebra::buffer::buffer (const ptr< baseObject > &


externalLock, const std::string & defaultType = "")

Constructor. Initialize the buffer (p. 107) object and set the default data (p. 139) type.
If no data (p. 139) type is specified, then the Dicom data (p. 139) type "OB" is used.

Parameters:
externalLock a pointer to an object to be used to lock this one (see baseObject
(p. 85)). If set to zero then a local locker will be used

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.11 puntoexe::imebra::buffer Class Reference 109

defaultType a string with the buffer’s type. The buffer’s type must be one of the
Dicom data (p. 139) types. A dicom’s data (p. 139) type is formed by two
uppercase chars

13.11.2.2 puntoexe::imebra::buffer::buffer (const ptr< baseObject >


& externalLock, const std::string & defaultType, const ptr<
baseStream > & originalStream, imbxUint32 bufferPosition,
imbxUint32 bufferLength, imbxUint32 wordLength,
streamController::tByteOrdering endianType)

Constructor. Initialize the buffer (p. 107) object and declare the buffer’s content on
demand.
On demand content is loaded from the original stream (p. 340) when the application
requires the access to the buffer (p. 107).

Parameters:
externalLock a pointer to an object to be used to lock this one (see baseObject
(p. 85)). If set to zero then a local locker will be used
defaultType a string with the buffer’s type. The buffer’s type must be one of the
Dicom data (p. 139) types. A dicom’s data (p. 139) type is formed by two
uppercase chars
originalStream the stream (p. 340) from which the content can be read
bufferPosition the first stream’s byte that contains the buffer’s content
bufferLength the buffer’s content length, in bytes
wordLength the size of a buffer’s element, in bytes
endianType the stream’s endian type

13.11.3 Member Function Documentation

13.11.3.1 imbxUint32 puntoexe::imebra::buffer::getBufferSizeBytes ()

Return the current buffer’s size in bytes.


If the buffer (p. 107) is currently loaded then return the memory’s size, otherwise return
the size that the buffer (p. 107) would have when it is loaded.

Returns:
the buffer’s size, in bytes

13.11.3.2 void puntoexe::imebra::buffer::getCharsetsList


(charsetsList::tCharsetsList ∗ pCharsetsList) [virtual]

Retrieve the charsets used by the dicom object.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


110 Class Documentation

If during the operation an error is detected (diffetent objects use different default
charsets) then the exception charsetListExceptionDiffDefault is thrown.

Parameters:
pCharsetsList a pointer to a list that will be filled with the used charsets

13.11.3.3 ptr< handlers::dataHandler > pun-


toexe::imebra::buffer::getDataHandler (bool bWrite, imbxUint32
size = 0)

Retrieve a data (p. 139) handler that can be used to read, write and resize the memory
(p. 328) controlled by the buffer (p. 107).
The data (p. 139) handler will have access to a local copy of the buffer (p. 107), then
it will not have to worry about multithreading related problems. If a writing handler is
requested, then the handler’s local buffer (p. 107) will be copied back into the buffer
(p. 107) when the handler will be destroyed.

Parameters:
bWrite set to true if you want to write into the buffer (p. 107)
size this parameter is used only when the parameter bWrite is set to true and the
buffer (p. 107) is empty: in this case, the returned buffer (p. 107) will be
resized to the number of elements (NOT bytes) declared in this parameter

Returns:
a pointer to a dataHandler object

13.11.3.4 ptr< handlers::dataHandlerRaw > pun-


toexe::imebra::buffer::getDataHandlerRaw (bool bWrite,
imbxUint32 size = 0)

Retrieve a raw data (p. 139) handler that can be used to read, write and resize the
memory (p. 328) controlled by the buffer (p. 107).
Raw data (p. 139) handlers (p. 77) always see a collection of bytes, regardless of the
original buffer’s type.
The data (p. 139) handler will have access to a local copy of the buffer (p. 107), then
it will not have to worry about multithreading related problems. If a writing handler is
requested, then the handler’s local buffer (p. 107) will be copied back into the buffer
(p. 107) when the handler will be destroyed.

Parameters:
bWrite set to true if you want to write into the buffer (p. 107)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.11 puntoexe::imebra::buffer Class Reference 111

size this parameter is used only when the parameter bWrite is set to true and the
buffer (p. 107) is empty: in this case, the returned buffer (p. 107) will be
resized to the number of bytes declared in this parameter

Returns:
a pointer to a dataHandler object

13.11.3.5 std::string puntoexe::imebra::buffer::getDataType ()

Returns the buffer’s data (p. 139) type.


Return a string with the buffer’s data (p. 139) type.

Returns:
a string with the buffer’s data (p. 139) type in Dicom format.

13.11.3.6 ptr< streamReader > puntoexe::imebra::buffer::getStreamReader ()

Return a stream (p. 340) reader connected to the buffer’s content.


The stream (p. 340) works on a local copy of the buffer’s data (p. 139), then it doesn’t
have to worry about multithreading related problems.

Returns:
a pointer to a stream (p. 340) reader

13.11.3.7 ptr< streamWriter > puntoexe::imebra::buffer::getStreamWriter ()

Return a stream (p. 340) writer connected to the buffer’s content.


The stream (p. 340) works on a local copy of the buffer’s data (p. 139), then it doesn’t
have to worry about multithreading related problems.

Returns:
a pointer to a stream (p. 340) writer

13.11.3.8 void puntoexe::imebra::buffer::setCharsetsList


(charsetsList::tCharsetsList ∗ pCharsetsList) [virtual]

Defines the charsets that should be used by the object.


The valid charsets are:

• "" - "ISO_IR 6" - "ISO_IR 100"

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


112 Class Documentation

• "ISO_IR 101"
• "ISO_IR 109"
• "ISO_IR 110"
• "ISO_IR 144"
• "ISO_IR 127"
• "ISO_IR 126"
• "ISO_IR 138"
• "ISO_IR 148"
• "ISO_IR 13"
• "ISO_IR 166"
• "ISO 2022 IR 6"
• "ISO 2022 IR 100"
• "ISO 2022 IR 101"
• "ISO 2022 IR 109"
• "ISO 2022 IR 110"
• "ISO 2022 IR 144"
• "ISO 2022 IR 127"
• "ISO 2022 IR 126"
• "ISO 2022 IR 138"
• "ISO 2022 IR 148"
• "ISO 2022 IR 13"
• "ISO 2022 IR 166"
• "ISO 2022 IR 87"
• "ISO 2022 IR 159"
• "ISO 2022 IR 149"
• "ISO_IR 192" (UTF-8)
• "GB18030"
Parameters:
pCharsetsList a list of charsets that can be used by the dicom object. The default
charsets must be the first item in the list

The documentation for this class was generated from the following files:

• buffer.h
• buffer.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.12 puntoexe::imebra::bufferException Class Reference 113

13.12 puntoexe::imebra::bufferException Class Refer-


ence
This is the base class for the exceptions thrown by the buffer (p. 107) class.
#include <buffer.h>
Inheritance diagram for puntoexe::imebra::bufferException::

puntoexe::imebra::bufferException

puntoexe::imebra::bufferExceptionUnknownType

Public Member Functions


• bufferException (const std::string &message)
Build a buffer (p. 107) exception.

13.12.1 Detailed Description

This is the base class for the exceptions thrown by the buffer (p. 107) class.

13.12.2 Constructor & Destructor Documentation

13.12.2.1 puntoexe::imebra::bufferException::bufferException (const


std::string & message) [inline]

Build a buffer (p. 107) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• buffer.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


114 Class Documentation

13.13 puntoexe::imebra::bufferExceptionUnknownType
Class Reference
This exception is throw by the buffer (p. 107) when an handler for an unknown data
(p. 139) type is asked.
#include <buffer.h>
Inheritance diagram for puntoexe::imebra::bufferExceptionUnknownType::

puntoexe::imebra::bufferException

puntoexe::imebra::bufferExceptionUnknownType

Public Member Functions


• bufferExceptionUnknownType (const std::string &message)
Build a wrong data (p. 139) type exception.

13.13.1 Detailed Description

This exception is throw by the buffer (p. 107) when an handler for an unknown data
(p. 139) type is asked.

13.13.2 Constructor & Destructor Documentation

13.13.2.1 puntoexe::imebra::bufferExceptionUnknownType::bufferExceptionUnknownType
(const std::string & message) [inline]

Build a wrong data (p. 139) type exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• buffer.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.14 puntoexe::imebra::charsetsList::charsetListExceptionDiffDefault Class
Reference 115

13.14 puntoexe::imebra::charsetsList::charsetListExceptionDiffDefault
Class Reference
This exception is thrown when a conversion from an unicode string causes the dicom
dataSet (p. 155) to change its default charset.
#include <charsetsList.h>
Inheritance diagram for puntoexe::imebra::charsetsList::charsetListExceptionDiffDefault::

puntoexe::imebra::charsetsList::charsetsListException

puntoexe::imebra::charsetsList::charsetListExceptionDiffDefault

13.14.1 Detailed Description

This exception is thrown when a conversion from an unicode string causes the dicom
dataSet (p. 155) to change its default charset.
For instace, the default charset is ISO IR 6 but a value written by the application in one
tag causes the default charset to switch to ISO 2022 IR 100.
The documentation for this class was generated from the following file:

• charsetsList.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


116 Class Documentation

13.15 puntoexe::imebra::charsetsList::charsetsListException
Class Reference
This is the base class for the exceptions thrown by the class charsetsList.
#include <charsetsList.h>
Inheritance diagram for puntoexe::imebra::charsetsList::charsetsListException::

puntoexe::imebra::charsetsList::charsetsListException

puntoexe::imebra::charsetsList::charsetListExceptionDiffDefault

13.15.1 Detailed Description

This is the base class for the exceptions thrown by the class charsetsList.
The documentation for this class was generated from the following file:

• charsetsList.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.16 puntoexe::imebra::codecs::codec Class Reference 117

13.16 puntoexe::imebra::codecs::codec Class Refer-


ence
This is the base class for all the imebra (p. 71) codecs (p. 75).
#include <codec.h>
Inheritance diagram for puntoexe::imebra::codecs::codec::

puntoexe::baseObject

puntoexe::imebra::codecs::codec

puntoexe::imebra::codecs::dicomCodec puntoexe::imebra::codecs::jpegCodec

Public Member Functions


Streams read/write

• ptr< dataSet > read (ptr< streamReader > pSourceStream, imbxUint32


maxSizeBufferLoad=0xffffffff)
Read a stream (p. 340) and build an in-memory dicom structure.

• void write (ptr< streamWriter > pDestStream, ptr< dataSet > pSource-
DataSet)
Write a dicom structure into a stream (p. 340).

Selection of the codec from a transfer syntax

• virtual ptr< codec > createCodec ()=0


Create another codec (p. 117) of the same type of the codec (p. 117) where the
function is being called.

• virtual bool canHandleTransferSyntax (std::wstring transferSyntax)=0


This function returns true if the codec (p. 117) can handle the requested DICOM
transfer syntax.

• virtual bool encapsulated (std::wstring transferSyntax)=0


This function returns true if the codec (p. 117) transfer syntax handled by the code
has to be encapsulated.

Image’s attributes from the transfer syntax.

• virtual imbxUint32 getMaxHighBit (std::string transferSyntax)=0

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


118 Class Documentation

This function returns the highest bit per channel supported by the specified transfer
syntax.

• virtual imbxUint32 suggestAllocatedBits (std::wstring transferSyntax, im-


bxUint32 highBit)=0
Suggest an optimal number of allocated bits for the specified transfer syntax and
high bit.

Set/get the image in the dicom structure


• enum quality {
veryHigh = 0, high = 100, aboveMedium = 200, medium = 300,
belowMedium = 400, low = 500, veryLow = 600 }
This enumeration is used by setImage() (p. 122) in order to setup the compression
parameters.

• virtual ptr< image > getImage (ptr< dataSet > pSourceDataSet, ptr<
streamReader > pSourceStream, std::string dataType)=0
Get a decompressed image (p. 232) from a dicom structure.

• virtual void setImage (ptr< streamWriter > pDestStream, ptr< image >
pSourceImage, std::wstring transferSyntax, quality imageQuality, std::string
dataType, imbxUint8 allocatedBits, bool bSubSampledX, bool bSubSampledY,
bool bInterleaved, bool b2Complement)=0
Stores an image (p. 232) into stream (p. 340).

13.16.1 Detailed Description

This is the base class for all the imebra (p. 71) codecs (p. 75).
When the imebra (p. 71) codecs (p. 75) read the content of a file, they don’t return
a decompressed image (p. 232): instead they build a DICOM structure in memory
(p. 328), with the image(s) embedded in it.
A call to the dataSet::getImage() (p. 163) method will return the decompressed image
(p. 232) embedded into the dicom structure.
E.G: A call to jpegCodec::read() (p. 121) will build a dataSet (p. 155) object with a
jpeg image (p. 232) embedded in it. Your application should call dataSet::getImage()
(p. 163)in order to get the decompressed image (p. 232).
The same concept is used when your application must generate a file with a compressed
image (p. 232) in it. Your application should:

• allocate a dicom structure (see dataSet (p. 155))


• insert an image (p. 232) into the structure by calling dataSet::setImage()
(p. 169)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.16 puntoexe::imebra::codecs::codec Class Reference 119

• generate the final file using the preferred codec (p. 117).

13.16.2 Member Enumeration Documentation

13.16.2.1 enum puntoexe::imebra::codecs::codec::quality

This enumeration is used by setImage() (p. 122) in order to setup the compression
parameters.

Enumerator:
veryHigh the image (p. 232) is saved with very high quality. No subsampling is
performed and no quantization
high the image (p. 232) is saved with high quality. No subsampling is performed.
Quantization ratios are low
aboveMedium the image (p. 232) is saved in medium quality. Horizontal sub-
sampling is applied. Quantization ratios are low
medium the image (p. 232) is saved in medium quality. Horizontal subsampling
is applied. Quantization ratios are medium
belowMedium the image (p. 232) is saved in medium quality. Horizontal and
vertical subsampling are applied. Quantization ratios are medium
low the image (p. 232) is saved in low quality. Horizontal and vertical subsam-
pling are applied. Quantization ratios are higher than the ratios used in the
belowMedium quality
veryLow the image (p. 232) is saved in low quality. Horizontal and vertical sub-
sampling are applied. Quantization ratios are high

13.16.3 Member Function Documentation

13.16.3.1 virtual bool pun-


toexe::imebra::codecs::codec::canHandleTransferSyntax
(std::wstring transferSyntax) [pure virtual]

This function returns true if the codec (p. 117) can handle the requested DICOM trans-
fer syntax.

Parameters:
transferSyntax the transfer syntax to check for

Returns:
true if the transfer syntax specified in transferSyntax can be handled by the codec
(p. 117), false otherwise.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


120 Class Documentation

13.16.3.2 virtual ptr<codec> puntoexe::imebra::codecs::codec::createCodec ()


[pure virtual]

Create another codec (p. 117) of the same type of the codec (p. 117) where the function
is being called.

Returns:
a pointer to a codec (p. 117) of the same type of the codec (p. 117) where the
function is being called

13.16.3.3 virtual bool puntoexe::imebra::codecs::codec::encapsulated


(std::wstring transferSyntax) [pure virtual]

This function returns true if the codec (p. 117) transfer syntax handled by the code has
to be encapsulated.

Parameters:
transferSyntax the transfer syntax to check for

Returns:
true if the transfer syntax specified in transferSyntax has to be encapsulated

13.16.3.4 virtual ptr<image> puntoexe::imebra::codecs::codec::getImage


(ptr< dataSet > pSourceDataSet, ptr< streamReader >
pSourceStream, std::string dataType) [pure virtual]

Get a decompressed image (p. 232) from a dicom structure.


This function is usually called by dataSet::getImage() (p. 163), which also manages
the codec (p. 117) and the frame selection.
The decompressed image (p. 232) will be stored in a image (p. 232) object. Your appli-
cation can choose the frame to decompress if a multiframe Dicom structure is available.
We suggest to use the dataSet::getImage() (p. 163) function instead of calling this
function directly. dataSet::getImage() (p. 163) takes care of selecting the right tag’s
group and buffer’s id. Infact, some dicom file formats span images in several groups,
while others use sequence when saving multiple frames.

Parameters:
pSourceDataSet a pointer to the Dicom structure where the requested image
(p. 232) is embedded into
pSourceStream a pointer to a stream (p. 340) containing the data (p. 139) to be
parsed

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.16 puntoexe::imebra::codecs::codec Class Reference 121

dataType the data (p. 139) type of the buffer (p. 107) from which the stream
(p. 340) pSourceStream has been obtained. The data (p. 139) type must be
in DICOM format

Returns:
a pointer to the loaded image (p. 232)

13.16.3.5 virtual imbxUint32 puntoexe::imebra::codecs::codec::getMaxHighBit


(std::string transferSyntax) [pure virtual]

This function returns the highest bit per channel supported by the specified transfer
syntax.

Parameters:
transferSyntax the transfer syntax for which the information is requested.

Returns:
the highest bit supported by the transfer syntax

13.16.3.6 ptr< dataSet > puntoexe::imebra::codecs::codec::read (ptr<


streamReader > pSourceStream, imbxUint32 maxSizeBufferLoad =
0xffffffff)

Read a stream (p. 340) and build an in-memory dicom structure.


The specified stream (p. 340) is parsed and its content is saved into a dataSet (p. 155)
object.
The type of codec (p. 117) to use depends on the stream’s type (the jpeg codec (p. 117)
jpegCodec (p. 136) will parse a jpeg stream (p. 340), the DICOM codec (p. 117) di-
comCodec (p. 131) will parse a DICOM stream (p. 340)).
If you want to autodetect the file type, just try to parse the stream (p. 340) with several
codecs (p. 75) until one of them return a valid result. This task is easier if you use the
class codecFactory (p. 128), which automatically scans all the imebra (p. 71) codecs
(p. 75) until one can decompress the stream (p. 340).
Each codec (p. 117) will rewind the stream’s position if an error occurs.
If the codec (p. 117) parses the stream (p. 340) correctly (no error occurs) then the
resulting dataSet (p. 155) object will contain a valid dicom structure.

Parameters:
pSourceStream Stream a pointer to the baseStream (p. 89) object to parse. If the
codec (p. 117) cannot parse the stream’s content, then the stream (p. 340) is
rewinded to its initial position.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


122 Class Documentation

maxSizeBufferLoad if a loaded buffer (p. 107) exceedes the size in the parameter
then it is not loaded immediatly but it will be loaded on demand. Some
codecs (p. 75) may ignore this parameter. Set to -1 to load all the buffers
immediatly

Returns:
a pointer to the loaded dataSet (p. 155)

13.16.3.7 virtual void puntoexe::imebra::codecs::codec::setImage (ptr<


streamWriter > pDestStream, ptr< image > pSourceImage,
std::wstring transferSyntax, quality imageQuality, std::string
dataType, imbxUint8 allocatedBits, bool bSubSampledX, bool
bSubSampledY, bool bInterleaved, bool b2Complement) [pure
virtual]

Stores an image (p. 232) into stream (p. 340).


The image (p. 232) is compressed using the specified transfer syntax and quality.
The application should call dataSet::setImage() (p. 169) instead of calling this func-
tion directly.

Parameters:
pDestStream the stream (p. 340) where the compressed image (p. 232) must be
saved
pSourceImage the image (p. 232) to be saved into the stream (p. 340)
transferSyntax the transfer syntax to use for the compression
imageQuality the quality to use for the compression. Please note that the param-
eters bSubSampledX and bSubSampledY override the settings specified by
this parameter
dataType the data (p. 139) type of the tag that will contain the generated stream
(p. 340)
allocatedBits the number of bits per color channel
bSubSampledX true if the chrominance channels must be subsampled horizon-
tally, false otherwise
bSubSampledY true if the chrominance channels must be subsampled vertically,
false otherwise
bInterleaved true if the channels’ information must be interleaved, false if the
channels’ information must be flat (not interleaved)
b2Complement true if the image (p. 232) contains 2-complement data (p. 139),
false otherwise

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.16 puntoexe::imebra::codecs::codec Class Reference 123

13.16.3.8 virtual imbxUint32 pun-


toexe::imebra::codecs::codec::suggestAllocatedBits
(std::wstring transferSyntax, imbxUint32 highBit) [pure
virtual]

Suggest an optimal number of allocated bits for the specified transfer syntax and high
bit.

Parameters:
transferSyntax the transfer syntax to use
highBit the high bit to use for the suggestion

Returns:
the suggested number of allocated bits for the specified transfer syntax and high
bit.

13.16.3.9 void puntoexe::imebra::codecs::codec::write (ptr< streamWriter >


pDestStream, ptr< dataSet > pSourceDataSet)

Write a dicom structure into a stream (p. 340).


The specified dataSet (p. 155) object is transformed into the desidered kind of stream
(p. 340) (the jpeg codec (p. 117) jpegCodec (p. 136) will produce a jpeg stream
(p. 340), the DICOM codec (p. 117) dicomCodec (p. 131) will produce a DICOM
stream (p. 340)).

Parameters:
pDestStream a pointer to the stream (p. 340) to use for writing.
pSourceDataSet a pointer to the Dicom structure to write into the stream (p. 340)

The documentation for this class was generated from the following files:

• codec.h
• codec.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


124 Class Documentation

13.17 puntoexe::imebra::codecs::codecException
Class Reference
This is the base class for the exceptions thrown by the codec (p. 117) derived classes.
#include <codec.h>
Inheritance diagram for puntoexe::imebra::codecs::codecException::

puntoexe::imebra::codecs::codecException

puntoexe::imebra::codecs::codecExceptionCorruptedFile puntoexe::imebra::codecs::codecExceptionWrongFormat puntoexe::imebra::codecs::codecExceptionWrongTransferSyntax puntoexe::imebra::codecs::dicomCodecException puntoexe::imebra::codecs::jpegCodecException

puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax

Public Member Functions


• codecException (const std::string &message)
Build a codec (p. 117) exception.

13.17.1 Detailed Description

This is the base class for the exceptions thrown by the codec (p. 117) derived classes.

13.17.2 Constructor & Destructor Documentation

13.17.2.1 puntoexe::imebra::codecs::codecException::codecException (const


std::string & message) [inline]

Build a codec (p. 117) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• codec.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.18 puntoexe::imebra::codecs::codecExceptionCorruptedFile Class Reference
125

13.18 puntoexe::imebra::codecs::codecExceptionCorruptedFile
Class Reference
This exception is thrown when the file being parsed is corrupted.
#include <codec.h>
Inheritance diagram for puntoexe::imebra::codecs::codecExceptionCorruptedFile::

puntoexe::imebra::codecs::codecException

puntoexe::imebra::codecs::codecExceptionCorruptedFile

Public Member Functions


• codecExceptionCorruptedFile (const std::string &message)
Build a codecExceptionCorruptedFile (p. 125) exception.

13.18.1 Detailed Description

This exception is thrown when the file being parsed is corrupted.

13.18.2 Constructor & Destructor Documentation

13.18.2.1 puntoexe::imebra::codecs::codecExceptionCorruptedFile::codecExceptionCorruptedFile
(const std::string & message) [inline]

Build a codecExceptionCorruptedFile (p. 125) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• codec.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


126 Class Documentation

13.19 puntoexe::imebra::codecs::codecExceptionWrongFormat
Class Reference
This exception is thrown when the file being parsed is not valid for the codec (p. 117).
#include <codec.h>
Inheritance diagram for puntoexe::imebra::codecs::codecExceptionWrongFormat::

puntoexe::imebra::codecs::codecException

puntoexe::imebra::codecs::codecExceptionWrongFormat

Public Member Functions


• codecExceptionWrongFormat (const std::string &message)
Build a codecExceptionWrongFormat (p. 126) exception.

13.19.1 Detailed Description

This exception is thrown when the file being parsed is not valid for the codec (p. 117).

13.19.2 Constructor & Destructor Documentation

13.19.2.1 puntoexe::imebra::codecs::codecExceptionWrongFormat::codecExceptionWrongFormat
(const std::string & message) [inline]

Build a codecExceptionWrongFormat (p. 126) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• codec.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.20 puntoexe::imebra::codecs::codecExceptionWrongTransferSyntax Class
Reference 127

13.20 puntoexe::imebra::codecs::codecExceptionWrongTransferSyntax
Class Reference
This exception is thrown when the transfer syntax is not recognized by the codec
(p. 117).
#include <codec.h>
Inheritance diagram for puntoexe::imebra::codecs::codecExceptionWrongTransferSyntax::

puntoexe::imebra::codecs::codecException

puntoexe::imebra::codecs::codecExceptionWrongTransferSyntax

Public Member Functions


• codecExceptionWrongTransferSyntax (const std::string &message)
Build a codecExceptionWrongTransferSyntax (p. 127) exception.

13.20.1 Detailed Description

This exception is thrown when the transfer syntax is not recognized by the codec
(p. 117).

13.20.2 Constructor & Destructor Documentation

13.20.2.1 puntoexe::imebra::codecs::codecExceptionWrongTransferSyntax::codecExceptionWrongTransferSyntax
(const std::string & message) [inline]

Build a codecExceptionWrongTransferSyntax (p. 127) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• codec.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


128 Class Documentation

13.21 puntoexe::imebra::codecs::codecFactory Class


Reference

This class maintains a list of the available codecs (p. 75).


#include <codecFactory.h>
Inheritance diagram for puntoexe::imebra::codecs::codecFactory::

puntoexe::baseObject

puntoexe::imebra::codecs::codecFactory

Public Member Functions

• void registerCodec (ptr< codec > pCodec)


Register a new codec (p. 117).

• ptr< dataSet > load (ptr< streamReader > pStream, imbxUint32 maxSize-
BufferLoad=0xffffffff)
Build a dataSet (p. 155) structure from the specified stream (p. 340) of data (p. 139).

Static Public Member Functions

• static ptr< codec > getCodec (std::wstring transferSyntax)


Get a pointer to the codec (p. 117) that can handle the requested transfer syntax.

• static ptr< codecFactory > getCodecFactory ()


Retrieve the only reference to the codecFactory (p. 128) instance.

13.21.1 Detailed Description

This class maintains a list of the available codecs (p. 75).


It is used to retrieve the right codec (p. 117) when the transfer syntax is known, or to
automatically select the right codec (p. 117) that can parse the specified stream (p. 340)
of data (p. 139).
An instance of this class is automatically allocated by the library and can be retrieved
using the static function codecFactory::getCodecFactory() (p. 129).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.21 puntoexe::imebra::codecs::codecFactory Class Reference 129

13.21.2 Member Function Documentation

13.21.2.1 ptr< codec > puntoexe::imebra::codecs::codecFactory::getCodec


(std::wstring transferSyntax) [static]

Get a pointer to the codec (p. 117) that can handle the requested transfer syntax.
All the registered codecs (p. 75) are queried until the codec (p. 117) that can handle the
specified transfer syntax replies.
A new instance of the requested codec (p. 117) is allocated and its pointer is returned.

Parameters:
transferSyntax a string with the requested transfer syntax.

Returns:
a pointer to a imebra (p. 71) codec (p. 117) that can handle the requested transfer
syntax, or 0 if the function didn’t find any valid codec (p. 117). The returned
pointer references a new instance of the codec (p. 117), not the instance registered
using registerCodec() (p. 130)

13.21.2.2 ptr< codecFactory > pun-


toexe::imebra::codecs::codecFactory::getCodecFactory ()
[static]

Retrieve the only reference to the codecFactory (p. 128) instance.


An instance of codecFactory (p. 128) class is statically allocated by the imebra (p. 71)
framework.
The applications should use only the statically allocated instance of codecFactory
(p. 128).

Returns:
a pointer to the only instance of the codecFactory (p. 128) class.

13.21.2.3 ptr< dataSet > puntoexe::imebra::codecs::codecFactory::load


(ptr< streamReader > pStream, imbxUint32 maxSizeBufferLoad =
0xffffffff)

Build a dataSet (p. 155) structure from the specified stream (p. 340) of data (p. 139).
The function selects automatically the codec (p. 117) that can read the specified stream
(p. 340).

Parameters:
pStream the stream (p. 340) that contain the data (p. 139) to be parsed

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


130 Class Documentation

maxSizeBufferLoad if a loaded buffer (p. 107) exceedes the size in the parameter
then it is not loaded immediatly but it will be loaded on demand. Some
codecs (p. 75) may ignore this parameter. Set to 0xffffffff to load all the
buffers immediatly

Returns:
a pointer to the dataSet (p. 155) containing the parsed data (p. 139)

13.21.2.4 void puntoexe::imebra::codecs::codecFactory::registerCodec (ptr<


codec > pCodec)

Register a new codec (p. 117).


This function is called by the framework during the library’s startup, in order to register
all the imebra (p. 71) codecs (p. 75). The codecs (p. 75) distributed with the imebra
(p. 71) library are automatically registered.

Parameters:
pCodec a pointer to the codec (p. 117) to register

The documentation for this class was generated from the following files:

• codecFactory.h
• codecFactory.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.22 puntoexe::imebra::codecs::dicomCodec Class Reference 131

13.22 puntoexe::imebra::codecs::dicomCodec Class


Reference
The Dicom codec (p. 117).
#include <dicomCodec.h>
Inheritance diagram for puntoexe::imebra::codecs::dicomCodec::

puntoexe::baseObject

puntoexe::imebra::codecs::codec

puntoexe::imebra::codecs::dicomCodec

Public Member Functions


• void parseStream (ptr< streamReader > pStream, ptr< dataSet >
pDataSet, bool bExplicitDataType, streamController::tByteOrdering endi-
anType, imbxUint32 maxSizeBufferLoad=0xffffffff, imbxUint32 subItem-
Length=0xffffffff, imbxUint32 ∗pReadSubItemLength=0, imbxUint32
depth=0)
Parse the dicom stream (p. 340) and fill the data (p. 139) set with the read tags.

• void buildStream (ptr< streamWriter > pStream, ptr< dataSet > pDataSet,
bool bExplicitDataType, streamController::tByteOrdering endianType)
Write the dataSet (p. 155) to the specified stream (p. 340) in Dicom format, without
the file header and signature.

13.22.1 Detailed Description

The Dicom codec (p. 117).


This class is used to decode and encode a DICOM stream (p. 340).

13.22.2 Member Function Documentation

13.22.2.1 void puntoexe::imebra::codecs::dicomCodec::buildStream (ptr<


streamWriter > pStream, ptr< dataSet > pDataSet, bool
bExplicitDataType, streamController::tByteOrdering endianType)

Write the dataSet (p. 155) to the specified stream (p. 340) in Dicom format, without
the file header and signature.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


132 Class Documentation

Parameters:
pStream the destination stream (p. 340)
pDataSet the dataSet (p. 155) to be written
bExplicitDataType true if the function must write the data (p. 139) type, false if
the data (p. 139) type is implicit
endianType the endian type to be generated

13.22.2.2 void puntoexe::imebra::codecs::dicomCodec::parseStream (ptr<


streamReader > pStream, ptr< dataSet > pDataSet, bool
bExplicitDataType, streamController::tByteOrdering endianType,
imbxUint32 maxSizeBufferLoad = 0xffffffff, imbxUint32
subItemLength = 0xffffffff, imbxUint32 ∗ pReadSubItemLength
= 0, imbxUint32 depth = 0)

Parse the dicom stream (p. 340) and fill the data (p. 139) set with the read tags.
This function doesn’t parse the 128 bytes preamble and the DICM signature, which has
to be parsed by the calling function.

Parameters:
pStream The stream (p. 340) do decode
pDataSet A pointer to the data (p. 139) set to fill with the decoded tags
bExplicitDataType true if the stream (p. 340) is encoded with explicit data
(p. 139) type, false otherwise. Even when this parameter is set, the function
will automatically switch this parameter if a mismatch is detected during the
decoding procedure
endianType The stream’s endian type. Even when this parameter is set, the func-
tion will automatically switch this parameter if a mismatch is detected during
the decoding procedure
subItemLength the number of bytes to parse. If this parameter is set to 0xffffffff
then the function will stop parsing at the end of the sequence or at the end of
the file
maxSizeBufferLoad if a loaded buffer (p. 107) is exceedes the size in the param-
eter then it is not loaded immediatly but it will be loaded on demand. Some
codecs (p. 75) may ignore this parameter. Set to -1 to load all the buffers
immediatly
pReadSubItemLength a pointer to a imbxUint32 that the function will fill with
the number of bytes read
depth the current dataSet (p. 155) depth:
• 0 = root dataset
• >=1 = dataset embedded into another dataset. This value is used to
prevent a stack overflow

The documentation for this class was generated from the following files:

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.22 puntoexe::imebra::codecs::dicomCodec Class Reference 133

• dicomCodec.h
• dicomCodec.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


134 Class Documentation

13.23 puntoexe::imebra::codecs::dicomCodecException
Class Reference
This is the base class for the exceptions thrown by the dicom codec (p. 117)
(dicomCodec (p. 131)).
#include <dicomCodec.h>
Inheritance diagram for puntoexe::imebra::codecs::dicomCodecException::

puntoexe::imebra::codecs::codecException

puntoexe::imebra::codecs::dicomCodecException

puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached

Public Member Functions


• dicomCodecException (const std::string &message)
Build a dicomCodecException (p. 134) exception.

13.23.1 Detailed Description

This is the base class for the exceptions thrown by the dicom codec (p. 117)
(dicomCodec (p. 131)).

13.23.2 Constructor & Destructor Documentation

13.23.2.1 puntoexe::imebra::codecs::dicomCodecException::dicomCodecException
(const std::string & message) [inline]

Build a dicomCodecException (p. 134) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• dicomCodec.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.24 puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached
Class Reference 135

13.24 puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached
Class Reference
This exception is thrown when dicomCodec::parseStream (p. 132) reaches the maxi-
mum depth for embedded datasets.
#include <dicomCodec.h>
Inheritance diagram for puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached::

puntoexe::imebra::codecs::codecException

puntoexe::imebra::codecs::dicomCodecException

puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached

Public Member Functions


• dicomCodecExceptionDepthLimitReached (const std::string &message)
Build a dicomCodecExceptionDepthLimitReached (p. 135) exception.

13.24.1 Detailed Description

This exception is thrown when dicomCodec::parseStream (p. 132) reaches the maxi-
mum depth for embedded datasets.

13.24.2 Constructor & Destructor Documentation

13.24.2.1 puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached::dicomCodecExceptionDepthLimit
(const std::string & message) [inline]

Build a dicomCodecExceptionDepthLimitReached (p. 135) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• dicomCodec.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


136 Class Documentation

13.25 puntoexe::imebra::codecs::jpegCodec Class Ref-


erence
The Jpeg codec (p. 117).
#include <jpegCodec.h>
Inheritance diagram for puntoexe::imebra::codecs::jpegCodec::

puntoexe::baseObject

puntoexe::imebra::codecs::codec

puntoexe::imebra::codecs::jpegCodec

13.25.1 Detailed Description

The Jpeg codec (p. 117).


This class is used to decode and encode a Jpeg stream (p. 340).
The documentation for this class was generated from the following files:

• jpegCodec.h
• jpegCodec.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.26 puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax Class
Reference 137

13.26 puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax
Class Reference
Exception thrown when the jpeg variant cannot be handled.
#include <jpegCodec.h>
Inheritance diagram for puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax::

puntoexe::imebra::codecs::codecException

puntoexe::imebra::codecs::jpegCodecException

puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax

Public Member Functions


• jpegCodecCannotHandleSyntax (const std::string &message)
Constructs the exception.

13.26.1 Detailed Description

Exception thrown when the jpeg variant cannot be handled.

13.26.2 Constructor & Destructor Documentation

13.26.2.1 puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax::jpegCodecCannotHandleSyntax
(const std::string & message) [inline]

Constructs the exception.

Parameters:
message the cause of the exception

The documentation for this class was generated from the following file:

• jpegCodec.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


138 Class Documentation

13.27 puntoexe::imebra::codecs::jpegCodecException
Class Reference
Base class for the exceptions thrown by the jpeg codec (p. 117).
#include <jpegCodec.h>
Inheritance diagram for puntoexe::imebra::codecs::jpegCodecException::

puntoexe::imebra::codecs::codecException

puntoexe::imebra::codecs::jpegCodecException

puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax

13.27.1 Detailed Description

Base class for the exceptions thrown by the jpeg codec (p. 117).
The documentation for this class was generated from the following file:

• jpegCodec.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.28 puntoexe::imebra::data Class Reference 139

13.28 puntoexe::imebra::data Class Reference


Represents a single Dicom Tag.
#include <data.h>
Inheritance diagram for puntoexe::imebra::data::

puntoexe::baseObject

puntoexe::imebra::data

Public Member Functions


Data handlers
Retrieve dataHandler, dataHandlerRaw or a baseStream (p. 89) that allow to read
or modify the buffer’s data (p. 139)

• bool bufferExists (imbxUint32 bufferId)


Returns true if the specified buffer (p. 107) exists, otherwise it returns false.

• imbxUint32 getBufferSize (imbxUint32 bufferId)


Returns the size of a buffer (p. 107), in bytes.

• ptr< handlers::dataHandler > getDataHandler (imbxUint32 bufferId,


bool bWrite, std::string defaultType)
Get a data (p. 139) handler for the specified buffer (p. 107).

• ptr< handlers::dataHandlerRaw > getDataHandlerRaw (imbxUint32


bufferId, bool bWrite, std::string defaultType)
Get a raw data (p. 139) handler (handlers::dataHandlerRaw (p. 216)) for the
specified buffer (p. 107).

• ptr< streamReader > getStreamReader (imbxUint32 bufferId)


Get a streamReader (p. 354) connected to a buffer’s data (p. 139).

• ptr< streamWriter > getStreamWriter (imbxUint32 bufferId, std::string


dataType="")
Get a streamWriter (p. 359) connected to a buffer’s data (p. 139).

Embedded data sets.


Get or set an embedded dataSet (p. 155)

• ptr< dataSet > getDataSet (imbxUint32 dataSetId)


Retrieve an embedded data (p. 139) set.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


140 Class Documentation

• void setDataSet (imbxUint32 dataSetId, ptr< dataSet > pDataSet)


Set an embedded dataSet (p. 155) to the sequence.

• void appendDataSet (ptr< dataSet > pDataSet)


Append an embedded dataSet (p. 155) to the sequence.

Buffer deletion

• void deleteBuffer (imbxUint32 bufferId)


Remove a buffer (p. 107) from the tag.

Buffer’s data type

• std::string getDataType ()
Get the tag’s buffer (p. 107) type in Dicom format.

13.28.1 Detailed Description

Represents a single Dicom Tag.


Dicom tags are stored into a dataSet (p. 155) object. Each tag can be referred by its
group ID and tag ID.
The class data (p. 139) uses the buffer (p. 107) objects to store its data.
Each tag can have several buffers (tags defined as sequence in the dicom stream
(p. 340)).
Your application can access to the tag’s buffers using a data (p. 139) handler (call
getDataHandler() (p. 141)).

13.28.2 Member Function Documentation

13.28.2.1 void puntoexe::imebra::data::appendDataSet (ptr< dataSet >


pDataSet)

Append an embedded dataSet (p. 155) to the sequence.


Several data (p. 139) sets can be nested one inside each other. When a data (p. 139)
set is embedded into a tag, then the tag will have a sequence type (dicom type=SQ).
Sequences are used to build dicom directories and other tags in normal data (p. 139)
sets.

Parameters:
pDataSet A pointer to the dataSet (p. 155) to store into the tag

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.28 puntoexe::imebra::data Class Reference 141

13.28.2.2 bool puntoexe::imebra::data::bufferExists (imbxUint32 bufferId)

Returns true if the specified buffer (p. 107) exists, otherwise it returns false.
The buffer (p. 107) can be created by requesting a writing handler (see han-
dlers::dataHandler (p. 195)).

Parameters:
bufferId the zero-based buffer’s id the function has to check for

Returns:
true if the buffer (p. 107) exists, false otherwise

13.28.2.3 void puntoexe::imebra::data::deleteBuffer (imbxUint32 bufferId)

Remove a buffer (p. 107) from the tag.

Parameters:
bufferId the id of the buffer (p. 107) to be removed from the tag

13.28.2.4 imbxUint32 puntoexe::imebra::data::getBufferSize (imbxUint32


bufferId)

Returns the size of a buffer (p. 107), in bytes.


If the buffer (p. 107) doesn’t exist then returns 0. See buffer::getBufferSizeBytes()
(p. 109) for more info.

Parameters:
bufferId the zero-based buffer’s id the function has to check for

Returns:
the buffer’s size in bytes, or 0 if the buffer (p. 107) doesn’t exist.

13.28.2.5 ptr< handlers::dataHandler > pun-


toexe::imebra::data::getDataHandler (imbxUint32 bufferId, bool
bWrite, std::string defaultType)

Get a data (p. 139) handler for the specified buffer (p. 107).
handlers::dataHandler (p. 195) can be used to read, write and resize the buffer
(p. 107).
handlers::dataHandler (p. 195) manages data (p. 139) types depending on the
buffer’s data (p. 139) type: if your application has to work directly on the buffer’s

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


142 Class Documentation

bytes, then it should obtain a handlers::dataHandlerRaw (p. 216) by calling getData-


HandlerRaw() (p. 142).
Usually a tag has only one buffer (p. 107) (bufferId = 0), but when a tag is a sequence
or has an undefined length, then it could store more than one buffer (p. 107); in this
case your application has to specify the id of the buffer (p. 107) for which the han-
dlers::dataHandler (p. 195) is requested.
The application can also specify a data (p. 139) type to use when a buffer (p. 107)
doesn’t exist yet: in this case a buffer (p. 107) with the specified data (p. 139) type
will be allocated.
The returned handlers::dataHandler (p. 195) works on a local copy of the buffer’s
data (p. 139), then it doesn’t have to worry about multithreading accesses to the buffer’s
data (p. 139).

Parameters:
bufferId the zero-based buffer’s id the data (p. 139) handler must use.
bWrite true if the application wants to write something into the buffer (p. 107)
defaultType a string that specifies the data (p. 139) type to use for the new buffers.

Returns:
a pointer to the data (p. 139) handler for the requested buffer (p. 107).

13.28.2.6 ptr< handlers::dataHandlerRaw > pun-


toexe::imebra::data::getDataHandlerRaw (imbxUint32 bufferId,
bool bWrite, std::string defaultType)

Get a raw data (p. 139) handler (handlers::dataHandlerRaw (p. 216)) for the speci-
fied buffer (p. 107).
The raw data (p. 139) handler can be used to read, write and resize the buffer (p. 107).
A raw data (p. 139) handler (handlers::dataHandlerRaw (p. 216)) always works on
a collection of bytes, no matter what the buffer’s data (p. 139) type is, while the nor-
mal handlers::dataHandler (p. 195) works on data (p. 139) types depending on the
buffer’s data (p. 139) type.
A handlers::dataHandler (p. 195) can be obtained by calling getDataHandler()
(p. 141).
Usually a tag has only one buffer (p. 107) (bufferId = 0), but when a tag is a sequence
or has an undefined length, then it could store more than one buffer (p. 107); in this
case your application has to specify the id of the buffer (p. 107) for which the data
(p. 139) handler is requested.
The application can also specify a data (p. 139) type to use when a buffer (p. 107)
doesn’t exist yet: in this case a buffer (p. 107) with the specified data (p. 139) type
will be allocated.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.28 puntoexe::imebra::data Class Reference 143

The returned handlers::dataHandlerRaw (p. 216) works on a local copy of the


buffer’s data (p. 139), then it doesn’t have to worry about multithreading accesses to
the buffer’s data (p. 139).

Parameters:
bufferId the zero-based buffer’s id the data (p. 139) handler must use.
bWrite true if the application wants to write something into the buffer (p. 107)
defaultType a string that specifies the data (p. 139) type to use for the new buffers.

Returns:
a pointer to the data (p. 139) handler for the requested buffer (p. 107).

13.28.2.7 ptr< dataSet > puntoexe::imebra::data::getDataSet (imbxUint32


dataSetId)

Retrieve an embedded data (p. 139) set.


Sequence tags (dicom type=SQ) store embedded dicom structures inside.
Sequences allow to nest several dicom structures. Sequences are used by dicom direc-
tories and by some tags in the normal dataSet (p. 155).

Parameters:
dataSetId the ID of the dataSet (p. 155) to retrieve. Several data (p. 139) sets can
be embedded in the tag. The first dataSet’s ID is zero.

Returns:
a pointer to the retrieved dataSet (p. 155)

13.28.2.8 std::string puntoexe::imebra::data::getDataType ()

Get the tag’s buffer (p. 107) type in Dicom format.


A buffer’s data (p. 139) type is composed by two uppercase chars.

Returns:
the buffer’s data (p. 139) type in Dicom format

13.28.2.9 ptr< streamReader > puntoexe::imebra::data::getStreamReader


(imbxUint32 bufferId)

Get a streamReader (p. 354) connected to a buffer’s data (p. 139).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


144 Class Documentation

Parameters:
bufferId the id of the buffer (p. 107) for which the streamReader (p. 354) is re-
quired. This parameter is usually 0

Returns:
the streamReader (p. 354) connected to the buffer’s data (p. 139).

13.28.2.10 ptr< streamWriter > puntoexe::imebra::data::getStreamWriter


(imbxUint32 bufferId, std::string dataType = "")

Get a streamWriter (p. 359) connected to a buffer’s data (p. 139).

Parameters:
bufferId the id of the buffer (p. 107) for which the streamWriter (p. 359) is re-
quired. This parameter is usually 0
dataType the datatype used to create the buffer (p. 107) if it doesn’t exist already

Returns:
the streamWriter (p. 359) connected to the emptied buffer’s data (p. 139).

13.28.2.11 void puntoexe::imebra::data::setDataSet (imbxUint32 dataSetId,


ptr< dataSet > pDataSet)

Set an embedded dataSet (p. 155) to the sequence.


Several data (p. 139) sets can be nested one inside each other. When a data (p. 139)
set is embedded into a tag, then the tag will have a sequence type (dicom type=SQ).
Sequences are used to build dicom directories and other tags in normal data (p. 139)
sets.

Parameters:
dataSetId The Id of the dataSet (p. 155) inside the tag. Tags can store several
data (p. 139) sets. The first dataSet (p. 155) has an ID of zero
pDataSet A pointer to the dataSet (p. 155) to store into the tag

The documentation for this class was generated from the following files:

• data.h
• data.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.29 puntoexe::imebra::dataCollection< collectionType > Class Template
Reference 145

13.29 puntoexe::imebra::dataCollection< collection-


Type > Class Template Reference
This class stores a collection of Dicom tags or groups (classes pun-
toexe::imebra::data (p. 139) or puntoexe::imebra::dataGroup (p. 150)). It is
used as base class by dataGroup (p. 150) and dataSet (p. 155).
#include <dataCollection.h>
Inheritance diagram for puntoexe::imebra::dataCollection< collectionType >::

puntoexe::baseObject

puntoexe::imebra::dataCollection< collectionType >

Public Member Functions


• ptr< dataCollectionIterator< collectionType > > getDataIterator ()
Return an iterator pointing to the first tag or group (data (p. 139) or dataGroup
(p. 150)) in the collection.

13.29.1 Detailed Description

template<class collectionType> class puntoexe::imebra::dataCollection< collec-


tionType >

This class stores a collection of Dicom tags or groups (classes pun-


toexe::imebra::data (p. 139) or puntoexe::imebra::dataGroup (p. 150)). It is
used as base class by dataGroup (p. 150) and dataSet (p. 155).

13.29.2 Member Function Documentation

13.29.2.1 template<class collectionType>


ptr<dataCollectionIterator<collectionType> >
puntoexe::imebra::dataCollection< collectionType
>::getDataIterator () [inline]

Return an iterator pointing to the first tag or group (data (p. 139) or dataGroup
(p. 150)) in the collection.
You can use this function to scan all the tags (data (p. 139)) in a dataGroup (p. 150)
or all the groups (dataGroup (p. 150)) in a dataSet (p. 155).
See dataCollectionIterator (p. 147) for more information.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


146 Class Documentation

Returns:
an iterator that accesses all the data in the collection

The documentation for this class was generated from the following file:

• dataCollection.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.30 puntoexe::imebra::dataCollectionIterator< collectionType > Class
Template Reference 147

13.30 puntoexe::imebra::dataCollectionIterator< col-


lectionType > Class Template Reference
This class accesses to all the data stored in a dataCollection (p. 145) derived class
(dataGroup (p. 150) or dataSet (p. 155)).
#include <dataCollection.h>
Inheritance diagram for puntoexe::imebra::dataCollectionIterator< collectionType >::

puntoexe::baseObject

puntoexe::imebra::dataCollectionIterator< collectionType >

Public Member Functions


• bool incIterator ()
Increase the iterator so it references the next data (p. 139) or dataGroup (p. 150) in
the collection.

• bool reset ()
Reset the iterator so it referencesthe first data (p. 139) or dataGroup (p. 150) in the
collection.

• bool isValid ()
Returns true if the iterator references a valid data (p. 139) or dataGroup (p. 150) in
the collection.

• ptr< collectionType > getData ()


Retrieve the data (p. 139) or dataGroup (p. 150) referenced by the iterator.

• imbxUint16 getId ()
Return the id of the data (p. 139) or dataGroup (p. 150) referenced by the iterator.

• imbxUint16 getOrder ()
Retrieve the order of the referenced data (p. 139) or dataGroup (p. 150).

13.30.1 Detailed Description

template<class collectionType> class puntoexe::imebra::dataCollectionIterator<


collectionType >

This class accesses to all the data stored in a dataCollection (p. 145) derived class
(dataGroup (p. 150) or dataSet (p. 155)).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


148 Class Documentation

When retrieved from a dataSet (p. 155) this class accesses all the groups (class data-
Group (p. 150)) in the dataSet (p. 155), while when retrieved from a dataGroup
(p. 150) it accesses all the tags (class data (p. 139)) in the dataGroup (p. 150).
When retrieved the iterator references the first data (p. 139) or dataGroup (p. 150) in
the collection.

13.30.2 Member Function Documentation

13.30.2.1 template<class collectionType > ptr<collectionType>


puntoexe::imebra::dataCollectionIterator< collectionType
>::getData () [inline]

Retrieve the data (p. 139) or dataGroup (p. 150) referenced by the iterator.
This function returns 0 if the iterator references an invalid data (p. 139) or dataGroup
(p. 150) (isValid() (p. 149) returns false).

Returns:
the data (p. 139) or dataGroup (p. 150) referenced by the iterator

13.30.2.2 template<class collectionType > imbxUint16


puntoexe::imebra::dataCollectionIterator< collectionType >::getId
() [inline]

Return the id of the data (p. 139) or dataGroup (p. 150) referenced by the iterator.
If the iterator references an invalid data (p. 139) or dataGroup (p. 150) (isValid()
(p. 149) returns false) then the function returns 0.

Returns:
the id of the referenced data (p. 139) or dataGroup (p. 150)

13.30.2.3 template<class collectionType > imbxUint16


puntoexe::imebra::dataCollectionIterator< collectionType
>::getOrder () [inline]

Retrieve the order of the referenced data (p. 139) or dataGroup (p. 150).
This function is used only while retrieving dataGroups because there can be several
groups with the same id; in this case the function retrieve the order of the dataGroup
(p. 150), that could be bigger than 0 when several data groups with the same id are
stored in the collection.
When used while retrieving the tags (class data (p. 139)) this function always returns
0.
The function returns 0 also when used while the iterator references an invalid data-
Group (p. 150) (isValid() (p. 149) returns 0).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.30 puntoexe::imebra::dataCollectionIterator< collectionType > Class
Template Reference 149
Returns:
the dataGroup’s order

13.30.2.4 template<class collectionType > bool


puntoexe::imebra::dataCollectionIterator< collectionType
>::incIterator () [inline]

Increase the iterator so it references the next data (p. 139) or dataGroup (p. 150) in
the collection.

Returns:
true if after the increment the iterator references a valid data (p. 139) or data-
Group (p. 150), or false if after the increment the iterator references the end of the
collection (invalid data (p. 139) or dataGroup (p. 150))

13.30.2.5 template<class collectionType > bool


puntoexe::imebra::dataCollectionIterator< collectionType >::isValid
() [inline]

Returns true if the iterator references a valid data (p. 139) or dataGroup (p. 150) in
the collection.

Returns:
true if the iterator references a valid data (p. 139) or dataGroup (p. 150), or false
if the iterator references the end of the collection

13.30.2.6 template<class collectionType > bool


puntoexe::imebra::dataCollectionIterator< collectionType >::reset ()
[inline]

Reset the iterator so it referencesthe first data (p. 139) or dataGroup (p. 150) in the
collection.

Returns:
true if after the reset the iterator references to a valid data (p. 139) or dataGroup
(p. 150), or false if after the reset the iterator references the end of the collection
(it means that the collection is empty)

The documentation for this class was generated from the following file:

• dataCollection.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


150 Class Documentation

13.31 puntoexe::imebra::dataGroup Class Reference


Represents a Dicom group which stores a group of Dicom tags.
#include <dataGroup.h>
Inheritance diagram for puntoexe::imebra::dataGroup::

puntoexe::baseObject

puntoexe::imebra::dataCollection< data >

puntoexe::imebra::dataGroup

Public Member Functions

• ptr< data > getTag (imbxUint16 tagId, bool bCreate=false)


Get the requested tag (class data (p. 139)).

• ptr< handlers::dataHandler > getDataHandler (imbxUint16 tagId, im-


bxUint32 bufferId, bool bWrite, std::string defaultType="")
Get a handlers::dataHandler (p. 195) object for the requested tag’s buffer (p. 107).

• ptr< handlers::dataHandlerRaw > getDataHandlerRaw (imbxUint16


tagId, imbxUint32 bufferId, bool bWrite, std::string defaultType="")
Get a handlers::dataHandlerRaw (p. 216) object for the requested tag’s buffer
(p. 107).

• ptr< streamReader > getStreamReader (imbxUint16 tagId, imbxUint32


bufferId)
Get a streamReader (p. 354) connected to the requested tag’s buffer (p. 107).

• ptr< streamWriter > getStreamWriter (imbxUint16 tagId, imbxUint32


bufferId, std::string dataType="")
Get a streamWriter (p. 359) connected to the requested tag’s buffer (p. 107).

• std::string getDataType (imbxUint16 tagId)


Return the data (p. 139) type of the specified tag, in dicom format.

13.31.1 Detailed Description

Represents a Dicom group which stores a group of Dicom tags.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.31 puntoexe::imebra::dataGroup Class Reference 151

The Dicom tags are organized into groups: this class stores all the tags that belong to
the same group.
Groups and tags (represented by the class data (p. 139)) are identified by an ID.

13.31.2 Member Function Documentation

13.31.2.1 ptr< handlers::dataHandler > pun-


toexe::imebra::dataGroup::getDataHandler (imbxUint16 tagId,
imbxUint32 bufferId, bool bWrite, std::string defaultType = "")

Get a handlers::dataHandler (p. 195) object for the requested tag’s buffer (p. 107).
A tag is represented by the class data (p. 139).
The data (p. 139) handler (handlers::dataHandler (p. 195)) allows the application to
read, write and resize the tag’s buffer (p. 107).
A tag can store several buffers: the application must specify the buffer’s id it wants to
deal with.

Parameters:
tagId the tag’s id, without the group’s id.
bufferId the buffer’s id (zero based). See data::getDataHandler() (p. 141) for
more informantion regarding this parameter
bWrite true if the application wants to write into the buffer (p. 107)
defaultType a string with the dicom data (p. 139) type to use if the buffer (p. 107)
doesn’t exist. If none is specified, then a default data (p. 139) type will be
used. This parameter is ignored if bWrite is set to false

Returns:
a pointer to the handlers::dataHandler (p. 195)

13.31.2.2 ptr< handlers::dataHandlerRaw > pun-


toexe::imebra::dataGroup::getDataHandlerRaw (imbxUint16 tagId,
imbxUint32 bufferId, bool bWrite, std::string defaultType = "")

Get a handlers::dataHandlerRaw (p. 216) object for the requested tag’s buffer
(p. 107).
A raw data (p. 139) handler always sees the buffer (p. 107) as a collection of bytes, no
matter what its real data (p. 139) type is.
A tag is represented by the class data (p. 139).
The raw data (p. 139) handler (handlers::dataHandlerRaw (p. 216)) allows the ap-
plication to read, write and resize the tag’s buffer (p. 107). The data (p. 139) handler
works on a local copy of the data (p. 139) so the application doesn’t have to worry
about multithreading accesses to the buffer’s data (p. 139).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


152 Class Documentation

A tag can store several buffers: the application must specify the buffer’s id it wants to
deal with.

Parameters:
tagId the tag’s id, without the group’s id.
bufferId the buffer’s id (zero based). See data::getDataHandlerRaw() (p. 142)
for more informantion regarding this parameter
bWrite true if the application wants to write into the buffer (p. 107)
defaultType a string with the dicom data (p. 139) type to use if the buffer (p. 107)
doesn’t exist. If none is specified, then a default data (p. 139) type will be
used. This parameter is ignored if bWrite is set to false

Returns:
a pointer to the handlers::dataHandlerRaw (p. 216)

13.31.2.3 std::string puntoexe::imebra::dataGroup::getDataType (imbxUint16


tagId)

Return the data (p. 139) type of the specified tag, in dicom format.
A dicom data (p. 139) type is composed by 2 uppercase chars.
If the specified tag doesn’t exist, then the function returns an empty string.

Parameters:
tagId the tag’s id, without the group’s id

Returns:
the tag’s data (p. 139) type in dicom format, or an empty string if the tag doesn’t
exist in the group

13.31.2.4 ptr< streamReader > pun-


toexe::imebra::dataGroup::getStreamReader
(imbxUint16 tagId, imbxUint32 bufferId)

Get a streamReader (p. 354) connected to the requested tag’s buffer (p. 107).
A tag is represented by the class data (p. 139).
The streamReader (p. 354) allows the application to read the data (p. 139) from the
tag’s buffer (p. 107). The stream (p. 340) works on a local copy of the data (p. 139)
so the application doesn’t have to worry about multithreading accesses to the buffer’s
data (p. 139).
A tag can store several buffers: the application must specify the buffer’s id it wants to
deal with.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.31 puntoexe::imebra::dataGroup Class Reference 153

Parameters:
tagId the tag’s id, without the group’s id.
bufferId the buffer’s id (zero based). See data::getDataHandler() (p. 141) for
more informantion regarding this parameter

Returns:
a pointer to the streamReader (p. 354)

13.31.2.5 ptr< streamWriter > pun-


toexe::imebra::dataGroup::getStreamWriter
(imbxUint16 tagId, imbxUint32 bufferId, std::string dataType = "")

Get a streamWriter (p. 359) connected to the requested tag’s buffer (p. 107).
A tag is represented by the class data (p. 139).
The streamWriter (p. 359) allows the application to write the data (p. 139) into the
tag’s buffer (p. 107). The stream (p. 340) works on a local copy of the data (p. 139)
so the application doesn’t have to worry about multithreading accesses to the buffer’s
data (p. 139).
A tag can store several buffers: the application must specify the buffer’s id it wants to
deal with.

Parameters:
tagId the tag’s id, without the group’s id.
bufferId the buffer’s id (zero based). See data::getDataHandler() (p. 141) for
more informantion regarding this parameter
dataType the datatype used to create the buffer (p. 107) if it doesn’t exist already

Returns:
a pointer to the streamWriter (p. 359)

13.31.2.6 ptr< data > puntoexe::imebra::dataGroup::getTag (imbxUint16


tagId, bool bCreate = false)

Get the requested tag (class data (p. 139)).

Parameters:
tagId the tag’s id (without the group id).
bCreate if true and the tag doesn’t exist then a new tag will be created.

Returns:
a pointer to the tag object

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


154 Class Documentation

The documentation for this class was generated from the following files:

• dataGroup.h
• dataGroup.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.32 puntoexe::imebra::dataSet Class Reference 155

13.32 puntoexe::imebra::dataSet Class Reference


A data (p. 139) set is a collection of groups of tags (see dataGroup (p. 150)).
#include <dataSet.h>
Inheritance diagram for puntoexe::imebra::dataSet::

puntoexe::baseObject

puntoexe::imebra::dataCollection< dataGroup >

puntoexe::imebra::dataSet

Public Member Functions


Get/set groups/tags

• ptr< data > getTag (imbxUint16 groupId, imbxUint16 order, imbxUint16


tagId, bool bCreate=false)
Retrieve a tag object.

• ptr< dataGroup > getGroup (imbxUint16 groupId, imbxUint16 order,


bool bCreate=false)
Retrieve a group object.

• void setGroup (imbxUint16 groupId, imbxUint16 order, ptr< dataGroup


> pGroup)
Insert the specified group into the dataset.

Get/set the image

• ptr< image > getImage (imbxUint32 frameNumber)


Retrieve an image (p. 232) from the dataset.

• void setImage (imbxUint32 frameNumber, ptr< image > pImage,


std::wstring transferSyntax, codecs::codec::quality quality)
Insert an image (p. 232) into the data (p. 139) set.

• imbxUint32 getFrameOffset (imbxUint32 frameNumber)


Get a frame’s offset from the offset table.

• imbxUint32 getFrameBufferId (imbxUint32 offset, imbxUint32


∗pLengthToBuffer)
Get the id of the buffer (p. 107) that starts at the specified offset.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


156 Class Documentation

• imbxUint32 getFrameBufferIds (imbxUint32 frameNumber, imbxUint32


∗pFirstBuffer, imbxUint32 ∗pEndBuffer)
Retrieve the first and the last buffers used to store the image (p. 232).

• imbxUint32 getFirstAvailFrameBufferId ()
Return the first buffer’s id available where a new frame can be saved.

Get/set a sequence item

• ptr< dataSet > getSequenceItem (imbxUint16 groupId, imbxUint16 or-


der, imbxUint16 tagId, imbxUint32 bufferId)
Retrieve a data (p. 139) set embedded into a sequence tag.

• ptr< lut > getLut (imbxUint16 groupId, imbxUint16 tagId, imbxUint32


lutId)
Retrieve a LUT.

• ptr< waveform > getWaveform (imbxUint32 waveformId)


Retrieve a waveform (p. 319) from the dataSet (p. 155).

Get/set the tags’ values

• imbxInt32 getSignedLong (imbxUint16 groupId, imbxUint16 order, im-


bxUint16 tagId, imbxUint32 elementNumber)
Retrieve a tag’s value as a signed long.

• void setSignedLong (imbxUint16 groupId, imbxUint16 order, imbxUint16


tagId, imbxUint32 elementNumber, imbxInt32 newValue, std::string de-
faultType="")
Set a tag’s value as a signed long.

• imbxUint32 getUnsignedLong (imbxUint16 groupId, imbxUint16 order,


imbxUint16 tagId, imbxUint32 elementNumber)
Retrieve a tag’s value as an unsigned long.

• void setUnsignedLong (imbxUint16 groupId, imbxUint16 order, im-


bxUint16 tagId, imbxUint32 elementNumber, imbxUint32 newValue,
std::string defaultType="")
Set a tag’s value as an unsigned long.

• double getDouble (imbxUint16 groupId, imbxUint16 order, imbxUint16


tagId, imbxUint32 elementNumber)
Retrieve a tag’s value as a double.

• void setDouble (imbxUint16 groupId, imbxUint16 order, imbxUint16 tagId,


imbxUint32 elementNumber, double newValue, std::string defaultType="")
Set a tag’s value as a double.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.32 puntoexe::imebra::dataSet Class Reference 157

• std::string getString (imbxUint16 groupId, imbxUint16 order, imbxUint16


tagId, imbxUint32 elementNumber)
Retrieve a tag’s value as a string. getUnicodeString() (p. 167) is preferred over
this method.

• std::wstring getUnicodeString (imbxUint16 groupId, imbxUint16 order,


imbxUint16 tagId, imbxUint32 elementNumber)
Retrieve a tag’s value as an unicode string.

• void setString (imbxUint16 groupId, imbxUint16 order, imbxUint16


tagId, imbxUint32 elementNumber, std::string newString, std::string default-
Type="")
Set a tag’s value as a string. setUnicodeString() (p. 171) is preferred over this
method.

• void setUnicodeString (imbxUint16 groupId, imbxUint16 order, im-


bxUint16 tagId, imbxUint32 elementNumber, std::wstring newString,
std::string defaultType="")
Set a tag’s value as an unicode string.

Data handlers

• std::string getDefaultDataType (imbxUint16 groupId, imbxUint16 tagId)


Return the default data (p. 139) type for the specified tag’s id.

• std::string getDataType (imbxUint16 groupId, imbxUint16 order, im-


bxUint16 tagId)
Return the data (p. 139) type of a tag.

• ptr< handlers::dataHandler > getDataHandler (imbxUint16 groupId,


imbxUint16 order, imbxUint16 tagId, imbxUint32 bufferId, bool bWrite,
std::string defaultType="")
Return a data (p. 139) handler for the specified tag’s buffer (p. 107).

• ptr< handlers::dataHandlerRaw > getDataHandlerRaw (imbxUint16


groupId, imbxUint16 order, imbxUint16 tagId, imbxUint32 bufferId, bool
bWrite, std::string defaultType="")
Return a raw data (p. 139) handler for the specified tag’s buffer (p. 107).

• ptr< streamReader > getStreamReader (imbxUint16 groupId, im-


bxUint16 order, imbxUint16 tagId, imbxUint32 bufferId)
Return a streamReader (p. 354) connected to the specified tag’s buffer’s memory
(p. 328).

• ptr< streamWriter > getStreamWriter (imbxUint16 groupId, im-


bxUint16 order, imbxUint16 tagId, imbxUint32 bufferId, std::string
dataType="")
Return a streamWriter (p. 359) connected to the specified tag’s buffer’s memory
(p. 328).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


158 Class Documentation

Syncronize the charset tag (0008,0005)

• void updateCharsetTag ()
Collect all the charsets used in the dataSet’s tags and then update the content of
the tag 0008,0005.

• void updateTagsCharset ()
Update all the dataSet’s tags with the charsets specified in the tag 0008,0005.

Set/get the item offset.

• void setItemOffset (imbxUint32 offset)


Called by codecs::dicomCodec (p. 131) when the dataset is written into a stream
(p. 340). Tells the dataSet (p. 155) the position at which it has been written into
the stream (p. 340).

• imbxUint32 getItemOffset ()
Retrieve the offset at which the dataSet (p. 155) is located in the dicom stream
(p. 340).

13.32.1 Detailed Description

A data (p. 139) set is a collection of groups of tags (see dataGroup (p. 150)).
The dataSet (p. 155) is usually built from a dicom stream (p. 340) by using the codec
codec::dicomCodec.
Also the tags with the data (p. 139) type SQ (sequence) contains one or more embedded
dataSets that can be retrieved by using data::getDataSet() (p. 143).
If your application creates a new dataset then it can set the default dataSet’s charset by
calling setCharsetsList(). See Imebra & Unicode (p. 41) for more information related
to Imebra and the Dicom charsets.
The dataSet (p. 155) and its components (all the dataGroup (p. 150), and data
(p. 139)) share a common lock object: this means that a lock on one of the dataSet’s
component will lock the entire dataSet (p. 155) and all its components.
For an introduction to the dataSet (p. 155), read Let’s read a dataSet (p. 30).

13.32.2 Member Function Documentation

13.32.2.1 ptr< handlers::dataHandler > pun-


toexe::imebra::dataSet::getDataHandler (imbxUint16 groupId,
imbxUint16 order, imbxUint16 tagId, imbxUint32 bufferId, bool
bWrite, std::string defaultType = "")

Return a data (p. 139) handler for the specified tag’s buffer (p. 107).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.32 puntoexe::imebra::dataSet Class Reference 159

The data (p. 139) handler allows the application to read, write and resize the tag’s
buffer (p. 107).
A tag can store several buffers, then the application must specify the buffer’s id it wants
to deal with.

Parameters:
groupId the group to which the tag belongs
order if the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the tag belongs. This parameter is used
to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId the tag’s id
bufferId the buffer’s id (zero based)
bWrite true if the application wants to write into the buffer (p. 107)
defaultType a string with the dicom data (p. 139) type to use if the buffer (p. 107)
doesn’t exist. If none is specified, then a default data (p. 139) type will be
used

Returns:
a pointer to the data (p. 139) handler.

13.32.2.2 ptr< handlers::dataHandlerRaw > pun-


toexe::imebra::dataSet::getDataHandlerRaw (imbxUint16 groupId,
imbxUint16 order, imbxUint16 tagId, imbxUint32 bufferId, bool
bWrite, std::string defaultType = "")

Return a raw data (p. 139) handler for the specified tag’s buffer (p. 107).
A raw data (p. 139) handler always sees the buffer (p. 107) as a collection of bytes, no
matter what the tag’s data (p. 139) type is.
A tag can store several buffers, then the application must specify the buffer’s id it wants
to deal with.

Parameters:
groupId the group to which the tag belongs
order if the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the tag belongs. This parameter is used
to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId the tag’s id
bufferId the buffer’s id (zero based)
bWrite true if the application wants to write into the buffer (p. 107)
defaultType a string with the dicom data (p. 139) type to use if the buffer (p. 107)
doesn’t exist. If none is specified, then a default data (p. 139) type will be
used

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


160 Class Documentation

Returns:
a pointer to the data (p. 139) handler.

13.32.2.3 std::string puntoexe::imebra::dataSet::getDataType (imbxUint16


groupId, imbxUint16 order, imbxUint16 tagId)

Return the data (p. 139) type of a tag.

Parameters:
groupId The group to which the tag belongs
order When multiple groups with the same it are present, then use this parameter
to specify which group must be used. The first group as an order of 0.
tagId The id of the tag for which the type must be retrieved.

Returns:
a string with the tag’s type.

13.32.2.4 std::string puntoexe::imebra::dataSet::getDefaultDataType


(imbxUint16 groupId, imbxUint16 tagId)

Return the default data (p. 139) type for the specified tag’s id.
The default data (p. 139) type is retrieved from an internal dictionary which stores the
default properties of each dicom’s tag.

Parameters:
groupId The group to which the tag belongs
tagId The id of the tag.

Returns:
the tag’s default type. The returned string is a constant.

13.32.2.5 double puntoexe::imebra::dataSet::getDouble (imbxUint16 groupId,


imbxUint16 order, imbxUint16 tagId, imbxUint32 elementNumber)

Retrieve a tag’s value as a double.


Read the value of the requested tag and return it as a double.

Parameters:
groupId The group to which the tag to be read belongs

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.32 puntoexe::imebra::dataSet Class Reference 161

order If the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the group belongs. This parameter is
used to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId The id of the tag to retrieve
elementNumber The element’s number to retrieve. A buffer (p. 107) can store
several elements: this parameter specifies which element must be retrieved.
The first element’s number is 0

Returns:
The tag’s content, as a double

13.32.2.6 imbxUint32 puntoexe::imebra::dataSet::getFirstAvailFrameBufferId


()

Return the first buffer’s id available where a new frame can be saved.

Returns:
the id of the first buffer (p. 107) available to store a new frame

13.32.2.7 imbxUint32 puntoexe::imebra::dataSet::getFrameBufferId


(imbxUint32 offset, imbxUint32 ∗ pLengthToBuffer)

Get the id of the buffer (p. 107) that starts at the specified offset.

Parameters:
offset one offset retrieved from the frames offset table: see getFrameOffset()
(p. 162)
pLengthToBuffer a pointer to a variable that will store the total lenght of the
buffers that preceed the one being returned (doesn’t include the tag descrip-
tors)

Returns:
the id of the buffer (p. 107) that starts at the specified offset

13.32.2.8 imbxUint32 puntoexe::imebra::dataSet::getFrameBufferIds


(imbxUint32 frameNumber, imbxUint32 ∗ pFirstBuffer, imbxUint32
∗ pEndBuffer)

Retrieve the first and the last buffers used to store the image (p. 232).
This function works only with the new Dicom3 streams, not with the old NEMA for-
mat.
This function is used by setImage() (p. 169) and getImage() (p. 163).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


162 Class Documentation

Parameters:
frameNumber the frame for which the buffers have to be retrieved
pFirstBuffer a pointer to a variable that will contain the id of the first buffer
(p. 107) used to store the image (p. 232)
pEndBuffer a pointer to a variable that will contain the id of the first buffer
(p. 107) next to the last one used to store the image (p. 232)

Returns:
the total length of the buffers that contain the image (p. 232)

13.32.2.9 imbxUint32 puntoexe::imebra::dataSet::getFrameOffset


(imbxUint32 frameNumber)

Get a frame’s offset from the offset table.

Parameters:
frameNumber the number of the frame for which the offset is requested

Returns:
the offset for the specified frame

13.32.2.10 ptr< dataGroup > puntoexe::imebra::dataSet::getGroup


(imbxUint16 groupId, imbxUint16 order, bool bCreate = false)

Retrieve a group object.


A Group object is represented by the dataGroup (p. 150) class.
If the group doesn’t exist and the parameter bCreate is set to false, then the function
returns a null pointer. If the group doesn’t exist and the parameter bCreate is set to true,
then an empty group will be created and inserted into the dataset.

Parameters:
groupId The group to retrieve.
order If the group is recurring in the file (it appears several times), then use this
parameter to specify which group must be retrieved. This parameter is used
to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero.
bCreate When bCreate is set to true and the requested group doesn’t exist, then a
new one is created and inserted into the dataset. When bCreate is set to false
and the requested group doesn’t exist, then a null pointer is returned.

Returns:
A pointer to the retrieved group. The group should be released as soon as possible
using the function Release(). If the requested group doesn’t exist then the returned

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.32 puntoexe::imebra::dataSet Class Reference 163

value depend on the value of the bCreate parameter: when bCreate is false then a
value of zero is returned, otherwise a pointer to the just created group is returned.

13.32.2.11 ptr< image > puntoexe::imebra::dataSet::getImage (imbxUint32


frameNumber)

Retrieve an image (p. 232) from the dataset.


The right codec will be automatically used to decode the image (p. 232) embedded into
the dataset. If multiple frames are available, then the calling application can decide the
frame to retrieve.
The function throw an exception if the requested image (p. 232) doesn’t exist or the
image’s tag is corrupted.
The retrieved image (p. 232) should then be processed by the trans-
forms::modalityVOILUT (p. 283) transform in order to convert the pixels value to a
meaningful space. Infact, the dicom image’s pixel values saved by other application
have a meaningful value only for the application that generated them, while the
modality VOI/LUT transformation will convert those values to a more portable unit
(e.g.: optical density).
Further transformations are applied by the transforms::VOILUT (p. 300) transform,
in order to adjust the image’s contrast for displaying purposes.

Parameters:
frameNumber The frame number to retrieve. The first frame’s id is 0

Returns:
A pointer to the retrieved image (p. 232)

13.32.2.12 imbxUint32 puntoexe::imebra::dataSet::getItemOffset ()

Retrieve the offset at which the dataSet (p. 155) is located in the dicom stream (p. 340).

Returns:
the position at which the dataSet (p. 155) is located in the dicom stream (p. 340)

13.32.2.13 ptr< lut > puntoexe::imebra::dataSet::getLut (imbxUint16 groupId,


imbxUint16 tagId, imbxUint32 lutId)

Retrieve a LUT.
LUT are encoded into sequences. This function retrieve the sequence and build a lut
(p. 241) object describing the LUT.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


164 Class Documentation

Parameters:
groupId The group to which the LUT sequence belongs
tagId The id of the tag to containing the LUT
lutId The id of the lut (p. 241) inside the tag (0 based)

Returns:
A pointer to the retrieved LUT. If the requested group, tag or buffer (p. 107) (se-
quence item) doesn’t exist, or if the tag’s type is not a sequence (SQ), then a null
pointer is returned, otherwise a pointer to the retrieved LUT is returned

13.32.2.14 ptr< dataSet > puntoexe::imebra::dataSet::getSequenceItem


(imbxUint16 groupId, imbxUint16 order, imbxUint16 tagId,
imbxUint32 bufferId)

Retrieve a data (p. 139) set embedded into a sequence tag.


Sequence tags store several binary data (p. 139) which can be individually parsed as a
normal dicom file (without the preamble of 128 bytes and the DICM signature).
Using sequences, an application can store several nested dicom structures.
This function parse a single item of a sequence tag and return a data (p. 139) set object
(represented by a this class) which stores the retrieved tags.
If the requested tag’s type is not a sequence or the requested item in the sequence is
missed, then a null pointer will be returned.

Parameters:
groupId The group to which the sequence tag to be parsed belongs
order If the group is recurring in the file (it appears several times), then use this
parameter to specify which group must be retrieved. This parameter is used
to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId The id of the tag to parse
bufferId The id of the tag’s item to parse (zero based)

Returns:
A pointer to the retrieved data (p. 139) set. If the requested group, tag or buffer
(p. 107) (sequence item) doesn’t exist, or if the tag’s type is not a sequence (SQ),
then a null pointer is returned, otherwise a pointer to the retrieved dataset is re-
turned

13.32.2.15 imbxInt32 puntoexe::imebra::dataSet::getSignedLong (imbxUint16


groupId, imbxUint16 order, imbxUint16 tagId, imbxUint32
elementNumber)

Retrieve a tag’s value as a signed long.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.32 puntoexe::imebra::dataSet Class Reference 165

Read the value of the requested tag and return it as a signed long.

Parameters:
groupId The group to which the tag to be read belongs
order If the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the group belongs This parameter is used
to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId The id of the tag to retrieve
elementNumber The element’s number to retrieve. A buffer (p. 107) can store
several elements: this parameter specifies which element must be retrieved.
The first element’s number is 0

Returns:
The tag’s content, as a signed long

13.32.2.16 ptr< streamReader > puntoexe::imebra::dataSet::getStreamReader


(imbxUint16 groupId, imbxUint16 order, imbxUint16 tagId,
imbxUint32 bufferId)

Return a streamReader (p. 354) connected to the specified tag’s buffer’s memory
(p. 328).
A tag can store several buffers: the application must specify the buffer’s id it wants to
deal with.

Parameters:
groupId the group to which the tag belongs
order if the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the tag belongs. This parameter is used
to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId the tag’s id
bufferId the buffer’s id (zero based)

Returns:
a pointer to the streamReader (p. 354)

13.32.2.17 ptr< streamWriter > puntoexe::imebra::dataSet::getStreamWriter


(imbxUint16 groupId, imbxUint16 order, imbxUint16 tagId,
imbxUint32 bufferId, std::string dataType = "")

Return a streamWriter (p. 359) connected to the specified tag’s buffer’s memory
(p. 328).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


166 Class Documentation

A tag can store several buffers, then the application must specify the buffer’s id it wants
to deal with.

Parameters:
groupId the group to which the tag belongs
order if the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the tag belongs. This parameter is used
to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId the tag’s id
bufferId the buffer’s id (zero based)
dataType the datatype used to create the buffer (p. 107) if it doesn’t exist already

Returns:
a pointer to the streamWriter (p. 359)

13.32.2.18 std::string puntoexe::imebra::dataSet::getString (imbxUint16


groupId, imbxUint16 order, imbxUint16 tagId, imbxUint32
elementNumber)

Retrieve a tag’s value as a string. getUnicodeString() (p. 167) is preferred over this
method.
Read the value of the requested tag and return it as a string.

Parameters:
groupId The group to which the tag to be read belongs
order If the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the group belongs. This parameter is
used to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId The id of the tag to retrieve
elementNumber The element’s number to retrieve. A buffer (p. 107) can store
several elements: this parameter specifies which element must be retrieved.
The first element’s number is 0

Returns:
The tag’s content, as a string

13.32.2.19 ptr< data > puntoexe::imebra::dataSet::getTag (imbxUint16


groupId, imbxUint16 order, imbxUint16 tagId, bool bCreate =
false)

Retrieve a tag object.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.32 puntoexe::imebra::dataSet Class Reference 167

Tag object is represented by the data (p. 139) class.


If the tag doesn’t exist and the parameter bCreate is set to false, then the function
returns a null pointer. If the tag doesn’t exist and the parameter bCreate is set to true,
then an empty tag will be created and inserted into the dataset.

Parameters:
groupId The group to which the tag belongs.
order If the group is recurring in the file (it appears several times), then use this
parameter to specify which group must be retrieved. This parameter is used
to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero.
tagId The id of the tag to retrieve.
bCreate When bCreate is set to true and the requested tag doesn’t exist, then a
new one is created and inserted into the dataset. When bCreate is set to false
and the requested tag doesn’t exist, then a null pointer is returned.

Returns:
A pointer to the retrieved tag. If the requested tag doesn’t exist then the returned
value depend on the value of the bCreate parameter: when bCreate is false then a
value of zero is returned, otherwise a pointer to the just created tag is returned.

13.32.2.20 std::wstring puntoexe::imebra::dataSet::getUnicodeString


(imbxUint16 groupId, imbxUint16 order, imbxUint16 tagId,
imbxUint32 elementNumber)

Retrieve a tag’s value as an unicode string.


Read the value of the requested tag and return it as an unicode string.

Parameters:
groupId The group to which the tag to be read belongs
order If the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the group belongs. This parameter is
used to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId The id of the tag to retrieve
elementNumber The element’s number to retrieve. A buffer (p. 107) can store
several elements: this parameter specifies which element must be retrieved.
The first element’s number is 0

Returns:
The tag’s content, as an unicode string

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


168 Class Documentation

13.32.2.21 imbxUint32 puntoexe::imebra::dataSet::getUnsignedLong


(imbxUint16 groupId, imbxUint16 order, imbxUint16 tagId,
imbxUint32 elementNumber)

Retrieve a tag’s value as an unsigned long.


Read the value of the requested tag and return it as an unsigned long.

Parameters:
groupId The group to which the tag to be read belongs
order If the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the group belongs. This parameter is
used to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId The id of the tag to retrieve
elementNumber The element’s number to retrieve. A buffer (p. 107) can store
several elements: this parameter specifies which element must be retrieved.
The first element’s number is 0

Returns:
The tag’s content, as an unsigned long

13.32.2.22 ptr< waveform > puntoexe::imebra::dataSet::getWaveform


(imbxUint32 waveformId)

Retrieve a waveform (p. 319) from the dataSet (p. 155).


Each waveforms is stored in a sequence item; the function retrieves the proper sequence
item and connects it to the class waveform (p. 319) which can be used to retrieve the
waveform (p. 319) data (p. 139).

Parameters:
waveformId the zero based index of the waveform (p. 319) to retrieve

Returns:
an object waveform (p. 319) that can be used to read the waveform (p. 319) data
(p. 139), or a null pointer if the requested waveform (p. 319) doesn’t exist

13.32.2.23 void puntoexe::imebra::dataSet::setDouble (imbxUint16 groupId,


imbxUint16 order, imbxUint16 tagId, imbxUint32 elementNumber,
double newValue, std::string defaultType = "")

Set a tag’s value as a double.


If the specified tag doesn’t exist, then a new one will be created and inserted into the
dataset.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.32 puntoexe::imebra::dataSet Class Reference 169

Parameters:
groupId The group to which the tag to be write belongs
order If the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the group belongs. This parameter is
used to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId The id of the tag to set
elementNumber The element’s number to set. A buffer (p. 107) can store sev-
eral elements: this parameter specifies which element must be set. The first
element’s number is 0
newValue the value to be written into the tag
defaultType if the specified tag doesn’t exist then the function will create a new
tag with the data (p. 139) type specified in this parameter

13.32.2.24 void puntoexe::imebra::dataSet::setGroup (imbxUint16 groupId,


imbxUint16 order, ptr< dataGroup > pGroup)

Insert the specified group into the dataset.


A Group object is represented by the dataGroup (p. 150) class.
If a group with the same id and order is already present into the data (p. 139) set, then
it is removed to leave space to the new group.

Parameters:
groupId The id of the group to insert into the data (p. 139) set.
order If the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the group belongs. This parameter is
used to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero.
pGroup A pointer to the group to insert into the data (p. 139) set.

13.32.2.25 void puntoexe::imebra::dataSet::setImage (imbxUint32


frameNumber, ptr< image > pImage, std::wstring transferSyntax,
codecs::codec::quality quality)

Insert an image (p. 232) into the data (p. 139) set.
The specified transfer syntax will be used to choose the right codec for the image
(p. 232).

Parameters:
frameNumber The frame number where the image (p. 232) must be stored. The
first frame’s id is 0.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


170 Class Documentation

pImage A pointer to the image (p. 232) object to be stored into the data (p. 139)
set.
transferSyntax the transfer syntax that specifies the codec and the parameters to
use for the encoding
quality an enumeration that set the compression quality

13.32.2.26 void puntoexe::imebra::dataSet::setItemOffset (imbxUint32 offset)

Called by codecs::dicomCodec (p. 131) when the dataset is written into a stream
(p. 340). Tells the dataSet (p. 155) the position at which it has been written into the
stream (p. 340).

Parameters:
offset the position at which the dataSet (p. 155) has been written into the stream
(p. 340)

13.32.2.27 void puntoexe::imebra::dataSet::setSignedLong (imbxUint16


groupId, imbxUint16 order, imbxUint16 tagId, imbxUint32
elementNumber, imbxInt32 newValue, std::string defaultType = "")

Set a tag’s value as a signed long.


If the specified tag doesn’t exist, then a new one will be created and inserted into the
dataset.

Parameters:
groupId The group to which the tag to be write belongs
order If the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the group belongs. This parameter is
used to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId The id of the tag to set
elementNumber The element’s number to set. A buffer (p. 107) can store sev-
eral elements: this parameter specifies which element must be set. The first
element’s number is 0
newValue the value to be written into the tag
defaultType if the specified tag doesn’t exist then the function will create a new
tag with the data (p. 139) type specified in this parameter

13.32.2.28 void puntoexe::imebra::dataSet::setString (imbxUint16 groupId,


imbxUint16 order, imbxUint16 tagId, imbxUint32 elementNumber,
std::string newString, std::string defaultType = "")

Set a tag’s value as a string. setUnicodeString() (p. 171) is preferred over this method.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.32 puntoexe::imebra::dataSet Class Reference 171

If the specified tag doesn’t exist, then a new one will be created and inserted into the
dataset.

Parameters:
groupId The group to which the tag to be write belongs
order If the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the group belongs. This parameter is
used to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId The id of the tag to set
elementNumber The element’s number to set. A buffer (p. 107) can store sev-
eral elements: this parameter specifies which element must be set. The first
element’s number is 0
newString the value to be written into the tag
defaultType if the specified tag doesn’t exist then the function will create a new
tag with the data (p. 139) type specified in this parameter

13.32.2.29 void puntoexe::imebra::dataSet::setUnicodeString (imbxUint16


groupId, imbxUint16 order, imbxUint16 tagId, imbxUint32
elementNumber, std::wstring newString, std::string defaultType =
"")

Set a tag’s value as an unicode string.


If the specified tag doesn’t exist, then a new one will be created and inserted into the
dataset.

Parameters:
groupId The group to which the tag to be write belongs
order If the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the group belongs. This parameter is
used to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId The id of the tag to set
elementNumber The element’s number to set. A buffer (p. 107) can store sev-
eral elements: this parameter specifies which element must be set. The first
element’s number is 0
newString the value to be written into the tag
defaultType if the specified tag doesn’t exist then the function will create a new
tag with the data (p. 139) type specified in this parameter

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


172 Class Documentation

13.32.2.30 void puntoexe::imebra::dataSet::setUnsignedLong (imbxUint16


groupId, imbxUint16 order, imbxUint16 tagId, imbxUint32
elementNumber, imbxUint32 newValue, std::string defaultType =
"")

Set a tag’s value as an unsigned long.


If the specified tag doesn’t exist, then a new one will be created and inserted into the
dataset.

Parameters:
groupId The group to which the tag to be write belongs
order If the group is recurring in the file (it appears several times), then use this
parameter to specify to which group the group belongs. This parameter is
used to deal with old DICOM files, since the new one should use the sequence
items to achieve the same result. It should be set to zero
tagId The id of the tag to set
elementNumber The element’s number to set. A buffer (p. 107) can store sev-
eral elements: this parameter specifies which element must be set. The first
element’s number is 0
newValue the value to be written into the tag
defaultType if the specified tag doesn’t exist then the function will create a new
tag with the data (p. 139) type specified in this parameter

13.32.2.31 void puntoexe::imebra::dataSet::updateCharsetTag ()

Collect all the charsets used in the dataSet’s tags and then update the content of the tag
0008,0005.
This function is called by the codecs (p. 75) before the dicom stream (p. 340) is saved,
therefore the application doesn’t need to call the function before saving the stream
(p. 340).

13.32.2.32 void puntoexe::imebra::dataSet::updateTagsCharset ()

Update all the dataSet’s tags with the charsets specified in the tag 0008,0005.
This function is called by the codecs (p. 75) after the stream (p. 340) has been loaded,
therefore the application doesn’t need to call the function after the stream (p. 340) has
been loaded.
The documentation for this class was generated from the following files:

• dataSet.h
• dataSet.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.33 puntoexe::imebra::dataSetCorruptedOffsetTable Class Reference 173

13.33 puntoexe::imebra::dataSetCorruptedOffsetTable
Class Reference
This exception is thrown when the basic offset table is corrupted.
#include <dataSet.h>
Inheritance diagram for puntoexe::imebra::dataSetCorruptedOffsetTable::

puntoexe::imebra::dataSetException

puntoexe::imebra::dataSetCorruptedOffsetTable

Public Member Functions


• dataSetCorruptedOffsetTable (const std::string &message)
Build a dataSetImageDoesntExist (p. 179) exception.

13.33.1 Detailed Description

This exception is thrown when the basic offset table is corrupted.

13.33.2 Constructor & Destructor Documentation

13.33.2.1 puntoexe::imebra::dataSetCorruptedOffsetTable::dataSetCorruptedOffsetTable
(const std::string & message) [inline]

Build a dataSetImageDoesntExist (p. 179) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• dataSet.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


174 Class Documentation

13.34 puntoexe::imebra::dataSetException Class Ref-


erence
This is the base class for the exceptions thrown by the dataSet (p. 155).
#include <dataSet.h>
Inheritance diagram for puntoexe::imebra::dataSetException::

puntoexe::imebra::dataSetException

puntoexe::imebra::dataSetCorruptedOffsetTable puntoexe::imebra::dataSetExceptionDifferentFormat puntoexe::imebra::dataSetExceptionOldFormat puntoexe::imebra::dataSetExceptionUnknownTransferSyntax puntoexe::imebra::dataSetExceptionWrongFrame puntoexe::imebra::dataSetImageDoesntExist

13.34.1 Detailed Description

This is the base class for the exceptions thrown by the dataSet (p. 155).
The documentation for this class was generated from the following file:

• dataSet.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.35 puntoexe::imebra::dataSetExceptionDifferentFormat Class Reference 175

13.35 puntoexe::imebra::dataSetExceptionDifferentFormat
Class Reference
This exception is thrown when the application is trying to store an image (p. 232) in the
dataSet (p. 155) but the dataSet (p. 155) already stores other images that have different
attributes.
#include <dataSet.h>
Inheritance diagram for puntoexe::imebra::dataSetExceptionDifferentFormat::

puntoexe::imebra::dataSetException

puntoexe::imebra::dataSetExceptionDifferentFormat

13.35.1 Detailed Description

This exception is thrown when the application is trying to store an image (p. 232) in the
dataSet (p. 155) but the dataSet (p. 155) already stores other images that have different
attributes.
The exception is usually thrown by dataSet::setImage() (p. 169).
The documentation for this class was generated from the following file:

• dataSet.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


176 Class Documentation

13.36 puntoexe::imebra::dataSetExceptionOldFormat
Class Reference
This exception is thrown when the application is trying to store an image (p. 232) in an
old Dicom format.
#include <dataSet.h>
Inheritance diagram for puntoexe::imebra::dataSetExceptionOldFormat::

puntoexe::imebra::dataSetException

puntoexe::imebra::dataSetExceptionOldFormat

13.36.1 Detailed Description

This exception is thrown when the application is trying to store an image (p. 232) in an
old Dicom format.
The application cannot store images in old Dicom formats (before Dicom3).
The documentation for this class was generated from the following file:

• dataSet.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.37 puntoexe::imebra::dataSetExceptionUnknownTransferSyntax Class
Reference 177

13.37 puntoexe::imebra::dataSetExceptionUnknownTransferSyntax
Class Reference
This exception is thrown when an unknown transfer syntax is being used while reading
or writing a stream (p. 340).
#include <dataSet.h>
Inheritance diagram for puntoexe::imebra::dataSetExceptionUnknownTransferSyntax::

puntoexe::imebra::dataSetException

puntoexe::imebra::dataSetExceptionUnknownTransferSyntax

13.37.1 Detailed Description

This exception is thrown when an unknown transfer syntax is being used while reading
or writing a stream (p. 340).
The documentation for this class was generated from the following file:

• dataSet.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


178 Class Documentation

13.38 puntoexe::imebra::dataSetExceptionWrongFrame
Class Reference
This exception is thrown when the application is storing several images in the dataSet
(p. 155) but doesn’t store them in the right order.
#include <dataSet.h>
Inheritance diagram for puntoexe::imebra::dataSetExceptionWrongFrame::

puntoexe::imebra::dataSetException

puntoexe::imebra::dataSetExceptionWrongFrame

13.38.1 Detailed Description

This exception is thrown when the application is storing several images in the dataSet
(p. 155) but doesn’t store them in the right order.
The application must store the images following the frame order, without skipping
frames.
The documentation for this class was generated from the following file:

• dataSet.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.39 puntoexe::imebra::dataSetImageDoesntExist Class Reference 179

13.39 puntoexe::imebra::dataSetImageDoesntExist
Class Reference
This exception is thrown when the an image (p. 232) that doesn’t exist is requested.
#include <dataSet.h>
Inheritance diagram for puntoexe::imebra::dataSetImageDoesntExist::

puntoexe::imebra::dataSetException

puntoexe::imebra::dataSetImageDoesntExist

Public Member Functions


• dataSetImageDoesntExist (const std::string &message)
Build a dataSetImageDoesntExist (p. 179) exception.

13.39.1 Detailed Description

This exception is thrown when the an image (p. 232) that doesn’t exist is requested.

Examples:

dicom2jpeg/dicom2jpeg.cpp.

13.39.2 Constructor & Destructor Documentation

13.39.2.1 puntoexe::imebra::dataSetImageDoesntExist::dataSetImageDoesntExist
(const std::string & message) [inline]

Build a dataSetImageDoesntExist (p. 179) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• dataSet.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


180 Class Documentation

13.40 puntoexe::imebra::dicomDictionary Class Ref-


erence
The Dicom Dictionary.
#include <dicomDict.h>

Public Member Functions

• std::wstring getTagName (imbxUint16 groupId, imbxUint16 tagId) const


Retrieve a tag’s description.

• std::string getTagType (imbxUint16 groupId, imbxUint16 tagId) const


Retrieve a tag’s default data (p. 139) type.

• bool isDataTypeValid (std::string dataType) const


Return true if the specified string represents a valid dicom data (p. 139) type.

• bool getLongLength (std::string dataType) const


Return true if the tag’s length in the dicom stream (p. 340) must be written using a
DWORD.

• imbxUint32 getWordSize (std::string dataType) const


Return the size of the data (p. 139) type’s elements.

• imbxUint32 getMaxSize (std::string dataType) const


Return the maximum size of the tags with the specified data (p. 139) type.

Static Public Member Functions

• static dicomDictionary ∗ getDicomDictionary ()


Retrieve the only valid instance of this class.

13.40.1 Detailed Description

The Dicom Dictionary.


This class can be used to retrieve the tags’ default data (p. 139) types and descriptions.
An instance of this class is automatically allocated by the library: your application
should use the static function getDicomDictionary() (p. 181) in order to get the only
valid instance of this class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.40 puntoexe::imebra::dicomDictionary Class Reference 181

13.40.2 Member Function Documentation

13.40.2.1 dicomDictionary ∗ pun-


toexe::imebra::dicomDictionary::getDicomDictionary ()
[static]

Retrieve the only valid instance of this class.

Returns:
a pointer to the dicom dictionary

13.40.2.2 bool puntoexe::imebra::dicomDictionary::getLongLength (std::string


dataType) const

Return true if the tag’s length in the dicom stream (p. 340) must be written using a
DWORD.

Parameters:
dataType the data (p. 139) type for which the information is required

Returns:
true if the specified data (p. 139) type’s length must be written using a DWORD

13.40.2.3 imbxUint32 puntoexe::imebra::dicomDictionary::getMaxSize


(std::string dataType) const

Return the maximum size of the tags with the specified data (p. 139) type.

Parameters:
dataType the data (p. 139) type for which the information is required

Returns:
the maximum tag’s size in bytes

13.40.2.4 std::wstring puntoexe::imebra::dicomDictionary::getTagName


(imbxUint16 groupId, imbxUint16 tagId) const

Retrieve a tag’s description.

Parameters:
groupId The group which the tag belongs to

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


182 Class Documentation

tagId The tag’s id

Returns:
The tag’s description

13.40.2.5 std::string puntoexe::imebra::dicomDictionary::getTagType


(imbxUint16 groupId, imbxUint16 tagId) const

Retrieve a tag’s default data (p. 139) type.

Parameters:
groupId The group which the tag belongs to
tagId The tag’s id

Returns:
The tag’s data (p. 139) type

13.40.2.6 imbxUint32 puntoexe::imebra::dicomDictionary::getWordSize


(std::string dataType) const

Return the size of the data (p. 139) type’s elements.

Parameters:
dataType the data (p. 139) type for which the information is required

Returns:
the size of a single element

13.40.2.7 bool puntoexe::imebra::dicomDictionary::isDataTypeValid


(std::string dataType) const

Return true if the specified string represents a valid dicom data (p. 139) type.

Parameters:
dataType the string to be checked

Returns:
true if the specified string is a valid dicom data (p. 139) type

The documentation for this class was generated from the following files:

• dicomDict.h
• dicomDict.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.41 puntoexe::imebra::dicomDir Class Reference 183

13.41 puntoexe::imebra::dicomDir Class Reference


A dicomDir (p. 183) object contains the information about the tree structure of a DI-
COMDIR dataset.
#include <dicomDir.h>
Inheritance diagram for puntoexe::imebra::dicomDir::

puntoexe::baseObject

puntoexe::imebra::dicomDir

Public Member Functions


• dicomDir (ptr< dataSet > pDataSet)
Initializes a dicomDir (p. 183) object and attach it to an existing dataset.

• ptr< dataSet > getDirectoryDataSet ()


Returns the DICOMDIR dataset.

• ptr< directoryRecord > getNewRecord ()


Creates a new directoryRecord (p. 190) and embeds its dataSet (p. 155) into the DI-
COMDIR sequence of items.

• ptr< directoryRecord > getFirstRootRecord ()


Returns the first root record in the DICOMDIR.

• void setFirstRootRecord (ptr< directoryRecord > pFirstRootRecord)


Sets the first root record in the DICOMDIR.

• ptr< dataSet > buildDataSet ()


Updates the dataSet (p. 155) containing the DICOMDIR with the information con-
tained in the directory records.

13.41.1 Detailed Description

A dicomDir (p. 183) object contains the information about the tree structure of a DI-
COMDIR dataset.
The dicomDir (p. 183) class parses the DICOMDIR dataset in the constructor and
detects DICOMDIR tree structure the specified.
Each directory record in the DICOMDIR structure is represented by the directo-
ryRecord (p. 190) class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


184 Class Documentation

The first root directoryRecord (p. 190) can be obtained with a call to getFirst-
RootRecord() (p. 185).
WARNING: all the directoryRecord (p. 190) allocated by this class are released only
when the dicomDir (p. 183) itself is released, even if the directoryRecord (p. 190) are
explicitly released by your application.
This resolves a stack overflow when a large number of sibling records is present.

Examples:

dicomdirItems/dicomdirItems.cpp.

13.41.2 Constructor & Destructor Documentation

13.41.2.1 puntoexe::imebra::dicomDir::dicomDir (ptr< dataSet > pDataSet)

Initializes a dicomDir (p. 183) object and attach it to an existing dataset.


If a dataSet (p. 155) is specified then the constructor parses it and build an in memory
(p. 328) representation of the directory tree and its records. The first root record can be
retrieved with a call to getFirstRootRecord() (p. 185).

Parameters:
pDataSet the dataSet (p. 155) that contains or will contain the DICOMDIR struc-
ture. If a null pointer is passed, then a new dataSet (p. 155) is created by this
constructor

13.41.3 Member Function Documentation

13.41.3.1 ptr< dataSet > puntoexe::imebra::dicomDir::buildDataSet ()

Updates the dataSet (p. 155) containing the DICOMDIR with the information con-
tained in the directory records.
Before building the DICOMDIR dataSet (p. 155) remember to set the following val-
ues in the dataSet (p. 155) (call getDirectoryDataSet() (p. 185) to get the dataSet
(p. 155)):

• tag 0x2,0x3: Media Storage SOP instance UID

• tag 0x2,0x12: Implementation class UID

• tag 0x2,0x13: Implementation version name

• tag 0x2,0x16: Source application Entity Title

Please note that if any data (p. 139) is added to the directory or any of the directoryItem
objects after a call to buildDataSet() (p. 184) then the dataset has to be rebuilt once
more with another call to buildDataSet() (p. 184).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.41 puntoexe::imebra::dicomDir Class Reference 185

buildDataSet() (p. 184) doesn’t return a new dataSet (p. 155) but modifies the dataSet
(p. 155) specified in the constructor.

Returns:
a pointer to the updated dataSet (p. 155)

13.41.3.2 ptr< dataSet > puntoexe::imebra::dicomDir::getDirectoryDataSet ()

Returns the DICOMDIR dataset.


This is the same dataset specified in the constructor dicomDir::dicomDir() (p. 184)
and returned by buildDataSet() (p. 184).

13.41.3.3 ptr< directoryRecord > pun-


toexe::imebra::dicomDir::getFirstRootRecord
()

Returns the first root record in the DICOMDIR.


Once the first root record has been retrieved, the application can retrieve sibling root
records by calling directoryRecord::getNextRecord() (p. 192).

Returns:
the first root record in the DICOMDIR.

13.41.3.4 ptr< directoryRecord > pun-


toexe::imebra::dicomDir::getNewRecord
()

Creates a new directoryRecord (p. 190) and embeds its dataSet (p. 155) into the DI-
COMDIR sequence of items.
Once the new directoryRecord (p. 190) has been returned, the calling ap-
plication should set the proper record’s values and specify the relation-
ship with other items by calling setFirstRootRecord() (p. 185) or directo-
ryRecord::setNextRecord() (p. 193) or directoryRecord::setFirstChildRecord()
(p. 193) or directoryRecord::setReferencedRecord() (p. 193).

Returns:
a new directoryRecord (p. 190) object belonging to the DICOMDIR

13.41.3.5 void puntoexe::imebra::dicomDir::setFirstRootRecord (ptr<


directoryRecord > pFirstRootRecord)

Sets the first root record in the DICOMDIR.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


186 Class Documentation

Parameters:
pFirstRootRecord a directoryRecord (p. 190) obtained with a call to get-
NewRecord() (p. 185). The directoryRecord (p. 190) will be the first root
record in the directory

The documentation for this class was generated from the following files:

• dicomDir.h
• dicomDir.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.42 puntoexe::imebra::dicomDirCircularReferenceException Class Reference
187

13.42 puntoexe::imebra::dicomDirCircularReferenceException
Class Reference
This exception is thrown when a call to dicomDir::setFirstRootRecord()
(p. 185) or directoryRecord::setNextRecord() (p. 193) or di-
rectoryRecord::setFirstChildRecord() (p. 193) or directo-
ryRecord::setReferencedRecord() (p. 193) causes a circular reference between
directoryRecord (p. 190) objects.
#include <dicomDir.h>
Inheritance diagram for puntoexe::imebra::dicomDirCircularReferenceException::

puntoexe::imebra::dicomDirException

puntoexe::imebra::dicomDirCircularReferenceException

Public Member Functions


• dicomDirCircularReferenceException (const std::string &message)
Build a dicomDirCircularReferenceException (p. 187) exception.

13.42.1 Detailed Description

This exception is thrown when a call to dicomDir::setFirstRootRecord()


(p. 185) or directoryRecord::setNextRecord() (p. 193) or di-
rectoryRecord::setFirstChildRecord() (p. 193) or directo-
ryRecord::setReferencedRecord() (p. 193) causes a circular reference between
directoryRecord (p. 190) objects.

13.42.2 Constructor & Destructor Documentation

13.42.2.1 puntoexe::imebra::dicomDirCircularReferenceException::dicomDirCircularReferenceException
(const std::string & message) [inline]

Build a dicomDirCircularReferenceException (p. 187) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• dicomDir.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


188 Class Documentation

13.43 puntoexe::imebra::dicomDirException Class


Reference
Base class from which the exceptions thrown by directoryRecord (p. 190) and di-
comDir (p. 183) derive.
#include <dicomDir.h>
Inheritance diagram for puntoexe::imebra::dicomDirException::

puntoexe::imebra::dicomDirException

puntoexe::imebra::dicomDirCircularReferenceException puntoexe::imebra::dicomDirUnknownDirectoryRecordType

Public Member Functions


• dicomDirException (const std::string &message)
Build a dicomDirException (p. 188) exception.

13.43.1 Detailed Description

Base class from which the exceptions thrown by directoryRecord (p. 190) and di-
comDir (p. 183) derive.

13.43.2 Constructor & Destructor Documentation

13.43.2.1 puntoexe::imebra::dicomDirException::dicomDirException (const


std::string & message) [inline]

Build a dicomDirException (p. 188) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• dicomDir.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.44 puntoexe::imebra::dicomDirUnknownDirectoryRecordType Class
Reference 189

13.44 puntoexe::imebra::dicomDirUnknownDirectoryRecordType
Class Reference
Exception thrown when an unknown record type is detected in directo-
ryRecord::getType() (p. 193), directoryRecord::getTypeString() (p. 193), directo-
ryRecord::setType() (p. 194) or directoryRecord::setTypeString() (p. 194).
#include <dicomDir.h>
Inheritance diagram for puntoexe::imebra::dicomDirUnknownDirectoryRecordType::

puntoexe::imebra::dicomDirException

puntoexe::imebra::dicomDirUnknownDirectoryRecordType

Public Member Functions


• dicomDirUnknownDirectoryRecordType (const std::string &message)
Build a dicomDirUnknownDirectoryRecordType (p. 189) exception.

13.44.1 Detailed Description

Exception thrown when an unknown record type is detected in directo-


ryRecord::getType() (p. 193), directoryRecord::getTypeString() (p. 193), directo-
ryRecord::setType() (p. 194) or directoryRecord::setTypeString() (p. 194).

13.44.2 Constructor & Destructor Documentation

13.44.2.1 puntoexe::imebra::dicomDirUnknownDirectoryRecordType::dicomDirUnknownDirectoryRecordType
(const std::string & message) [inline]

Build a dicomDirUnknownDirectoryRecordType (p. 189) exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• dicomDir.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


190 Class Documentation

13.45 puntoexe::imebra::directoryRecord Class Refer-


ence
directoryRecord (p. 190) represents a single record in a DICOMDIR structure (see
dicomDir (p. 183)).
#include <dicomDir.h>
Inheritance diagram for puntoexe::imebra::directoryRecord::

puntoexe::baseObject

puntoexe::imebra::directoryRecord

Public Types
• enum tDirectoryRecordType
Specifies the item’s type.

Public Member Functions


• ptr< dataSet > getRecordDataSet ()
Returns the dataSet (p. 155) that contains the record’s information.

• ptr< directoryRecord > getNextRecord ()


Returns the next sibling record.

• ptr< directoryRecord > getFirstChildRecord ()


Returns the first child record.

• ptr< directoryRecord > getReferencedRecord ()


Returns the referenced record, if any.

• void setNextRecord (ptr< directoryRecord > pNextRecord)


Sets the next sibling record.

• void setFirstChildRecord (ptr< directoryRecord > pFirstChildRecord)


Set the first child record.

• void setReferencedRecord (ptr< directoryRecord > pReferencedRecord)


Set the referenced record.

• std::wstring getFilePart (imbxUint32 part)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.45 puntoexe::imebra::directoryRecord Class Reference 191

Get the full path to the file referenced by the record.

• tDirectoryRecordType getType ()
Returns the record’s type.

• std::wstring getTypeString ()
Returns a string representing the record’s type.

• void setType (tDirectoryRecordType recordType)


Sets the record’s type.

• void setTypeString (std::wstring recordType)


Sets the record’s type.

13.45.1 Detailed Description

directoryRecord (p. 190) represents a single record in a DICOMDIR structure (see


dicomDir (p. 183)).
A new directoryRecord (p. 190) object cannot be constructed directly but only by call-
ing dicomDir::getNewRecord() (p. 185) on the directory the new record will belong
to.

13.45.2 Member Enumeration Documentation

13.45.2.1 enum puntoexe::imebra::directoryRecord::tDirectoryRecordType

Specifies the item’s type.

13.45.3 Member Function Documentation

13.45.3.1 std::wstring puntoexe::imebra::directoryRecord::getFilePart


(imbxUint32 part)

Get the full path to the file referenced by the record.


Several calls to this function may have to be made to obtain the full file path.
The full file path is formed by a list of folder and by the file name; for each call to this
function the caller has to specify a zero based part number.
The last valid part contains the file name, while the parts before the last one contain
the folder in which the file is stored; each folder is a child of the folder returned by the
previous part.
The function returns an empty string if the specified part doesn’t exist.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


192 Class Documentation

Parameters:
part the part to be returned, 0 based.

Returns:
the part’s name (folder or file), or an empty string if the requested part doesn’t exist

13.45.3.2 ptr< directoryRecord > pun-


toexe::imebra::directoryRecord::getFirstChildRecord
()

Returns the first child record.

Returns:
the first child record, or 0 if the record doesn’t have any child

13.45.3.3 ptr< directoryRecord > pun-


toexe::imebra::directoryRecord::getNextRecord
()

Returns the next sibling record.

Returns:
the next sibling record, or 0 if this is the last record

13.45.3.4 ptr< dataSet > pun-


toexe::imebra::directoryRecord::getRecordDataSet
()

Returns the dataSet (p. 155) that contains the record’s information.
The record’s dataSet (p. 155) is embedded in a sequence in the DICOMDIR dataset.

Returns:
the dataSet (p. 155) that contains the record’s information

13.45.3.5 ptr< directoryRecord > pun-


toexe::imebra::directoryRecord::getReferencedRecord
()

Returns the referenced record, if any.

Returns:
the referenced record, or 0 if the record doesn’t reference any other record

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.45 puntoexe::imebra::directoryRecord Class Reference 193

13.45.3.6 directoryRecord::tDirectoryRecordType
puntoexe::imebra::directoryRecord::getType ()

Returns the record’s type.


This function calls getTypeString() (p. 193) and convert the result to an enumerated
value.

Returns:
the record’s type

13.45.3.7 std::wstring puntoexe::imebra::directoryRecord::getTypeString ()

Returns a string representing the record’s type.

Returns:
the record’s type

13.45.3.8 void puntoexe::imebra::directoryRecord::setFirstChildRecord (ptr<


directoryRecord > pFirstChildRecord)

Set the first child record.


The new child record takes the place of the old child record, if it was already set.

Parameters:
pFirstChildRecord the first child record

13.45.3.9 void puntoexe::imebra::directoryRecord::setNextRecord (ptr<


directoryRecord > pNextRecord)

Sets the next sibling record.


The new sibling record takes the place of the old next sibling record, if it was already
set.

Parameters:
pNextRecord the next sibling record

13.45.3.10 void puntoexe::imebra::directoryRecord::setReferencedRecord


(ptr< directoryRecord > pReferencedRecord)

Set the referenced record.


The new referenced record takes the place of the old referenced record, if it was already
set.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


194 Class Documentation

Parameters:
pReferencedRecord the referenced record

13.45.3.11 void puntoexe::imebra::directoryRecord::setType


(tDirectoryRecordType recordType)

Sets the record’s type.

Parameters:
recordType the record’s type

13.45.3.12 void puntoexe::imebra::directoryRecord::setTypeString


(std::wstring recordType)

Sets the record’s type.

Parameters:
recordType the string representing the record’s type

The documentation for this class was generated from the following files:

• dicomDir.h
• dicomDir.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.46 puntoexe::imebra::handlers::dataHandler Class Reference 195

13.46 puntoexe::imebra::handlers::dataHandler Class


Reference
This is the base class for all the imebra (p. 71) data (p. 139) handlers (p. 77).
A data (p. 139) handler allows to read/write the data (p. 139) stored in a pun-
toexe::imebra::buffer (p. 107) object without worrying about the data format.
#include <dataHandler.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandler::
puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerNumeric< imbxUint8 > puntoexe::imebra::handlers::dataHandlerNumeric< dataHandlerType > puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerRaw puntoexe::imebra::handlers::dataHandlerDateTimeBase

puntoexe::imebra::handlers::dataHandlerStringAE

puntoexe::imebra::handlers::dataHandlerStringAS

puntoexe::imebra::handlers::dataHandlerStringCS

puntoexe::imebra::handlers::dataHandlerStringDS

puntoexe::imebra::handlers::dataHandlerStringIS

puntoexe::imebra::handlers::dataHandlerStringUnicode

Public Member Functions


• void copyBack ()
In a writing handler copies back the modified data (p. 139) to the buffer (p. 107).

• void commit ()
Finalize the copy of the data (p. 139) from the handler to the buffer (p. 107).

• void abort ()
Discard all the changes made on a writing handler.

Data pointer
The following functions set the value of the internal pointer that references the data
element read/written by the reading/writing functions.
• virtual void setPointer (const imbxUint32 elementNumber)=0
Move the internal pointer to the required. data (p. 139) element.

• virtual void incPointer ()=0


Increase the internal pointer by one element.

• virtual void skip (const int skip)


Increase the data (p. 139) handler’s internal pointer by the specified number of
elements.

• virtual bool pointerIsValid () const =0


Returns true if the data (p. 139) handler’s internal pointer is valid.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


196 Class Documentation

Buffer and elements size

• virtual void setSize (const imbxUint32 elementsNumber)=0


Set the buffer’s size, in elements.

• virtual imbxUint32 getSize () const =0


Retrieve the data (p. 139) handler’s local buffer (p. 107) buffer (p. 107) size (in
elements).

• virtual imbxUint32 getUnitSize () const =0


Returns a single element’s size in bytes.

Attributes

• std::string getDataType () const


Get the dicom data (p. 139) type managed by this handler.

• virtual imbxUint8 getPaddingByte () const


Return the byte that this handler uses to fill its content to make its size even.

Reading/writing functions

• virtual imbxInt32 getSignedLong () const =0


Retrieve the active data element as a signed long.

• virtual imbxUint32 getUnsignedLong () const =0


Retrieve the active data element as an unsigned long.

• virtual double getDouble () const =0


Retrieve the active data element as a double.

• virtual imbxInt32 getSignedLongIncPointer ()


Retrieve the active data element as a signed long and increase the data handler’s
internal pointer by 1.

• virtual imbxUint32 getUnsignedLongIncPointer ()


Retrieve the active data element as an unsigned long and increase the data han-
dler’s internal pointer by 1.

• virtual double getDoubleIncPointer ()


Retrieve the active data element as a double and increase the data handler’s inter-
nal pointer by 1.

• virtual std::string getString () const =0


Retrieve the active data element as a string.

• virtual std::wstring getUnicodeString () const =0

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.46 puntoexe::imebra::handlers::dataHandler Class Reference 197

Retrieve the active data element as an unicode string.

• virtual void getDate (imbxInt32 ∗pYear, imbxInt32 ∗pMonth, imbx-


Int32 ∗pDay, imbxInt32 ∗pHour, imbxInt32 ∗pMinutes, imbxInt32
∗pSeconds, imbxInt32 ∗pNanoseconds, imbxInt32 ∗pOffsetHours, imbx-
Int32 ∗pOffsetMinutes) const
Retrieve the active data element as a date.

• virtual void setDate (imbxInt32 year, imbxInt32 month, imbxInt32 day, im-
bxInt32 hour, imbxInt32 minutes, imbxInt32 seconds, imbxInt32 nanosec-
onds, imbxInt32 offsetHours, imbxInt32 offsetMinutes)
Set the active data element as a date.

• virtual void setSignedLong (const imbxInt32 value)=0


Set the active data element from a signed long.

• virtual void setUnsignedLong (const imbxUint32 value)=0


Set the active data element from an unsigned long.

• virtual void setDouble (const double value)=0


Set the active data element from a double.

• virtual void setSignedLongIncPointer (const imbxInt32 value)


Set the active data element from a signed long and increase the data (p. 139) han-
dler’s internal pointer by one element.

• virtual void setUnsignedLongIncPointer (const imbxUint32 value)


Set the active data element from an unsigned long and increase the data (p. 139)
handler’s internal pointer by one element.

• virtual void setDoubleIncPointer (const double value)


Set the active data element from a double and increase the data (p. 139) handler’s
internal pointer by one element.

• virtual void setString (const std::string &value)=0


Set the active data element from a string. SetUnicodeString() is preferred over
setString() (p. 206).

• virtual void setUnicodeString (const std::wstring &value)=0


Set the active data element from an unicode string.

Copy from/to imbxUint32 arrays

• virtual void copyFromInt32 (const imbxInt32 ∗pSource, const imbxUint32


length)=0
Copy the content of an array of imbxInt32 values into the buffer controlled by the
handler.

• virtual void copyToInt32 (imbxInt32 ∗pDest, const imbxUint32 length)


const =0

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


198 Class Documentation

Copy the content of the buffer controlled by the handler into an array of imbxInt32
values.

Friends
• class puntoexe::imebra::buffer
• class puntoexe::imebra::transaction

13.46.1 Detailed Description

This is the base class for all the imebra (p. 71) data (p. 139) handlers (p. 77).
A data (p. 139) handler allows to read/write the data (p. 139) stored in a pun-
toexe::imebra::buffer (p. 107) object without worrying about the data format.
Data handlers (p. 77) work on a local copy of the buffer (p. 107), then they don’t need
to worry about multithreading accesses.
Also, once a dataHandler (p. 195) has been obtained from a buffer (p. 107), it cannot
be shared between threads and it doesn’t provide any multithread-safe mechanism,
except for its destructor which copies the local buffer (p. 107) back to the original one
(only for the writable handlers (p. 77)).
Data handlers (p. 77) are also used to access to the decompressed image’s pixels (see
image (p. 232) and handlers::imageHandler (p. 78)).
To obtain a data (p. 139) handler your application has to call
buffer::getDataHandler() (p. 110) or image::getDataHandler() (p. 235).

13.46.2 Member Function Documentation

13.46.2.1 void puntoexe::imebra::handlers::dataHandler::abort ()

Discard all the changes made on a writing handler.


The function also switches the write flag to false, so it also prevent further changes
from being committed into the buffer (p. 107).

13.46.2.2 void puntoexe::imebra::handlers::dataHandler::commit ()

Finalize the copy of the data (p. 139) from the handler to the buffer (p. 107).
Is not necessary to call this function directly because it is called by the handler’s de-
structor, which copy any modification back to the buffer (p. 107) and then finalize it.

13.46.2.3 void puntoexe::imebra::handlers::dataHandler::copyBack ()

In a writing handler copies back the modified data (p. 139) to the buffer (p. 107).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.46 puntoexe::imebra::handlers::dataHandler Class Reference 199

Is not necessary to call this function directly because it is called by the handler’s de-
structor, which copy any modification back to the buffer (p. 107) and finalize it.
The operation must be finalized by a call to commit() (p. 198), or will be finalized by
the destructor unless a call to abort() (p. 198) happen.

13.46.2.4 virtual void pun-


toexe::imebra::handlers::dataHandler::copyFromInt32 (const
imbxInt32 ∗ pSource, const imbxUint32 length) [pure virtual]

Copy the content of an array of imbxInt32 values into the buffer controlled by the
handler.
The function doesn’t resize the handler’s memory before copying the values. If the size
of the source buffer (p. 107) is too big, then a partial copy will be performed.

Parameters:
pSource the pointer to the array of imbxInt32 values.
length the number of imbxInt32 values that must be copied from pSource into the
buffer (p. 107) controlled by the handler.

13.46.2.5 virtual void puntoexe::imebra::handlers::dataHandler::copyToInt32


(imbxInt32 ∗ pDest, const imbxUint32 length) const [pure
virtual]

Copy the content of the buffer controlled by the handler into an array of imbxInt32
values.

Parameters:
pDest the pointer to the destination array of imbxInt32 values
length the number of imbxInt32 values to copy into the destination array

13.46.2.6 std::string puntoexe::imebra::handlers::dataHandler::getDataType


() const

Get the dicom data (p. 139) type managed by this handler.
The dicom data (p. 139) type is formed by 2 uppercase chars, as described by the dicom
standard. See buffer (p. 107) for further information.

Returns:
the data (p. 139) handler’s dicom data (p. 139) type

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


200 Class Documentation

13.46.2.7 void puntoexe::imebra::handlers::dataHandler::getDate (imbxInt32


∗ pYear, imbxInt32 ∗ pMonth, imbxInt32 ∗ pDay, imbxInt32 ∗
pHour, imbxInt32 ∗ pMinutes, imbxInt32 ∗ pSeconds, imbxInt32
∗ pNanoseconds, imbxInt32 ∗ pOffsetHours, imbxInt32 ∗
pOffsetMinutes) const [virtual]

Retrieve the active data element as a date.


The active data element is referenced by the data (p. 139) handler’s internal pointer,
set by the method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Parameters:
pYear a pointer to a value that will be filled with the UTC date’s year
pMonth a pointer to a value that will be filled with the UTC date’s month
pDay a pointer to a value that will be filled with the UTC date’s day of the month
pHour a pointer to a value that will be filled with the UTC hour
pMinutes a pointer to a value that will be filled with the UTC minutes
pSeconds a pointer to a value that will be filled with the UTC seconds
pNanoseconds a pointer to a value that will be filled with the UTC nanosecods
pOffsetHours a pointer to a value that will be filled with the difference between
the date time zone and the UTC time zone
pOffsetMinutes a pointer to a value that will be filled with the difference between
the date time zone and the UTC time zone

13.46.2.8 virtual double puntoexe::imebra::handlers::dataHandler::getDouble


() const [pure virtual]

Retrieve the active data element as a double.


The active data element is referenced by the data handler’s internal pointer, set by the
method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Returns:
the value of the active data (p. 139) element transformed into a double

Implemented in puntoexe::imebra::handlers::dataHandlerStringAS (p. 221).

13.46.2.9 double pun-


toexe::imebra::handlers::dataHandler::getDoubleIncPointer ()
[virtual]

Retrieve the active data element as a double and increase the data handler’s internal
pointer by 1.
The active data element is referenced by the data (p. 139) handler’s internal pointer,
set by the method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.46 puntoexe::imebra::handlers::dataHandler Class Reference 201

Returns:
the value of the active data (p. 139) element transformed into a double

13.46.2.10 imbxUint8 pun-


toexe::imebra::handlers::dataHandler::getPaddingByte () const
[virtual]

Return the byte that this handler uses to fill its content to make its size even.

Returns:
the byte used to make the content’s size even

13.46.2.11 virtual imbxInt32 pun-


toexe::imebra::handlers::dataHandler::getSignedLong () const
[pure virtual]

Retrieve the active data element as a signed long.


The active data element is referenced by the data handler’s internal pointer, set by the
method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Returns:
the value of the active data (p. 139) element transformed into a signed long

Implemented in puntoexe::imebra::handlers::dataHandlerStringAS (p. 221).

13.46.2.12 imbxInt32 pun-


toexe::imebra::handlers::dataHandler::getSignedLongIncPointer ()
[virtual]

Retrieve the active data element as a signed long and increase the data handler’s internal
pointer by 1.
The active data element is referenced by the data (p. 139) handler’s internal pointer,
set by the method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Returns:
the value of the active data (p. 139) element transformed into a signed long

13.46.2.13 virtual imbxUint32 pun-


toexe::imebra::handlers::dataHandler::getSize ()
const [pure virtual]

Retrieve the data (p. 139) handler’s local buffer (p. 107) buffer (p. 107) size (in ele-
ments).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


202 Class Documentation

Returns:
the buffer’s size in elements

13.46.2.14 virtual std::string pun-


toexe::imebra::handlers::dataHandler::getString ()
const [pure virtual]

Retrieve the active data element as a string.


The retrieved string is converted using the active locale settings. The usage of getU-
nicodeString() (p. 202) is preferred because the retrieved string can represent all the
chars stored in the dicom tag.
The active data (p. 139) element is referenced by the data (p. 139) handler’s inter-
nal pointer, set by the method setPointer() (p. 205), incPointer() (p. 203) and skip()
(p. 207).

Returns:
the value of the active data (p. 139) element transformed into a string.

13.46.2.15 virtual std::wstring pun-


toexe::imebra::handlers::dataHandler::getUnicodeString () const
[pure virtual]

Retrieve the active data element as an unicode string.


The chars used in the dicom tag are converted to unicode using the charsets defined in
the dicom dataSet (p. 155).
The active data (p. 139) element is referenced by the data (p. 139) handler’s inter-
nal pointer, set by the method setPointer() (p. 205), incPointer() (p. 203) and skip()
(p. 207).

Returns:
the value of the active data (p. 139) element transformed into a string.

Implemented in puntoexe::imebra::handlers::dataHandlerDate (p. 208), and pun-


toexe::imebra::handlers::dataHandlerTime (p. 230).

13.46.2.16 imbxUint32 puntoexe::imebra::handlers::dataHandler::getUnitSize


() const [pure virtual]

Returns a single element’s size in bytes.


If the element doesn’t have a fixed size, then this function return 0.

Returns:
the element’s size in bytes, or zero if the element doesn’t have a fixed size

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.46 puntoexe::imebra::handlers::dataHandler Class Reference 203

13.46.2.17 virtual imbxUint32 pun-


toexe::imebra::handlers::dataHandler::getUnsignedLong () const
[pure virtual]

Retrieve the active data element as an unsigned long.


The active data element is referenced by the data handler’s internal pointer, set by the
method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Returns:
the value of the active data (p. 139) element transformed into an unsigned long

Implemented in puntoexe::imebra::handlers::dataHandlerStringAS (p. 221).

13.46.2.18 imbxUint32 pun-


toexe::imebra::handlers::dataHandler::getUnsignedLongIncPointer
() [virtual]

Retrieve the active data element as an unsigned long and increase the data handler’s
internal pointer by 1.
The active data element is referenced by the data (p. 139) handler’s internal pointer,
set by the method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Returns:
the value of the active data (p. 139) element transformed into an unsigned long

13.46.2.19 virtual void puntoexe::imebra::handlers::dataHandler::incPointer


() [pure virtual]

Increase the internal pointer by one element.


The internal pointer references the element that will be read/written by the reading/writ-
ing functions.
See also setPointer() (p. 205) and skip() (p. 207).

13.46.2.20 virtual bool pun-


toexe::imebra::handlers::dataHandler::pointerIsValid () const
[pure virtual]

Returns true if the data (p. 139) handler’s internal pointer is valid.
The internal pointer references the element that will be read/written by the reading/writ-
ing functions.
If the internal pointer is out of the valid range, then this method returns false.
See also setPointer() (p. 205), incPointer and skip() (p. 207).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


204 Class Documentation

Returns:
the internal pointer’s status (true=valid, false=invalid).

13.46.2.21 void puntoexe::imebra::handlers::dataHandler::setDate (imbxInt32


year, imbxInt32 month, imbxInt32 day, imbxInt32 hour, imbxInt32
minutes, imbxInt32 seconds, imbxInt32 nanoseconds, imbxInt32
offsetHours, imbxInt32 offsetMinutes) [virtual]

Set the active data element as a date.


The active data element is referenced by the data (p. 139) handler’s internal pointer,
set by the method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Parameters:
year the UTC date’s year
month the UTC date’s month
day the UTC date’s day of the month
hour the UTC hour
minutes the UTC minutes
seconds the UTC seconds
nanoseconds the UTC nanosecods
offsetHours the difference between the date time zone and the UTC time zone
offsetMinutes the difference between the date time zone and the UTC time zone

13.46.2.22 virtual void puntoexe::imebra::handlers::dataHandler::setDouble


(const double value) [pure virtual]

Set the active data element from a double.


The active data element is referenced by the data (p. 139) handler’s internal pointer,
set by the method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Parameters:
value the value to write into the active data element.

Implemented in puntoexe::imebra::handlers::dataHandlerStringAS (p. 222).

13.46.2.23 void pun-


toexe::imebra::handlers::dataHandler::setDoubleIncPointer (const
double value) [virtual]

Set the active data element from a double and increase the data (p. 139) handler’s
internal pointer by one element.
The active data element is referenced by the data (p. 139) handler’s internal pointer,
set by the method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.46 puntoexe::imebra::handlers::dataHandler Class Reference 205

Parameters:
value the value to write into the active data element.

13.46.2.24 virtual void puntoexe::imebra::handlers::dataHandler::setPointer


(const imbxUint32 elementNumber) [pure virtual]

Move the internal pointer to the required. data (p. 139) element.
Subsequent calls to the reading/writing functions will read/write the element specified
by using this function.
Note that the pointer is in "data elements", not in bytes. See also incPointer() (p. 203)
and skip() (p. 207).

Parameters:
elementNumber The element number to activate.

13.46.2.25 virtual void pun-


toexe::imebra::handlers::dataHandler::setSignedLong (const
imbxInt32 value) [pure virtual]

Set the active data element from a signed long.


The active data element is referenced by the data (p. 139) handler’s internal pointer,
set by the method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Parameters:
value the value to write into the active data element.

Implemented in puntoexe::imebra::handlers::dataHandlerStringAS (p. 222).

13.46.2.26 void pun-


toexe::imebra::handlers::dataHandler::setSignedLongIncPointer
(const imbxInt32 value) [virtual]

Set the active data element from a signed long and increase the data (p. 139) handler’s
internal pointer by one element.
The active data element is referenced by the data (p. 139) handler’s internal pointer,
set by the method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Parameters:
value the value to write into the active data element.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


206 Class Documentation

13.46.2.27 virtual void puntoexe::imebra::handlers::dataHandler::setSize


(const imbxUint32 elementsNumber) [pure virtual]

Set the buffer’s size, in elements.


The function resize the data (p. 139) handler’s local buffer (p. 107) to the requested
number of elements.

Parameters:
elementsNumber the requested buffer’s size, in data (p. 139) elements

13.46.2.28 virtual void puntoexe::imebra::handlers::dataHandler::setString


(const std::string & value) [pure virtual]

Set the active data element from a string. SetUnicodeString() is preferred over set-
String() (p. 206).
The active data element is referenced by the data handler’s internal pointer, set by the
method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Parameters:
value the value to write into the active data element.

13.46.2.29 virtual void pun-


toexe::imebra::handlers::dataHandler::setUnicodeString (const
std::wstring & value) [pure virtual]

Set the active data element from an unicode string.


The unicode string is converted to multibyte using the dicom charsets when copied
back to the tag’s buffer (p. 107).
The active data element is referenced by the data handler’s internal pointer, set by the
method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Parameters:
value the value to write into the active data element.

Implemented in puntoexe::imebra::handlers::dataHandlerDate (p. 209), and pun-


toexe::imebra::handlers::dataHandlerTime (p. 231).

13.46.2.30 virtual void pun-


toexe::imebra::handlers::dataHandler::setUnsignedLong (const
imbxUint32 value) [pure virtual]

Set the active data element from an unsigned long.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.46 puntoexe::imebra::handlers::dataHandler Class Reference 207

The active data element is referenced by the data (p. 139) handler’s internal pointer,
set by the method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Parameters:
value the value to write into the active data element.

Implemented in puntoexe::imebra::handlers::dataHandlerStringAS (p. 222).

13.46.2.31 void pun-


toexe::imebra::handlers::dataHandler::setUnsignedLongIncPointer
(const imbxUint32 value) [virtual]

Set the active data element from an unsigned long and increase the data (p. 139) han-
dler’s internal pointer by one element.
The active data element is referenced by the data (p. 139) handler’s internal pointer,
set by the method setPointer() (p. 205), incPointer() (p. 203) and skip() (p. 207).

Parameters:
value the value to write into the active data element.

13.46.2.32 void puntoexe::imebra::handlers::dataHandler::skip (const int skip)


[virtual]

Increase the data (p. 139) handler’s internal pointer by the specified number of ele-
ments.
The internal pointer references the element that will be read/written by the reading/writ-
ing functions.
See also setPointer() (p. 205) and incPointer() (p. 203).

Parameters:
skip the number of element the to add to the current value of the data (p. 139)
handler’s internal pointer

The documentation for this class was generated from the following files:

• dataHandler.h
• dataHandler.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


208 Class Documentation

13.47 puntoexe::imebra::handlers::dataHandlerDate
Class Reference
This data handler is returned by the class buffer (p. 107) when the application wants to
deal with a dicom tag of type "DA" (date).
#include <dataHandlerDate.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerDate::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerDateTimeBase

puntoexe::imebra::handlers::dataHandlerDate

Public Member Functions


• virtual std::wstring getUnicodeString () const
Return a string representing the date stored in the buffer (p. 107).

• virtual void setUnicodeString (const std::wstring &value)


Set the date from a string.

13.47.1 Detailed Description

This data handler is returned by the class buffer (p. 107) when the application wants to
deal with a dicom tag of type "DA" (date).

13.47.2 Member Function Documentation

13.47.2.1 std::wstring pun-


toexe::imebra::handlers::dataHandlerDate::getUnicodeString ()
const [virtual]

Return a string representing the date stored in the buffer (p. 107).
The returned string has the format: "YYYY-MM-DD" where:

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.47 puntoexe::imebra::handlers::dataHandlerDate Class Reference 209

• YYYY is the year


• MM is the month

• DD is the day

Returns:
a string representing the date stored in the buffer (p. 107)

Reimplemented from puntoexe::imebra::handlers::dataHandlerString (p. 217).

13.47.2.2 void pun-


toexe::imebra::handlers::dataHandlerDate::setUnicodeString (const
std::wstring & value) [virtual]

Set the date from a string.


The string must have the format: "YYYY-MM-DD" where:

• YYYY is the year


• MM is the month

• DD is the day

Parameters:
value the string representing the date to be set

Reimplemented from puntoexe::imebra::handlers::dataHandlerString (p. 217).


The documentation for this class was generated from the following files:

• dataHandlerDate.h
• dataHandlerDate.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


210 Class Documentation

13.48 puntoexe::imebra::handlers::dataHandlerDateTimeBase
Class Reference
This class is used as base class by the handlers (p. 77) that manage the date and the
time.
#include <dataHandlerDateTimeBase.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerDateTimeBase::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerDateTimeBase

puntoexe::imebra::handlers::dataHandlerDate puntoexe::imebra::handlers::dataHandlerTime

13.48.1 Detailed Description

This class is used as base class by the handlers (p. 77) that manage the date and the
time.
This class supplies the methods setSignedLong(), setUnsignedLong(), setDouble(),
getSignedLong(), getUnsignedLong(), getDouble(). Those methods work with time_t
structure
The documentation for this class was generated from the following files:

• dataHandlerDateTimeBase.h
• dataHandlerDateTimeBase.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.49 puntoexe::imebra::handlers::dataHandlerNumeric< dataHandlerType >
Class Template Reference 211

13.49 puntoexe::imebra::handlers::dataHandlerNumeric<
dataHandlerType > Class Template Reference
This data (p. 139) handler accesses to the numeric data (p. 139) stored in a pun-
toexe::imebra::buffer (p. 107) class.
#include <dataHandlerNumeric.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerNumeric< dataHan-
dlerType >::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerNumeric< dataHandlerType >

Public Member Functions


• dataHandlerType & operator[ ] (int nSubscript)
Provides a direct access to the data (p. 139) managed by the handler.

• dataHandlerType & at (int nSubscript)


Provides a direct access to the data (p. 139) managed by the handler.

• dataHandlerType ∗ getMemoryBuffer () const


Returns a pointer to the physical memory that stores the data (p. 139) managed by the
handler.

• ptr< memory > getMemory ()


Return the memory (p. 328) object that stores the data (p. 139) managed by the han-
dler.

• virtual void copyFromInt32Interleaved (const imbxInt32 ∗pSource, im-


bxUint32 sourceReplicateX, imbxUint32 sourceReplicateY, imbxUint32 dest-
StartCol, imbxUint32 destStartRow, imbxUint32 destEndCol, imbxUint32
destEndRow, imbxUint32 destStartChannel, imbxUint32 destWidth, im-
bxUint32 destHeight, imbxUint32 destNumChannels)
Copy the content of an array of imbxInt32 values into the buffer (p. 107) controlled by
the handler, considering that the source buffer (p. 107) could have subsampled data
(p. 139).

• virtual void copyToInt32Interleaved (imbxInt32 ∗pDest, imbxUint32


destSubSampleX, imbxUint32 destSubSampleY, imbxUint32 sourceStart-
Col, imbxUint32 sourceStartRow, imbxUint32 sourceEndCol, imbxUint32

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


212 Class Documentation

sourceEndRow, imbxUint32 sourceStartChannel, imbxUint32 sourceWidth,


imbxUint32 sourceHeight, imbxUint32 sourceNumChannels) const
Copy the buffer (p. 107) controlled by the handler into an array of imbxInt32 values,
considering that the destination buffer (p. 107) could be subsampled.

13.49.1 Detailed Description

template<class dataHandlerType> class puntoexe::imebra::handlers::dataHandlerNumeric<


dataHandlerType >

This data (p. 139) handler accesses to the numeric data (p. 139) stored in a pun-
toexe::imebra::buffer (p. 107) class.
A special definition of this class (puntoexe::imebra::handlers::imageHandler
(p. 78)) is used to access to the images’ raw pixels.

13.49.2 Member Function Documentation

13.49.2.1 template<class dataHandlerType> dataHandlerType&


puntoexe::imebra::handlers::dataHandlerNumeric<
dataHandlerType >::at (int nSubscript) [inline]

Provides a direct access to the data (p. 139) managed by the handler.

Parameters:
nSubscript the index of the numeric value that you want to access to

Returns:
a reference to the requested value

13.49.2.2 template<class dataHandlerType> virtual void


puntoexe::imebra::handlers::dataHandlerNumeric<
dataHandlerType >::copyFromInt32Interleaved (const imbxInt32
∗ pSource, imbxUint32 sourceReplicateX, imbxUint32
sourceReplicateY, imbxUint32 destStartCol, imbxUint32
destStartRow, imbxUint32 destEndCol, imbxUint32 destEndRow,
imbxUint32 destStartChannel, imbxUint32 destWidth, imbxUint32
destHeight, imbxUint32 destNumChannels) [inline, virtual]

Copy the content of an array of imbxInt32 values into the buffer (p. 107) controlled by
the handler, considering that the source buffer (p. 107) could have subsampled data
(p. 139).
The source buffer (p. 107) is supposed to have the information related to a single chan-
nel.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.49 puntoexe::imebra::handlers::dataHandlerNumeric< dataHandlerType >
Class Template Reference 213
Parameters:
pSource a pointer to the source array of imbxInt32 values
sourceReplicateX the horizontal subsamplig factor of the source buffer (p. 107)
(1=not subsampled, 2=subsampled)
sourceReplicateY the vertical subsamplig factor of the source buffer (p. 107)
(1=not subsampled, 2=subsampled)
destStartCol the horizontal coordinate of the top left corner of the destination
rectangle
destStartRow the vertical coordinate of the top left corner of the destination rect-
angle
destEndCol the horizontal coordinate of the bottom right corner of the destination
rectangle
destEndRow the vertical coordinate of the bottom right corner of the destination
rectangle
destStartChannel the destination channel
destWidth the destination buffer’s width in pixels
destHeight the destination buffer’s height in pixels
destNumChannels the number of channels in the destination buffer (p. 107)

13.49.2.3 template<class dataHandlerType> virtual void


puntoexe::imebra::handlers::dataHandlerNumeric<
dataHandlerType >::copyToInt32Interleaved (imbxInt32 ∗ pDest,
imbxUint32 destSubSampleX, imbxUint32 destSubSampleY,
imbxUint32 sourceStartCol, imbxUint32 sourceStartRow,
imbxUint32 sourceEndCol, imbxUint32 sourceEndRow, imbxUint32
sourceStartChannel, imbxUint32 sourceWidth, imbxUint32
sourceHeight, imbxUint32 sourceNumChannels) const [inline,
virtual]

Copy the buffer (p. 107) controlled by the handler into an array of imbxInt32 values,
considering that the destination buffer (p. 107) could be subsampled.
The destination buffer (p. 107) is supposed to have the information related to a single
channel.

Parameters:
pDest a pointer to the destination array of imbxInt32 values
destSubSampleX the horizontal subsamplig factor of the destination buffer
(p. 107) (1=not subsampled, 2=subsampled)
destSubSampleY the vertical subsamplig factor of the destination buffer (p. 107)
(1=not subsampled, 2=subsampled)
sourceStartCol the horizontal coordinate of the top left corner of the source rect-
angle
sourceStartRow the vertical coordinate of the top left corner of the source rectan-
gle

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


214 Class Documentation

sourceEndCol the horizontal coordinate of the bottom right corner of the source
rectangle
sourceEndRow the vertical coordinate of the bottom right corner of the source
rectangle
sourceStartChannel the source channel to be copied
sourceWidth the source buffer’s width in pixels
sourceHeight the source buffer’s height in pixels
sourceNumChannels the number of channels in the source buffer (p. 107)

13.49.2.4 template<class dataHandlerType> ptr<memory>


puntoexe::imebra::handlers::dataHandlerNumeric<
dataHandlerType >::getMemory () [inline]

Return the memory (p. 328) object that stores the data (p. 139) managed by the han-
dler.

Returns:
the memory (p. 328) object that stores the data (p. 139) managed by the handler

13.49.2.5 template<class dataHandlerType> dataHandlerType∗


puntoexe::imebra::handlers::dataHandlerNumeric<
dataHandlerType >::getMemoryBuffer () const [inline]

Returns a pointer to the physical memory that stores the data (p. 139) managed by the
handler.
Warning: the memory that stores the managed data (p. 139) may be reallocated by a
call to setSize().

Returns:
a pointer to the physical memory that stores the data (p. 139) managed by the
handler

13.49.2.6 template<class dataHandlerType> dataHandlerType&


puntoexe::imebra::handlers::dataHandlerNumeric<
dataHandlerType >::operator[ ] (int nSubscript) [inline]

Provides a direct access to the data (p. 139) managed by the handler.

Parameters:
nSubscript the index of the numeric value that you want to access to

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.49 puntoexe::imebra::handlers::dataHandlerNumeric< dataHandlerType >
Class Template Reference 215
Returns:
a reference to the requested value

The documentation for this class was generated from the following file:

• dataHandlerNumeric.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


216 Class Documentation

13.50 puntoexe::imebra::handlers::dataHandlerRaw
Class Reference
A dataHandlerRaw (p. 216) always "sees" the data (p. 139) as a collection of bytes,
no matter what the Dicom data (p. 139) type is.
#include <dataHandlerNumeric.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerRaw::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerNumeric< imbxUint8 >

puntoexe::imebra::handlers::dataHandlerRaw

13.50.1 Detailed Description

A dataHandlerRaw (p. 216) always "sees" the data (p. 139) as a collection of bytes,
no matter what the Dicom data (p. 139) type is.
The documentation for this class was generated from the following file:

• dataHandlerNumeric.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.51 puntoexe::imebra::handlers::dataHandlerString Class Reference 217

13.51 puntoexe::imebra::handlers::dataHandlerString
Class Reference
This is the base class for all the data (p. 139) handlers (p. 77) that manage strings.
#include <dataHandlerString.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerString::
puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerDateTimeBase puntoexe::imebra::handlers::dataHandlerStringAE puntoexe::imebra::handlers::dataHandlerStringAS puntoexe::imebra::handlers::dataHandlerStringCS puntoexe::imebra::handlers::dataHandlerStringDS puntoexe::imebra::handlers::dataHandlerStringIS puntoexe::imebra::handlers::dataHandlerStringUnicode

puntoexe::imebra::handlers::dataHandlerDate puntoexe::imebra::handlers::dataHandlerTime puntoexe::imebra::handlers::dataHandlerStringPN

13.51.1 Detailed Description

This is the base class for all the data (p. 139) handlers (p. 77) that manage strings.
The documentation for this class was generated from the following files:

• dataHandlerString.h
• dataHandlerString.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


218 Class Documentation

13.52 puntoexe::imebra::handlers::dataHandlerStringAE
Class Reference
Handles the Dicom data (p. 139) type "AE" (application entity.
#include <dataHandlerStringAE.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerStringAE::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerStringAE

13.52.1 Detailed Description

Handles the Dicom data (p. 139) type "AE" (application entity.
The documentation for this class was generated from the following files:

• dataHandlerStringAE.h
• dataHandlerStringAE.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.53 puntoexe::imebra::handlers::dataHandlerStringAS Class Reference 219

13.53 puntoexe::imebra::handlers::dataHandlerStringAS
Class Reference
Handles the Dicom data (p. 139) type "AS" (age string).
#include <dataHandlerStringAS.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerStringAS::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerStringAS

Public Types
• enum tAgeUnit { days = L’D’, weeks = L’W’, months = L’M’, years = L’Y’
}
Used by setAge() (p. 222) and getAge() (p. 220) to specify the unit of the age value.

Public Member Functions


• virtual void setAge (const imbxUint32 age, const tAgeUnit unit)
Set the value of the age string and specify its unit.

• virtual imbxUint32 getAge (tAgeUnit ∗pUnit) const


Retrieve the age value and its unit from the buffer (p. 107) handled by this handler.

• virtual imbxInt32 getSignedLong () const


Retrieve the age from the handled buffer (p. 107).

• virtual imbxUint32 getUnsignedLong () const


Retrieve the age from the handled buffer (p. 107).

• virtual double getDouble () const


Retrieve the age from the handled buffer (p. 107).

• virtual void setSignedLong (const imbxInt32 value)


Write the specified age into the handled buffer (p. 107).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


220 Class Documentation

• virtual void setUnsignedLong (const imbxUint32 value)


Write the specified age into the handled buffer (p. 107).

• virtual void setDouble (const double value)


Write the specified age into the handled buffer (p. 107).

13.53.1 Detailed Description

Handles the Dicom data (p. 139) type "AS" (age string).
The handler supplies two additional functions designed to set/get the age (setAge()
(p. 222) and getAge() (p. 220)) and overwrite the functions getSignedLong() (p. 221),
getUnsignedLong() (p. 221), getDouble() (p. 221), setSignedLong() (p. 222), setUn-
signedLong() (p. 222), setDouble() (p. 222) to make them work with the years.
setDouble() (p. 222) and getDouble() (p. 221) work also with fraction of a year, setting
the age unit correctly (days, weeks, months or years).

13.53.2 Member Enumeration Documentation

13.53.2.1 enum puntoexe::imebra::handlers::dataHandlerStringAS::tAgeUnit

Used by setAge() (p. 222) and getAge() (p. 220) to specify the unit of the age value.

Enumerator:
days the age value is in days
weeks the age value is in weeks
months the age value is in months
years the age value is in years

13.53.3 Member Function Documentation

13.53.3.1 imbxUint32 pun-


toexe::imebra::handlers::dataHandlerStringAS::getAge (tAgeUnit ∗
pUnit) const [virtual]

Retrieve the age value and its unit from the buffer (p. 107) handled by this handler.

Parameters:
pUnit a pointer to a tAgeUnit that will be filled with the unit information related
to the returned value

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.53 puntoexe::imebra::handlers::dataHandlerStringAS Class Reference 221

Returns:
the age, expressed in the unit written in the location referenced by the parameter
pUnit

13.53.3.2 double pun-


toexe::imebra::handlers::dataHandlerStringAS::getDouble () const
[virtual]

Retrieve the age from the handled buffer (p. 107).


The returned value is always expressed in years. The function can return fraction of a
year if the age contained in the buffer (p. 107) is expressed in days, weeks or months.

Returns:
the age contained in the buffer (p. 107) converted into years

Reimplemented from puntoexe::imebra::handlers::dataHandlerString (p. 217).

13.53.3.3 imbxInt32 pun-


toexe::imebra::handlers::dataHandlerStringAS::getSignedLong ()
const [virtual]

Retrieve the age from the handled buffer (p. 107).


The returned value is always expressed in years.

Returns:
the age contained in the buffer (p. 107) converted into years

Reimplemented from puntoexe::imebra::handlers::dataHandlerString (p. 217).

13.53.3.4 imbxUint32 pun-


toexe::imebra::handlers::dataHandlerStringAS::getUnsignedLong ()
const [virtual]

Retrieve the age from the handled buffer (p. 107).


The returned value is always expressed in years.

Returns:
the age contained in the buffer (p. 107) converted into years

Reimplemented from puntoexe::imebra::handlers::dataHandlerString (p. 217).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


222 Class Documentation

13.53.3.5 void puntoexe::imebra::handlers::dataHandlerStringAS::setAge


(const imbxUint32 age, const tAgeUnit unit) [virtual]

Set the value of the age string and specify its unit.

Parameters:
age the age to be written in the buffer (p. 107)
unit the units used for the parameter age

13.53.3.6 void puntoexe::imebra::handlers::dataHandlerStringAS::setDouble


(const double value) [virtual]

Write the specified age into the handled buffer (p. 107).
If a fraction of a year is specified, then the function set the age in days, weeks or months
according to the value of the fraction.

Parameters:
value the age to be written, in years

Reimplemented from puntoexe::imebra::handlers::dataHandlerString (p. 217).

13.53.3.7 void pun-


toexe::imebra::handlers::dataHandlerStringAS::setSignedLong
(const imbxInt32 value) [virtual]

Write the specified age into the handled buffer (p. 107).

Parameters:
value the age to be written, in years

Reimplemented from puntoexe::imebra::handlers::dataHandlerString (p. 217).

13.53.3.8 void pun-


toexe::imebra::handlers::dataHandlerStringAS::setUnsignedLong
(const imbxUint32 value) [virtual]

Write the specified age into the handled buffer (p. 107).

Parameters:
value the age to be written, in years

Reimplemented from puntoexe::imebra::handlers::dataHandlerString (p. 217).


The documentation for this class was generated from the following files:

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.53 puntoexe::imebra::handlers::dataHandlerStringAS Class Reference 223

• dataHandlerStringAS.h
• dataHandlerStringAS.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


224 Class Documentation

13.54 puntoexe::imebra::handlers::dataHandlerStringCS
Class Reference
Handles the Dicom data (p. 139) type "CS" (code string).
#include <dataHandlerStringCS.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerStringCS::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerStringCS

13.54.1 Detailed Description

Handles the Dicom data (p. 139) type "CS" (code string).
The documentation for this class was generated from the following files:

• dataHandlerStringCS.h
• dataHandlerStringCS.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.55 puntoexe::imebra::handlers::dataHandlerStringDS Class Reference 225

13.55 puntoexe::imebra::handlers::dataHandlerStringDS
Class Reference
Handles the Dicom type "DS" (decimal string).
#include <dataHandlerStringDS.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerStringDS::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerStringDS

13.55.1 Detailed Description

Handles the Dicom type "DS" (decimal string).


The documentation for this class was generated from the following files:

• dataHandlerStringDS.h
• dataHandlerStringDS.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


226 Class Documentation

13.56 puntoexe::imebra::handlers::dataHandlerStringIS
Class Reference
Handles the Dicom type "IS" (integer string).
#include <dataHandlerStringIS.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerStringIS::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerStringIS

13.56.1 Detailed Description

Handles the Dicom type "IS" (integer string).


The documentation for this class was generated from the following files:

• dataHandlerStringIS.h
• dataHandlerStringIS.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.57 puntoexe::imebra::handlers::dataHandlerStringPN Class Reference 227

13.57 puntoexe::imebra::handlers::dataHandlerStringPN
Class Reference
Handles the Dicom type "PN" (person name).
#include <dataHandlerStringPN.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerStringPN::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerStringUnicode

puntoexe::imebra::handlers::dataHandlerStringPN

13.57.1 Detailed Description

Handles the Dicom type "PN" (person name).


This class separates the component groups of the name.
The person name can be formed by three groups: one or more groups can be absent.

• the first components group contains a character representation of the person


name

• the second components group contains an ideographic representation of the per-


son name

• the third components group contains a phonetic representation of the patient


name

Inside a components group, the name components (first name, middle name, surname,
etc) must be separated by a ∧ .
This class doesn’t insert or parse the ∧ separator which must be inserted and handled
by the calling application, but handles the = separator which separates the components
groups.
This means that to read or set all the patient name you have to move the pointer to the
internal element by using setPointer(), incPointer() or skip() (p. 207).
For instance, to set the name "Left∧ Arrow" both with a character and an ideographic
representation you have to use the following code:

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


228 Class Documentation

myDataSet->getDataHandler(group, 0, tag, 0, true, "PN");


myDataSet->setSize(2);
myDataSet->setUnicodeString(L"Left^Arrow");
myDataSet->incPointer();
myDataSet->setUnicodeString(L"<-"); // :-)

The documentation for this class was generated from the following files:

• dataHandlerStringPN.h
• dataHandlerStringPN.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.58 puntoexe::imebra::handlers::dataHandlerStringUnicode Class Reference
229

13.58 puntoexe::imebra::handlers::dataHandlerStringUnicode
Class Reference
This is the base class for all the data (p. 139) handlers (p. 77) that manage strings that
need to be converted from different unicode charsets.
#include <dataHandlerStringUnicode.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerStringUnicode::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerStringUnicode

puntoexe::imebra::handlers::dataHandlerStringPN

13.58.1 Detailed Description

This is the base class for all the data (p. 139) handlers (p. 77) that manage strings that
need to be converted from different unicode charsets.
The documentation for this class was generated from the following files:

• dataHandlerStringUnicode.h
• dataHandlerStringUnicode.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


230 Class Documentation

13.59 puntoexe::imebra::handlers::dataHandlerTime
Class Reference
This data handler is returned by the class buffer (p. 107) when the application wants to
deal with a dicom tag of type "TM" (time).
#include <dataHandlerTime.h>
Inheritance diagram for puntoexe::imebra::handlers::dataHandlerTime::

puntoexe::baseObject

puntoexe::imebra::handlers::dataHandler

puntoexe::imebra::handlers::dataHandlerString

puntoexe::imebra::handlers::dataHandlerDateTimeBase

puntoexe::imebra::handlers::dataHandlerTime

Public Member Functions


• virtual std::wstring getUnicodeString () const
Return a string representing the time stored in the buffer (p. 107).

• virtual void setUnicodeString (const std::wstring &value)


Set the date from a string.

13.59.1 Detailed Description

This data handler is returned by the class buffer (p. 107) when the application wants to
deal with a dicom tag of type "TM" (time).

13.59.2 Member Function Documentation

13.59.2.1 std::wstring pun-


toexe::imebra::handlers::dataHandlerTime::getUnicodeString ()
const [virtual]

Return a string representing the time stored in the buffer (p. 107).
The returned string has the format: "HH:MM:SS.FFFFFF" where:

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.59 puntoexe::imebra::handlers::dataHandlerTime Class Reference 231

• HH is the hour
• MM is the minute

• SS is the second
• FFFFFF is the fraction of seconds in nanoseconds

Returns:
a string representing the time stored in the buffer (p. 107)

Reimplemented from puntoexe::imebra::handlers::dataHandlerString (p. 217).

13.59.2.2 void pun-


toexe::imebra::handlers::dataHandlerTime::setUnicodeString (const
std::wstring & value) [virtual]

Set the date from a string.


The string must have the format: "HH:MM:SS.FFFFFF" where:

• HH is the hour
• MM is the minute

• SS is the second
• FFFFFF is the fraction of seconds in nanoseconds

Parameters:
value the string representing the time to be set

Reimplemented from puntoexe::imebra::handlers::dataHandlerString (p. 217).


The documentation for this class was generated from the following files:

• dataHandlerTime.h
• dataHandlerTime.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


232 Class Documentation

13.60 puntoexe::imebra::image Class Reference


Represents a single image (p. 232) of a dicom data (p. 139) set.
#include <image.h>
Inheritance diagram for puntoexe::imebra::image::

puntoexe::baseObject

puntoexe::imebra::image

Public Types
• enum bitDepth {
depthUnknown, depthU8, depthS8, depthU16,
depthS16 }
Define a single color component’s size.

Public Member Functions


• ptr< handlers::imageHandler > create (const imbxUint32 sizeX, const im-
bxUint32 sizeY, const bitDepth depth, std::wstring colorSpace, const im-
bxUint8 highBit)
Create the image (p. 232).

• void getSizeMm (double ∗pSizeX, double ∗pSizeY)


Retrieve the image’s size, in millimeters.

• void setSizeMm (const double sizeX, const double sizeY)


Set the image’s size, in millimeters.

• void getSize (imbxUint32 ∗pSizeX, imbxUint32 ∗pSizeY)


Get the image’s size, in pixels.

• ptr< handlers::imageHandler > getDataHandler (const bool bWrite,


imbxUint32 ∗pRowSize, imbxUint32 ∗pChannelPixelSize, imbxUint32
∗pChannelsNumber)
Retrieve a data (p. 139) handler for managing the image’s buffer (p. 107).

• std::wstring getColorSpace ()
Get the image’s color space (DICOM standard).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.60 puntoexe::imebra::image Class Reference 233

• imbxUint32 getChannelsNumber ()
Get the number of allocated channels.

• bitDepth getDepth ()
Get the image’s bit depth.

• imbxUint32 getHighBit ()
Get the high bit.

13.60.1 Detailed Description

Represents a single image (p. 232) of a dicom data (p. 139) set.
Images are embedded into the dicom structures (represented by the dataSet (p. 155)
class), stored in a compressed format.
The class image (p. 232) represents a decompressed raw image (p. 232), extracted from
a dicom structure using dataSet::getImage() (p. 163).
image (p. 232) objects can also be created by the application and stored into a dicom
structure using the function dataSet::setImage() (p. 169).
The image (p. 232) and its buffer (p. 107) share a common lock object: this means
that a lock to the image (p. 232) object will also locks the image’s buffer (p. 107) and
viceversa.

Examples:

dicom2jpeg/dicom2jpeg.cpp.

13.60.2 Member Enumeration Documentation

13.60.2.1 enum puntoexe::imebra::image::bitDepth

Define a single color component’s size.

Enumerator:
depthUnknown the bit depth is unknown
depthU8 unsigned integer, 1 byte
depthS8 signed integer, 1 byte
depthU16 unsigned integer, 2 bytes
depthS16 signed integer, 2 bytes

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


234 Class Documentation

13.60.3 Member Function Documentation

13.60.3.1 ptr< handlers::imageHandler > puntoexe::imebra::image::create


(const imbxUint32 sizeX, const imbxUint32 sizeY, const bitDepth
depth, std::wstring colorSpace, const imbxUint8 highBit)

Create the image (p. 232).


An image (p. 232) with the specified size (in pixels), bit depth and color space is al-
located. The number of channels to allocate is automatically calculated using the col-
orSpace parameter.

Parameters:
sizeX the image’s width, in pixels.
sizeY the image’s height, in pixels.
depth the size of a single color’s component.
colorSpace The color space as defined by the DICOM standard. Valid colorspace
are:
• "RGB"
• "YBR_FULL"
• "YBR_PARTIAL"
• "YBR_RCT"
• "YBR_ICT"
• "PALETTE COLOR"
• "MONOCHROME2"
• "MONOCHROME1"
highBit the highest bit used for integer values.

Returns:
the data (p. 139) handler containing the image’s data (p. 139)

13.60.3.2 imbxUint32 puntoexe::imebra::image::getChannelsNumber ()

Get the number of allocated channels.

Returns:
the number of color channels in the image (p. 232)

13.60.3.3 std::wstring puntoexe::imebra::image::getColorSpace ()

Get the image’s color space (DICOM standard).

Returns:
a string with the image’s color space

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.60 puntoexe::imebra::image Class Reference 235

13.60.3.4 ptr< handlers::imageHandler > pun-


toexe::imebra::image::getDataHandler (const bool bWrite,
imbxUint32 ∗ pRowSize, imbxUint32 ∗ pChannelPixelSize,
imbxUint32 ∗ pChannelsNumber)

Retrieve a data (p. 139) handler for managing the image’s buffer (p. 107).
The retrieved data (p. 139) handler gives access to the image’s buffer (p. 107). The
image’s buffer (p. 107) stores the data (p. 139) in the following format:

• when multiple channels are present, then the channels are ALWAYS interleaved
• the channels are NEVER subsampled or oversampled. The subsampling/over-
sampling is done by the codecs (p. 75) when the image (p. 232) is stored or
loaded from the dicom structure.
• the first stored value represent the first channel of the top/left pixel.
• each row is stored countiguously, from the top to the bottom.

Parameters:
bWrite true if the application wants to write into the buffer (p. 107), false other-
wise.
pRowSize the function will fill the variable pointed by this parameter with the size
of a single row, in bytes.
pChannelPixelSize the function will fill the variable pointed by this parameter
with the size of a single pixel, in bytes.
pChannelsNumber the function will fill the variable pointed by this parameter
with the number of channels per pixel.

Returns:
a pointer to the data (p. 139) handler for the image’s buffer (p. 107).

13.60.3.5 image::bitDepth puntoexe::imebra::image::getDepth ()

Get the image’s bit depth.


The bit depth indicates how every single value is stored into the image’s buffer (p. 107).

Returns:
the bit depth.

13.60.3.6 imbxUint32 puntoexe::imebra::image::getHighBit ()

Get the high bit.

Returns:
the image’s high bit

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


236 Class Documentation

13.60.3.7 void puntoexe::imebra::image::getSize (imbxUint32 ∗ pSizeX,


imbxUint32 ∗ pSizeY)

Get the image’s size, in pixels.

Parameters:
pSizeX a pointer to the variable to fill with the image’s width (in pixels).
pSizeY a pointer to the variable to fill with the image’s height (in pixels).

13.60.3.8 void puntoexe::imebra::image::getSizeMm (double ∗ pSizeX, double


∗ pSizeY)

Retrieve the image’s size, in millimeters.


The image’s size in millimeters is automatically read from the dicom structure or can
be set using setSizeMm() (p. 236).

Parameters:
pSizeX a pointer to the variable to fill with the image’s width (in millimeters).
pSizeY a pointer to the variable to fill with the image’s height (in millimeters).

13.60.3.9 void puntoexe::imebra::image::setSizeMm (const double sizeX, const


double sizeY)

Set the image’s size, in millimeters.

Parameters:
sizeX the new image’s width, in millimeters.
sizeY the new image’s height, in millimeters.

The documentation for this class was generated from the following files:

• image.h
• image.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.61 puntoexe::imebra::imageException Class Reference 237

13.61 puntoexe::imebra::imageException Class Refer-


ence
This is the base class for the exceptions thrown by the image (p. 232) class.
#include <image.h>
Inheritance diagram for puntoexe::imebra::imageException::

puntoexe::imebra::imageException

puntoexe::imebra::imageExceptionInvalidSize puntoexe::imebra::imageExceptionUnknownColorSpace puntoexe::imebra::imageExceptionUnknownDepth

Public Member Functions


• imageException (const std::string &message)
Build a codec exception.

13.61.1 Detailed Description

This is the base class for the exceptions thrown by the image (p. 232) class.

13.61.2 Constructor & Destructor Documentation

13.61.2.1 puntoexe::imebra::imageException::imageException (const


std::string & message) [inline]

Build a codec exception.

Parameters:
message the message to store into the exception

The documentation for this class was generated from the following file:

• image.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


238 Class Documentation

13.62 puntoexe::imebra::imageExceptionInvalidSize
Class Reference
This exception is thrown when an invalid size in pixels is specified in the function
create().
#include <image.h>
Inheritance diagram for puntoexe::imebra::imageExceptionInvalidSize::

puntoexe::imebra::imageException

puntoexe::imebra::imageExceptionInvalidSize

13.62.1 Detailed Description

This exception is thrown when an invalid size in pixels is specified in the function
create().
The documentation for this class was generated from the following file:

• image.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.63 puntoexe::imebra::imageExceptionUnknownColorSpace Class Reference
239

13.63 puntoexe::imebra::imageExceptionUnknownColorSpace
Class Reference
This exception is thrown when an unknown color space is specified in the function
create().
#include <image.h>
Inheritance diagram for puntoexe::imebra::imageExceptionUnknownColorSpace::

puntoexe::imebra::imageException

puntoexe::imebra::imageExceptionUnknownColorSpace

13.63.1 Detailed Description

This exception is thrown when an unknown color space is specified in the function
create().
The documentation for this class was generated from the following file:

• image.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


240 Class Documentation

13.64 puntoexe::imebra::imageExceptionUnknownDepth
Class Reference
This exception is thrown when an unknown depth is specified as a parameter.
#include <image.h>
Inheritance diagram for puntoexe::imebra::imageExceptionUnknownDepth::

puntoexe::imebra::imageException

puntoexe::imebra::imageExceptionUnknownDepth

13.64.1 Detailed Description

This exception is thrown when an unknown depth is specified as a parameter.


The documentation for this class was generated from the following file:

• image.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.65 puntoexe::imebra::lut Class Reference 241

13.65 puntoexe::imebra::lut Class Reference


Represents a Lookup table (LUT).
#include <LUT.h>
Inheritance diagram for puntoexe::imebra::lut::

puntoexe::baseObject

puntoexe::imebra::lut

Public Member Functions


• void setLut (ptr< handlers::dataHandler > pDescriptor, ptr< han-
dlers::dataHandler > pData, std::wstring description)
Initializes the lut (p. 241) with the values stored in three data (p. 139) handlers (p. 77),
usually retrieved from a dataset.

• void create (imbxUint32 size, imbxInt32 firstMapped, imbxUint8 bits,


std::wstring description)
Create an empty lut (p. 241).

• void setLutValue (imbxInt32 startValue, imbxInt32 lutValue)


Store a mapped value in the lut (p. 241).

• void fillHandlers (ptr< handlers::dataHandler > pDescriptor, ptr< han-


dlers::dataHandler > pData)
Fill the data (p. 139) handlers (p. 77) with the lut’s descriptor and the lut’s data
(p. 139).

• std::wstring getDescription ()
Return the lut’s description.

• imbxUint8 getBits ()
Return the number of bits used to store a mapped value.

• imbxUint32 getSize ()
Return the lut’s size.

• bool checkValidDataRange ()
Checks if the data (p. 139) in the LUT is consistent with the number of bits specified
in number of bits.

• imbxInt32 getFirstMapped ()

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


242 Class Documentation

Return the id of the first mapped value.

• imbxInt32 mappedValue (imbxInt32 id)


Retrieve the value mapped by the specified id.

• imbxInt32 mappedValueRev (imbxInt32 lutValue)


Retrieve tha id that maps the specified value.

• void copyToInt32 (imbxInt32 ∗pDestination, imbxUint32 destSize, imbxInt32


∗pFirstMapped)
Copy the lut’s data (p. 139) into an imbxInt32 array.

13.65.1 Detailed Description

Represents a Lookup table (LUT).


The lookup table maps a value stored into an image (p. 232) into another value that
must be used for the visualization or for the analysis of the image (p. 232).
3 lookups tables can be joined together to form a color palette, also
used by the transforms (p. 79) transforms::PALETTECOLORToRGB and trans-
forms::RGBToPALETTECOLOR.

13.65.2 Member Function Documentation

13.65.2.1 bool puntoexe::imebra::lut::checkValidDataRange ()

Checks if the data (p. 139) in the LUT is consistent with the number of bits specified
in number of bits.

Returns:
true if the data (p. 139) is correct, false otherwise

13.65.2.2 void puntoexe::imebra::lut::copyToInt32 (imbxInt32 ∗ pDestination,


imbxUint32 destSize, imbxInt32 ∗ pFirstMapped)

Copy the lut’s data (p. 139) into an imbxInt32 array.

Parameters:
pDestination a pointer to the first element of the imbxInt32 array
destSize the size of the array, in elements
pFirstMapped a pointer to a variable that this function will fill with the id of the
first mapped element

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.65 puntoexe::imebra::lut Class Reference 243

13.65.2.3 void puntoexe::imebra::lut::create (imbxUint32 size, imbxInt32


firstMapped, imbxUint8 bits, std::wstring description)

Create an empty lut (p. 241).


Subsequent calls to setLutValue() (p. 245) must be made in order to fill the lut (p. 241)
with the data (p. 139).

Parameters:
size the number of mapped values that will be set by setLutValue() (p. 245)
firstMapped the id of the first mapped value
bits the number of bits to use to store the mapped values
description a string that describes the lut (p. 241)

13.65.2.4 void puntoexe::imebra::lut::fillHandlers (ptr<


handlers::dataHandler > pDescriptor, ptr< handlers::dataHandler
> pData)

Fill the data (p. 139) handlers (p. 77) with the lut’s descriptor and the lut’s data
(p. 139).
This function is usually called when a lut (p. 241) has to be written in a dataSet
(p. 155).

Parameters:
pDescriptor the data (p. 139) handler that manages the buffer (p. 107) that will
store the lut (p. 241) descriptor
pData the data (p. 139) handler that manages the buffer (p. 107) that will store
the lut (p. 241) data (p. 139)

13.65.2.5 imbxUint8 puntoexe::imebra::lut::getBits ()

Return the number of bits used to store a mapped value.

Returns:
the number of bits used to store a mapped value

13.65.2.6 std::wstring puntoexe::imebra::lut::getDescription ()

Return the lut’s description.

Returns:
the lut (p. 241) description

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


244 Class Documentation

13.65.2.7 imbxInt32 puntoexe::imebra::lut::getFirstMapped ()

Return the id of the first mapped value.

Returns:
the id of the first mapped value

13.65.2.8 imbxUint32 puntoexe::imebra::lut::getSize ()

Return the lut’s size.

Returns:
the number of mapped value stored in the lut (p. 241)

13.65.2.9 imbxInt32 puntoexe::imebra::lut::mappedValue (imbxInt32 id)

Retrieve the value mapped by the specified id.

Parameters:
id the id to look for

Returns:
the value mapped by the specified id

13.65.2.10 imbxInt32 puntoexe::imebra::lut::mappedValueRev (imbxInt32


lutValue)

Retrieve tha id that maps the specified value.

Parameters:
lutValue the value to look for in the lut (p. 241)

Returns:
the id that maps the specified value

13.65.2.11 void puntoexe::imebra::lut::setLut (ptr< handlers::dataHandler >


pDescriptor, ptr< handlers::dataHandler > pData, std::wstring
description)

Initializes the lut (p. 241) with the values stored in three data (p. 139) handlers (p. 77),
usually retrieved from a dataset.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.65 puntoexe::imebra::lut Class Reference 245

Parameters:
pDescriptor the handler that manages the lut (p. 241) descriptor (size, first
mapped value and number of bits)
pData the handler that manages the lut (p. 241) data (p. 139)
description a string that describes the lut (p. 241)

13.65.2.12 void puntoexe::imebra::lut::setLutValue (imbxInt32 startValue,


imbxInt32 lutValue)

Store a mapped value in the lut (p. 241).


This function has to be called if the lut (p. 241) has been created by create() (p. 243).
Call this function for every mapped value that must be stored in the lut (p. 241).

Parameters:
startValue the id of the mapped value
lutValue the mapped value

The documentation for this class was generated from the following files:

• LUT.h
• LUT.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


246 Class Documentation

13.66 puntoexe::imebra::lutException Class Reference


This is the base class for the exceptions thrown by the lut (p. 241) class.
#include <LUT.h>
Inheritance diagram for puntoexe::imebra::lutException::

puntoexe::imebra::lutException

puntoexe::imebra::lutExceptionCorrupted puntoexe::imebra::lutExceptionWrongIndex

13.66.1 Detailed Description

This is the base class for the exceptions thrown by the lut (p. 241) class.
The documentation for this class was generated from the following file:

• LUT.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.67 puntoexe::imebra::lutExceptionCorrupted Class Reference 247

13.67 puntoexe::imebra::lutExceptionCorrupted
Class Reference
This exception is thrown by the lut (p. 241) class when the the LUT information is
corrupted.
#include <LUT.h>
Inheritance diagram for puntoexe::imebra::lutExceptionCorrupted::

puntoexe::imebra::lutException

puntoexe::imebra::lutExceptionCorrupted

13.67.1 Detailed Description

This exception is thrown by the lut (p. 241) class when the the LUT information is
corrupted.
The documentation for this class was generated from the following file:

• LUT.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


248 Class Documentation

13.68 puntoexe::imebra::lutExceptionWrongIndex
Class Reference
This exception is thrown by the lut (p. 241) class when the wrong index or id is speci-
fied as a parameter.
#include <LUT.h>
Inheritance diagram for puntoexe::imebra::lutExceptionWrongIndex::

puntoexe::imebra::lutException

puntoexe::imebra::lutExceptionWrongIndex

13.68.1 Detailed Description

This exception is thrown by the lut (p. 241) class when the wrong index or id is speci-
fied as a parameter.
The documentation for this class was generated from the following file:

• LUT.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.69 puntoexe::imebra::transaction Class Reference 249

13.69 puntoexe::imebra::transaction Class Reference


Represents a single transaction (p. 249).
#include <transaction.h>

Public Member Functions


• transaction (bool bCommitTransaction=false)
Initialize a transaction (p. 249).

• virtual ∼transaction ()
Destroy the transaction (p. 249) and commit the changes if bCommitTransaction was
set to true in the constructor or there are no parent transactions.

• void abort ()
Rollback all the changes made to far.

13.69.1 Detailed Description

Represents a single transaction (p. 249).


When a transaction (p. 249) is created it is inserted into the current thread’s transac-
tions stack; the transaction (p. 249) object on the top of the stack will be used by all the
writing handlers (p. 77) (see dataHandler) created AFTER the transaction’s creation.
The writing handlers (p. 77) that are included in a transaction (p. 249) don’t write the
modified data (p. 139) back to the buffer (p. 107) when they go out of scope, but when
the first committing transaction (p. 249) goes out of scope.
The transaction (p. 249) writes the data (p. 139) back to the buffers in two phases:

• the first phase build the data (p. 139) for all the buffers and check for errors
• if there are no errors in the first phase then the second phase commits all the
changes and the modifications are finalized.

If the transaction (p. 249) is aborted or an unhandled exception is thrown inside a


transaction (p. 249) block (see the transaction (p. 249) macros) then all the modifica-
tions are rolled back and no changes are written back to the buffers.
Transactions should be used through the macros

• IMEBRA_TRANSACTION_START() (p. 506)


• IMEBRA_COMMIT_TRANSACTION_START() (p. 505)
• IMEBRA_TRANSACTION_END() (p. 505)
• IMEBRA_TRANSACTION_ABORT() (p. 505)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


250 Class Documentation

13.69.2 Constructor & Destructor Documentation

13.69.2.1 puntoexe::imebra::transaction::transaction (bool


bCommitTransaction = false)

Initialize a transaction (p. 249).

Parameters:
bCommitTransaction if this parameter is true then the transaction (p. 249) will
commit the changes in the destructor, otherwise the changes will be commit-
ted by the parent transaction (p. 249). When there are no parent transactions,
then the commit happens anyway

13.69.2.2 puntoexe::imebra::transaction::∼transaction () [virtual]

Destroy the transaction (p. 249) and commit the changes if bCommitTransaction was
set to true in the constructor or there are no parent transactions.
If abort() (p. 250) was called before the destruction of the transaction (p. 249) then
the modified data (p. 139) will not be copied back to the buffers.

13.69.3 Member Function Documentation

13.69.3.1 void puntoexe::imebra::transaction::abort ()

Rollback all the changes made to far.


Data handlers (p. 77) (see dataHandler) created AFTER the call to abort() (p. 250)
will be committed unless another call to abort is made().
The documentation for this class was generated from the following files:

• transaction.h
• transaction.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.70 puntoexe::imebra::transforms::colorTransforms::colorTransform Class
Reference 251

13.70 puntoexe::imebra::transforms::colorTransforms::colorTransform
Class Reference
This is the base class used by the color transforms (p. 79) classes.
#include <colorTransform.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::colorTransform::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToMONOCHROME2

puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToRGB

puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToRGB

puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToYBRFULL

puntoexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB

puntoexe::imebra::transforms::colorTransforms::RGBToMONOCHROME2

puntoexe::imebra::transforms::colorTransforms::RGBToYBRFULL

puntoexe::imebra::transforms::colorTransforms::RGBToYBRPARTIAL

puntoexe::imebra::transforms::colorTransforms::YBRFULLToMONOCHROME2

puntoexe::imebra::transforms::colorTransforms::YBRFULLToRGB

puntoexe::imebra::transforms::colorTransforms::YBRPARTIALToRGB

Public Member Functions


• virtual std::wstring getInitialColorSpace ()=0
Return the name of the color space that this colorTransform (p. 251) can convert.

• virtual std::wstring getFinalColorSpace ()=0


Return the name of the color space that this colorTransform (p. 251) can generate.

• virtual ptr< colorTransform > createColorTransform ()=0


Create another instance of the colorTransform (p. 251) class.

13.70.1 Detailed Description

This is the base class used by the color transforms (p. 79) classes.
Each color transform (p. 285) class can handle a color space conversion from one color
space to another.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


252 Class Documentation

The class colorTransformsFactory (p. 253) can select the right transform (p. 285)
automatically when queried with the initial and the final color spaces as parameters.

13.70.2 Member Function Documentation

13.70.2.1 virtual ptr<colorTransform> pun-


toexe::imebra::transforms::colorTransforms::colorTransform::createColorTransform
() [pure virtual]

Create another instance of the colorTransform (p. 251) class.


The new instance will have the same type of the instance on which this function is
called.

Returns:
a new instance of the colorTransform (p. 251). The new instance will have the
same class of the instance on which the function is called

13.70.2.2 virtual std::wstring pun-


toexe::imebra::transforms::colorTransforms::colorTransform::getFinalColorSpace
() [pure virtual]

Return the name of the color space that this colorTransform (p. 251) can generate.

Returns:
a string with the name of the color space that can be generated by the colorTrans-
form (p. 251)

13.70.2.3 virtual std::wstring pun-


toexe::imebra::transforms::colorTransforms::colorTransform::getInitialColorSpace
() [pure virtual]

Return the name of the color space that this colorTransform (p. 251) can convert.

Returns:
a string with the name of the color space that can be converted by the colorTrans-
form (p. 251)

The documentation for this class was generated from the following files:

• colorTransform.h
• colorTransform.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.71 puntoexe::imebra::transforms::colorTransforms::colorTransformsFactory
Class Reference 253

13.71 puntoexe::imebra::transforms::colorTransforms::colorTransformsFactor
Class Reference
This class maintains a list of all the available colorTransform (p. 251) classes and
retrieve the most appropriate transform (p. 285) class (or classes) when a color space
conversion is needed.
#include <colorTransformsFactory.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::colorTransformsFactory::

puntoexe::baseObject

puntoexe::imebra::transforms::colorTransforms::colorTransformsFactory

Public Member Functions


Color space conversion
Return the transform (p. 285) that convert one color space into another

• ptr< transform > getTransform (std::wstring startColorSpace, std::wstring


endColorSpace)
Returns a transform (p. 285) or a sequence of transforms (p. 79) (see transform-
sChain (p. 298)) that can convert the pixels from one color space to another color
space.

Static Public Member Functions


Static instance
Static functions that return a pointer to the statically allocated instance of color-
TransformsFactory (p. 253)

• static ptr< colorTransformsFactory > getColorTransformsFactory ()


Retrieve a pointer to the unique statically allocated instance of the colorTransfors-
Factory class.

Static functions
Static functions that operate on the color space name

• static std::wstring normalizeColorSpace (std::wstring colorSpace)


Normalize a color space name.

• static bool isMonochrome (std::wstring colorSpace)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


254 Class Documentation

Returns true if the color space name specified in the parameter has only one color
channel and is monochrome (it doesn’t have a lookup color table).

• static bool isSubsampledX (std::wstring colorSpace)


Returns true if the name of the color space specified in the parameter indicates
that the chrominance channels are subsampled horizontally.

• static bool isSubsampledY (std::wstring colorSpace)


Returns true if the name of the color space specified in the parameter indicates
that the chrominance channels are subsampled vertically.

• static bool canSubsample (std::wstring colorSpace)


Returns true if the color space specified in the parameter can be subsampled.

• static std::wstring makeSubsampled (std::wstring colorSpace, bool bSub-


sampleX, bool bSubsampleY)
Add the subsamplig information to a color space name.

• static imbxUint32 getNumberOfChannels (std::wstring colorSpace)


Returns the number of channels used by the specified color space.

13.71.1 Detailed Description

This class maintains a list of all the available colorTransform (p. 251) classes and
retrieve the most appropriate transform (p. 285) class (or classes) when a color space
conversion is needed.
One instance of this class is statically allocated by the library; the application does
NOT have to allocate its own instance of colorTransformsFactory (p. 253).
A pointer to the statically allocated colorTransformsFactory (p. 253)
class can be obtained by calling that static function colorTransformsFac-
tory::getColorTransformsFactory() (p. 255).
The class can also retrieve more information from a name of a color space (in dicom
standard). For instance, both the Dicom color space "YBR_FULL_422" and "YBR_-
FULL" describe the color space YBR, but the first indicates that the image (p. 232) is
subsampled both horizontally and vertically.
The colorTransformsFactory (p. 253) can normalize the color space name (e.g.: con-
vert "YBR_FULL_422" to "YBR_FULL") and can retrieve the subsampling parame-
ters.

13.71.2 Member Function Documentation

13.71.2.1 bool pun-


toexe::imebra::transforms::colorTransforms::colorTransformsFactory::canSubsample
(std::wstring colorSpace) [static]

Returns true if the color space specified in the parameter can be subsampled.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.71 puntoexe::imebra::transforms::colorTransforms::colorTransformsFactory
Class Reference 255

For instance, the color spaces "YBR_FULL" and "YBR_PARTIAL" can be subsam-
pled, but the color space "RGB" cannot be subsampled.

Parameters:
colorSpace the name of the color space to be tested

Returns:
true if the name of the color space in the parameter colorSpace can be subsampled

13.71.2.2 ptr< colorTransformsFactory > pun-


toexe::imebra::transforms::colorTransforms::colorTransformsFactory::getColorTransformsFactory
() [static]

Retrieve a pointer to the unique statically allocated instance of the colorTransforsFac-


tory class.
The application must use the colorTransformsFactory (p. 253) referenced by this
function.

Returns:
a pointer to the unique instance of the colorTransformsFactory (p. 253)

13.71.2.3 imbxUint32 pun-


toexe::imebra::transforms::colorTransforms::colorTransformsFactory::getNumberOfChannels
(std::wstring colorSpace) [static]

Returns the number of channels used by the specified color space.


For instance, the color space "RGB" has 3 color channels, while the
"MONOCHROME2" color space has 1 color channel.

Parameters:
colorSpace the name of the color space for which the number of channels must
be returned

Returns:
the number of color channels in the specified color channel

13.71.2.4 ptr< transform > pun-


toexe::imebra::transforms::colorTransforms::colorTransformsFactory::getTransform
(std::wstring startColorSpace, std::wstring endColorSpace)

Returns a transform (p. 285) or a sequence of transforms (p. 79) (see transform-
sChain (p. 298)) that can convert the pixels from one color space to another color
space.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


256 Class Documentation

If the no conversion is needed then the function returns 0. If the function cannot find
any suitable transform (p. 285) then a colorTransformsFactoryExceptionNoTrans-
form (p. 260) is thrown.

Parameters:
startColorSpace the color space from which the conversion has to take place
endColorSpace the color space resulting from the conversion

Returns:
the transform (p. 285) that can convert the startColorSpace into endColorSpace,
or 0 if startColorSpace and endColorSpace have the same value

13.71.2.5 bool pun-


toexe::imebra::transforms::colorTransforms::colorTransformsFactory::isMonochrome
(std::wstring colorSpace) [static]

Returns true if the color space name specified in the parameter has only one color
channel and is monochrome (it doesn’t have a lookup color table).
At the moment, only the color space names "MONOCHROME1" and
"MONOCHROME2" indicate a monochrome color space.

Parameters:
colorSpace the name of the color space to be tested

Returns:
true if the color space indicated in the parameter is monochrome, or false otherwise

13.71.2.6 bool pun-


toexe::imebra::transforms::colorTransforms::colorTransformsFactory::isSubsampledX
(std::wstring colorSpace) [static]

Returns true if the name of the color space specified in the parameter indicates that the
chrominance channels are subsampled horizontally.

Parameters:
colorSpace the name of the color space to be tested

Returns:
true if the name of the color space in the parameter colorSpace has the chrominance
channels subsampled horizontally

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.71 puntoexe::imebra::transforms::colorTransforms::colorTransformsFactory
Class Reference 257

13.71.2.7 bool pun-


toexe::imebra::transforms::colorTransforms::colorTransformsFactory::isSubsampledY
(std::wstring colorSpace) [static]

Returns true if the name of the color space specified in the parameter indicates that the
chrominance channels are subsampled vertically.

Parameters:
colorSpace the name of the color space to be tested

Returns:
true if the name of the color space in the parameter colorSpace has the chrominance
channels subsampled vertically

13.71.2.8 std::wstring pun-


toexe::imebra::transforms::colorTransforms::colorTransformsFactory::makeSubsampled
(std::wstring colorSpace, bool bSubsampleX, bool bSubsampleY)
[static]

Add the subsamplig information to a color space name.


Only the color spaces for which canSubsample() (p. 254) returns true can have the
subsampling information.

Parameters:
colorSpace the name of the color space to which the subsampling information
should be added
bSubsampleX if true, then the function will make the color space subsampled
horizontally. The color space will also be subsampled vertically
bSubsampleY if true, then the function will make the color space subsampled
vertically

Returns:
the color space name subsampled as specified

13.71.2.9 std::wstring pun-


toexe::imebra::transforms::colorTransforms::colorTransformsFactory::normalizeColorSpace
(std::wstring colorSpace) [static]

Normalize a color space name.


The function converts all the chars to uppercase and remove additional information
from the color space.
For instance, the color space "ybr_full_420" is converted to "YBR_FULL".

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


258 Class Documentation

Parameters:
colorSpace the color space name to be normalized

Returns:
the normalized color space name

The documentation for this class was generated from the following files:

• colorTransformsFactory.h
• colorTransformsFactory.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.72 pun-
toexe::imebra::transforms::colorTransforms::colorTransformsFactoryException
Class Reference 259
13.72 puntoexe::imebra::transforms::colorTransforms::colorTransformsFactor
Class Reference
This is the base class for the exceptions thrown by colorTransformsFactory (p. 253).
#include <colorTransformsFactory.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryException::

puntoexe::imebra::transforms::transformException

puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryException

puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryExceptionNoTransform

13.72.1 Detailed Description

This is the base class for the exceptions thrown by colorTransformsFactory (p. 253).
The documentation for this class was generated from the following file:

• colorTransformsFactory.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


260 Class Documentation

13.73 puntoexe::imebra::transforms::colorTransforms::colorTransform
Class Reference
This exception is thrown by the function colorTransformsFactory::getTransform()
(p. 255) when it cannot find any transform (p. 285) that can convert the specified color
spaces.
#include <colorTransformsFactory.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryExceptionNoTr

puntoexe::imebra::transforms::transformException

puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryException

puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryExceptionNoTransform

13.73.1 Detailed Description

This exception is thrown by the function colorTransformsFactory::getTransform()


(p. 255) when it cannot find any transform (p. 285) that can convert the specified color
spaces.
The documentation for this class was generated from the following file:

• colorTransformsFactory.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.74 pun-
toexe::imebra::transforms::colorTransforms::MONOCHROME1ToMONOCHROME2
Class Reference 261
13.74 puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToM
Class Reference
Transforms an image (p. 232) from the colorspace MONOCHROME1 into the color
space MONOCHROME2.
#include <MONOCHROME1ToMONOCHROME2.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToMONOCHROME2::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToMONOCHROME2

puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToMONOCHROME1

13.74.1 Detailed Description

Transforms an image (p. 232) from the colorspace MONOCHROME1 into the color
space MONOCHROME2.
The input image (p. 232) has to have the colorspace MONOCHROME1, while the
output image (p. 232) is created by the transform (p. 285) and will have the colorspace
MONOCHROME2.
The documentation for this class was generated from the following files:

• MONOCHROME1ToMONOCHROME2.h
• MONOCHROME1ToMONOCHROME2.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


262 Class Documentation

13.75 puntoexe::imebra::transforms::colorTransforms::MONOCHROM
Class Reference
Transforms an image (p. 232) from the colorspace MONOCHROME1 into the color
space RGB.
#include <MONOCHROME1ToRGB.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToRGB::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToRGB

13.75.1 Detailed Description

Transforms an image (p. 232) from the colorspace MONOCHROME1 into the color
space RGB.
The input image (p. 232) has to have the colorspace MONOCHROME1, while the
output image (p. 232) is created by the transform (p. 285) and will have the colorspace
RGB.
The documentation for this class was generated from the following files:

• MONOCHROME1ToRGB.h
• MONOCHROME1ToRGB.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.76 pun-
toexe::imebra::transforms::colorTransforms::MONOCHROME2ToMONOCHROME1
Class Reference 263
13.76 puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToM
Class Reference
Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space MONOCHROME1.
#include <MONOCHROME1ToMONOCHROME2.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToMONOCHROME1::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToMONOCHROME2

puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToMONOCHROME1

13.76.1 Detailed Description

Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space MONOCHROME1.
The input image (p. 232) has to have the colorspace MONOCHROME2, while the
output image (p. 232) is created by the transform (p. 285) and will have the colorspace
MONOCHROME1.
The documentation for this class was generated from the following files:

• MONOCHROME1ToMONOCHROME2.h
• MONOCHROME1ToMONOCHROME2.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


264 Class Documentation

13.77 puntoexe::imebra::transforms::colorTransforms::MONOCHROM
Class Reference
Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space RGB.
#include <MONOCHROME2ToRGB.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToRGB::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToRGB

13.77.1 Detailed Description

Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space RGB.
The input image (p. 232) has to have the colorspace MONOCHROME2, while the
output image (p. 232) is created by the transform (p. 285) and will have the colorspace
RGB.
The documentation for this class was generated from the following files:

• MONOCHROME2ToRGB.h
• MONOCHROME2ToRGB.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.78 pun-
toexe::imebra::transforms::colorTransforms::MONOCHROME2ToYBRFULL
Class Reference 265
13.78 puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToY
Class Reference
Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space YBR_FULL.
#include <MONOCHROME2ToYBRFULL.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToYBRFULL::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToYBRFULL

13.78.1 Detailed Description

Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space YBR_FULL.
The input image (p. 232) has to have the colorspace MONOCHROME2, while the
output image (p. 232) is created by the transform (p. 285) and will have the colorspace
YBR_FULL.
The documentation for this class was generated from the following files:

• MONOCHROME2ToYBRFULL.h
• MONOCHROME2ToYBRFULL.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


266 Class Documentation

13.79 puntoexe::imebra::transforms::colorTransforms::PALETTECOL
Class Reference

Transforms an image (p. 232) from the colorspace PALETTE COLOR into the color
space RGB.
#include <PALETTECOLORToRGB.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB

puntoexe::imebra::transforms::colorTransforms::RGBToPALETTECOLOR

Public Member Functions

• virtual void setLut (ptr< lut > red, ptr< lut > green, ptr< lut > blue)

Specify the palette to use for the conversion.

13.79.1 Detailed Description

Transforms an image (p. 232) from the colorspace PALETTE COLOR into the color
space RGB.
The input image (p. 232) has to have the colorspace PALETTE COLOR, while the
output image (p. 232) is created by the transform (p. 285) and will have the colorspace
RGB.
The transform (p. 285) needs a dataSet (p. 155) or a palette in order to perform the
conversion. Use declareDataSet() to declare the dataSet (p. 155) or setLut() (p. 267)
to declare the palette.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.79
puntoexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB
Class Reference 267
13.79.2 Member Function Documentation

13.79.2.1 void pun-


toexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB::setLut
(ptr< lut > red, ptr< lut > green, ptr< lut > blue) [virtual]

Specify the palette to use for the conversion.


If the application doesn’t call this function before calling doTransform(), then the
transform (p. 285) uses the palette declared in the dataSet (p. 155).

Parameters:
red the lut (p. 241) that stores the red components of the mapped values
green the lut (p. 241) that stores the green components of the mapped values
blue the lut (p. 241) that stores the blue components of the mapped values

The documentation for this class was generated from the following files:

• PALETTECOLORToRGB.h
• PALETTECOLORToRGB.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


268 Class Documentation

13.80 puntoexe::imebra::transforms::colorTransforms::RGBToMONO
Class Reference
Transforms an image (p. 232) from the colorspace RGB into the color space
MONOCHROME2.
#include <RGBToMONOCHROME2.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::RGBToMONOCHROME2::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::RGBToMONOCHROME2

13.80.1 Detailed Description

Transforms an image (p. 232) from the colorspace RGB into the color space
MONOCHROME2.
The input image (p. 232) has to have the colorspace RGB, while the output im-
age (p. 232) is created by the transform (p. 285) and will have the colorspace
MONOCHROME2.
The documentation for this class was generated from the following files:

• RGBToMONOCHROME2.h
• RGBToMONOCHROME2.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.81
puntoexe::imebra::transforms::colorTransforms::RGBToPALETTECOLOR
Class Reference 269
13.81 puntoexe::imebra::transforms::colorTransforms::RGBToPALETTECOL
Class Reference
Transforms an image (p. 232) from the colorspace RGB into the color space PALETTE
COLOR.
#include <RGBToPALETTECOLOR.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::RGBToPALETTECOLOR::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB

puntoexe::imebra::transforms::colorTransforms::RGBToPALETTECOLOR

13.81.1 Detailed Description

Transforms an image (p. 232) from the colorspace RGB into the color space PALETTE
COLOR.
The input image (p. 232) has to have the colorspace RGB, while the output image
(p. 232) is created by the transform (p. 285) and will have the colorspace PALETTE
COLOR.
If a palette has been defined by calling setLut() or declareDataSet(), then the specified
lut (p. 241) will be used for the conversion.
If the declared dataset doesn’t contain a palette, or the dataSet (p. 155) nor the palette
have been defined then the function calculate a new palette and stores it in the de-
clared dataSet (p. 155) (if any). The calculated lut (p. 241) will also be used for the
conversion.
When multiple image (p. 232) have been declared as input parameters, then the palette
will be shared by all the images.
The documentation for this class was generated from the following files:

• RGBToPALETTECOLOR.h
• RGBToPALETTECOLOR.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


270 Class Documentation

13.82 puntoexe::imebra::transforms::colorTransforms::RGBToYBRFU
Class Reference
Transforms an image (p. 232) from the colorspace RGB into the color space YBR_-
FULL.
#include <RGBToYBRFULL.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::RGBToYBRFULL::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::RGBToYBRFULL

13.82.1 Detailed Description

Transforms an image (p. 232) from the colorspace RGB into the color space YBR_-
FULL.
The input image (p. 232) has to have the colorspace RGB, while the output image
(p. 232) is created by the transform (p. 285) and will have the colorspace YBR_FULL.
The documentation for this class was generated from the following files:

• RGBToYBRFULL.h
• RGBToYBRFULL.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.83 puntoexe::imebra::transforms::colorTransforms::RGBToYBRPARTIAL
Class Reference 271

13.83 puntoexe::imebra::transforms::colorTransforms::RGBToYBRPARTIAL
Class Reference
Transforms an image (p. 232) from the colorspace RGB into the color space YBR_-
PARTIAL.
#include <RGBToYBRPARTIAL.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::RGBToYBRPARTIAL::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::RGBToYBRPARTIAL

13.83.1 Detailed Description

Transforms an image (p. 232) from the colorspace RGB into the color space YBR_-
PARTIAL.
The input image (p. 232) has to have the colorspace RGB, while the output image
(p. 232) is created by the transform (p. 285) and will have the colorspace YBR_-
PARTIAL.
The documentation for this class was generated from the following files:

• RGBToYBRPARTIAL.h
• RGBToYBRPARTIAL.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


272 Class Documentation

13.84 puntoexe::imebra::transforms::colorTransforms::YBRFULLToM
Class Reference
Transforms an image (p. 232) from the colorspace YBR_FULL into the color space
MONOCHROME2.
#include <YBRFULLToMONOCHROME2.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::YBRFULLToMONOCHROME2::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::YBRFULLToMONOCHROME2

13.84.1 Detailed Description

Transforms an image (p. 232) from the colorspace YBR_FULL into the color space
MONOCHROME2.
The input image (p. 232) has to have the colorspace YBR_FULL, while the output
image (p. 232) is created by the transform (p. 285) and will have the colorspace
MONOCHROME2.
The documentation for this class was generated from the following files:

• YBRFULLToMONOCHROME2.h
• YBRFULLToMONOCHROME2.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.85 puntoexe::imebra::transforms::colorTransforms::YBRFULLToRGB Class
Reference 273

13.85 puntoexe::imebra::transforms::colorTransforms::YBRFULLToRGB
Class Reference
Transforms an image (p. 232) from the colorspace YBR_FULL into the color space
RGB.
#include <YBRFULLToRGB.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::YBRFULLToRGB::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::YBRFULLToRGB

13.85.1 Detailed Description

Transforms an image (p. 232) from the colorspace YBR_FULL into the color space
RGB.
The input image (p. 232) has to have the colorspace YBR_FULL, while the output
image (p. 232) is created by the transform (p. 285) and will have the colorspace RGB.
The documentation for this class was generated from the following files:

• YBRFULLToRGB.h
• YBRFULLToRGB.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


274 Class Documentation

13.86 puntoexe::imebra::transforms::colorTransforms::YBRPARTIAL
Class Reference
Transforms an image (p. 232) from the colorspace YBR_PARTIAL into the color space
RGB.
#include <YBRPARTIALToRGB.h>
Inheritance diagram for puntoexe::imebra::transforms::colorTransforms::YBRPARTIALToRGB::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform

puntoexe::imebra::transforms::colorTransforms::YBRPARTIALToRGB

13.86.1 Detailed Description

Transforms an image (p. 232) from the colorspace YBR_PARTIAL into the color space
RGB.
The input image (p. 232) has to have the colorspace YBR_PARTIAL, while the output
image (p. 232) is created by the transform (p. 285) and will have the colorspace RGB.
The documentation for this class was generated from the following files:

• YBRPARTIALToRGB.h
• YBRPARTIALToRGB.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.87 puntoexe::imebra::transforms::drawBitmap Class Reference 275

13.87 puntoexe::imebra::transforms::drawBitmap
Class Reference

This transform (p. 285) takes an image (p. 232) as an input and returns an 8 bit RGB
bitmap of the requested image’s area; the image’s area is expanded or reduced to fit
into the destination bitmap’s size.
#include <drawBitmap.h>
Inheritance diagram for puntoexe::imebra::transforms::drawBitmap::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::drawBitmap

Public Member Functions

• void declareBitmapType (imbxInt32 totalWidthPixels, imbxInt32 total-


HeightPixels, imbxInt32 visibleTopLeftX, imbxInt32 visibleTopLeftY, im-
bxInt32 visibleBottomRightX, imbxInt32 visibleBottomRightY, imbxInt32
alignByte, bool bBGR)
Declare the total size of a bitmap that contains the entire image (p. 232) and the rect-
angle of that bitmap that has to be generated. A subsequent call to getOutputBitmap()
(p. 276) will return the requested bitmap.

• imbxUint8 ∗ getOutputBitmap (imbxInt32 ∗pWidthPixels, imbxInt32


∗pHeightPixels, imbxInt32 ∗pRowLengthBytes)
Returns a pointer to a bitmap that can be used to update the area defined by the pa-
rameters visibleTopLeftX, visibleTopLeftY, visibleBottomRightX, visibleBottomRightY
in the function declareBitmapType() (p. 276).

13.87.1 Detailed Description

This transform (p. 285) takes an image (p. 232) as an input and returns an 8 bit RGB
bitmap of the requested image’s area; the image’s area is expanded or reduced to fit
into the destination bitmap’s size.
The transform (p. 285) processes only the first declared image (p. 232). A requirement
of this transform (p. 285) is that the dataSet (p. 155) has to be declared before the
input image (p. 232); this means that declareDataSet() (p. 286) has to be called before
declareInputImage().

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


276 Class Documentation

13.87.2 Member Function Documentation

13.87.2.1 void pun-


toexe::imebra::transforms::drawBitmap::declareBitmapType
(imbxInt32 totalWidthPixels, imbxInt32 totalHeightPixels,
imbxInt32 visibleTopLeftX, imbxInt32 visibleTopLeftY, imbxInt32
visibleBottomRightX, imbxInt32 visibleBottomRightY, imbxInt32
alignByte, bool bBGR)

Declare the total size of a bitmap that contains the entire image (p. 232) and the rectan-
gle of that bitmap that has to be generated. A subsequent call to getOutputBitmap()
(p. 276) will return the requested bitmap.
This class is used by the class view (p. 305).

Parameters:
totalWidthPixels the width of the bitmap that contains the whole image (p. 232)
declared with declareInputImage()
totalHeightPixels the width of the bitmap that contains the whole image (p. 232)
declared with declareInputImage()
visibleTopLeftX the horizontal coordinate of the top-left corner of the destination
bitmap’s rectangle that has to be updated
visibleTopLeftY the vertical coordinate of the top-left corner of the destination
bitmap’s rectangle that has to be updated
visibleBottomRightX the horizontal coordinate of the bottom-right corner of the
destination bitmap’s rectangle that has to be updated
visibleBottomRightY the vertical coordinate of the bottom-right corner of the des-
tination bitmap’s rectangle that has to be updated
alignByte the number of bytes used to align each row of the returned bitmap
bBGR true if the returned bitmap has to be in the BGR format, false if it has to be
in RGB format

13.87.2.2 imbxUint8 ∗ pun-


toexe::imebra::transforms::drawBitmap::getOutputBitmap
(imbxInt32 ∗ pWidthPixels, imbxInt32 ∗ pHeightPixels, imbxInt32 ∗
pRowLengthBytes)

Returns a pointer to a bitmap that can be used to update the area defined by the parame-
ters visibleTopLeftX, visibleTopLeftY, visibleBottomRightX, visibleBottomRightY in
the function declareBitmapType() (p. 276).
The pointer refers to a memory (p. 328) area that is managed by this transform
(p. 285); DO NOT FREE THE MEMORY, THE TRANSFORM WILL.
Subsequent calls to doTransform() will reuse the memory (p. 328) area referred by the
returned pointer.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.87 puntoexe::imebra::transforms::drawBitmap Class Reference 277

Parameters:
pWidthPixels a pointer to a variable that will by filled with the returned bitmap’s
width, in pixels
pHeightPixels a pointer to a variable that will be filled with the returned bitmap’s
height, in pixels
pRowLengthBytes a pointer to a variable that will be filled with the image’s rows’
length, in bytes

Returns:
a pointer to a memory (p. 328) area containing the bitmap data (p. 139). The
memory (p. 328) is managed by the transform (p. 285) and must NOT be freed
by the caller

The documentation for this class was generated from the following files:

• drawBitmap.h
• drawBitmap.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


278 Class Documentation

13.88 puntoexe::imebra::transforms::drawBitmapException
Class Reference
Base class used for the exceptions thrown by drawBitmap (p. 275).
#include <drawBitmap.h>
Inheritance diagram for puntoexe::imebra::transforms::drawBitmapException::

puntoexe::imebra::transforms::transformException

puntoexe::imebra::transforms::drawBitmapException

puntoexe::imebra::transforms::drawBitmapExceptionDataSetNotDeclared puntoexe::imebra::transforms::drawBitmapExceptionImageNotDeclared puntoexe::imebra::transforms::drawBitmapExceptionInvalidAlignByte puntoexe::imebra::transforms::drawBitmapExceptionInvalidArea

13.88.1 Detailed Description

Base class used for the exceptions thrown by drawBitmap (p. 275).
The documentation for this class was generated from the following file:

• drawBitmap.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.89
puntoexe::imebra::transforms::drawBitmapExceptionDataSetNotDeclared
Class Reference 279
13.89 puntoexe::imebra::transforms::drawBitmapExceptionDataSetNotDeclare
Class Reference
This exception is thrown by declareInputImage() if the dataSet (p. 155) hasn’t been
declared yet.
#include <drawBitmap.h>
Inheritance diagram for puntoexe::imebra::transforms::drawBitmapExceptionDataSetNotDeclared::

puntoexe::imebra::transforms::transformException

puntoexe::imebra::transforms::drawBitmapException

puntoexe::imebra::transforms::drawBitmapExceptionDataSetNotDeclared

13.89.1 Detailed Description

This exception is thrown by declareInputImage() if the dataSet (p. 155) hasn’t been
declared yet.
The documentation for this class was generated from the following file:

• drawBitmap.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


280 Class Documentation

13.90 puntoexe::imebra::transforms::drawBitmapExceptionImageNotD
Class Reference
This exception is thrown by doTransform() if the image (p. 232) hasn’t been declared
yet.
#include <drawBitmap.h>
Inheritance diagram for puntoexe::imebra::transforms::drawBitmapExceptionImageNotDeclared::

puntoexe::imebra::transforms::transformException

puntoexe::imebra::transforms::drawBitmapException

puntoexe::imebra::transforms::drawBitmapExceptionImageNotDeclared

13.90.1 Detailed Description

This exception is thrown by doTransform() if the image (p. 232) hasn’t been declared
yet.
The documentation for this class was generated from the following file:

• drawBitmap.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.91 puntoexe::imebra::transforms::drawBitmapExceptionInvalidAlignByte
Class Reference 281

13.91 puntoexe::imebra::transforms::drawBitmapExceptionInvalidAlignByte
Class Reference
This exception is thrown by declareBitmapType() if the align byte is illegal (1, 2 and 4
are the typical values).
#include <drawBitmap.h>
Inheritance diagram for puntoexe::imebra::transforms::drawBitmapExceptionInvalidAlignByte::

puntoexe::imebra::transforms::transformException

puntoexe::imebra::transforms::drawBitmapException

puntoexe::imebra::transforms::drawBitmapExceptionInvalidAlignByte

13.91.1 Detailed Description

This exception is thrown by declareBitmapType() if the align byte is illegal (1, 2 and 4
are the typical values).
The documentation for this class was generated from the following file:

• drawBitmap.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


282 Class Documentation

13.92 puntoexe::imebra::transforms::drawBitmapExceptionInvalidAre
Class Reference
This exception is thrown by declareBitmapType() if the image’s area that has to be
generated is not valid.
#include <drawBitmap.h>
Inheritance diagram for puntoexe::imebra::transforms::drawBitmapExceptionInvalidArea::

puntoexe::imebra::transforms::transformException

puntoexe::imebra::transforms::drawBitmapException

puntoexe::imebra::transforms::drawBitmapExceptionInvalidArea

13.92.1 Detailed Description

This exception is thrown by declareBitmapType() if the image’s area that has to be


generated is not valid.
The documentation for this class was generated from the following file:

• drawBitmap.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.93 puntoexe::imebra::transforms::modalityVOILUT Class Reference 283

13.93 puntoexe::imebra::transforms::modalityVOILUT
Class Reference
This class transforms (p. 79) the pixel values of the image (p. 232) retrieved from the
dataset into values that are meaningful to th application.
#include <modalityVOILUT.h>
Inheritance diagram for puntoexe::imebra::transforms::modalityVOILUT::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::transformBuffers

puntoexe::imebra::transforms::transformBuffersInPlace

puntoexe::imebra::transforms::modalityVOILUT

puntoexe::imebra::transforms::modalityVOILUTInverse

13.93.1 Detailed Description

This class transforms (p. 79) the pixel values of the image (p. 232) retrieved from the
dataset into values that are meaningful to th application.
For instance, the original pixel values could store a device specific value that has a
meaning only when used by the device that generated it: this transform (p. 285) uses
the modality VOI/LUT defined in the dataset to convert the original values into optical
density or other known measure units.
In order to perform the transformation the class needs to know the dataset from which
the image (p. 232) has been retrieved, then the function transform::declareDataSet()
(p. 286) must be called.
If the dataset doesn’t define any modality VOI/LUT transformation, then the input
image (p. 232) is simply copied into the output image (p. 232).

Examples:

dicom2jpeg/dicom2jpeg.cpp.

The documentation for this class was generated from the following files:

• modalityVOILUT.h
• modalityVOILUT.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


284 Class Documentation

13.94 puntoexe::imebra::transforms::modalityVOILUTInverse
Class Reference
Executes the inverse modality VOI/LUT transformation (see modalityVOILUT
(p. 283)).
#include <modalityVOILUT.h>
Inheritance diagram for puntoexe::imebra::transforms::modalityVOILUTInverse::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::transformBuffers

puntoexe::imebra::transforms::transformBuffersInPlace

puntoexe::imebra::transforms::modalityVOILUT

puntoexe::imebra::transforms::modalityVOILUTInverse

13.94.1 Detailed Description

Executes the inverse modality VOI/LUT transformation (see modalityVOILUT


(p. 283)).
In order to perform the transformation the class needs to know the dataset in which the
output image (p. 232) will be stored, then the function transform::declareDataSet()
(p. 286) must be called.
If the dataset doesn’t define any modality VOI/LUT transformation, then the input
image (p. 232) is simply copied into the output image (p. 232).
The documentation for this class was generated from the following files:

• modalityVOILUT.h
• modalityVOILUT.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.95 puntoexe::imebra::transforms::transform Class Reference 285

13.95 puntoexe::imebra::transforms::transform Class


Reference
This is the base class for the transforms (p. 79).
#include <transform.h>
Inheritance diagram for puntoexe::imebra::transforms::transform::
puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::colorTransforms::colorTransform puntoexe::imebra::transforms::drawBitmap puntoexe::imebra::transforms::transformBuffers puntoexe::imebra::transforms::transformsChain

puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToMONOCHROME2 puntoexe::imebra::transforms::transformBuffersInPlace

puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToRGB puntoexe::imebra::transforms::transformBuffersInputOutput

puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToRGB

puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToYBRFULL

puntoexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB

puntoexe::imebra::transforms::colorTransforms::RGBToMONOCHROME2

puntoexe::imebra::transforms::colorTransforms::RGBToYBRFULL

puntoexe::imebra::transforms::colorTransforms::RGBToYBRPARTIAL

puntoexe::imebra::transforms::colorTransforms::YBRFULLToMONOCHROME2

puntoexe::imebra::transforms::colorTransforms::YBRFULLToRGB

puntoexe::imebra::transforms::colorTransforms::YBRPARTIALToRGB

Public Member Functions


• virtual void declareInputImage (long imageNumber, ptr< image > pInputIm-
age)
Declare an input image (p. 232) for the transform (p. 285).

• virtual void declareOutputImage (long imageNumber, ptr< image > pOut-


putImage)
Declare an output image (p. 232) for the transform (p. 285).

• ptr< image > getOutputImage (long imageNumber)


Retrieve an image (p. 232) used as input parameter.

• ptr< image > getInputImage (long imageNumber)


Retrieve an image (p. 232) used as output parameter.

• virtual void declareDataSet (ptr< dataSet > pDataSet)


Set the dataset to use for the transformations.

• ptr< dataSet > getDataSet ()


Retrieve the dataset used for the transformation.

• virtual void doTransform ()=0


Executes the transform (p. 285).

• virtual bool isEmpty ()


Returns true if the transform (p. 285) doesn’t do anything.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


286 Class Documentation

13.95.1 Detailed Description

This is the base class for the transforms (p. 79).


A transform (p. 285) can process several input images and reply with several output
images.
Sometimes the transform (p. 285) needs to know the dataSet (p. 155) related to the im-
ages being processed; in this case the function transform::declareDataSet() (p. 286)
must be called.

13.95.2 Member Function Documentation

13.95.2.1 void puntoexe::imebra::transforms::transform::declareDataSet


(ptr< dataSet > pDataSet) [virtual]

Set the dataset to use for the transformations.


Some transformations need additional data (p. 139) from a dataset. E.G.: the modali-
tyVOILUT (p. 283) transform (p. 285) needs to load the LUT table or the rescale/in-
tercept values from the dataset.

Parameters:
pDataSet the dataset to use for the transformation

13.95.2.2 void puntoexe::imebra::transforms::transform::declareInputImage


(long imageNumber, ptr< image > pInputImage) [virtual]

Declare an input image (p. 232) for the transform (p. 285).
The transform (p. 285) will use the input image (p. 232) for its purposes when the
application will call doTransform() (p. 287).

Parameters:
imageNumber the transform (p. 285) can work with more than one input im-
age (p. 232). This parameter specifies the parameter’s ID. If another image
(p. 232) was already stored with this parameter’s ID, then it will be released.
pInputImage the image (p. 232) to use as the transform’s input parameter

13.95.2.3 void puntoexe::imebra::transforms::transform::declareOutputImage


(long imageNumber, ptr< image > pOutputImage) [virtual]

Declare an output image (p. 232) for the transform (p. 285).
The transform (p. 285) will store the results in the output image (p. 232).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.95 puntoexe::imebra::transforms::transform Class Reference 287

Parameters:
imageNumber the transform (p. 285) can work with more than one output im-
age (p. 232). This parameter specifies the parameter’s ID. If another image
(p. 232) was already stored with this parameter’s ID, then it will be released
pOutputImage the image (p. 232) to use as the transform’s output parameter

13.95.2.4 virtual void puntoexe::imebra::transforms::transform::doTransform


() [pure virtual]

Executes the transform (p. 285).

13.95.2.5 ptr< dataSet > pun-


toexe::imebra::transforms::transform::getDataSet
()

Retrieve the dataset used for the transformation.


The dataSet (p. 155) can be set by calling declareDataSet() (p. 286).

Returns:
a pointer to the active data (p. 139) set, or 0 if the dataset has not been set

13.95.2.6 ptr< image > pun-


toexe::imebra::transforms::transform::getInputImage (long
imageNumber)

Retrieve an image (p. 232) used as output parameter.

Parameters:
imageNumber the ID of the output parameter to retrieve.

Returns:
the image (p. 232) used as output parameter or 0 if the output parameter has not
been defined

13.95.2.7 ptr< image > pun-


toexe::imebra::transforms::transform::getOutputImage (long
imageNumber)

Retrieve an image (p. 232) used as input parameter.

Parameters:
imageNumber the ID of the input parameter to retrieve

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


288 Class Documentation

Returns:
the image (p. 232) used as input parameter or 0 if the input parameter has not been
defined

13.95.2.8 bool puntoexe::imebra::transforms::transform::isEmpty ()


[virtual]

Returns true if the transform (p. 285) doesn’t do anything.


It always return false, but it is overwritten in the transformsChain (p. 298) class.

Returns:
false if the transform (p. 285) does something, or true if the transform (p. 285)
doesn’t do anything (e.g. an empty transformsChain (p. 298) object).

Reimplemented in puntoexe::imebra::transforms::transformsChain (p. 299).


The documentation for this class was generated from the following files:

• transform.h
• transform.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.96 puntoexe::imebra::transforms::transformBuffers Class Reference 289

13.96 puntoexe::imebra::transforms::transformBuffers
Class Reference
This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels.
#include <transformBuffers.h>
Inheritance diagram for puntoexe::imebra::transforms::transformBuffers::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::transformBuffers

puntoexe::imebra::transforms::transformBuffersInPlace puntoexe::imebra::transforms::transformBuffersInputOutput

puntoexe::imebra::transforms::modalityVOILUT puntoexe::imebra::transforms::transformHighBit puntoexe::imebra::transforms::VOILUT

puntoexe::imebra::transforms::modalityVOILUTInverse puntoexe::imebra::transforms::VOILUTInverse

Protected Member Functions


• virtual void processDataBuffers (ptr< image > inputImage, ptr< image
> outputImage, imbxUint32 sizeX, imbxUint32 sizeY, std::wstring input-
ColorSpace, image::bitDepth inputDepth, imbxUint32 inputHighBit, im-
age::bitDepth ∗pOutputDepth, imbxUint32 ∗pOutputHighBit)=0
Get the data (p. 139) buffers and calls the doTransformBuffers().

13.96.1 Detailed Description

This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels.
Don’t use this class directly but allocate CTransformBuffersInputOutput or CTrans-
formBuffersInPlace.

13.96.2 Member Function Documentation

13.96.2.1 virtual void pun-


toexe::imebra::transforms::transformBuffers::processDataBuffers
(ptr< image > inputImage, ptr< image > outputImage, imbxUint32
sizeX, imbxUint32 sizeY, std::wstring inputColorSpace,
image::bitDepth inputDepth, imbxUint32 inputHighBit,
image::bitDepth ∗ pOutputDepth, imbxUint32 ∗ pOutputHighBit)
[protected, pure virtual]

Get the data (p. 139) buffers and calls the doTransformBuffers().

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


290 Class Documentation

Retrieve the data (p. 139) buffers from the input and output images and call the derived
class processing function.

Parameters:
inputImage the input image (p. 232)
outputImage the output image (p. 232)
sizeX the buffer’s width, in pixels
sizeY the buffer’s height, in pixels
inputColorSpace the color space of the input image (p. 232)
inputDepth the bit depth of the input image (p. 232)
inputHighBit the input image’s high bit
pOutputDepth pointer to the variable that the function fills with the output im-
age’s bit depth
pOutputHighBit pointer to the variable that the function fills with the output im-
age’s high bit

The documentation for this class was generated from the following files:

• transformBuffers.h
• transformBuffers.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.97 puntoexe::imebra::transforms::transformBuffersInPlace Class Reference
291

13.97 puntoexe::imebra::transforms::transformBuffersInPlace
Class Reference
This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels and don’t need two different buffers (input & output) but can work on a single
buffer (p. 107) that contains the input and output data (p. 139).
#include <transformBuffers.h>
Inheritance diagram for puntoexe::imebra::transforms::transformBuffersInPlace::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::transformBuffers

puntoexe::imebra::transforms::transformBuffersInPlace

puntoexe::imebra::transforms::modalityVOILUT puntoexe::imebra::transforms::transformHighBit puntoexe::imebra::transforms::VOILUT

puntoexe::imebra::transforms::modalityVOILUTInverse puntoexe::imebra::transforms::VOILUTInverse

13.97.1 Detailed Description

This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels and don’t need two different buffers (input & output) but can work on a single
buffer (p. 107) that contains the input and output data (p. 139).
The class takes the input image (p. 232) and automatically allocate an output image
(p. 232) if it hasn’t been declared.
Then the virtual function doTransformBuffersInPlace() is called.
The documentation for this class was generated from the following files:

• transformBuffers.h
• transformBuffers.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


292 Class Documentation

13.98 puntoexe::imebra::transforms::transformBuffersInputOutput
Class Reference
This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels and need two different buffers (one for the input image (p. 232) and one for the
outpu image (p. 232)).
#include <transformBuffers.h>
Inheritance diagram for puntoexe::imebra::transforms::transformBuffersInputOutput::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::transformBuffers

puntoexe::imebra::transforms::transformBuffersInputOutput

13.98.1 Detailed Description

This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels and need two different buffers (one for the input image (p. 232) and one for the
outpu image (p. 232)).
The class takes the input image (p. 232) and automatically allocate an output image
(p. 232) if it hasn’t been declared.
Then the virtual function doTransformBuffersInputOutput() is called.
The documentation for this class was generated from the following files:

• transformBuffers.h
• transformBuffers.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.99 puntoexe::imebra::transforms::transformException Class Reference 293

13.99 puntoexe::imebra::transforms::transformException
Class Reference
This is the base class of the exceptions thrown by the classes derived from transform
(p. 285).
#include <transform.h>
Inheritance diagram for puntoexe::imebra::transforms::transformException::
puntoexe::imebra::transforms::transformException

puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryException puntoexe::imebra::transforms::drawBitmapException puntoexe::imebra::transforms::transformExceptionDataInputImageDefined puntoexe::imebra::transforms::transformExceptionDataSetNotDefined puntoexe::imebra::transforms::transformExceptionOutputImageNotDefined

puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryExceptionNoTransform puntoexe::imebra::transforms::drawBitmapExceptionDataSetNotDeclared puntoexe::imebra::transforms::drawBitmapExceptionImageNotDeclared puntoexe::imebra::transforms::drawBitmapExceptionInvalidAlignByte puntoexe::imebra::transforms::drawBitmapExceptionInvalidArea

13.99.1 Detailed Description

This is the base class of the exceptions thrown by the classes derived from transform
(p. 285).
The documentation for this class was generated from the following file:

• transform.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


294 Class Documentation

13.100 puntoexe::imebra::transforms::transformExceptionDataInputIm
Class Reference
This exception is thrown by a transforms (p. 79) when an input image (p. 232) is
required but hasn’t been defined (see declareInputImage()).
#include <transform.h>
Inheritance diagram for puntoexe::imebra::transforms::transformExceptionDataInputImageDefined::

puntoexe::imebra::transforms::transformException

puntoexe::imebra::transforms::transformExceptionDataInputImageDefined

13.100.1 Detailed Description

This exception is thrown by a transforms (p. 79) when an input image (p. 232) is
required but hasn’t been defined (see declareInputImage()).
The documentation for this class was generated from the following file:

• transform.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.101 puntoexe::imebra::transforms::transformExceptionDataSetNotDefined
Class Reference 295

13.101 puntoexe::imebra::transforms::transformExceptionDataSetNotDefined
Class Reference
This exception is thrown by the transforms (p. 79) that need a defined dataSet (p. 155)
(see declareDataSet()) but don’t have any.
#include <transform.h>
Inheritance diagram for puntoexe::imebra::transforms::transformExceptionDataSetNotDefined::

puntoexe::imebra::transforms::transformException

puntoexe::imebra::transforms::transformExceptionDataSetNotDefined

13.101.1 Detailed Description

This exception is thrown by the transforms (p. 79) that need a defined dataSet (p. 155)
(see declareDataSet()) but don’t have any.
The documentation for this class was generated from the following file:

• transform.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


296 Class Documentation

13.102 puntoexe::imebra::transforms::transformExceptionOutputImag
Class Reference
This exception is thrown by a transforms (p. 79) when an output image (p. 232) is
required but hasn’t been defined (see declareOutputImage()).
#include <transform.h>
Inheritance diagram for puntoexe::imebra::transforms::transformExceptionOutputImageNotDefined::

puntoexe::imebra::transforms::transformException

puntoexe::imebra::transforms::transformExceptionOutputImageNotDefined

13.102.1 Detailed Description

This exception is thrown by a transforms (p. 79) when an output image (p. 232) is
required but hasn’t been defined (see declareOutputImage()).
The documentation for this class was generated from the following file:

• transform.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.103 puntoexe::imebra::transforms::transformHighBit Class Reference 297

13.103 puntoexe::imebra::transforms::transformHighBit
Class Reference
Shift the image’s content to adapt it to the specified high bit.
#include <transformHighBit.h>
Inheritance diagram for puntoexe::imebra::transforms::transformHighBit::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::transformBuffers

puntoexe::imebra::transforms::transformBuffersInPlace

puntoexe::imebra::transforms::transformHighBit

13.103.1 Detailed Description

Shift the image’s content to adapt it to the specified high bit.


In order to use this transform (p. 285), both the input and the output image (p. 232)
must be defined by calling declareInputImage() (p. 286) and declareOutputImage()
(p. 286).
The input image (p. 232) is copied into the output image (p. 232) but all the values are
shifted to be fitted in the output image’s high bit settings.

Examples:

dicom2jpeg/dicom2jpeg.cpp.

The documentation for this class was generated from the following files:

• transformHighBit.h
• transformHighBit.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


298 Class Documentation

13.104 puntoexe::imebra::transforms::transformsChain
Class Reference

Executes a sequence of transforms (p. 79).


#include <transformsChain.h>
Inheritance diagram for puntoexe::imebra::transforms::transformsChain::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::transformsChain

Public Member Functions

• void addTransform (ptr< transform > pTransform)


Add a transform (p. 285) to the transforms (p. 79) chain.

• virtual bool isEmpty ()


Returns true if no transform (p. 285) has been defined.

• void endTransformsChain ()
Tells to the transformsChain (p. 298) object that no more transforms (p. 79) will be
added to the chain.

13.104.1 Detailed Description

Executes a sequence of transforms (p. 79).


Before calling doTransform, specify the sequence by calling addTransform() (p. 299).
Each specified transforms (p. 79) take the output of the previous transform (p. 285)
as input.
When all the transforms (p. 79) have been defined, call endTransformsChain()
(p. 299).
The first defined transform (p. 285) takes the input images defined in the transform-
sChain (p. 298) object, the last defined transforms (p. 79) uses the output images de-
fined in the transformsChain (p. 298) object.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.104 puntoexe::imebra::transforms::transformsChain Class Reference 299

13.104.2 Member Function Documentation

13.104.2.1 void pun-


toexe::imebra::transforms::transformsChain::addTransform (ptr<
transform > pTransform)

Add a transform (p. 285) to the transforms (p. 79) chain.


The added transform (p. 285) will take the output of the previously added transform
(p. 285) as an input image (p. 232) and will supply its output to the next added trans-
form (p. 285) or as an output of the transformsChain (p. 298) if it is the last added
transform (p. 285).
After all the transforms (p. 79) have been added the application must call endTrans-
formsChain() (p. 299) before calling doTransform().

Parameters:
pTransform the transform (p. 285) to be added to transformsChain (p. 298)

13.104.2.2 void pun-


toexe::imebra::transforms::transformsChain::endTransformsChain
()

Tells to the transformsChain (p. 298) object that no more transforms (p. 79) will be
added to the chain.
This function MUST be called after all the transforms (p. 79) have been added to the
chain by addTransform() (p. 299) and before calling doTransform().

13.104.2.3 bool puntoexe::imebra::transforms::transformsChain::isEmpty ()


[virtual]

Returns true if no transform (p. 285) has been defined.

Returns:
true if the transforms (p. 79) chain is empty and will not perform any transforma-
tion

Reimplemented from puntoexe::imebra::transforms::transform (p. 288).


The documentation for this class was generated from the following files:

• transformsChain.h
• transformsChain.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


300 Class Documentation

13.105 puntoexe::imebra::transforms::VOILUT Class


Reference
Transform the value of the input image’s pixels by using the presentation VOI/LUT
defined in the dataSet (p. 155).
#include <VOILUT.h>
Inheritance diagram for puntoexe::imebra::transforms::VOILUT::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::transformBuffers

puntoexe::imebra::transforms::transformBuffersInPlace

puntoexe::imebra::transforms::VOILUT

puntoexe::imebra::transforms::VOILUTInverse

Public Member Functions

• imbxUint32 getVOILUTId (imbxUint32 VOILUTNumber)


Retrieve an ID for a VOI or a LUT.

• std::wstring getVOILUTDescription (imbxUint32 VOILUTId)


Return a description for the VOI or LUT with the specified ID.

• void setVOILUT (imbxUint32 VOILUTId)


Define the VOI/LUT to use for the transformation.

• void setLUT (ptr< lut > pLut)


Define the LUT to use for the transformation.

• void setCenterWidth (imbxInt32 center, imbxInt32 width)


Define the VOI width/center to use for the transformation.

• void getCenterWidth (imbxInt32 ∗pCenter, imbxInt32 ∗pWidth)


Returns the VOI width/center used for the transformation.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.105 puntoexe::imebra::transforms::VOILUT Class Reference 301

13.105.1 Detailed Description

Transform the value of the input image’s pixels by using the presentation VOI/LUT
defined in the dataSet (p. 155).
The dataSet (p. 155) could define more than one VOI/LUT: by default the transform
(p. 285) uses the first VOI or LUT defined in the dataset.
To control which VOI/LUT is used for the transformation the application must
use the functions getVOILUTId() (p. 301), getVOILUTDescription() (p. 301),
setVOILUT() (p. 302) or set the VOI or the LUT directly by calling setCenterWidth()
(p. 302) or setLUT() (p. 302).

Examples:

dicom2jpeg/dicom2jpeg.cpp.

13.105.2 Member Function Documentation

13.105.2.1 void puntoexe::imebra::transforms::VOILUT::getCenterWidth


(imbxInt32 ∗ pCenter, imbxInt32 ∗ pWidth)

Returns the VOI width/center used for the transformation.

Parameters:
pCenter pointer to the recipient for the VOI center
pWidth pointer to the recipient for the VOI width

13.105.2.2 std::wstring pun-


toexe::imebra::transforms::VOILUT::getVOILUTDescription
(imbxUint32 VOILUTId)

Return a description for the VOI or LUT with the specified ID.
The VOI/LUT ID can be obtained by calling getVOILUTId() (p. 301).

Parameters:
VOILUTId the id of the VOI/LUT for which the description is required

Returns:
the VOI/LUT description

13.105.2.3 imbxUint32 pun-


toexe::imebra::transforms::VOILUT::getVOILUTId (imbxUint32
VOILUTNumber)

Retrieve an ID for a VOI or a LUT.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


302 Class Documentation

The returned ID can be used with the functions getVOILUTDescription() (p. 301) and
setVOILUT() (p. 302).
The function returns 0 when the requested VOI/LUT doesn’t exist.
The parameter VOILUTNumber is a zero based index used to scan all the available
VOIs first and then all the LUTs. For instance, if VOILUTNumber is 3 and the dataSet
(p. 155) contains 2 VOIs and 3 LUTs, then the function will return the ID for the second
LUT.

Parameters:
VOILUTNumber a number that identifies the VOI or the LUT for which the ID is
requested. The value 0 refers to the first VOI in the dataSet (p. 155) or to the
first LUT if there isn’t any defined VOI. Bigger values refer to the following
VOIs or LUTs when all the VOIs have been scanned

Returns:
an ID that can be used with getVOILUTDescription() (p. 301) and setVOILUT()
(p. 302), or 0 if the requested VOI/LUT doesn’t exist

13.105.2.4 void puntoexe::imebra::transforms::VOILUT::setCenterWidth


(imbxInt32 center, imbxInt32 width)

Define the VOI width/center to use for the transformation.

Parameters:
center the center value of the VOI
width the width value of the VOI

13.105.2.5 void puntoexe::imebra::transforms::VOILUT::setLUT (ptr< lut >


pLut)

Define the LUT to use for the transformation.

Parameters:
pLut the lut (p. 241) that will be used for the transformation

13.105.2.6 void puntoexe::imebra::transforms::VOILUT::setVOILUT


(imbxUint32 VOILUTId)

Define the VOI/LUT to use for the transformation.


The VOI/LUT ID can be obtained by calling getVOILUTId() (p. 301).
Disable the VOI/LUT transform (p. 285) if the parameter is 0.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.105 puntoexe::imebra::transforms::VOILUT Class Reference 303

Parameters:
VOILUTId the ID of the VOI/LUT to use for the transformation, or 0 to disable
the transformation

The documentation for this class was generated from the following files:

• VOILUT.h
• VOILUT.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


304 Class Documentation

13.106 puntoexe::imebra::transforms::VOILUTInverse
Class Reference
Execute the inverse of the transformation executed by VOILUT (p. 300).
#include <VOILUT.h>
Inheritance diagram for puntoexe::imebra::transforms::VOILUTInverse::

puntoexe::baseObject

puntoexe::imebra::transforms::transform

puntoexe::imebra::transforms::transformBuffers

puntoexe::imebra::transforms::transformBuffersInPlace

puntoexe::imebra::transforms::VOILUT

puntoexe::imebra::transforms::VOILUTInverse

13.106.1 Detailed Description

Execute the inverse of the transformation executed by VOILUT (p. 300).


The documentation for this class was generated from the following files:

• VOILUT.h
• VOILUT.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.107 puntoexe::imebra::view Class Reference 305

13.107 puntoexe::imebra::view Class Reference


This class can be used as a base class by the windows that need to display a Dicom
image (p. 232).
#include <viewHelper.h>

Public Member Functions


• view (imbxInt32 rowByteAlign, bool bBGR)
Costructor.

• imbxInt32 windowPosToImageX (imbxInt32 windowPosX)


Translate the window’s horizontal coordinate into the image’s horizontal coordinate.

• imbxInt32 windowPosToImageY (imbxInt32 windowPosY)


Translate the window’s vertical coordinate into the image’s vertical coordinate.

• double imagePosToMillimitersX (imbxInt32 imagePosX)


Return a pixel’s horizontal position in millimeters.

• double imagePosToMillimitersY (imbxInt32 imagePosY)


Return a pixel’s vertical position in millimeters.

• imbxInt32 millimitersToImagePosX (double millimitersX)


Return the horizontal pixel’s index that lays at the specified horizontal position, in
millimeters.

• imbxInt32 millimitersToImagePosY (double millimitersY)


Return the vertical pixel’s index that lays at the specified vertical position, in millime-
ters.

• void draw (void ∗pDeviceContext, imbxInt32 left, imbxInt32 top, imbxInt32


right, imbxInt32 bottom)
Draw the image (p. 232).

Get/Set the image to be show

• void setImage (ptr< image > pImage, ptr< dataSet > pDataSet)
Define the image (p. 232) that the window must display.

• ptr< image > getImage ()


Retrieve the image (p. 232) currently displayed in the window.

Get/Set the background color

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


306 Class Documentation

• void getBackgroundColor (imbxUint8 ∗pRed, imbxUint8 ∗pGreen, im-


bxUint8 ∗pBlue)
Get the color used to draw the background around the image (p. 232).

• void setBackgroundColor (imbxUint8 red, imbxUint8 green, imbxUint8


blue)
Set the color to be used to draw the background around the image (p. 232).

Zoom and image’s position

• void getImageRect (imbxInt32 ∗pLeft, imbxInt32 ∗pTop, imbxInt32


∗pRight, imbxInt32 ∗pBottom)
Retrieve the coordinates of the rectangle that contains the image (p. 232).

• double getZoomFactor ()
Retrieve the active zoom factor.

• void setZoomFactor (double zoomFactor, imbxInt32 centerPointX=-1, im-


bxInt32 centerPointY=-1)
Set the active zoom factor.

• void setZoomRect (imbxInt32 left, imbxInt32 top, imbxInt32 right, imbx-


Int32 bottom)
Zoom to the selected image’s area. The rectangle’s coordinates are in image’s
pixels.

• void zoomInOut (bool bZoomIn=true, imbxInt32 centerPointX=-1, imbx-


Int32 centerPointY=-1)
Increase or decrease the zoom factor.

• bool isAutoZoom ()
Return true if the zoom is in automatic mode. The zoom can be set in automatic
mode by calling setZoomFactor() (p. 316) with a negative zoom factor.

• void getCenterPoint (imbxInt32 ∗pCenterPointX, imbxInt32


∗pCenterPointY)
• void setCenterPoint (imbxInt32 centerPointX, imbxInt32 centerPointY)

Pure virtual functions

• virtual void getWindowSize (imbxUint32 ∗pSizeX, imbxUint32


∗pSizeY)=0
Overwrite this method with a function that retrieve the size of the window’s client
area, in screen’s pixels.

• virtual void getScrollSize (imbxUint32 ∗pScrollSizeX, imbxUint32


∗pScrollSizeY)=0
Overwrite this method with a function that retrieves the total virtual size of the
window.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.107 puntoexe::imebra::view Class Reference 307

• virtual void setScrollSize (imbxUint32 newScrollSizeX, imbxUint32


newScrollSizeY, bool bInvalidate)=0
Overwrite this method with a function that sets the window’s virtual size.

• virtual void getScrollPosition (imbxInt32 ∗pScrollX, imbxInt32


∗pScrollY)=0
Overwrite this method with a function that retrieves the current position in the
scroll bars, in screen’s pixels.

• virtual void setScrollPosition (imbxInt32 scrollX, imbxInt32 scrollY)=0


Overwrite this method with a function that changes the position in the scroll bars,
in screen’s pixels.

• virtual void drawRectangle (void ∗pDeviceContext, imbxInt32 left, imbx-


Int32 top, imbxInt32 right, imbxInt32 bottom, imbxUint8 colorRed, im-
bxUint8 colorGreen, imbxUint8 colorBlue)=0
Overwrite this method with a function that draws a rectangle on a device context.

• virtual void drawBitmap (void ∗pDeviceContext, imbxInt32 left, imbx-


Int32 top, imbxInt32 right, imbxInt32 bottom, imbxUint32 bufferWidth,
imbxUint32 bufferHeight, imbxUint32 bufferRowSizeBytes, imbxUint8
∗pBuffer)=0
Overwrite this method with a function that draws a bitmap on the screen in the
specified window’s rectangle.

• virtual void drawCursorLine (void ∗pDeviceContext, imbxInt32 start-


PointX, imbxInt32 startPointY, imbxInt32 endPointX, imbxInt32 end-
PointY, imbxUint8 colorRed, imbxUint8 colorGreen, imbxUint8 colorBlue,
cursorLine::tStyle style, imbxUint32 width)=0
Overwrite this method with a function that draws a line on the specified device
context.

• virtual void invalidate (imbxInt32 left, imbxInt32 top, imbxInt32 right, im-
bxInt32 bottom)=0
Overwrite this method with a function that invalidate a portion of the window,
without redrawing it immediatly. The code doesn’t have to invalidate the back-
ground.

• virtual void updateWindow ()=0


Overwrite this method with a function that launches a redraw of the invalidated
areas of the window.

• virtual void getScreenDPI (imbxUint32 ∗pHorzDPI, imbxUint32


∗pVertDPI)=0
Overwrite this method with a function that retrieve the screen’s resolution, in pixels
per inch.

• virtual bool isMouseCaptured ()=0

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


308 Class Documentation

13.107.1 Detailed Description

This class can be used as a base class by the windows that need to display a Dicom
image (p. 232).
The is an abstract class, so it cannot be used alone; it provides some functions that the
derived class must always overwrite because they are platform specific.
Because this class must always be overwritten its header is not included in the file
imebra.h (p. 461) and should be included in the header file of the derived class.

13.107.2 Constructor & Destructor Documentation

13.107.2.1 puntoexe::imebra::view::view (imbxInt32 rowByteAlign, bool


bBGR)

Costructor.
Each time a redraw operation is needed this class generates a bitmap that is then passed
to the virtual function drawBitmap() (p. 309).
The derived class can specify the byte alignment for each bitmap’s row and the order
of the RGB components.

Parameters:
rowByteAlign the number of bytes each bitmap’s row has to be aligned to. Usually
is for bytes on Windows
bBGR true if the RGB components in the bitmap has to be blue, green and then
red. false if the order has to be red, green, blue

13.107.3 Member Function Documentation

13.107.3.1 void puntoexe::imebra::view::draw (void ∗ pDeviceContext,


imbxInt32 left, imbxInt32 top, imbxInt32 right, imbxInt32 bottom)

Draw the image (p. 232).

Parameters:
pDeviceContext the pointer or the handle of the device context that must be used.
This value is passed directly to the functions called by this one:
• drawRectangle() (p. 310)
• drawBitmap() (p. 309)
• drawCursorLine() (p. 309)
left the left side of the visible rectangle
top the top side of the visible rectangle
right the right side of the visible rectangle
bottom the bottom side of the visible rectangle

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.107 puntoexe::imebra::view Class Reference 309

13.107.3.2 virtual void puntoexe::imebra::view::drawBitmap (void ∗


pDeviceContext, imbxInt32 left, imbxInt32 top, imbxInt32
right, imbxInt32 bottom, imbxUint32 bufferWidth, imbxUint32
bufferHeight, imbxUint32 bufferRowSizeBytes, imbxUint8 ∗
pBuffer) [pure virtual]

Overwrite this method with a function that draws a bitmap on the screen in the specified
window’s rectangle.

Parameters:
pDeviceContext the device context to use for the drawing. This is the same value
that your application passes to the draw() (p. 308) function
left the horizontal coordinate of the top-left corner of the rectangle that contains
the bitmap
top the vertical coordinate of the top-left corner of the rectangle that contains the
bitmap
right the horizontal coordinate of the bottom-right corner of the rectangle that
contains the bitmap
bottom the vertical coordinate of the bottom-right corner of the rectangle that con-
tains the bitmap
bufferWidth the width of the bitmap contained in pBuffer, in pixels
bufferHeight the height of the bitmap contained in pBuffer, in pixels
bufferRowSizeBytes the size of a bitmap’s row, in bytes
pBuffer a pointer to an array if bytes representing the bitmap. The array contains
all the bitmap pixels, from the top-left to the bottom-right, row by row. The
rows are contiguous, not aligned to 4 bytes boundaries as in the Window’s
bitmaps. Each pixels has 3 bytes representing the red, green and blue com-
ponent (please note that the order of the color components is reversed in the
Window’s bitmaps)

13.107.3.3 virtual void puntoexe::imebra::view::drawCursorLine (void ∗


pDeviceContext, imbxInt32 startPointX, imbxInt32 startPointY,
imbxInt32 endPointX, imbxInt32 endPointY, imbxUint8 colorRed,
imbxUint8 colorGreen, imbxUint8 colorBlue, cursorLine::tStyle
style, imbxUint32 width) [pure virtual]

Overwrite this method with a function that draws a line on the specified device context.

Parameters:
pDeviceContext the device context to use for the drawing. This is the same value
that your application passes to the drawCursor() function
startPointX the horizontal coordinate of the line’s starting point, in pixels
startPointY the vertical coordinate of the line’s starting point, in pixels
endPointX the horizontal coordinate of the line’s ending point, in pixels

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


310 Class Documentation

endPointY the vertical coordinate of the line’s ending point, in pixels


colorRed the red component of the line’s color
colorGreen the green component of the line’s color
colorBlue the blue component of the line’s color
style the line’s style. It can be one of the following values:
• cursorLine::line
• cursorLine::dotted
width the line’s width, in pixels. 0 means really thin.

13.107.3.4 virtual void puntoexe::imebra::view::drawRectangle (void ∗


pDeviceContext, imbxInt32 left, imbxInt32 top, imbxInt32 right,
imbxInt32 bottom, imbxUint8 colorRed, imbxUint8 colorGreen,
imbxUint8 colorBlue) [pure virtual]

Overwrite this method with a function that draws a rectangle on a device context.

Parameters:
pDeviceContext a pointer to a device context class. Is the same pointer that your
application passes to the draw() (p. 308) or the drawCursor() functions.
left the horizontal coordinate of the rectangle’s top-left corner
top the vertical coordinate of the rectangle’s top-left corner
right the horizontal coordinate of the rectangle’s bottom-right corner
bottom the vertical coordinate of the rectangle’s bottom-right corner
colorRed the red component of the rectangle’s color
colorGreen the green component of the rectangle’s color
colorBlue the blue component of the rectangle’s color

13.107.3.5 void puntoexe::imebra::view::getBackgroundColor (imbxUint8 ∗


pRed, imbxUint8 ∗ pGreen, imbxUint8 ∗ pBlue)

Get the color used to draw the background around the image (p. 232).

Parameters:
pRed a pointer to a variable filled with the red component of the background
pGreen a pointer to a variable filled with the green component of the background
pBlue a pointer to a variable filled with the blue component of the background

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.107 puntoexe::imebra::view Class Reference 311

13.107.3.6 ptr< image > puntoexe::imebra::view::getImage ()

Retrieve the image (p. 232) currently displayed in the window.

Returns:
the image (p. 232) currently displayed in the window

13.107.3.7 void puntoexe::imebra::view::getImageRect (imbxInt32 ∗ pLeft,


imbxInt32 ∗ pTop, imbxInt32 ∗ pRight, imbxInt32 ∗ pBottom)

Retrieve the coordinates of the rectangle that contains the image (p. 232).
When an image (p. 232) is set with setImage() (p. 315) or the zoom factor is changed,
the rectangle containing the image (p. 232) is recalculated by updateImageRect().
This function retrieves the latest rectangle calculated by updateImageRect().

Parameters:
pLeft a pointer to a variable filled with the horizontal coordinate of the rectangle’s
top-left corner
pTop a pointer to a variable filled with the vertical coordinate of the rectangle’s
top-left corner
pRight a pointer to a variable filled with the horizontal coordinate of the rectan-
gle’s bottom-right corner
pBottom a pointer to a variable filled with the vertical coordinate of the rectangle’s
bottom-right corner

13.107.3.8 virtual void puntoexe::imebra::view::getScreenDPI (imbxUint32 ∗


pHorzDPI, imbxUint32 ∗ pVertDPI) [pure virtual]

Overwrite this method with a function that retrieve the screen’s resolution, in pixels per
inch.

Parameters:
pHorzDPI a pointer to a variable that the function must fill with the horizontal
resolution, in pixels per inch
pVertDPI a pointer to a variable that the function must fill with the vertical reso-
lution, in pixels per inch

13.107.3.9 virtual void puntoexe::imebra::view::getScrollPosition (imbxInt32 ∗


pScrollX, imbxInt32 ∗ pScrollY) [pure virtual]

Overwrite this method with a function that retrieves the current position in the scroll
bars, in screen’s pixels.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


312 Class Documentation

Parameters:
pScrollX a pointer to a variable that the function must fill with the horizontal scroll
bar’s position
pScrollY a pointer to a variable that the function must fill with the vertical scroll
bar’s position

13.107.3.10 virtual void puntoexe::imebra::view::getScrollSize (imbxUint32 ∗


pScrollSizeX, imbxUint32 ∗ pScrollSizeY) [pure virtual]

Overwrite this method with a function that retrieves the total virtual size of the window.
The virtual size is the size managed by the window’s scroll bars, in screen’s pixels.

Parameters:
pScrollSizeX a pointer to the value that the function fills with the window’s virtual
width, in pixels
pScrollSizeY a pointer to the value that the function fills with the window’s virtual
height, in pixels

13.107.3.11 virtual void puntoexe::imebra::view::getWindowSize (imbxUint32


∗ pSizeX, imbxUint32 ∗ pSizeY) [pure virtual]

Overwrite this method with a function that retrieve the size of the window’s client area,
in screen’s pixels.

Parameters:
pSizeX a pointer to the value that the function fills with the window’s width, in
pixels
pSizeY a pointer to the value that the function fills with the window’s height, in
pixels

13.107.3.12 double puntoexe::imebra::view::getZoomFactor ()

Retrieve the active zoom factor.


The zoom factor is used to calculate the rectangle in which the image (p. 232) is drawn.
The zoom factor can be set by one of the following functions:

• setZoomFactor() (p. 316)

• setZoomRect() (p. 316)

• zoomInOut() (p. 318)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.107 puntoexe::imebra::view Class Reference 313

Even when the zoom factor has been set to an automatic value (-1) this function retrieve
the real zoom factor.

Returns:
the active zoom factor.

13.107.3.13 double puntoexe::imebra::view::imagePosToMillimitersX


(imbxInt32 imagePosX)

Return a pixel’s horizontal position in millimeters.

Parameters:
imagePosX the horizontal pixel position for which the position in millimeters has
to be retrieved

Returns:
the horizontal position of the specified pixel, in millimeters

13.107.3.14 double puntoexe::imebra::view::imagePosToMillimitersY


(imbxInt32 imagePosY)

Return a pixel’s vertical position in millimeters.

Parameters:
imagePosY the vertical pixel position for which the position in millimeters has to
be retrieved

Returns:
the vertical position of the specified pixel, in millimeters

13.107.3.15 virtual void puntoexe::imebra::view::invalidate (imbxInt32 left,


imbxInt32 top, imbxInt32 right, imbxInt32 bottom) [pure
virtual]

Overwrite this method with a function that invalidate a portion of the window, without
redrawing it immediatly. The code doesn’t have to invalidate the background.
The coordinates of the invalidated area are passed in window’s pixels and relative to
the window top-left corner, without any scroll adjustment.

Parameters:
left the horizontal coordinate of the top-left corner of the rectangle that must be
invalidated, in window’s pixels

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


314 Class Documentation

top the vertical coordinate of the top-left corner of the rectangle that must be in-
validated, in window’s pixels
right the horizontal coordinate of the bottom-right corner of the rectangle that
must be invalidated, in window’s pixels
bottom the vertical coordinate of the bottom-right corner of the rectangle that must
be invalidated, in window’s pixels

13.107.3.16 bool puntoexe::imebra::view::isAutoZoom ()

Return true if the zoom is in automatic mode. The zoom can be set in automatic mode
by calling setZoomFactor() (p. 316) with a negative zoom factor.
When the zoom is in automatic mode then the size of the rectangle that contains the
image (p. 232) is modified when the window’s size is modified.

Returns:
true if the zoom is in automatic mode, false otherwise

13.107.3.17 imbxInt32 puntoexe::imebra::view::millimitersToImagePosX


(double millimitersX)

Return the horizontal pixel’s index that lays at the specified horizontal position, in
millimeters.

Parameters:
millimitersX the horizontal position in millimiters

Returns:
the index of the pixel that lays at the specified position

13.107.3.18 imbxInt32 puntoexe::imebra::view::millimitersToImagePosY


(double millimitersY)

Return the vertical pixel’s index that lays at the specified vertical position, in millime-
ters.

Parameters:
millimitersY the vertical position in millimiters

Returns:
the index of the pixel that lays at the specified position

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.107 puntoexe::imebra::view Class Reference 315

13.107.3.19 void puntoexe::imebra::view::setBackgroundColor (imbxUint8


red, imbxUint8 green, imbxUint8 blue)

Set the color to be used to draw the background around the image (p. 232).

Parameters:
red the red component of the background color
green the green component of the background color
blue the blue component of the background color

13.107.3.20 void puntoexe::imebra::view::setImage (ptr< image > pImage,


ptr< dataSet > pDataSet)

Define the image (p. 232) that the window must display.
After the image (p. 232) has been set the function will invalidate the window and the
operating framework will take care of sending a repaint message to it.
If the view (p. 305) already had an image (p. 232) set with setImage() (p. 315) then the
function will take one of the following actions:

• if the new image (p. 232) has the same size of the old one (in pixels and millim-
iters), then the new image (p. 232) will be displayed in the same position of the
old one

• if the new image’s size differs from the old one then a new position will be
calculated for the new image (p. 232) so it will fit completly in the window’s
client area

Parameters:
pImage the image (p. 232) to be displayed in the window, or a null pointer to
remove the image (p. 232) from the window
pDataSet the dataSet (p. 155) from which the image (p. 232) was retrieved

13.107.3.21 virtual void puntoexe::imebra::view::setScrollPosition (imbxInt32


scrollX, imbxInt32 scrollY) [pure virtual]

Overwrite this method with a function that changes the position in the scroll bars, in
screen’s pixels.

Parameters:
scrollX the new position for the horizontal scroll bar, in pixels
scrollY the new position for the vertical scroll bar, in pixels

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


316 Class Documentation

13.107.3.22 virtual void puntoexe::imebra::view::setScrollSize (imbxUint32


newScrollSizeX, imbxUint32 newScrollSizeY, bool bInvalidate)
[pure virtual]

Overwrite this method with a function that sets the window’s virtual size.
The virtual size is the size managed by the window’s scroll bars, in screen’s pixels.

Parameters:
newScrollSizeX the virtual window’s width that must be set
newScrollSizeY the virtual window’s height that must be set
bInvalidate is true if the function must invalidate the window after changing the
virtual size, false otherwise. Note that the background doesn’t need to be
invalidated

13.107.3.23 void puntoexe::imebra::view::setZoomFactor (double zoomFactor,


imbxInt32 centerPointX = -1, imbxInt32 centerPointY = -1)

Set the active zoom factor.


The active zoom factor uses the display’s size and the image’s size (in millimeters) to
calculate the rectangle in which the image (p. 232) is displayed.
When the zoom factor is 1 then the image’s size on the display will be a one-to-one
representation of the real image (p. 232).
A negative zoom factor enables the automatic zoom which displays the whole image
(p. 232) in the window. When the zoom factor is in automatic mode then the size of the
displayed image (p. 232) changes if the window’s size is modified.
This function calls updateImageRect() and updates the window.

Parameters:
zoomFactor the zoom factor to use when drawing the image (p. 232)
centerPointX the horizontal coordinate of the image’s pixel that should be cen-
tered in the window’s area. If -1 then the function calculates its value auto-
matically
centerPointY the vertical coordinate of the image’s pixek that should be centered
in the window’s area. If -1 then the function calculates its value automatically

13.107.3.24 void puntoexe::imebra::view::setZoomRect (imbxInt32 left,


imbxInt32 top, imbxInt32 right, imbxInt32 bottom)

Zoom to the selected image’s area. The rectangle’s coordinates are in image’s pixels.
This function calls updateImageRect() and updates the window.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.107 puntoexe::imebra::view Class Reference 317

Parameters:
left the horizontal coordinate of the top-left corner of the image’s rectangle that
must be shown in the window
top the vertical coordinate of the top-left corner of the image’s rectangle that must
be shown in the window
right the horizontal coordinate of the bottom-right corner of the image’s rectangle
that must be shown in the window
bottom the vertical coordinate of the bottom-right corner of the image’s rectangle
that must be shown in the window

13.107.3.25 virtual void puntoexe::imebra::view::updateWindow () [pure


virtual]

Overwrite this method with a function that launches a redraw of the invalidated areas
of the window.

13.107.3.26 imbxInt32 puntoexe::imebra::view::windowPosToImageX


(imbxInt32 windowPosX)

Translate the window’s horizontal coordinate into the image’s horizontal coordinate.
Use in pair with windowPosToImageY to translate the horizontal and the vertical co-
ordinates.
The window’s coordinates must include any scroll adjustment.

Parameters:
windowPosX the horizontal window’s coordinate, adjusted with the current hori-
zontal scroll position

Returns:
the image’s horizontal coordinate. The returned is always adjusted to the valid
range (is never less than 0 and never more than the image’s horizontal size)

13.107.3.27 imbxInt32 puntoexe::imebra::view::windowPosToImageY


(imbxInt32 windowPosY)

Translate the window’s vertical coordinate into the image’s vertical coordinate.
Use in pair with windowPosToImageX to translate the horizontal and the vertical co-
ordinates.
The window’s coordinates must include any scroll adjustment.

Parameters:
windowPosY the vertical window’s coordinate, adjusted with the current vertical
scroll position

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


318 Class Documentation

Returns:
the image’s vertical coordinate. The returned is always adjusted to the valid range
(is never less than 0 and never more than the image’s vertical size)

13.107.3.28 void puntoexe::imebra::view::zoomInOut (bool bZoomIn = true,


imbxInt32 centerPointX = -1, imbxInt32 centerPointY = -1)

Increase or decrease the zoom factor.


This function calls updateImageRect() and updates the window.

Parameters:
bZoomIn when true the function increase the zoom factor, otherwise it decreases
the zoom factor
centerPointX the horizontal coordinate of the image’s pixel that must be centered
in the window’s area
centerPointY the vertical coordinate of the image’s pixel that must be centered in
the window’s area

The documentation for this class was generated from the following files:

• viewHelper.h
• viewHelper.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.108 puntoexe::imebra::waveform Class Reference 319

13.108 puntoexe::imebra::waveform Class Reference


Represents a single waveform (p. 319) of a dicom dataset.
#include <waveform.h>
Inheritance diagram for puntoexe::imebra::waveform::

puntoexe::baseObject

puntoexe::imebra::waveform

Public Member Functions


• waveform (ptr< dataSet > pDataSet)
Constructor. Initializes the class and connects it to the sequence item containing the
waveform (p. 319) data (p. 139).

• imbxUint32 getChannels ()
Retrieve the number of channels (tag 003A,0005).

• imbxUint32 getSamples ()
Retrieve the number of samples per channel (tag 003A,0010).

• imbxUint32 getBitsStored ()
Retrieve the number of bit stored (tag 003A,021A).

• imbxUint32 getBitsAllocated ()
Retrieve the number of bit allocated (tag 5400,1004).

• std::string getInterpretation ()
Return the data (p. 139) interpretation string (tag 5400,1006).

• ptr< handlers::dataHandler > getIntegerData (imbxUint32 channel, imbx-


Int32 paddingValue=0x7fffffff)
Retrieve the decompressed waveform (p. 319) data (p. 139).

• ptr< dataSet > GetWaveformItem ()


Return the sequence item used by the waveform (p. 319).

13.108.1 Detailed Description

Represents a single waveform (p. 319) of a dicom dataset.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


320 Class Documentation

Waveforms are embedded into the dicom structures (represented by the dataSet
(p. 155) class), stored in sequence items (one waveform (p. 319) per item).
Use dataSet::getWaveform() (p. 168) to retrieve a waveform (p. 319) from a dataSet
(p. 155).

13.108.2 Constructor & Destructor Documentation

13.108.2.1 puntoexe::imebra::waveform::waveform (ptr< dataSet > pDataSet)

Constructor. Initializes the class and connects it to the sequence item containing the
waveform (p. 319) data (p. 139).

Parameters:
pDataSet the sequence item containing the waveform (p. 319). Use
dataSet::getSequenceItem() (p. 164) to retrieve the sequence
item containing the waveform (p. 319) or construct the class with
dataSet::getWaveform() (p. 168)

13.108.3 Member Function Documentation

13.108.3.1 imbxUint32 puntoexe::imebra::waveform::getBitsAllocated ()

Retrieve the number of bit allocated (tag 5400,1004).

Returns:
the number of bits allocated

13.108.3.2 imbxUint32 puntoexe::imebra::waveform::getBitsStored ()

Retrieve the number of bit stored (tag 003A,021A).

Returns:
the number of bits stored

13.108.3.3 imbxUint32 puntoexe::imebra::waveform::getChannels ()

Retrieve the number of channels (tag 003A,0005).

Returns:
the number of channels

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.108 puntoexe::imebra::waveform Class Reference 321

13.108.3.4 ptr< handlers::dataHandler > pun-


toexe::imebra::waveform::getIntegerData (imbxUint32 channel,
imbxInt32 paddingValue = 0x7fffffff)

Retrieve the decompressed waveform (p. 319) data (p. 139).


Retrieve the requested channel’s data (p. 139) and decompress it into signed long val-
ues. 8 bits uLaw and aLaw data (p. 139) are decompressed into normalized 16 bits
values.
This function takes into account the value in the interpretation tag and returns an han-
dler to ready to use data (p. 139).

Parameters:
channel the channel for which the data (p. 139) is required
paddingValue the value that the function must write in the returned data (p. 139)
in place of the original padding value. Specify a number outside the range
-32768..65535

Returns:
a data (p. 139) handler attached to ready to use data (p. 139). Use
handlers::dataHandler (p. 195)->GetSignedLong() or handlers::dataHandler
(p. 195)->GetSignedLongIncPointer() to retrieve the data (p. 139)

13.108.3.5 std::string puntoexe::imebra::waveform::getInterpretation ()

Return the data (p. 139) interpretation string (tag 5400,1006).

Returns:
the interpretation string. Possible values are:
• "SB": signed 8 bit linear
• "UB": unsigned 8 bit linear
• "MB": 8 bit u-law
• "AB": 8 bit a-law
• "SS": signed 16 bit
• "US": unsigned 16 bit

13.108.3.6 imbxUint32 puntoexe::imebra::waveform::getSamples ()

Retrieve the number of samples per channel (tag 003A,0010).

Returns:
the number of samples per channel

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


322 Class Documentation

13.108.3.7 ptr< dataSet > puntoexe::imebra::waveform::GetWaveformItem ()

Return the sequence item used by the waveform (p. 319).

Returns:
the sequence item used by the waveform (p. 319)

The documentation for this class was generated from the following files:

• waveform.h
• waveform.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.109 puntoexe::lockCriticalSection Class Reference 323

13.109 puntoexe::lockCriticalSection Class Reference


This class locks a critical section in the constructor and unlocks it in the destructor.
#include <criticalSection.h>

Public Member Functions


• lockCriticalSection (criticalSection ∗pCriticalSection)
Creates the object lockCriticalSection (p. 323) and lock the specified criticalSection
(p. 95).

• virtual ∼lockCriticalSection ()
Destroy the object lockCriticalSection (p. 323) and unlock the previously locked crit-
icalSection (p. 95).

13.109.1 Detailed Description

This class locks a critical section in the constructor and unlocks it in the destructor.
This helps to correctly release a critical section in case of exceptions or premature exit
from a function that uses the critical section.

13.109.2 Constructor & Destructor Documentation

13.109.2.1 puntoexe::lockCriticalSection::lockCriticalSection (criticalSection ∗


pCriticalSection)

Creates the object lockCriticalSection (p. 323) and lock the specified criticalSection
(p. 95).

Parameters:
pCriticalSection a pointer to the criticalSection (p. 95) that has to be locked

13.109.2.2 puntoexe::lockCriticalSection::∼lockCriticalSection ()
[virtual]

Destroy the object lockCriticalSection (p. 323) and unlock the previously locked crit-
icalSection (p. 95).
The documentation for this class was generated from the following files:

• criticalSection.h
• criticalSection.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


324 Class Documentation

13.110 puntoexe::lockMultipleObjects Class Reference

Locks the access to several objects of type baseObject (p. 85).


#include <baseObject.h>

Public Types

• typedef std::list< ptr< baseObject > > tObjectsList


Represents a std::list of pointers to the objects to be locked (see puntoexe::ptr
(p. 336)).

Public Member Functions

• lockMultipleObjects (tObjectsList ∗pObjectsList)


Construct the locker and lock all the objects listed in the pObjectsList.

• virtual ∼lockMultipleObjects ()
Destroy the locker and unlock all the locked objects.

• void unlock ()
Unlock all the locked objects.

13.110.1 Detailed Description

Locks the access to several objects of type baseObject (p. 85).


The class lock ALL the objects listed in the constructor’s parameter. If the objects
cannot be locked at once, then all of them are left unlocked until all of them can be
locked all togheter.

13.110.2 Member Typedef Documentation

13.110.2.1 typedef std::list<ptr<baseObject> >


puntoexe::lockMultipleObjects::tObjectsList

Represents a std::list of pointers to the objects to be locked (see puntoexe::ptr


(p. 336)).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.110 puntoexe::lockMultipleObjects Class Reference 325

13.110.3 Constructor & Destructor Documentation

13.110.3.1 puntoexe::lockMultipleObjects::lockMultipleObjects (tObjectsList


∗ pObjectsList)

Construct the locker and lock all the objects listed in the pObjectsList.
The function looks for the external lockers (if any). An object may be listed several
times in the list.

Parameters:
pObjectsList a list of pointers to the objects to be locked

13.110.3.2 puntoexe::lockMultipleObjects::∼lockMultipleObjects ()
[virtual]

Destroy the locker and unlock all the locked objects.

13.110.4 Member Function Documentation

13.110.4.1 void puntoexe::lockMultipleObjects::unlock ()

Unlock all the locked objects.


The documentation for this class was generated from the following files:

• baseObject.h
• baseObject.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


326 Class Documentation

13.111 puntoexe::lockObject Class Reference


Locks the access to an object of type baseObject (p. 85).
#include <baseObject.h>

Public Member Functions


• lockObject (baseObject ∗pObject)
Lock the access to the pObject’s attributes.

• virtual ∼lockObject ()
Unlock the access to the locked object.

• void unlock ()
Release the lock on the locked object.

13.111.1 Detailed Description

Locks the access to an object of type baseObject (p. 85).

13.111.2 Constructor & Destructor Documentation

13.111.2.1 puntoexe::lockObject::lockObject (baseObject ∗ pObject)

Lock the access to the pObject’s attributes.


The lock is per thread (p. 363): this means that if a lockObject (p. 326) successfully
locks a baseObject (p. 85) class, then all the other threads in the application will enter
in a wait mode when they try to lock the same object until the original lock is released.

Parameters:
pObject a pointer to the object to lock

13.111.2.2 puntoexe::lockObject::∼lockObject () [virtual]

Unlock the access to the locked object.

13.111.3 Member Function Documentation

13.111.3.1 void puntoexe::lockObject::unlock ()

Release the lock on the locked object.


The documentation for this class was generated from the following files:

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.111 puntoexe::lockObject Class Reference 327

• baseObject.h
• baseObject.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


328 Class Documentation

13.112 puntoexe::memory Class Reference


This class is used to supply a reference counter to a string of bytes.
#include <memory.h>
Inheritance diagram for puntoexe::memory::

puntoexe::baseObject

puntoexe::memory

Public Member Functions

• void transfer (const ptr< memory > &transferFrom)


Transfer the content from another memory (p. 328) object.

• void copyFrom (const ptr< memory > &sourceMemory)


Copy the content of the memory (p. 328) managed by another memory (p. 328) object
into the memory (p. 328) managed by this object.

• void clear ()
Clear the content of the managed string of bytes.

• void resize (imbxUint32 newSize)


Resize the memory (p. 328) buffer.

• void reserve (imbxUint32 reserveSize)


Reserve the specified quantity of bytes for the memory (p. 328) object. This doesn’t
modify the actual size of the memory (p. 328) object.

• imbxUint32 size ()
Return the size of the managed memory (p. 328) in bytes.

• imbxUint8 ∗ data ()
Return a pointer to the memory (p. 328) managed by the object.

• bool empty ()
Return true if the size of the managed memory (p. 328) is 0.

• void assign (const imbxUint8 ∗pSource, const imbxUint32 sourceLength)


Copy the specified array of bytes into the managed memory (p. 328).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.112 puntoexe::memory Class Reference 329

13.112.1 Detailed Description

This class is used to supply a reference counter to a string of bytes.


New instances of this class should be obtained through the class memoryPool (p. 332);
call memoryPool::getMemory() (p. 333) in order to obtain a new instance of memory
(p. 328).
This class is usually used by imebra::buffer (p. 107) objects to store the tags values.

13.112.2 Member Function Documentation

13.112.2.1 void puntoexe::memory::assign (const imbxUint8 ∗ pSource, const


imbxUint32 sourceLength)

Copy the specified array of bytes into the managed memory (p. 328).

Parameters:
pSource a pointer to the buffer containing the bytes to be copied
sourceLength the number of bytes stored in the buffer pSource and to be copied
into the managed memory (p. 328)

13.112.2.2 void puntoexe::memory::clear ()

Clear the content of the managed string of bytes.

13.112.2.3 void puntoexe::memory::copyFrom (const ptr< memory > &


sourceMemory)

Copy the content of the memory (p. 328) managed by another memory (p. 328) object
into the memory (p. 328) managed by this object.

Parameters:
sourceMemory a pointer to the memory (p. 328) object from which the data has
to be copied

13.112.2.4 imbxUint8 ∗ puntoexe::memory::data ()

Return a pointer to the memory (p. 328) managed by the object.

Returns:
a pointer to the data managed by the object

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


330 Class Documentation

13.112.2.5 bool puntoexe::memory::empty ()

Return true if the size of the managed memory (p. 328) is 0.

Returns:
true if the managed memory’s size is 0 or false otherwise

13.112.2.6 void puntoexe::memory::reserve (imbxUint32 reserveSize)

Reserve the specified quantity of bytes for the memory (p. 328) object. This doesn’t
modify the actual size of the memory (p. 328) object.

Parameters:
reserveSize the number of bytes to reserve for the memory (p. 328) object.

13.112.2.7 void puntoexe::memory::resize (imbxUint32 newSize)

Resize the memory (p. 328) buffer.

Parameters:
newSize the new size of the buffer, in bytes

13.112.2.8 imbxUint32 puntoexe::memory::size ()

Return the size of the managed memory (p. 328) in bytes.

Returns:
the size of the managed memory (p. 328), in bytes

13.112.2.9 void puntoexe::memory::transfer (const ptr< memory > &


transferFrom)

Transfer the content from another memory (p. 328) object.


The source memory (p. 328) object will transfer the ownership of the managed mem-
ory (p. 328) to this object and then will reference an empty memory (p. 328) area (size
= 0)

Parameters:
transferFrom the object from which the memory (p. 328) must be transferred

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.112 puntoexe::memory Class Reference 331

The documentation for this class was generated from the following files:

• memory.h
• memory.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


332 Class Documentation

13.113 puntoexe::memoryPool Class Reference

Stores unused memory (p. 328) objects (see puntoexe::memory (p. 328)) so they can
be reused when needed.
#include <memory.h>

Public Member Functions

• memory ∗ getMemory (imbxUint32 requestedSize)


Retrieve a new or reused puntoexe::memory (p. 328) object.

• void flush ()
Discard all the currently unused memory (p. 328).

Static Public Member Functions

• static memoryPool ∗ getMemoryPool ()


Get a pointer to the statically allocated instance of memoryPool (p. 332).

13.113.1 Detailed Description

Stores unused memory (p. 328) objects (see puntoexe::memory (p. 328)) so they can
be reused when needed.
One instance of this class is statically allocated by the library. Don’t allocate new
instance of this class.
To obtain a pointer to the statically allocated instance of memoryPool (p. 332) call the
static function memoryPool::getMemoryPool() (p. 333).
When the reference counter of a memory (p. 328) object reaches 0, the memory
(p. 328) object may not be deleted immediatly; infact, if the memory (p. 328) man-
aged by the memory (p. 328) pool matches some predefined requisites, the memory
(p. 328) object is temporarily stored in the memory (p. 328) pool and reused when a
request for a memory (p. 328) object is received.
The memory (p. 328) pool tries to reuse the memory (p. 328) object that manages
an amount of memory (p. 328) similar to the amount of memory (p. 328) requested
through getMemory() (p. 333).
When a memory (p. 328) object is not used for a while then it is deleted permanently.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.113 puntoexe::memoryPool Class Reference 333

13.113.2 Member Function Documentation

13.113.2.1 void puntoexe::memoryPool::flush ()

Discard all the currently unused memory (p. 328).

13.113.2.2 memory ∗ puntoexe::memoryPool::getMemory (imbxUint32


requestedSize)

Retrieve a new or reused puntoexe::memory (p. 328) object.


The function look for an unused memory (p. 328) object that has a managed string
with the same size of the specified one and tries to reuse it.
If none of the unused objects has the requested size, then a new memory (p. 328) object
is created and returned.

Parameters:
requestedSize the size that the string managed by the returned memory (p. 328)
object must have

Returns:
a pointer to the reused or new memory (p. 328) object: in any case the reference
counter of the returned object will be 1

13.113.2.3 memoryPool ∗ puntoexe::memoryPool::getMemoryPool ()


[static]

Get a pointer to the statically allocated instance of memoryPool (p. 332).

Returns:
a pointer to the statically allocated instance of memoryPool (p. 332)

The documentation for this class was generated from the following files:

• memory.h
• memory.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


334 Class Documentation

13.114 puntoexe::memoryStream Class Reference


This class derives from the baseStream (p. 89) class and implements a memory
(p. 328) stream (p. 340).
#include <memoryStream.h>
Inheritance diagram for puntoexe::memoryStream::

puntoexe::baseObject

puntoexe::baseStream

puntoexe::memoryStream

Public Member Functions


• memoryStream (ptr< memory > memoryStream)
Construct a memoryStream (p. 334) object and attach a memory (p. 328) object to it.

13.114.1 Detailed Description

This class derives from the baseStream (p. 89) class and implements a memory
(p. 328) stream (p. 340).
This class can be used to read/write on the allocated memory (p. 328).

13.114.2 Constructor & Destructor Documentation

13.114.2.1 puntoexe::memoryStream::memoryStream (ptr< memory >


memoryStream)

Construct a memoryStream (p. 334) object and attach a memory (p. 328) object to it.
The attached memory (p. 328) object will be resized if new data is written and its size
is too small.
Parameters:
memoryStream (p. 334) the memory (p. 328) object to be used by the memoryS-
tream (p. 334) object.

The documentation for this class was generated from the following files:

• memoryStream.h
• memoryStream.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.115 puntoexe::nullStream Class Reference 335

13.115 puntoexe::nullStream Class Reference


This class derives from the baseStream (p. 89) class and implements a null stream
(p. 340).
#include <nullStream.h>
Inheritance diagram for puntoexe::nullStream::

puntoexe::baseObject

puntoexe::baseStream

puntoexe::nullStream

13.115.1 Detailed Description

This class derives from the baseStream (p. 89) class and implements a null stream
(p. 340).
The null stream (p. 340) doesn’t write or read anything: it’s just used to update the
position counter. The null stream (p. 340) can be used to calculate the tags offsets
before they are written to the definitive stream (p. 340).
The documentation for this class was generated from the following file:

• nullStream.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


336 Class Documentation

13.116 puntoexe::ptr< objectType > Class Template


Reference
This class must be used to allocate objects derived from the class baseObject (p. 85).
#include <baseObject.h>
Inherits puntoexe::basePtr.

Public Member Functions


• ptr ()
Default constructor.

• ptr (objectType ∗pObject)


Construct the ptr (p. 336) object and keeps track of the object referenced by the pointer
pObject.

• ptr (ptr< objectType > const &ptrSource)


Copy constructor.

• ptr< objectType > & operator= (const ptr< objectType > &ptrSource)
Copy the object tracked by another ptr (p. 336).

• bool operator== (const objectType ∗ptrCompare) const


Compare the pointer to the tracked object with the pointer specified in the parameter.

• bool operator== (const ptr< objectType > &ptrCompare) const


Compare the pointer to the tracked object with the pointer tracked by another ptr
(p. 336).

• objectType ∗ operator → () const


Return the pointer to the tracked object.

• objectType ∗ get () const


Return the pointer to the tracked object.

• template<class destType >


operator destType ∗ () const
Return the pointer to the tracked object, type casted in the specified class pointer.

• template<class destType >


operator ptr< destType > () const
Return a new ptr (p. 336) object tracking the object tracked by this ptr (p. 336). A type
cast is performed if necessary.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.116 puntoexe::ptr< objectType > Class Template Reference 337

13.116.1 Detailed Description

template<class objectType> class puntoexe::ptr< objectType >

This class must be used to allocate objects derived from the class baseObject (p. 85).
The object type specified in the template will be deleted by this class when the object’s
reference counter reaches zero.
The references counter is managed automatically by this class.

Examples:

dicom2jpeg/dicom2jpeg.cpp, and dicomdirItems/dicomdirItems.cpp.

13.116.2 Constructor & Destructor Documentation

13.116.2.1 template<class objectType> puntoexe::ptr< objectType >::ptr ()


[inline]

Default constructor.
Set the internal pointer to null.

13.116.2.2 template<class objectType> puntoexe::ptr< objectType >::ptr


(objectType ∗ pObject) [inline]

Construct the ptr (p. 336) object and keeps track of the object referenced by the pointer
pObject.

Parameters:
pObject a pointer to the allocated object. The allocated object will be automati-
cally released by the class’ destructor.
The object must be allocated by the C++ new statement.
The object’s reference counter is increased by this function.

13.116.2.3 template<class objectType> puntoexe::ptr< objectType >::ptr


(ptr< objectType > const & ptrSource) [inline]

Copy constructor.
The object tracked by another ptr (p. 336) is copied into the current ptr (p. 336) and
the reference counter is increased.

Parameters:
ptrSource the source ptr (p. 336) object that must be copied into the current ptr
(p. 336).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


338 Class Documentation

13.116.3 Member Function Documentation

13.116.3.1 template<class objectType> objectType∗ puntoexe::ptr<


objectType >::get () const [inline]

Return the pointer to the tracked object.

Returns:
the pointer to the tracked object

13.116.3.2 template<class objectType> template<class destType >


puntoexe::ptr< objectType >::operator destType ∗ () const
[inline]

Return the pointer to the tracked object, type casted in the specified class pointer.
The cast is static, so its validity is checked at compile time.

Returns:
the pointer to the tracked object

13.116.3.3 template<class objectType> template<class destType >


puntoexe::ptr< objectType >::operator ptr< destType > () const
[inline]

Return a new ptr (p. 336) object tracking the object tracked by this ptr (p. 336). A type
cast is performed if necessary.
The type cast is static, so its validity is checked at compile time.

Returns:
the pointer to the tracked object

13.116.3.4 template<class objectType> objectType∗ puntoexe::ptr<


objectType >::operator → () const [inline]

Return the pointer to the tracked object.

Returns:
the pointer to the tracked object

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.116 puntoexe::ptr< objectType > Class Template Reference 339

13.116.3.5 template<class objectType> ptr<objectType>& puntoexe::ptr<


objectType >::operator= (const ptr< objectType > & ptrSource)
[inline]

Copy the object tracked by another ptr (p. 336).

Parameters:
ptrSource the ptr (p. 336) object that is currently tracking the object to be tracked
by this ptr (p. 336) object. The reference counter of the new object is in-
creased. The object previously tracked by this ptr (p. 336) is released.

Returns:
a reference to the ptr (p. 336) object.

13.116.3.6 template<class objectType> bool puntoexe::ptr< objectType


>::operator== (const ptr< objectType > & ptrCompare) const
[inline]

Compare the pointer to the tracked object with the pointer tracked by another ptr
(p. 336).

Parameters:
ptrCompare the ptr (p. 336) tracking the object to be compared

Returns:
true if the ptrCompare pointer is equal to the pointer of the tracked object

13.116.3.7 template<class objectType> bool puntoexe::ptr< objectType


>::operator== (const objectType ∗ ptrCompare) const [inline]

Compare the pointer to the tracked object with the pointer specified in the parameter.

Parameters:
ptrCompare the pointer to be compared with the pointer to the tracked object

Returns:
true if the ptrCompare pointer is equal to the pointer of the tracked object

The documentation for this class was generated from the following file:

• baseObject.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


340 Class Documentation

13.117 puntoexe::stream Class Reference


This class derives from the baseStream (p. 89) class and implements a file stream
(p. 340).
#include <stream.h>
Inheritance diagram for puntoexe::stream::

puntoexe::baseObject

puntoexe::baseStream

puntoexe::stream

Public Member Functions


• void openFile (const std::string &fileName, const int mode)
Open a file.

13.117.1 Detailed Description

This class derives from the baseStream (p. 89) class and implements a file stream
(p. 340).
This class can be used to read/write on physical files in the mass storage.

Examples:

dicom2jpeg/dicom2jpeg.cpp, and dicomdirItems/dicomdirItems.cpp.

13.117.2 Member Function Documentation

13.117.2.1 void puntoexe::stream::openFile (const std::string & fileName,


const int mode)

Open a file.
The function uses the standard library function fopen to open the specified file.
The created file object will be automatically closed and destroyed when one of the
following events will occur:

• the stream (p. 340) class will be destroyed


• this function will be called again

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.117 puntoexe::stream Class Reference 341

Parameters:
fileName the name of the file to be opened
mode the opening mode. Can be the combination of one or more of the following
values:
• ios_base::in the file will be opened for reading operations
• ios_base::out the file will be opened for writing operations
• ios_base::app the writing operations will append data to the existing file
• ios_base::trunc the existing file will be truncated to zero length
• ios_base::binary the file will be opened in binary mode. Please note
that this flag is useless, since all the files ARE OPENED IN BINARY
MODE.

The documentation for this class was generated from the following files:

• stream.h
• stream.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


342 Class Documentation

13.118 puntoexe::streamController Class Reference


This class represents a stream (p. 340) controller. A stream (p. 340) controller can
read or write data from/to a stream (p. 340).
#include <streamController.h>
Inheritance diagram for puntoexe::streamController::

puntoexe::baseObject

puntoexe::streamController

puntoexe::streamReader puntoexe::streamWriter

Public Member Functions


• streamController (ptr< baseStream > pControlledStream, imbxUint32 vir-
tualStart=0, imbxUint32 virtualLength=0)
Construct the stream (p. 340) controller and connect it to a stream (p. 340).

• imbxUint32 position ()
Get the stream’s position relative to the virtual start position specified in the construc-
tor.

• ptr< baseStream > getControlledStream ()


Return a pointer to the controlled stream (p. 340).

• imbxUint32 getControlledStreamPosition ()
Return the position in bytes from the beginning of the stream (p. 340).

Public Attributes
• bool m_bJpegTags
true writeByte() must write all 0xff as 0xff, 0x00 anf readByte() as to convert all
0xff,0x00 to 0xff, as in jpeg streams.

Protected Attributes
• ptr< baseStream > m_pControlledStream
Stream controlled by the stream (p. 340) controller.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.118 puntoexe::streamController Class Reference 343

• std::auto_ptr< imbxUint8 > m_dataBuffer


Used for buffered IO.

• imbxUint32 m_virtualStart
Byte in the stream (p. 340) that represents the byte 0 in the stream (p. 340) controller.

• imbxUint32 m_virtualLength
Max number of bytes that the stream (p. 340) controller can control in the controlled
stream (p. 340). An EOF signal will be raised when trying to read past the maximum
length.

Byte ordering

• enum tByteOrdering { lowByteEndian = 1, highByteEndian = 2 }


Specify a byte ordering.

• static void adjustEndian (imbxUint8 ∗pBuffer, const imbxUint32 wordLength,


const tByteOrdering endianType, const imbxUint32 words=1)
Adjust the pBuffer’s content according to the specified byte ordering.

13.118.1 Detailed Description

This class represents a stream (p. 340) controller. A stream (p. 340) controller can
read or write data from/to a stream (p. 340).
Do not use this class directly: use puntoexe::streamWriter (p. 359) or pun-
toexe::streamReader (p. 354) instead.

13.118.2 Member Enumeration Documentation

13.118.2.1 enum puntoexe::streamController::tByteOrdering

Specify a byte ordering.

Enumerator:
lowByteEndian the byte ordering is low endian: the least significant bytes of a
word are stored first
highByteEndian the byte ordering is high endian: the most significant bytes of a
word are stored first

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


344 Class Documentation

13.118.3 Constructor & Destructor Documentation

13.118.3.1 puntoexe::streamController::streamController (ptr< baseStream


> pControlledStream, imbxUint32 virtualStart = 0, imbxUint32
virtualLength = 0)

Construct the stream (p. 340) controller and connect it to a stream (p. 340).
The stream (p. 340) controller can be used to control only a portion of the connected
stream (p. 340).

Parameters:
pControlledStream pointer to the controlled stream (p. 340)
virtualStart position in the stream (p. 340) that is considered as the position 0 by
the stream (p. 340) controller
virtualLength the number of bytes in the connected stream (p. 340) that the con-
troller will use. An EOF will be issued if the application tries to read beyond
the virtual length

13.118.4 Member Function Documentation

13.118.4.1 void puntoexe::streamController::adjustEndian (imbxUint8 ∗


pBuffer, const imbxUint32 wordLength, const tByteOrdering
endianType, const imbxUint32 words = 1) [static]

Adjust the pBuffer’s content according to the specified byte ordering.


If the specified byte ordering is different from the platform’s byte ordering, then the
content of pBuffer is modified to reflect the desidered byte ordering.

Parameters:
pBuffer a pointer to the buffer that stores the data to order
wordLength the size, in bytes, of the elements stored in the buffer pointed by
pBuffer. E.g.: if the buffer stores a collection of words, this parameter will
be 2. If the buffer stores a collection of double words, then this parameter
will be 4.
endianType the desidered byte ordering. If it differs from the platform’s byte
ordering, then the content of the memory (p. 328) pointed by pBuffer will be
modified.
words The number of elements stored in the buffer pointed by pBuffer. This value
represents the number of element that will be byte ordered. The total size of
the buffer should be equal to words∗wordLength

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.118 puntoexe::streamController Class Reference 345

13.118.4.2 ptr< baseStream > pun-


toexe::streamController::getControlledStream
()

Return a pointer to the controlled stream (p. 340).

Returns:
a pointer to the controlled stream (p. 340)

13.118.4.3 imbxUint32 pun-


toexe::streamController::getControlledStreamPosition
()

Return the position in bytes from the beginning of the stream (p. 340).
It acts like the function position() (p. 345), but it doesn’t adjust the position to the
virtual stream (p. 340) position specified in the constructor.

Returns:
the stream’s read position, in bytes from the beginning of the stream (p. 340)

13.118.4.4 imbxUint32 puntoexe::streamController::position ()

Get the stream’s position relative to the virtual start position specified in the constructor.
The position is measured in bytes from the beginning of the stream (p. 340).
The position represents the byte in the stream (p. 340) that the next reading or writing
function will use.
If the virtual start position has been set in the constructor, then the returned position is
relative to the virtual start position.

Returns:
the stream’s read position, in bytes from the beginning of the stream (p. 340) or
the virtual start position set in the constructor

13.118.5 Member Data Documentation

13.118.5.1 bool puntoexe::streamController::m_bJpegTags

true writeByte() must write all 0xff as 0xff, 0x00 anf readByte() as to convert all
0xff,0x00 to 0xff, as in jpeg streams.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


346 Class Documentation

13.118.5.2 std::auto_ptr<imbxUint8> puntoexe::streamController::m_-


dataBuffer [protected]

Used for buffered IO.

13.118.5.3 ptr<baseStream> puntoexe::streamController::m_-


pControlledStream [protected]

Stream controlled by the stream (p. 340) controller.

13.118.5.4 imbxUint32 puntoexe::streamController::m_virtualLength


[protected]

Max number of bytes that the stream (p. 340) controller can control in the controlled
stream (p. 340). An EOF signal will be raised when trying to read past the maximum
length.
If this value is 0 then there are no limits on the maximum length.

13.118.5.5 imbxUint32 puntoexe::streamController::m_virtualStart


[protected]

Byte in the stream (p. 340) that represents the byte 0 in the stream (p. 340) controller.
The documentation for this class was generated from the following files:

• streamController.h
• streamController.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.119 puntoexe::streamException Class Reference 347

13.119 puntoexe::streamException Class Reference


The base exception for all the exceptions thrown by the function in baseStream (p. 89).
#include <baseStream.h>
Inheritance diagram for puntoexe::streamException::

puntoexe::streamException

puntoexe::streamExceptionClose puntoexe::streamExceptionEOF puntoexe::streamExceptionOpen puntoexe::streamExceptionRead puntoexe::streamExceptionWrite puntoexe::streamJpegTagInStream

13.119.1 Detailed Description

The base exception for all the exceptions thrown by the function in baseStream (p. 89).
The documentation for this class was generated from the following file:

• baseStream.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


348 Class Documentation

13.120 puntoexe::streamExceptionClose Class Refer-


ence
Exception thrown when there are problems during the closure of the stream (p. 340).
#include <baseStream.h>
Inheritance diagram for puntoexe::streamExceptionClose::

puntoexe::streamException

puntoexe::streamExceptionClose

13.120.1 Detailed Description

Exception thrown when there are problems during the closure of the stream (p. 340).
The documentation for this class was generated from the following file:

• baseStream.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.121 puntoexe::streamExceptionEOF Class Reference 349

13.121 puntoexe::streamExceptionEOF Class Refer-


ence
Exception thrown when an attempt to read past the end of the file is made.
#include <streamController.h>
Inheritance diagram for puntoexe::streamExceptionEOF::

puntoexe::streamException

puntoexe::streamExceptionEOF

13.121.1 Detailed Description

Exception thrown when an attempt to read past the end of the file is made.
The documentation for this class was generated from the following file:

• streamController.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


350 Class Documentation

13.122 puntoexe::streamExceptionOpen Class Refer-


ence
Exception thrown when the stream (p. 340) cannot be open.
#include <baseStream.h>
Inheritance diagram for puntoexe::streamExceptionOpen::

puntoexe::streamException

puntoexe::streamExceptionOpen

13.122.1 Detailed Description

Exception thrown when the stream (p. 340) cannot be open.


The documentation for this class was generated from the following file:

• baseStream.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.123 puntoexe::streamExceptionRead Class Reference 351

13.123 puntoexe::streamExceptionRead Class Refer-


ence
Exception thrown when there is an error during the read phase.
#include <baseStream.h>
Inheritance diagram for puntoexe::streamExceptionRead::

puntoexe::streamException

puntoexe::streamExceptionRead

13.123.1 Detailed Description

Exception thrown when there is an error during the read phase.


The documentation for this class was generated from the following file:

• baseStream.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


352 Class Documentation

13.124 puntoexe::streamExceptionWrite Class Refer-


ence
Exception thrown when there is an error during the write phase.
#include <baseStream.h>
Inheritance diagram for puntoexe::streamExceptionWrite::

puntoexe::streamException

puntoexe::streamExceptionWrite

13.124.1 Detailed Description

Exception thrown when there is an error during the write phase.


The documentation for this class was generated from the following file:

• baseStream.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.125 puntoexe::streamJpegTagInStream Class Reference 353

13.125 puntoexe::streamJpegTagInStream Class Ref-


erence
Exception thrown when a jpeg tag is found but wasn’t expected.
#include <streamReader.h>
Inheritance diagram for puntoexe::streamJpegTagInStream::

puntoexe::streamException

puntoexe::streamJpegTagInStream

13.125.1 Detailed Description

Exception thrown when a jpeg tag is found but wasn’t expected.


The documentation for this class was generated from the following file:

• streamReader.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


354 Class Documentation

13.126 puntoexe::streamReader Class Reference


Represents a stream (p. 340) reader. A stream (p. 340) reader can read data from a
stream (p. 340). Several stream (p. 340) readers can share a single baseStream (p. 89)
derived object.
#include <streamReader.h>
Inheritance diagram for puntoexe::streamReader::

puntoexe::baseObject

puntoexe::streamController

puntoexe::streamReader

Public Member Functions


• streamReader (ptr< baseStream > pControlledStream, imbxUint32 virtual-
Start=0, imbxUint32 virtualLength=0)
Builf a streamReader (p. 354) and connect it to an existing stream (p. 340).

• void read (imbxUint8 ∗pBuffer, imbxUint32 bufferLength)


Read raw data from the stream (p. 340).

• bool endReached ()
Returns true if the last byte in the stream (p. 340) has already been read.

• void seek (imbxInt32 newPosition, bool bCurrent=false)


Seek the stream’s read position.

• imbxUint32 readBits (int bitsNum)


Read the specified amount of bits from the stream (p. 340).

• imbxUint32 readBit ()
Read one bit from the stream (p. 340).

• void addBit (imbxUint32 ∗const pBuffer)


Read one bit from the stream (p. 340) and add its value to the specified buffer.

• void resetInBitsBuffer ()
Reset the bit pointer used by readBits() (p. 356), readBit() (p. 356) and addBit()
(p. 355).

• imbxUint8 readByte ()

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.126 puntoexe::streamReader Class Reference 355

Read a single byte from the stream (p. 340), parsing it if m_pTagByte is not zero.

13.126.1 Detailed Description

Represents a stream (p. 340) reader. A stream (p. 340) reader can read data from a
stream (p. 340). Several stream (p. 340) readers can share a single baseStream (p. 89)
derived object.
The stream (p. 340) reader object is not multithread safe, but one single stream
(p. 340) can have several streamReaders (in several threads) connected to it.
A stream (p. 340) reader can also be connected only to a part of a stream (p. 340):
when this feature is used, the streamReaded’s client thinks that he is using a whole
stream (p. 340), while the reader limits its view to allowed stream’s bytes only.

Examples:

dicom2jpeg/dicom2jpeg.cpp, and dicomdirItems/dicomdirItems.cpp.

13.126.2 Constructor & Destructor Documentation

13.126.2.1 puntoexe::streamReader::streamReader (ptr< baseStream >


pControlledStream, imbxUint32 virtualStart = 0, imbxUint32
virtualLength = 0)

Builf a streamReader (p. 354) and connect it to an existing stream (p. 340).
The stream (p. 340) reader can also be connected to only a part of the stream (p. 340).
When the streamReader (p. 354) is connected to a part of a stream (p. 340) then all
the its functions will act on the viewable stream’s part only.

Parameters:
pControlledStream the stream (p. 340) that will be controlled by the reader
virtualStart the first stream’s byte visible to the reader
virtualLength the number of bytes visible to the reader. A value of 0 means that
all the bytes are visible

13.126.3 Member Function Documentation

13.126.3.1 void puntoexe::streamReader::addBit (imbxUint32 ∗const pBuffer)


[inline]

Read one bit from the stream (p. 340) and add its value to the specified buffer.
The buffer pointed by the pBuffer parameter is left-shifted before the read bit is inserted
in the least significant bit of the buffer.
The function throws a streamExceptionRead (p. 351) if an error occurs.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


356 Class Documentation

Parameters:
pBuffer a pointer to a imbxUint32 value that will be left shifted and filled with
the read bit.

13.126.3.2 bool puntoexe::streamReader::endReached ()

Returns true if the last byte in the stream (p. 340) has already been read.

Returns:
true if the last byte in the stream (p. 340) has already been read

13.126.3.3 void puntoexe::streamReader::read (imbxUint8 ∗ pBuffer,


imbxUint32 bufferLength)

Read raw data from the stream (p. 340).


The number of bytes specified in the parameter bufferLength will be read from the
stream (p. 340) and copied into a buffer referenced by the parameter pBuffer. The
buffer’s size must be equal or greater than the number of bytes to read.
The functions throws a streamExceptionRead (p. 351) exception if an error occurs.

Parameters:
pBuffer a pointer to the buffer where the read data must be copied. the buffer’s
size must be at least equal to the size indicated in the bufferLength parameter.
bufferLength the number of bytes to read from the stream (p. 340).

13.126.3.4 imbxUint32 puntoexe::streamReader::readBit () [inline]

Read one bit from the stream (p. 340).


The returned buffer will store the value 0 or 1, depending on the value of the read bit.
The function throws a streamExceptionRead (p. 351) if an error occurs.

Returns:
the value of the read bit (1 or 0)

13.126.3.5 imbxUint32 puntoexe::streamReader::readBits (int bitsNum)


[inline]

Read the specified amount of bits from the stream (p. 340).
The functions uses a special bit pointer to keep track of the bytes that haven’t been
completly read.
The function throws a streamExceptionRead (p. 351) exception if an error occurs.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.126 puntoexe::streamReader Class Reference 357

Parameters:
bitsNum the number of bits to read. The function can read 32 bits maximum

Returns:
an integer containing the fetched bits, right aligned

13.126.3.6 imbxUint8 puntoexe::streamReader::readByte () [inline]

Read a single byte from the stream (p. 340), parsing it if m_pTagByte is not zero.
The read byte is stored in the buffer pointed by the parameter pBuffer.
If m_pTagByte is zero, then the function reads a byte and returns true.
If m_pTagByte is not zero, then the function skips all the bytes in the stream (p. 340)
that have the value 0xFF. If the function doesn’t have to skip any 0xFF bytes, then the
function just read a byte and returns true.
If one or more 0xFF bytes have been skipped, then the function returns a value depend-
ing on the byte that follows the 0xFF run:

• if the byte is 0, then the function fill the pBuffer parameter with a value 0xFF
and returns true
• if the byte is not 0, then that value is stored in the location pointed by m_-
pTagByte and the function returns false.

This mechanism is used to parse the jpeg tags in a stream (p. 340).

Returns:
the read byte

13.126.3.7 void puntoexe::streamReader::resetInBitsBuffer () [inline]

Reset the bit pointer used by readBits() (p. 356), readBit() (p. 356) and addBit()
(p. 355).
A subsequent call to readBits() (p. 356), readBit and addBit() (p. 355) will read data
from a byte-aligned boundary.

13.126.3.8 void puntoexe::streamReader::seek (imbxInt32 newPosition, bool


bCurrent = false)

Seek the stream’s read position.


The read position is moved to the specified byte in the stream (p. 340). Subsequent
calls to the read operations like read() (p. 356), readBits() (p. 356), readBit() (p. 356),
addBit() (p. 355) and readByte() (p. 357) will read data from the position specified
here.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


358 Class Documentation

Parameters:
newPosition the new position to use for read operations, in bytes from the begin-
ning of the stream (p. 340) if bCurrent is false, or in bytes relative to the
current position if bCurrent is true
bCurrent when this parameter is true then the new read position is calculated by
adding the content of position to the current position, otherwise the parameter
position stores the new absolute position

The documentation for this class was generated from the following files:

• streamReader.h
• streamReader.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.127 puntoexe::streamWriter Class Reference 359

13.127 puntoexe::streamWriter Class Reference


Use this class to write into a baseStream (p. 89) derived class.
#include <streamWriter.h>
Inheritance diagram for puntoexe::streamWriter::

puntoexe::baseObject

puntoexe::streamController

puntoexe::streamWriter

Public Member Functions


• streamWriter (ptr< baseStream > pControlledStream, imbxUint32 virtual-
Start=0, imbxUint32 virtualLength=0)
Creates the streamWriter (p. 359) and connects it to a baseStream (p. 89) object.

• void flushDataBuffer ()
Writes the internal buffer into the connected stream (p. 340). This function is auto-
matically called when needed, but your application can call it when syncronization
between the cached data and the stream (p. 340) is needed.

• void write (const imbxUint8 ∗pBuffer, imbxUint32 bufferLength)


Write raw data into the stream (p. 340).

• void writeBits (const imbxUint32 buffer, int bitsNum)


Write the specified amount of bits to the stream (p. 340).

• void resetOutBitsBuffer ()
Reset the bit pointer used by writeBits() (p. 361).

• void writeByte (const imbxUint8 buffer)


Write a single byte to the stream (p. 340), parsing it if m_pTagByte is not zero.

Protected Member Functions


• virtual ∼streamWriter ()
Flushes the internal buffer, disconnects the stream (p. 340) and destroys the
streamWriter (p. 359).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


360 Class Documentation

13.127.1 Detailed Description

Use this class to write into a baseStream (p. 89) derived class.
Like the streamReader (p. 354), this class is not multithread safe, but several
streamWriter (p. 359) (in several threads) can be connected to a single stream
(p. 340).
A streamWriter (p. 359) can also be connected only to a part of the original stream
(p. 340): when this feature is used then the streamWriter (p. 359) will act as if only
the visible bytes exist.

Examples:

dicom2jpeg/dicom2jpeg.cpp.

13.127.2 Constructor & Destructor Documentation

13.127.2.1 puntoexe::streamWriter::streamWriter (ptr< baseStream >


pControlledStream, imbxUint32 virtualStart = 0, imbxUint32
virtualLength = 0)

Creates the streamWriter (p. 359) and connects it to a baseStream (p. 89) object.

Parameters:
pControlledStream the stream (p. 340) used by the streamWriter (p. 359) to
write
virtualStart the first stream’s byte visible to the streamWriter (p. 359)
virtualLength the number of stream’s bytes visible to the streamWriter (p. 359).
Set to 0 to allow the streamWriter (p. 359) to see all the bytes

13.127.2.2 puntoexe::streamWriter::∼streamWriter () [protected,


virtual]

Flushes the internal buffer, disconnects the stream (p. 340) and destroys the
streamWriter (p. 359).

13.127.3 Member Function Documentation

13.127.3.1 void puntoexe::streamWriter::flushDataBuffer ()

Writes the internal buffer into the connected stream (p. 340). This function is auto-
matically called when needed, but your application can call it when syncronization
between the cached data and the stream (p. 340) is needed.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.127 puntoexe::streamWriter Class Reference 361

13.127.3.2 void puntoexe::streamWriter::resetOutBitsBuffer () [inline]

Reset the bit pointer used by writeBits() (p. 361).


A subsequent call to writeBits() (p. 361) will write data to a byte-aligned boundary.

13.127.3.3 void puntoexe::streamWriter::write (const imbxUint8 ∗ pBuffer,


imbxUint32 bufferLength)

Write raw data into the stream (p. 340).


The data stored in the pBuffer parameter will be written into the stream (p. 340).
The function throws a streamExceptionWrite (p. 352) exception if an error occurs.

Parameters:
pBuffer a pointer to the buffer which stores the data that must be written into the
stream (p. 340)
bufferLength the number of bytes that must be written to the stream (p. 340)

13.127.3.4 void puntoexe::streamWriter::writeBits (const imbxUint32 buffer,


int bitsNum) [inline]

Write the specified amount of bits to the stream (p. 340).


The functions uses a special bit pointer to keep track of the bytes that haven’t been
completly written.
The function throws a streamExceptionWrite (p. 352) exception if an error occurs.

Parameters:
buffer bits to be written. The bits must be right aligned
bitsNum the number of bits to write. The function can write max 32 bits

13.127.3.5 void puntoexe::streamWriter::writeByte (const imbxUint8 buffer)


[inline]

Write a single byte to the stream (p. 340), parsing it if m_pTagByte is not zero.
The byte to be written must be stored in the buffer pointed by the parameter pBuffer.
If m_pTagByte is zero, then the function writes the byte and returns.
If m_pTagByte is not zero, then the function adds a byte with value 0x0 after all the
bytes with value 0xFF. This mechanism is used to avoid the generation of the jpeg tags
in a stream (p. 340).

Parameters:
buffer byte to be written

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


362 Class Documentation

The documentation for this class was generated from the following files:

• streamWriter.h
• streamWriter.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.128 puntoexe::thread Class Reference 363

13.128 puntoexe::thread Class Reference


This class represents a thread (p. 363).
#include <thread.h>
Inheritance diagram for puntoexe::thread::

puntoexe::baseObject

puntoexe::thread

Public Member Functions

• thread ()
Construct the thread (p. 363).

• virtual void threadFunction ()=0


This function is executed in another thread (p. 363) when start() (p. 365) is called.

• void start ()
Execute the function threadFunction() (p. 365) in a separate thread (p. 363).

• void terminate ()
Communicates to the thread (p. 363) that it should terminate as soon as possible.

• bool shouldTerminate ()
Returns true if the function threadFunction() (p. 365) should return as soon as pos-
sible.

• bool isRunning ()
Return true if the function threadFunction() (p. 365) is running in its own thread
(p. 363).

Static Public Member Functions

• static tThreadId getThreadId ()


Return a number that identifies the active thread (p. 363).

• static void yield ()


Switch to another thread (p. 363).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


364 Class Documentation

13.128.1 Detailed Description

This class represents a thread (p. 363).


The thread (p. 363) can be started with thread::start() (p. 365). Once the thread
(p. 363) is started, the virtual function� threadFunction() (p. 365) is executed in a
separate thread (p. 363).
The code in threadFunction() (p. 365) can call shouldTerminate() (p. 365) to know
when the thread (p. 363) should be terminated gracefully as soon as possible.
The function terminate() (p. 365) can be called to inform the thread (p. 363) that it
should terminate. terminate() (p. 365) is called automatically by the thread (p. 363)
destructor which also waits for the thread (p. 363) termination before deallocating it
and returning.

13.128.2 Constructor & Destructor Documentation

13.128.2.1 puntoexe::thread::thread ()

Construct the thread (p. 363).


Your application has to call start() (p. 365) in order to start the thread (p. 363) function.

13.128.3 Member Function Documentation

13.128.3.1 thread::tThreadId puntoexe::thread::getThreadId () [static]

Return a number that identifies the active thread (p. 363).


Please note that this isn’t the thread (p. 363) handle, but a number that is different for
each running thread (p. 363).
When a thread (p. 363) terminates the number could be used to identify another thread
(p. 363).

Returns:
an id for the currently active thread (p. 363)

13.128.3.2 bool puntoexe::thread::isRunning ()

Return true if the function threadFunction() (p. 365) is running in its own thread
(p. 363).

Returns:
true if the function threadFunction() (p. 365) is running in its own thread (p. 363)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.128 puntoexe::thread Class Reference 365

13.128.3.3 bool puntoexe::thread::shouldTerminate ()

Returns true if the function threadFunction() (p. 365) should return as soon as possi-
ble.

Returns:
true if the function threadFunction() (p. 365) should return as soon as possible

13.128.3.4 void puntoexe::thread::start ()

Execute the function threadFunction() (p. 365) in a separate thread (p. 363).

13.128.3.5 void puntoexe::thread::terminate ()

Communicates to the thread (p. 363) that it should terminate as soon as possible.
A call to shouldTerminate() (p. 365) returns true after this function has been called.

13.128.3.6 virtual void puntoexe::thread::threadFunction () [pure


virtual]

This function is executed in another thread (p. 363) when start() (p. 365) is called.
The code in this function can call shouldTerminate() (p. 365) to know when another
thread (p. 363) has requested its termination.
This function has to be implemented in a derived class.

13.128.3.7 void puntoexe::thread::yield () [static]

Switch to another thread (p. 363).


The current thread (p. 363) is stopped and the following thrad scheduled to be executed
on the processor is started.
The documentation for this class was generated from the following files:

• thread.h
• thread.cpp

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


366 Class Documentation

13.129 puntoexe::threadException Class Reference


This is used as the base class for the exceptions thrown by the class thread (p. 363).
#include <thread.h>
Inheritance diagram for puntoexe::threadException::

puntoexe::threadException

puntoexe::threadExceptionAlreadyRunning

13.129.1 Detailed Description

This is used as the base class for the exceptions thrown by the class thread (p. 363).
The documentation for this class was generated from the following file:

• thread.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


13.130 puntoexe::threadExceptionAlreadyRunning Class Reference 367

13.130 puntoexe::threadExceptionAlreadyRunning
Class Reference
Exception thrown by thread (p. 363) when an attempt to run an already running thread
(p. 363) is made.
#include <thread.h>
Inheritance diagram for puntoexe::threadExceptionAlreadyRunning::

puntoexe::threadException

puntoexe::threadExceptionAlreadyRunning

13.130.1 Detailed Description

Exception thrown by thread (p. 363) when an attempt to run an already running thread
(p. 363) is made.
The documentation for this class was generated from the following file:

• thread.h

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


368 Class Documentation

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 14

File Documentation

14.1 baseObject.cpp File Reference


Implementation of the baseObject class.
#include "../include/baseObject.h"
#include "../include/exception.h"
#include <iostream>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.1.1 Detailed Description

Implementation of the baseObject class.


370 File Documentation

14.2 baseObject.h File Reference


Declaration of the base classes used by the puntoexe (p. 67) library.
#include "configuration.h"
#include "criticalSection.h"
#include <string>
#include <memory>

Classes
• class puntoexe::ptr< objectType >
This class must be used to allocate objects derived from the class baseObject (p. 85).

• class puntoexe::baseObject
This is the base class of the library. Almost all the classes in the library are derived
from this one.

• class puntoexe::lockObject
Locks the access to an object of type baseObject (p. 85).

• class puntoexe::lockMultipleObjects
Locks the access to several objects of type baseObject (p. 85).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.2.1 Detailed Description

Declaration of the base classes used by the puntoexe (p. 67) library.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.3 baseStream.cpp File Reference 371

14.3 baseStream.cpp File Reference


Implementation of the baseStream class.
#include "../include/baseStream.h"
#include <list>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.3.1 Detailed Description

Implementation of the baseStream class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


372 File Documentation

14.4 baseStream.h File Reference


Declaration of the the base class for the streams (memory, file, ...) used by the puntoexe
(p. 67) library.
#include "baseObject.h"
#include "../include/exception.h"
#include <vector>
#include <map>
#include <stdexcept>

Classes
• class puntoexe::baseStream
This class represents a stream (p. 340).

• class puntoexe::streamException
The base exception for all the exceptions thrown by the function in baseStream (p. 89).

• class puntoexe::streamExceptionOpen
Exception thrown when the stream (p. 340) cannot be open.

• class puntoexe::streamExceptionRead
Exception thrown when there is an error during the read phase.

• class puntoexe::streamExceptionWrite
Exception thrown when there is an error during the write phase.

• class puntoexe::streamExceptionClose
Exception thrown when there are problems during the closure of the stream (p. 340).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.4.1 Detailed Description

Declaration of the the base class for the streams (memory, file, ...) used by the puntoexe
(p. 67) library.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.5 buffer.cpp File Reference 373

14.5 buffer.cpp File Reference


Implementation of the buffer class.
#include "../../base/include/exception.h"
#include "../../base/include/streamReader.h"
#include "../../base/include/streamWriter.h"
#include "../include/buffer.h"
#include "../include/bufferStream.h"
#include "../include/dataHandler.h"
#include "../include/dataHandlerNumeric.h"
#include "../include/dataHandlerStringAE.h"
#include "../include/dataHandlerStringAS.h"
#include "../include/dataHandlerStringCS.h"
#include "../include/dataHandlerStringDS.h"
#include "../include/dataHandlerStringIS.h"
#include "../include/dataHandlerStringLO.h"
#include "../include/dataHandlerStringLT.h"
#include "../include/dataHandlerStringPN.h"
#include "../include/dataHandlerStringSH.h"
#include "../include/dataHandlerStringST.h"
#include "../include/dataHandlerStringUI.h"
#include "../include/dataHandlerStringUT.h"
#include "../include/dataHandlerDate.h"
#include "../include/dataHandlerDateTime.h"
#include "../include/dataHandlerTime.h"
#include "../include/transaction.h"
#include <vector>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


374 File Documentation

14.5.1 Detailed Description

Implementation of the buffer class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.6 buffer.h File Reference 375

14.6 buffer.h File Reference


Declaration of the buffer class.
#include "../../base/include/baseObject.h"
#include "../../base/include/streamController.h"
#include "../../base/include/memory.h"
#include "charsetsList.h"

Classes
• class puntoexe::imebra::buffer
This class manages a memory (p. 328) area containing data (p. 139) in dicom format.

• class puntoexe::imebra::bufferException
This is the base class for the exceptions thrown by the buffer (p. 107) class.

• class puntoexe::imebra::bufferExceptionUnknownType
This exception is throw by the buffer (p. 107) when an handler for an unknown data
(p. 139) type is asked.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.6.1 Detailed Description

Declaration of the buffer class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


376 File Documentation

14.7 charsetConversion.cpp File Reference


Implementation of the charsetConversion class.
#include "../include/exception.h"
#include "../include/charsetConversion.h"
#include <memory>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.7.1 Detailed Description

Implementation of the charsetConversion class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.8 charsetConversion.h File Reference 377

14.8 charsetConversion.h File Reference


Declaration of the class used to convert a string between different charsets.
#include "configuration.h"
#include "baseObject.h"
#include <string>
#include <stdexcept>
#include <iconv.h>
#include <errno.h>

Classes
• class puntoexe::charsetConversionException
Base class for the exceptions thrown by charsetConversion.

• class puntoexe::charsetConversionExceptionNoTable
Exception thrown when the requested charset is not supported by the DICOM stan-
dard.

• class puntoexe::charsetConversionExceptionNoSupportedTable
Exception thrown when the requested charset is not supported by the system.

• class puntoexe::charsetConversionExceptionUtfSizeNotSupported
Exception thrown when the system doesn’t have a supported size for wchar_t.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.8.1 Detailed Description

Declaration of the class used to convert a string between different charsets.


The class hides the platform specific implementations and supplies a common interface
for the charsets translations.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


378 File Documentation

14.9 charsetsList.cpp File Reference


Implementation of the basic class for the classes that handles the charsets.
#include "../../base/include/exception.h"
#include "../include/charsetsList.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.9.1 Detailed Description

Implementation of the basic class for the classes that handles the charsets.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.10 charsetsList.h File Reference 379

14.10 charsetsList.h File Reference


Declaration of the the base class for the classes that need to be aware of the Dicom
charsets.
#include <stdexcept>
#include <string>
#include <list>

Classes
• class puntoexe::imebra::charsetsList::charsetsListException
This is the base class for the exceptions thrown by the class charsetsList.

• class puntoexe::imebra::charsetsList::charsetListExceptionDiffDefault
This exception is thrown when a conversion from an unicode string causes the dicom
dataSet (p. 155) to change its default charset.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

Typedefs
• typedef std::list< std::wstring > puntoexe::imebra::charsetsList::tCharsetsList

Defines a list of widechar strings.

14.10.1 Detailed Description

Declaration of the the base class for the classes that need to be aware of the Dicom
charsets.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


380 File Documentation

14.11 codec.cpp File Reference


Implementation of the base class for the codecs.
#include "../../base/include/exception.h"
#include "../../base/include/streamReader.h"
#include "../../base/include/streamWriter.h"
#include "../include/codec.h"
#include "../include/dataSet.h"
#include "../include/codecFactory.h"
#include <string.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::codecs
This namespace is used to define the classes that implement a codec (p. 117) and their
helper classes.

14.11.1 Detailed Description

Implementation of the base class for the codecs.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.12 codec.h File Reference 381

14.12 codec.h File Reference


Declaration of the base class used by the codecs.
#include <stdexcept>
#include "../../base/include/baseObject.h"
#include "../../base/include/memory.h"

Classes
• class puntoexe::imebra::codecs::codec
This is the base class for all the imebra (p. 71) codecs (p. 75).

• class puntoexe::imebra::codecs::codecException
This is the base class for the exceptions thrown by the codec (p. 117) derived classes.

• class puntoexe::imebra::codecs::codecExceptionWrongFormat
This exception is thrown when the file being parsed is not valid for the codec (p. 117).

• class puntoexe::imebra::codecs::codecExceptionCorruptedFile
This exception is thrown when the file being parsed is corrupted.

• class puntoexe::imebra::codecs::codecExceptionWrongTransferSyntax
This exception is thrown when the transfer syntax is not recognized by the codec
(p. 117).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::codecs
This namespace is used to define the classes that implement a codec (p. 117) and their
helper classes.

14.12.1 Detailed Description

Declaration of the base class used by the codecs.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


382 File Documentation

14.13 codecFactory.cpp File Reference


Implementation of the codecFactory class.
#include "../include/codecFactory.h"
#include "../../base/include/exception.h"
#include "../../base/include/streamReader.h"
#include "../include/codec.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::codecs
This namespace is used to define the classes that implement a codec (p. 117) and their
helper classes.

14.13.1 Detailed Description

Implementation of the codecFactory class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.14 codecFactory.h File Reference 383

14.14 codecFactory.h File Reference


Declaration of the class used to retrieve the codec able to handle the requested transfer
syntax.
#include "../../base/include/baseObject.h"
#include "dataSet.h"
#include <list>

Classes
• class puntoexe::imebra::codecs::codecFactory
This class maintains a list of the available codecs (p. 75).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::codecs
This namespace is used to define the classes that implement a codec (p. 117) and their
helper classes.

14.14.1 Detailed Description

Declaration of the class used to retrieve the codec able to handle the requested transfer
syntax.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


384 File Documentation

14.15 colorTransform.cpp File Reference


Implementation of the base class for the color transforms.
#include "../../base/include/exception.h"
#include "../include/colorTransform.h"
#include "../include/colorTransformsFactory.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.15.1 Detailed Description

Implementation of the base class for the color transforms.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.16 colorTransform.h File Reference 385

14.16 colorTransform.h File Reference


Declaration of the base class used by all the color transforms.
#include "transform.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::colorTransform
This is the base class used by the color transforms (p. 79) classes.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.16.1 Detailed Description

Declaration of the base class used by all the color transforms.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


386 File Documentation

14.17 colorTransformsFactory.cpp File Reference


Implementation of the colorTransformsFactory class.
#include "../../base/include/exception.h"
#include "../include/colorTransformsFactory.h"
#include "../include/transformsChain.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.17.1 Detailed Description

Implementation of the colorTransformsFactory class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.18 colorTransformsFactory.h File Reference 387

14.18 colorTransformsFactory.h File Reference

Declaration of the class used to retrieve a color transform able to handle the requested
color spaces.
#include <list>
#include "colorTransform.h"

Classes

• class puntoexe::imebra::transforms::colorTransforms::colorTransformsFactory

This class maintains a list of all the available colorTransform (p. 251) classes and
retrieve the most appropriate transform (p. 285) class (or classes) when a color space
conversion is needed.

• class puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryException

This is the base class for the exceptions thrown by colorTransformsFactory (p. 253).

• class puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryExceptionNoTransform

This exception is thrown by the function colorTransformsFactory::getTransform()


(p. 255) when it cannot find any transform (p. 285) that can convert the specified
color spaces.

Namespaces

• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


388 File Documentation

14.18.1 Detailed Description

Declaration of the class used to retrieve a color transform able to handle the requested
color spaces.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.19 configuration.h File Reference 389

14.19 configuration.h File Reference


Declaration of the basic data types and of the platform flags (Posix or Windows).

Typedefs
• typedef unsigned char imbxUint8
This type represents an 1 byte unsigned integer.

• typedef unsigned short imbxUint16


This type represents a 2 bytes unsigned integer.

• typedef unsigned int imbxUint32


This type represents a 4 bytes unsigned integer.

• typedef signed char imbxInt8


This type represents an 1 byte signed integer.

• typedef signed short imbxInt16


This type represents a 2 bytes signed integer.

• typedef signed int imbxInt32


This type represents a 4 bytes signed integer.

14.19.1 Detailed Description

Declaration of the basic data types and of the platform flags (Posix or Windows).

14.19.2 Typedef Documentation

14.19.2.1 typedef signed short imbxInt16

This type represents a 2 bytes signed integer.

14.19.2.2 typedef signed int imbxInt32

This type represents a 4 bytes signed integer.

14.19.2.3 typedef signed char imbxInt8

This type represents an 1 byte signed integer.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


390 File Documentation

14.19.2.4 typedef unsigned short imbxUint16

This type represents a 2 bytes unsigned integer.

Examples:

dicomdirItems/dicomdirItems.cpp.

14.19.2.5 typedef unsigned int imbxUint32

This type represents a 4 bytes unsigned integer.

Examples:

dicom2jpeg/dicom2jpeg.cpp.

14.19.2.6 typedef unsigned char imbxUint8

This type represents an 1 byte unsigned integer.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.20 criticalSection.cpp File Reference 391

14.20 criticalSection.cpp File Reference


Implementation of the critical sections.
#include "../include/criticalSection.h"
#include "../include/exception.h"
#include <map>
#include <memory>
#include <sched.h>
#include <errno.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.20.1 Detailed Description

Implementation of the critical sections.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


392 File Documentation

14.21 criticalSection.h File Reference


Declaration of the functions that handle the the mutexes.
#include "configuration.h"
#include <pthread.h>
#include <exception>
#include <stdexcept>
#include <list>
#include <typeinfo>

Classes
• class puntoexe::criticalSection
This class represents a critical section.

• class puntoexe::lockCriticalSection
This class locks a critical section in the constructor and unlocks it in the destructor.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.21.1 Detailed Description

Declaration of the functions that handle the the mutexes.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.22 data.cpp File Reference 393

14.22 data.cpp File Reference


Implementation of the data class.
#include "../../base/include/exception.h"
#include "../../base/include/streamReader.h"
#include "../../base/include/streamWriter.h"
#include "../include/data.h"
#include "../include/dataSet.h"
#include "../include/buffer.h"
#include "../include/dataHandler.h"
#include "../include/dataHandlerNumeric.h"
#include <iostream>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.22.1 Detailed Description

Implementation of the data class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


394 File Documentation

14.23 data.h File Reference


Declaration of class used to store a single tag.
#include "../../base/include/baseObject.h"
#include "charsetsList.h"
#include <map>
#include <vector>

Classes
• class puntoexe::imebra::data
Represents a single Dicom Tag.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.23.1 Detailed Description

Declaration of class used to store a single tag.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.24 dataCollection.h File Reference 395

14.24 dataCollection.h File Reference


Declaration of the base class used by the dataSet and the dataGroup classes.
#include "../../base/include/exception.h"
#include "data.h"
#include "charsetsList.h"
#include <map>
#include <string>

Classes
• class puntoexe::imebra::dataCollectionIterator< collectionType >
This class accesses to all the data stored in a dataCollection (p. 145) derived class
(dataGroup (p. 150) or dataSet (p. 155)).

• class puntoexe::imebra::dataCollection< collectionType >


This class stores a collection of Dicom tags or groups (classes pun-
toexe::imebra::data (p. 139) or puntoexe::imebra::dataGroup (p. 150)). It is used
as base class by dataGroup (p. 150) and dataSet (p. 155).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.24.1 Detailed Description

Declaration of the base class used by the dataSet and the dataGroup classes.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


396 File Documentation

14.25 dataGroup.cpp File Reference


Implementation of the dataGroup class.
#include "../../base/include/exception.h"
#include "../../base/include/streamReader.h"
#include "../../base/include/streamWriter.h"
#include "../include/dataSet.h"
#include "../include/dataGroup.h"
#include "../include/dataHandlerNumeric.h"
#include "../include/dicomDict.h"
#include <iostream>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.25.1 Detailed Description

Implementation of the dataGroup class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.26 dataGroup.h File Reference 397

14.26 dataGroup.h File Reference


Declaration of the class used to store a single dicom group.
#include "dataCollection.h"
#include "dataHandler.h"

Classes
• class puntoexe::imebra::dataGroup
Represents a Dicom group which stores a group of Dicom tags.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.26.1 Detailed Description

Declaration of the class used to store a single dicom group.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


398 File Documentation

14.27 dataHandler.cpp File Reference


Implementation of the base class for the data handlers.
#include "../../base/include/exception.h"
#include "../include/dataHandler.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.27.1 Detailed Description

Implementation of the base class for the data handlers.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.28 dataHandler.h File Reference 399

14.28 dataHandler.h File Reference


Declaration of the base class used by all the data handlers.
#include "../../base/include/baseObject.h"
#include "buffer.h"
#include "charsetsList.h"

Classes
• class puntoexe::imebra::handlers::dataHandler
This is the base class for all the imebra (p. 71) data (p. 139) handlers (p. 77).
A data (p. 139) handler allows to read/write the data (p. 139) stored in a pun-
toexe::imebra::buffer (p. 107) object without worrying about the data format.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.28.1 Detailed Description

Declaration of the base class used by all the data handlers.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


400 File Documentation

14.29 dataHandlerDate.cpp File Reference


Implementation of the dataHandlerDate class.
#include <sstream>
#include <iomanip>
#include "../../base/include/exception.h"
#include "../include/dataHandlerDate.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.29.1 Detailed Description

Implementation of the dataHandlerDate class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.30 dataHandlerDate.h File Reference 401

14.30 dataHandlerDate.h File Reference


Declaration of the data handler able to handle the dicom tags of type "DA" (date).
#include "dataHandlerDateTimeBase.h"

Classes
• class puntoexe::imebra::handlers::dataHandlerDate
This data handler is returned by the class buffer (p. 107) when the application wants
to deal with a dicom tag of type "DA" (date).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.30.1 Detailed Description

Declaration of the data handler able to handle the dicom tags of type "DA" (date).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


402 File Documentation

14.31 dataHandlerDateTime.cpp File Reference


Implementation of the dataHandlerDateTime class.
#include <sstream>
#include <iomanip>
#include <stdlib.h>
#include "../../base/include/exception.h"
#include "../include/dataHandlerDateTime.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.31.1 Detailed Description

Implementation of the dataHandlerDateTime class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.32 dataHandlerDateTime.h File Reference 403

14.32 dataHandlerDateTime.h File Reference


Declaration of the handler for the date and time.
#include "dataHandlerDateTimeBase.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.32.1 Detailed Description

Declaration of the handler for the date and time.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


404 File Documentation

14.33 dataHandlerDateTimeBase.cpp File Reference


Implementation of the base class for the date/time handlers.
#include "../../base/include/exception.h"
#include "../include/dataHandlerDateTimeBase.h"
#include <time.h>
#include <stdlib.h>
#include <sstream>
#include <iomanip>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.33.1 Detailed Description

Implementation of the base class for the date/time handlers.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.34 dataHandlerDateTimeBase.h File Reference 405

14.34 dataHandlerDateTimeBase.h File Reference


Declaration of the base class for the time/date handlers.
#include "dataHandlerString.h"

Classes
• class puntoexe::imebra::handlers::dataHandlerDateTimeBase
This class is used as base class by the handlers (p. 77) that manage the date and the
time.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.34.1 Detailed Description

Declaration of the base class for the time/date handlers.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


406 File Documentation

14.35 dataHandlerNumeric.h File Reference


Declaration of the handler for the numeric tags.
#include <sstream>
#include <iomanip>
#include "../../base/include/exception.h"
#include "dataHandler.h"

Classes
• class puntoexe::imebra::handlers::dataHandlerNumeric< dataHandler-
Type >
This data (p. 139) handler accesses to the numeric data (p. 139) stored in a pun-
toexe::imebra::buffer (p. 107) class.

• class puntoexe::imebra::handlers::dataHandlerRaw
A dataHandlerRaw (p. 216) always "sees" the data (p. 139) as a collection of bytes,
no matter what the Dicom data (p. 139) type is.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.35.1 Detailed Description

Declaration of the handler for the numeric tags.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.36 dataHandlerString.cpp File Reference 407

14.36 dataHandlerString.cpp File Reference


Implementation of the base class for the string handlers.
#include <sstream>
#include <iomanip>
#include "../../base/include/exception.h"
#include "../include/dataHandlerString.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.36.1 Detailed Description

Implementation of the base class for the string handlers.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


408 File Documentation

14.37 dataHandlerString.h File Reference


Declaration of the base class used by the string handlers.
#include "dataHandler.h"
#include <vector>
#include <string>

Classes
• class puntoexe::imebra::handlers::dataHandlerString
This is the base class for all the data (p. 139) handlers (p. 77) that manage strings.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.37.1 Detailed Description

Declaration of the base class used by the string handlers.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.38 dataHandlerStringAE.cpp File Reference 409

14.38 dataHandlerStringAE.cpp File Reference


Implementation of the class dataHandlerStringAE.
#include "../include/dataHandlerStringAE.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.38.1 Detailed Description

Implementation of the class dataHandlerStringAE.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


410 File Documentation

14.39 dataHandlerStringAE.h File Reference


Declaration of the class dataHandlerStringAE.
#include "dataHandlerString.h"
#include <map>
#include <string>

Classes
• class puntoexe::imebra::handlers::dataHandlerStringAE
Handles the Dicom data (p. 139) type "AE" (application entity.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.39.1 Detailed Description

Declaration of the class dataHandlerStringAE.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.40 dataHandlerStringAS.cpp File Reference 411

14.40 dataHandlerStringAS.cpp File Reference


Implementation of the class dataHandlerStringAS.
#include <sstream>
#include <iomanip>
#include "../../base/include/exception.h"
#include "../include/dataHandlerStringAS.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.40.1 Detailed Description

Implementation of the class dataHandlerStringAS.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


412 File Documentation

14.41 dataHandlerStringAS.h File Reference


Declaration of the class dataHandlerStringAS.
#include "dataHandlerString.h"

Classes
• class puntoexe::imebra::handlers::dataHandlerStringAS
Handles the Dicom data (p. 139) type "AS" (age string).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.41.1 Detailed Description

Declaration of the class dataHandlerStringAS.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.42 dataHandlerStringCS.cpp File Reference 413

14.42 dataHandlerStringCS.cpp File Reference


Implementation of the class dataHandlerStringCS.
#include "../include/dataHandlerStringCS.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.42.1 Detailed Description

Implementation of the class dataHandlerStringCS.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


414 File Documentation

14.43 dataHandlerStringCS.h File Reference


Declaration of the class dataHandlerStringCS.
#include "dataHandlerString.h"

Classes
• class puntoexe::imebra::handlers::dataHandlerStringCS
Handles the Dicom data (p. 139) type "CS" (code string).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.43.1 Detailed Description

Declaration of the class dataHandlerStringCS.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.44 dataHandlerStringDS.cpp File Reference 415

14.44 dataHandlerStringDS.cpp File Reference


Implementation of the class dataHandlerStringDS.
#include <sstream>
#include <iomanip>
#include "../../base/include/exception.h"
#include "../include/dataHandlerStringDS.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.44.1 Detailed Description

Implementation of the class dataHandlerStringDS.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


416 File Documentation

14.45 dataHandlerStringDS.h File Reference


Declaration of the class dataHandlerStringDS.
#include "dataHandlerString.h"

Classes
• class puntoexe::imebra::handlers::dataHandlerStringDS
Handles the Dicom type "DS" (decimal string).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.45.1 Detailed Description

Declaration of the class dataHandlerStringDS.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.46 dataHandlerStringIS.cpp File Reference 417

14.46 dataHandlerStringIS.cpp File Reference


Implementation of the class dataHandlerStringIS.
#include "../../base/include/exception.h"
#include "../include/dataHandlerStringIS.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.46.1 Detailed Description

Implementation of the class dataHandlerStringIS.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


418 File Documentation

14.47 dataHandlerStringIS.h File Reference


Declaration of the class dataHandlerStringIS.
#include "dataHandlerString.h"

Classes
• class puntoexe::imebra::handlers::dataHandlerStringIS
Handles the Dicom type "IS" (integer string).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.47.1 Detailed Description

Declaration of the class dataHandlerStringIS.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.48 dataHandlerStringLO.cpp File Reference 419

14.48 dataHandlerStringLO.cpp File Reference


Implementation of the class dataHandlerStringLO.
#include "../include/dataHandlerStringLO.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.48.1 Detailed Description

Implementation of the class dataHandlerStringLO.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


420 File Documentation

14.49 dataHandlerStringLO.h File Reference


Declaration of the class dataHandlerStringLO.
#include "dataHandlerStringUnicode.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.49.1 Detailed Description

Declaration of the class dataHandlerStringLO.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.50 dataHandlerStringLT.cpp File Reference 421

14.50 dataHandlerStringLT.cpp File Reference


Implementation of the class dataHandlerStringLT.
#include "../include/dataHandlerStringLT.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.50.1 Detailed Description

Implementation of the class dataHandlerStringLT.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


422 File Documentation

14.51 dataHandlerStringLT.h File Reference


Declaration of the class dataHandlerStringLT.
#include "dataHandlerStringUnicode.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.51.1 Detailed Description

Declaration of the class dataHandlerStringLT.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.52 dataHandlerStringPN.cpp File Reference 423

14.52 dataHandlerStringPN.cpp File Reference


Implementation of the class dataHandlerStringPN.
#include "../include/dataHandlerStringPN.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.52.1 Detailed Description

Implementation of the class dataHandlerStringPN.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


424 File Documentation

14.53 dataHandlerStringPN.h File Reference


Declaration of the class dataHandlerStringPN.
#include "dataHandlerStringUnicode.h"

Classes
• class puntoexe::imebra::handlers::dataHandlerStringPN
Handles the Dicom type "PN" (person name).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.53.1 Detailed Description

Declaration of the class dataHandlerStringPN.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.54 dataHandlerStringSH.cpp File Reference 425

14.54 dataHandlerStringSH.cpp File Reference


Implementation of the class dataHandlerStringSH.
#include "../include/dataHandlerStringSH.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.54.1 Detailed Description

Implementation of the class dataHandlerStringSH.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


426 File Documentation

14.55 dataHandlerStringSH.h File Reference


Declaration of the class dataHandlerStringSH.
#include "dataHandlerStringUnicode.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.55.1 Detailed Description

Declaration of the class dataHandlerStringSH.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.56 dataHandlerStringST.cpp File Reference 427

14.56 dataHandlerStringST.cpp File Reference


Implementation of the class dataHandlerStringST.
#include "../include/dataHandlerStringST.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.56.1 Detailed Description

Implementation of the class dataHandlerStringST.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


428 File Documentation

14.57 dataHandlerStringST.h File Reference


Declaration of the class dataHandlerStringST.
#include "dataHandlerStringUnicode.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.57.1 Detailed Description

Declaration of the class dataHandlerStringST.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.58 dataHandlerStringUI.cpp File Reference 429

14.58 dataHandlerStringUI.cpp File Reference


Implementation of the class dataHandlerStringUI.
#include "../include/dataHandlerStringUI.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.58.1 Detailed Description

Implementation of the class dataHandlerStringUI.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


430 File Documentation

14.59 dataHandlerStringUI.h File Reference


Declaration of the class dataHandlerStringUI.
#include "dataHandlerString.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.59.1 Detailed Description

Declaration of the class dataHandlerStringUI.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.60 dataHandlerStringUnicode.cpp File Reference 431

14.60 dataHandlerStringUnicode.cpp File Reference


Implementation of the base class used by the string handlers that need to handle several
charsets.
#include "../../base/include/exception.h"
#include "../include/dataHandlerStringUnicode.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.60.1 Detailed Description

Implementation of the base class used by the string handlers that need to handle several
charsets.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


432 File Documentation

14.61 dataHandlerStringUnicode.h File Reference


Declaration of the base class used by the string handlers that need to work with different
charsets.
#include "../../base/include/charsetConversion.h"
#include "dataHandlerString.h"
#include "charsetsList.h"

Classes
• class puntoexe::imebra::handlers::dataHandlerStringUnicode
This is the base class for all the data (p. 139) handlers (p. 77) that manage strings
that need to be converted from different unicode charsets.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.61.1 Detailed Description

Declaration of the base class used by the string handlers that need to work with different
charsets.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.62 dataHandlerStringUT.cpp File Reference 433

14.62 dataHandlerStringUT.cpp File Reference


Implementation of the class dataHandlerStringUT.
#include "../include/dataHandlerStringUT.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.62.1 Detailed Description

Implementation of the class dataHandlerStringUT.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


434 File Documentation

14.63 dataHandlerStringUT.h File Reference


Declaration of the class dataHandlerStringUT.
#include "dataHandlerStringUnicode.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.63.1 Detailed Description

Declaration of the class dataHandlerStringUT.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.64 dataHandlerTime.cpp File Reference 435

14.64 dataHandlerTime.cpp File Reference


Implementation of the class dataHandlerTime.
#include <sstream>
#include <iomanip>
#include <stdlib.h>
#include "../../base/include/exception.h"
#include "../include/dataHandlerTime.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.64.1 Detailed Description

Implementation of the class dataHandlerTime.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


436 File Documentation

14.65 dataHandlerTime.h File Reference


Declaration of the class dataHandlerTime.
#include "dataHandlerDateTimeBase.h"

Classes
• class puntoexe::imebra::handlers::dataHandlerTime
This data handler is returned by the class buffer (p. 107) when the application wants
to deal with a dicom tag of type "TM" (time).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.65.1 Detailed Description

Declaration of the class dataHandlerTime.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.66 dataSet.cpp File Reference 437

14.66 dataSet.cpp File Reference


Implementation of the class dataSet.
#include "../../base/include/exception.h"
#include "../../base/include/streamReader.h"
#include "../../base/include/streamWriter.h"
#include "../../base/include/memoryStream.h"
#include "../include/dataSet.h"
#include "../include/dataGroup.h"
#include "../include/dataHandlerNumeric.h"
#include "../include/dicomDict.h"
#include "../include/codecFactory.h"
#include "../include/codec.h"
#include "../include/image.h"
#include "../include/LUT.h"
#include "../include/waveform.h"
#include "../include/colorTransformsFactory.h"
#include "../include/transformsChain.h"
#include "../include/transformHighBit.h"
#include "../include/transaction.h"
#include <iostream>
#include <string.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.66.1 Detailed Description

Implementation of the class dataSet.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


438 File Documentation

14.67 dataSet.h File Reference


Declaration of the class dataSet.
#include "dataCollection.h"
#include "dataGroup.h"
#include "../../base/include/exception.h"
#include "codec.h"
#include <vector>

Classes
• class puntoexe::imebra::dataSet
A data (p. 139) set is a collection of groups of tags (see dataGroup (p. 150)).

• class puntoexe::imebra::dataSetException
This is the base class for the exceptions thrown by the dataSet (p. 155).

• class puntoexe::imebra::dataSetExceptionDifferentFormat
This exception is thrown when the application is trying to store an image (p. 232) in
the dataSet (p. 155) but the dataSet (p. 155) already stores other images that have
different attributes.

• class puntoexe::imebra::dataSetExceptionUnknownTransferSyntax
This exception is thrown when an unknown transfer syntax is being used while reading
or writing a stream (p. 340).

• class puntoexe::imebra::dataSetExceptionWrongFrame
This exception is thrown when the application is storing several images in the dataSet
(p. 155) but doesn’t store them in the right order.

• class puntoexe::imebra::dataSetExceptionOldFormat
This exception is thrown when the application is trying to store an image (p. 232) in
an old Dicom format.

• class puntoexe::imebra::dataSetImageDoesntExist
This exception is thrown when the an image (p. 232) that doesn’t exist is requested.

• class puntoexe::imebra::dataSetCorruptedOffsetTable
This exception is thrown when the basic offset table is corrupted.

Namespaces
• namespace puntoexe

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.67 dataSet.h File Reference 439

The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.67.1 Detailed Description

Declaration of the class dataSet.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


440 File Documentation

14.68 dicomCodec.cpp File Reference


Implementation of the class dicomCodec.
#include <list>
#include <vector>
#include <string.h>
#include "../../base/include/exception.h"
#include "../../base/include/streamReader.h"
#include "../../base/include/streamWriter.h"
#include "../../base/include/memory.h"
#include "../include/dicomCodec.h"
#include "../include/dataSet.h"
#include "../include/dicomDict.h"
#include "../include/image.h"
#include "../include/colorTransformsFactory.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::codecs
This namespace is used to define the classes that implement a codec (p. 117) and their
helper classes.

14.68.1 Detailed Description

Implementation of the class dicomCodec.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.69 dicomCodec.h File Reference 441

14.69 dicomCodec.h File Reference


Declaration of the class dicomCodec.
#include "codec.h"
#include "data.h"
#include "dataGroup.h"
#include "dataSet.h"

Classes

• class puntoexe::imebra::codecs::dicomCodec
The Dicom codec (p. 117).

• class puntoexe::imebra::codecs::dicomCodecException
This is the base class for the exceptions thrown by the dicom codec (p. 117) (dicom-
Codec (p. 131)).

• class puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached

This exception is thrown when dicomCodec::parseStream (p. 132) reaches the maxi-
mum depth for embedded datasets.

Namespaces

• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::codecs
This namespace is used to define the classes that implement a codec (p. 117) and their
helper classes.

Defines

• #define IMEBRA_DATASET_MAX_DEPTH 16
Max number of datasets embedded into each others.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


442 File Documentation

14.69.1 Detailed Description

Declaration of the class dicomCodec.

14.69.2 Define Documentation

14.69.2.1 #define IMEBRA_DATASET_MAX_DEPTH 16

Max number of datasets embedded into each others.


This value is used to prevent a stack when reading a malformed dataset that has too
many datasets embedded into each others.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.70 dicomDict.cpp File Reference 443

14.70 dicomDict.cpp File Reference


Implementation of the class dicomDict.
#include "../../base/include/exception.h"
#include "../include/dicomDict.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.70.1 Detailed Description

Implementation of the class dicomDict.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


444 File Documentation

14.71 dicomDict.h File Reference


Declaration of the class dicomDict.
#include "../../base/include/baseObject.h"
#include <map>

Classes
• class puntoexe::imebra::dicomDictionary
The Dicom Dictionary.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.71.1 Detailed Description

Declaration of the class dicomDict.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.72 dicomDir.cpp File Reference 445

14.72 dicomDir.cpp File Reference


Implementation of the classes dicomDir and directoryRecord.
#include "../include/dicomDir.h"
#include "../include/dataSet.h"
#include "../include/dicomCodec.h"
#include "../include/dataHandlerNumeric.h"
#include "../../base/include/nullStream.h"
#include "../../base/include/streamWriter.h"
#include <map>
#include <string>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.72.1 Detailed Description

Implementation of the classes dicomDir and directoryRecord.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


446 File Documentation

14.73 dicomDir.h File Reference

Declaration of the classes that parse/create a DICOMDIR structure (dicomDir and di-
rectoryRecord).
#include "../../base/include/baseObject.h"
#include <string>

Classes

• class puntoexe::imebra::directoryRecord
directoryRecord (p. 190) represents a single record in a DICOMDIR structure (see
dicomDir (p. 183)).

• class puntoexe::imebra::dicomDir
A dicomDir (p. 183) object contains the information about the tree structure of a
DICOMDIR dataset.

• class puntoexe::imebra::dicomDirException
Base class from which the exceptions thrown by directoryRecord (p. 190) and di-
comDir (p. 183) derive.

• class puntoexe::imebra::dicomDirCircularReferenceException
This exception is thrown when a call to dicomDir::setFirstRootRecord()
(p. 185) or directoryRecord::setNextRecord() (p. 193) or di-
rectoryRecord::setFirstChildRecord() (p. 193) or directo-
ryRecord::setReferencedRecord() (p. 193) causes a circular reference between
directoryRecord (p. 190) objects.

• class puntoexe::imebra::dicomDirUnknownDirectoryRecordType
Exception thrown when an unknown record type is detected in directo-
ryRecord::getType() (p. 193), directoryRecord::getTypeString() (p. 193), directo-
ryRecord::setType() (p. 194) or directoryRecord::setTypeString() (p. 194).

Namespaces

• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.73 dicomDir.h File Reference 447

14.73.1 Detailed Description

Declaration of the classes that parse/create a DICOMDIR structure (dicomDir and di-
rectoryRecord).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


448 File Documentation

14.74 drawBitmap.cpp File Reference


Implementation of the transform drawBitmap.
#include "../include/drawBitmap.h"
#include "../include/image.h"
#include "../include/colorTransformsFactory.h"
#include "../include/transformHighBit.h"
#include <string.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.74.1 Detailed Description

Implementation of the transform drawBitmap.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.75 drawBitmap.h File Reference 449

14.75 drawBitmap.h File Reference


Declaration of the a class that draw an image into a bitmap.
#include "transform.h"
#include "../../base/include/memory.h"
#include <memory>

Classes
• class puntoexe::imebra::transforms::drawBitmap
This transform (p. 285) takes an image (p. 232) as an input and returns an 8 bit RGB
bitmap of the requested image’s area; the image’s area is expanded or reduced to fit
into the destination bitmap’s size.

• class puntoexe::imebra::transforms::drawBitmapException
Base class used for the exceptions thrown by drawBitmap (p. 275).

• class puntoexe::imebra::transforms::drawBitmapExceptionDataSetNotDeclared

This exception is thrown by declareInputImage() if the dataSet (p. 155) hasn’t been
declared yet.

• class puntoexe::imebra::transforms::drawBitmapExceptionImageNotDeclared

This exception is thrown by doTransform() if the image (p. 232) hasn’t been declared
yet.

• class puntoexe::imebra::transforms::drawBitmapExceptionInvalidArea
This exception is thrown by declareBitmapType() if the image’s area that has to be
generated is not valid.

• class puntoexe::imebra::transforms::drawBitmapExceptionInvalidAlignByte

This exception is thrown by declareBitmapType() if the align byte is illegal (1, 2 and
4 are the typical values).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


450 File Documentation

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.75.1 Detailed Description

Declaration of the a class that draw an image into a bitmap.


This file is not included automatically by imebra.h (p. 461)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.76 exception.cpp File Reference 451

14.76 exception.cpp File Reference


Implementation of the exception classes.
#include "../include/exception.h"
#include "../include/charsetConversion.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.76.1 Detailed Description

Implementation of the exception classes.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


452 File Documentation

14.77 exception.h File Reference


Defines the classes and the macros used to handle the exceptions in the library.
#include "configuration.h"
#include "thread.h"
#include "baseObject.h"
#include <typeinfo>
#include <exception>
#include <stdexcept>
#include <map>
#include <list>
#include <string>
#include <sstream>

Classes
• class puntoexe::exceptionInfo
This class is used to store the information related to the points where the exceptions
are being caught&thrown.

• class puntoexe::exceptionsManager
One statically allocated instance of this class logs the stack positions while an excep-
tion is being processed.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

Defines
• #define PUNTOEXE_FUNCTION_START(functionName)
Initialize a try block. The try block must be matched by a call to the PUNTOEXE_-
FUNCTION_END() (p. 453) macro.

• #define PUNTOEXE_FUNCTION_END()
Insert a catch block that rethrows the catched exception and log the function’s name
and the position in the source file in which the exception has been catched and
rethrown.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.77 exception.h File Reference 453

• #define PUNTOEXE_THROW(exceptionType, what)


Throw an exception of the specified type and log the function’s name and the position
in the file on which the exception has been thrown.

• #define PUNTOEXE_RETHROW(what)
Rethrow an exception caught by a catch block and add some descriptions to it.

14.77.1 Detailed Description

Defines the classes and the macros used to handle the exceptions in the library.

14.77.2 Define Documentation

14.77.2.1 #define PUNTOEXE_FUNCTION_END()

Value:

}\
catch(std::exception& e)\
{\
puntoexe::exceptionInfo info(_puntoexe_function_name, __FILE__, _
_LINE__, typeid(e).name(), e.what());\
puntoexe::exceptionsManager::addExceptionInfo(info);\
throw;\
}\
catch(...)\
{\
puntoexe::exceptionInfo info(_puntoexe_function_name, __FILE__, _
_LINE__, "unknown", "");\
puntoexe::exceptionsManager::addExceptionInfo(info);\
throw;\
}

Insert a catch block that rethrows the catched exception and log the function’s name and
the position in the source file in which the exception has been catched and rethrown.
This function must be placed at the end of a function if the PUNTOEXE_-
FUNCTION_START() (p. 453) has been used in the function.

14.77.2.2 #define PUNTOEXE_FUNCTION_START(functionName)

Value:

static const wchar_t* _puntoexe_function_name = functionName;\


try{

Initialize a try block. The try block must be matched by a call to the PUNTOEXE_-
FUNCTION_END() (p. 453) macro.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


454 File Documentation

This macro should be placed at the very beginning of a function.


All the exceptions not catched by the body of the function are catched by
PUNTOEXE_FUNCTION_END() (p. 453) and rethrown, but before being rethrown
the function’s name and the line number in the source file are logged. All the positions
of the PUNTOEXE_FUNCTION_END() (p. 453) that catch the same exception are
logged togheter.
Exceptions thrown inside the function should be thrown by PUNTOEXE_THROW()
(p. 454), but this is not necessary.

Parameters:
functionName the name of the function in which the macro is placed.

14.77.2.3 #define PUNTOEXE_RETHROW(what)

Value:

{\
puntoexe::exceptionInfo info(_puntoexe_function_name, __FILE__, _
_LINE__, "rethrowing", what);\
puntoexe::exceptionsManager::addExceptionInfo(info);\
throw;\
}

Rethrow an exception caught by a catch block and add some descriptions to it.
This macro can be used only in the functions or blocks that use the macros
PUNTOEXE_FUNCTION_START() (p. 453) and PUNTOEXE_FUNCTION_-
END() (p. 453).

Parameters:
what a message to be associated with the exception

14.77.2.4 #define PUNTOEXE_THROW(exceptionType, what)

Value:

{\
exceptionType e(what);\
puntoexe::exceptionInfo info(_puntoexe_function_name, __FILE__, _
_LINE__, typeid(e).name(), what);\
puntoexe::exceptionsManager::addExceptionInfo(info);\
throw e;\
}

Throw an exception of the specified type and log the function’s name and the position
in the file on which the exception has been thrown.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.77 exception.h File Reference 455

This macro can be used only in the functions or blocks that use the macros
PUNTOEXE_FUNCTION_START() (p. 453) and PUNTOEXE_FUNCTION_-
END() (p. 453).

Parameters:
exceptionType the type of exception to throw
what a message to be associated with the exception

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


456 File Documentation

14.78 huffmanTable.cpp File Reference


Implementation of the huffman codec.
#include "../include/exception.h"
#include "../include/huffmanTable.h"
#include "../include/streamReader.h"
#include "../include/streamWriter.h"
#include <list>
#include <string.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.78.1 Detailed Description

Implementation of the huffman codec.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.79 huffmanTable.h File Reference 457

14.79 huffmanTable.h File Reference


Declaration of the huffman codec.
#include "baseObject.h"
#include <vector>
#include <map>

Classes
• class puntoexe::huffmanTable
This class calculates the huffman table from a set of values and their frequency, and
can read or write huffman codes from/to a baseStream (p. 89) object.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.79.1 Detailed Description

Declaration of the huffman codec.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


458 File Documentation

14.80 image.cpp File Reference


Implementation of the class image.
#include "../../base/include/exception.h"
#include "../include/image.h"
#include "../include/colorTransformsFactory.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.80.1 Detailed Description

Implementation of the class image.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.81 image.h File Reference 459

14.81 image.h File Reference


Declaration of the class image.
#include "../../base/include/baseObject.h"
#include "dataHandlerNumeric.h"

Classes
• class puntoexe::imebra::image
Represents a single image (p. 232) of a dicom data (p. 139) set.

• class puntoexe::imebra::imageException
This is the base class for the exceptions thrown by the image (p. 232) class.

• class puntoexe::imebra::imageExceptionUnknownDepth
This exception is thrown when an unknown depth is specified as a parameter.

• class puntoexe::imebra::imageExceptionUnknownColorSpace
This exception is thrown when an unknown color space is specified in the function
create().

• class puntoexe::imebra::imageExceptionInvalidSize
This exception is thrown when an invalid size in pixels is specified in the function
create().

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

Typedefs
• typedef dataHandlerNumeric< imbxInt32 > pun-
toexe::imebra::handlers::imageHandler
Represents an handler specialized to work with the image (p. 232) data (p. 139).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


460 File Documentation

14.81.1 Detailed Description

Declaration of the class image.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.82 imebra.h File Reference 461

14.82 imebra.h File Reference

Includes all the headers needed to build an application that uses imebra.
#include "buffer.h"
#include "codec.h"
#include "codecFactory.h"
#include "colorTransform.h"
#include "colorTransformsFactory.h"
#include "data.h"
#include "dataGroup.h"
#include "dataHandlerDate.h"
#include "dataHandlerDateTime.h"
#include "dataHandlerNumeric.h"
#include "dataHandlerStringAE.h"
#include "dataHandlerStringAS.h"
#include "dataHandlerStringCS.h"
#include "dataHandlerStringDS.h"
#include "dataHandlerStringIS.h"
#include "dataHandlerStringLO.h"
#include "dataHandlerStringLT.h"
#include "dataHandlerStringPN.h"
#include "dataHandlerStringSH.h"
#include "dataHandlerStringST.h"
#include "dataHandlerStringUI.h"
#include "dataHandlerStringUT.h"
#include "dataHandlerTime.h"
#include "dataSet.h"
#include "dicomCodec.h"
#include "dicomDir.h"
#include "dicomDict.h"
#include "image.h"
#include "waveform.h"
#include "jpegCodec.h"
#include "LUT.h"

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


462 File Documentation

#include "modalityVOILUT.h"
#include "MONOCHROME1ToMONOCHROME2.h"
#include "MONOCHROME1ToRGB.h"
#include "MONOCHROME2ToRGB.h"
#include "MONOCHROME2ToYBRFULL.h"
#include "PALETTECOLORToRGB.h"
#include "RGBToMONOCHROME2.h"
#include "RGBToPALETTECOLOR.h"
#include "RGBToYBRFULL.h"
#include "RGBToYBRPARTIAL.h"
#include "transform.h"
#include "transformBuffers.h"
#include "transformHighBit.h"
#include "transformsChain.h"
#include "VOILUT.h"
#include "YBRFULLToMONOCHROME2.h"
#include "YBRFULLToRGB.h"
#include "YBRPARTIALToRGB.h"
#include "transaction.h"
#include "drawBitmap.h"
#include "../../base/include/baseObject.h"
#include "../../base/include/baseStream.h"
#include "../../base/include/configuration.h"
#include "../../base/include/exception.h"
#include "../../base/include/huffmanTable.h"
#include "../../base/include/memory.h"
#include "../../base/include/memoryStream.h"
#include "../../base/include/stream.h"
#include "../../base/include/nullStream.h"
#include "../../base/include/streamReader.h"
#include "../../base/include/streamWriter.h"
#include "../../base/include/charsetConversion.h"
#include "../../base/include/thread.h"
#include "../../base/include/criticalSection.h"

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.82 imebra.h File Reference 463

14.82.1 Detailed Description

Includes all the headers needed to build an application that uses imebra.
Please note that the file doesn’t include the file viewHelper.h (p. 517).

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


464 File Documentation

14.83 jpegCodec.cpp File Reference


Implementation of the class jpegCodec.
#include "../../base/include/exception.h"
#include "../../base/include/streamReader.h"
#include "../../base/include/streamWriter.h"
#include "../../base/include/huffmanTable.h"
#include "../include/jpegCodec.h"
#include "../include/dataSet.h"
#include "../include/image.h"
#include <vector>
#include <stdlib.h>
#include <string.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::codecs
This namespace is used to define the classes that implement a codec (p. 117) and their
helper classes.

14.83.1 Detailed Description

Implementation of the class jpegCodec.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.84 jpegCodec.h File Reference 465

14.84 jpegCodec.h File Reference


Declaration of the class jpegCodec.
#include "codec.h"
#include <map>
#include <list>

Classes
• class puntoexe::imebra::codecs::jpegCodec
The Jpeg codec (p. 117).

• class puntoexe::imebra::codecs::jpegCodecException
Base class for the exceptions thrown by the jpeg codec (p. 117).

• class puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax
Exception thrown when the jpeg variant cannot be handled.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::codecs
This namespace is used to define the classes that implement a codec (p. 117) and their
helper classes.

14.84.1 Detailed Description

Declaration of the class jpegCodec.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


466 File Documentation

14.85 LUT.cpp File Reference


Implementation of the class lut.
#include "../../base/include/exception.h"
#include "../include/LUT.h"
#include "../include/dataHandler.h"
#include <string.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.85.1 Detailed Description

Implementation of the class lut.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.86 LUT.h File Reference 467

14.86 LUT.h File Reference


Declaration of the class lut.
#include <map>
#include "../../base/include/baseObject.h"

Classes
• class puntoexe::imebra::lut
Represents a Lookup table (LUT).

• class puntoexe::imebra::lutException
This is the base class for the exceptions thrown by the lut (p. 241) class.

• class puntoexe::imebra::lutExceptionWrongIndex
This exception is thrown by the lut (p. 241) class when the wrong index or id is speci-
fied as a parameter.

• class puntoexe::imebra::lutExceptionCorrupted
This exception is thrown by the lut (p. 241) class when the the LUT information is
corrupted.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.86.1 Detailed Description

Declaration of the class lut.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


468 File Documentation

14.87 memory.cpp File Reference


Implementation of the memory manager and the memory class.
#include "../include/memory.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.87.1 Detailed Description

Implementation of the memory manager and the memory class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.88 memory.h File Reference 469

14.88 memory.h File Reference


Declaration of the memory manager and the memory class.
#include "baseObject.h"
#include "criticalSection.h"
#include <list>
#include <map>
#include <memory>

Classes
• class puntoexe::memory
This class is used to supply a reference counter to a string of bytes.

• class puntoexe::memoryPool
Stores unused memory (p. 328) objects (see puntoexe::memory (p. 328)) so they can
be reused when needed.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.88.1 Detailed Description

Declaration of the memory manager and the memory class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


470 File Documentation

14.89 memoryStream.cpp File Reference


Implementation of the memoryStream class.
#include "../include/exception.h"
#include "../include/memoryStream.h"
#include <string.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.89.1 Detailed Description

Implementation of the memoryStream class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.90 memoryStream.h File Reference 471

14.90 memoryStream.h File Reference


Declaration of the memoryStream class.
#include "baseStream.h"
#include "memory.h"

Classes
• class puntoexe::memoryStream
This class derives from the baseStream (p. 89) class and implements a memory
(p. 328) stream (p. 340).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.90.1 Detailed Description

Declaration of the memoryStream class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


472 File Documentation

14.91 modalityVOILUT.cpp File Reference


Implementation of the class modalityVOILUT.
#include "../../base/include/exception.h"
#include "../include/modalityVOILUT.h"
#include "../include/dataSet.h"
#include "../include/LUT.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.91.1 Detailed Description

Implementation of the class modalityVOILUT.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.92 modalityVOILUT.h File Reference 473

14.92 modalityVOILUT.h File Reference


Declaration of the class modalityVOILUT.
#include "transformBuffers.h"
#include "image.h"

Classes
• class puntoexe::imebra::transforms::modalityVOILUT
This class transforms (p. 79) the pixel values of the image (p. 232) retrieved from the
dataset into values that are meaningful to th application.

• class puntoexe::imebra::transforms::modalityVOILUTInverse
Executes the inverse modality VOI/LUT transformation (see modalityVOILUT
(p. 283)).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.92.1 Detailed Description

Declaration of the class modalityVOILUT.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


474 File Documentation

14.93 MONOCHROME1ToMONOCHROME2.cpp
File Reference
Implementation of the classes for conversion between 2 monochrome color spaces.
#include "../../base/include/exception.h"
#include "../include/MONOCHROME1ToMONOCHROME2.h"
#include "../include/dataHandler.h"
#include "../include/dataSet.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.93.1 Detailed Description

Implementation of the classes for conversion between 2 monochrome color spaces.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.94 MONOCHROME1ToMONOCHROME2.h File Reference 475

14.94 MONOCHROME1ToMONOCHROME2.h File


Reference
Declaration of the class MONOCHROME1ToMONOCHROME2.
#include "colorTransform.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToMONOCHROME2

Transforms an image (p. 232) from the colorspace MONOCHROME1 into the color
space MONOCHROME2.

• class puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToMONOCHROME1

Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space MONOCHROME1.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.94.1 Detailed Description

Declaration of the class MONOCHROME1ToMONOCHROME2.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


476 File Documentation

14.95 MONOCHROME1ToRGB.cpp File Reference


Implementation of the class MONOCHROME1ToRGB.
#include "../../base/include/exception.h"
#include "../include/MONOCHROME1ToRGB.h"
#include "../include/dataHandler.h"
#include "../include/dataSet.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.95.1 Detailed Description

Implementation of the class MONOCHROME1ToRGB.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.96 MONOCHROME1ToRGB.h File Reference 477

14.96 MONOCHROME1ToRGB.h File Reference


Declaration of the class MONOCHROME1ToRGB.
#include "colorTransform.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToRGB

Transforms an image (p. 232) from the colorspace MONOCHROME1 into the color
space RGB.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.96.1 Detailed Description

Declaration of the class MONOCHROME1ToRGB.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


478 File Documentation

14.97 MONOCHROME2ToRGB.cpp File Reference


Implementation of the class MONOCHROME2ToRGB.
#include "../../base/include/exception.h"
#include "../include/MONOCHROME2ToRGB.h"
#include "../include/dataHandler.h"
#include "../include/dataSet.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.97.1 Detailed Description

Implementation of the class MONOCHROME2ToRGB.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.98 MONOCHROME2ToRGB.h File Reference 479

14.98 MONOCHROME2ToRGB.h File Reference


Declaration of the class MONOCHROME2ToRGB.
#include "colorTransform.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToRGB

Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space RGB.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.98.1 Detailed Description

Declaration of the class MONOCHROME2ToRGB.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


480 File Documentation

14.99 MONOCHROME2ToYBRFULL.cpp File Refer-


ence
Implementation of the class MONOCHROMEToYBRFULL.
#include "../../base/include/exception.h"
#include "../include/MONOCHROME2ToYBRFULL.h"
#include "../include/dataHandler.h"
#include "../include/dataSet.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.99.1 Detailed Description

Implementation of the class MONOCHROMEToYBRFULL.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.100 MONOCHROME2ToYBRFULL.h File Reference 481

14.100 MONOCHROME2ToYBRFULL.h File Refer-


ence
Declaration of the class MONOCHROME2ToYBRFULL.
#include "colorTransform.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToYBRFULL

Transforms an image (p. 232) from the colorspace MONOCHROME2 into the color
space YBR_FULL.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.100.1 Detailed Description

Declaration of the class MONOCHROME2ToYBRFULL.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


482 File Documentation

14.101 nullStream.h File Reference


Declaration of the nullStream class.
#include "baseStream.h"

Classes
• class puntoexe::nullStream
This class derives from the baseStream (p. 89) class and implements a null stream
(p. 340).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.101.1 Detailed Description

Declaration of the nullStream class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.102 PALETTECOLORToRGB.cpp File Reference 483

14.102 PALETTECOLORToRGB.cpp File Reference


Implementation of the class PALETTECOLORToRGB.
#include "../../base/include/exception.h"
#include "../include/PALETTECOLORToRGB.h"
#include "../include/dataSet.h"
#include "../include/dataHandler.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.102.1 Detailed Description

Implementation of the class PALETTECOLORToRGB.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


484 File Documentation

14.103 PALETTECOLORToRGB.h File Reference


Declaration of the class PALETTECOLORToRGB.
#include "colorTransform.h"
#include "LUT.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB

Transforms an image (p. 232) from the colorspace PALETTE COLOR into the color
space RGB.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.103.1 Detailed Description

Declaration of the class PALETTECOLORToRGB.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.104 RGBToMONOCHROME2.cpp File Reference 485

14.104 RGBToMONOCHROME2.cpp File Reference


Implementation of the class RGBToMONOCHROME2.
#include "../../base/include/exception.h"
#include "../include/RGBToMONOCHROME2.h"
#include "../include/dataHandler.h"
#include "../include/dataSet.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.104.1 Detailed Description

Implementation of the class RGBToMONOCHROME2.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


486 File Documentation

14.105 RGBToMONOCHROME2.h File Reference


Declaration of the class RGBToMONOCHROME2.
#include "colorTransform.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::RGBToMONOCHROME2

Transforms an image (p. 232) from the colorspace RGB into the color space
MONOCHROME2.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.105.1 Detailed Description

Declaration of the class RGBToMONOCHROME2.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.106 RGBToPALETTECOLOR.cpp File Reference 487

14.106 RGBToPALETTECOLOR.cpp File Reference


Implementation of the class RGBToPALETTECOLOR.
#include "../../base/include/exception.h"
#include "../include/RGBToPALETTECOLOR.h"
#include "../include/dataSet.h"
#include "../include/dataHandler.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.106.1 Detailed Description

Implementation of the class RGBToPALETTECOLOR.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


488 File Documentation

14.107 RGBToPALETTECOLOR.h File Reference


Declaration of the class RGBToPALETTECOLOR.
#include <memory>
#include "PALETTECOLORToRGB.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::RGBToPALETTECOLOR

Transforms an image (p. 232) from the colorspace RGB into the color space
PALETTE COLOR.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.107.1 Detailed Description

Declaration of the class RGBToPALETTECOLOR.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.108 RGBToYBRFULL.cpp File Reference 489

14.108 RGBToYBRFULL.cpp File Reference


Implementation of the class RGBToYBRFULL.
#include "../../base/include/exception.h"
#include "../include/RGBToYBRFULL.h"
#include "../include/dataHandler.h"
#include "../include/dataSet.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.108.1 Detailed Description

Implementation of the class RGBToYBRFULL.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


490 File Documentation

14.109 RGBToYBRFULL.h File Reference


Declaration of the class RGBToYBRFULL.
#include "colorTransform.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::RGBToYBRFULL

Transforms an image (p. 232) from the colorspace RGB into the color space YBR_-
FULL.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.109.1 Detailed Description

Declaration of the class RGBToYBRFULL.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.110 RGBToYBRPARTIAL.cpp File Reference 491

14.110 RGBToYBRPARTIAL.cpp File Reference


Implementation of the class RGBToYBRPARTIAL.
#include "../../base/include/exception.h"
#include "../include/RGBToYBRPARTIAL.h"
#include "../include/dataHandler.h"
#include "../include/dataSet.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.110.1 Detailed Description

Implementation of the class RGBToYBRPARTIAL.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


492 File Documentation

14.111 RGBToYBRPARTIAL.h File Reference


Declaration of the class RGBToYBRPARTIAL.
#include "colorTransform.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::RGBToYBRPARTIAL

Transforms an image (p. 232) from the colorspace RGB into the color space YBR_-
PARTIAL.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.111.1 Detailed Description

Declaration of the class RGBToYBRPARTIAL.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.112 stream.cpp File Reference 493

14.112 stream.cpp File Reference


Implementation of the stream class.
#include "../include/exception.h"
#include "../include/stream.h"
#include "../include/charsetConversion.h"
#include <sstream>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.112.1 Detailed Description

Implementation of the stream class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


494 File Documentation

14.113 stream.h File Reference


Declaration of the stream class.
#include "baseStream.h"
#include <ios>
#include <stdio.h>

Classes
• class puntoexe::stream
This class derives from the baseStream (p. 89) class and implements a file stream
(p. 340).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.113.1 Detailed Description

Declaration of the stream class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.114 streamController.cpp File Reference 495

14.114 streamController.cpp File Reference


Implementation of the streamController class.
#include "../include/streamController.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.114.1 Detailed Description

Implementation of the streamController class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


496 File Documentation

14.115 streamController.h File Reference


Declaration of the the class used to control the streams.
#include "baseObject.h"
#include "baseStream.h"
#include <memory>

Classes
• class puntoexe::streamController
This class represents a stream (p. 340) controller. A stream (p. 340) controller can
read or write data from/to a stream (p. 340).

• class puntoexe::streamExceptionEOF
Exception thrown when an attempt to read past the end of the file is made.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.115.1 Detailed Description

Declaration of the the class used to control the streams.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.116 streamReader.cpp File Reference 497

14.116 streamReader.cpp File Reference


Implementation of the streamReader class.
#include "../include/streamReader.h"
#include <string.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.116.1 Detailed Description

Implementation of the streamReader class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


498 File Documentation

14.117 streamReader.h File Reference


Declaration of the the class used to read the streams.
#include "streamController.h"

Classes
• class puntoexe::streamJpegTagInStream
Exception thrown when a jpeg tag is found but wasn’t expected.

• class puntoexe::streamReader
Represents a stream (p. 340) reader. A stream (p. 340) reader can read data from
a stream (p. 340). Several stream (p. 340) readers can share a single baseStream
(p. 89) derived object.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.117.1 Detailed Description

Declaration of the the class used to read the streams.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.118 streamWriter.cpp File Reference 499

14.118 streamWriter.cpp File Reference


Implementation of the streamWriter class.
#include "../include/streamWriter.h"
#include <string.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.118.1 Detailed Description

Implementation of the streamWriter class.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


500 File Documentation

14.119 streamWriter.h File Reference


Declaration of the the class used to write the streams.
#include "streamController.h"

Classes
• class puntoexe::streamWriter
Use this class to write into a baseStream (p. 89) derived class.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.119.1 Detailed Description

Declaration of the the class used to write the streams.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.120 thread.cpp File Reference 501

14.120 thread.cpp File Reference


Implementation of the thread-related functions.
#include "../include/thread.h"
#include "../include/exception.h"
#include <map>
#include <memory>
#include <sched.h>
#include <errno.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.120.1 Detailed Description

Implementation of the thread-related functions.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


502 File Documentation

14.121 thread.h File Reference


Declaration of a class that represents the threads.
#include "baseObject.h"
#include <pthread.h>
#include <exception>
#include <stdexcept>
#include <list>
#include <typeinfo>

Classes
• class puntoexe::thread
This class represents a thread (p. 363).

• class puntoexe::threadException
This is used as the base class for the exceptions thrown by the class thread (p. 363).

• class puntoexe::threadExceptionAlreadyRunning
Exception thrown by thread (p. 363) when an attempt to run an already running
thread (p. 363) is made.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

14.121.1 Detailed Description

Declaration of a class that represents the threads.


The class in this file hide the platform specific features and supply a common interface
to the threads.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.122 transaction.cpp File Reference 503

14.122 transaction.cpp File Reference


Implementation of the class transaction.
#include "../include/transaction.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.122.1 Detailed Description

Implementation of the class transaction.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


504 File Documentation

14.123 transaction.h File Reference


Declaration of the classes that allow to use the transactions on the writing handlers (see
dataHandler).
#include "../../base/include/configuration.h"
#include "../../base/include/thread.h"
#include "../../base/include/baseObject.h"
#include "../../base/include/exception.h"
#include "dataHandler.h"
#include <typeinfo>
#include <map>
#include <list>

Classes
• class puntoexe::imebra::transaction
Represents a single transaction (p. 249).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

Defines
• #define IMEBRA_COMMIT_TRANSACTION_START()
Start a committing transaction block.

• #define IMEBRA_TRANSACTION_START()
Start a non-committing transaction block.

• #define IMEBRA_TRANSACTION_END()
Terminates a transaction block initiated by IMEBRA_COMMIT_TRANSACTION_-
START() (p. 505) or IMEBRA_TRANSACTION_START() (p. 506).

• #define IMEBRA_TRANSACTION_ABORT() imebraNestedTransac-


tion.abort();

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.123 transaction.h File Reference 505

Delete the modifications made in the transaction’s block before this macro is called.

14.123.1 Detailed Description

Declaration of the classes that allow to use the transactions on the writing handlers (see
dataHandler).

14.123.2 Define Documentation

14.123.2.1 #define IMEBRA_COMMIT_TRANSACTION_START()

Value:

{\
PUNTOEXE_FUNCTION_START(L"Imebra Commit Transaction");\
puntoexe::imebra::transaction imebraNestedTransaction(true);\
try{

Start a committing transaction block.


The transaction block must be terminated by the macro IMEBRA_-
TRANSACTION_END() (p. 505).
All the writing data handlers that are created in the transaction’s block will commit the
modifications only at the end of the transaction’s block. If one of the modifications
cannot be committed or if an uncaught exception occurs, then all the buffers are rolled
back to the status they had at the beginning of the transaction.
Committing transactions commit also the data of the nested non-committing transac-
tions

14.123.2.2 #define IMEBRA_TRANSACTION_-


ABORT() imebraNestedTransaction.abort();

Delete the modifications made in the transaction’s block before this macro is called.
This macro is called by IMEBRA_TRANSACTION_END() (p. 505) in case an un-
caught exception is detected.

14.123.2.3 #define IMEBRA_TRANSACTION_END()

Value:

}\
catch(...)\
{\
imebraNestedTransaction.abort();\
PUNTOEXE_RETHROW("Transaction aborted");\

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


506 File Documentation

}\
PUNTOEXE_FUNCTION_END();\
}

Terminates a transaction block initiated by IMEBRA_COMMIT_-


TRANSACTION_START() (p. 505) or IMEBRA_TRANSACTION_START()
(p. 506).
If the macro terminates a committing transaction then it tries to commit all the changes
made through the writing handlers, otherwise it passes the modifications to the parent
transaction.
If an uncaught exception occurs or one of the changes cannot be committed, then all the
modifications are rolled back to the status they had at the beginning of the transaction.
Uncaught exceptions are rethrown by this macro.

14.123.2.4 #define IMEBRA_TRANSACTION_START()

Value:

{\
PUNTOEXE_FUNCTION_START(L"Imebra Transaction");\
puntoexe::imebra::transaction imebraNestedTransaction(false);\
try{

Start a non-committing transaction block.


The transaction block must be terminated by the macro IMEBRA_-
TRANSACTION_END() (p. 505).
If the transaction is not nested into another one, then a committing transaction is created
anyway, as in IMEBRA_COMMIT_TRANSACTION_START() (p. 505).
All the writing data handlers that are created in the transaction’s block will commit
the modifications only at the end first parent committing transaction. If one of the
modifications cannot be committed or if an uncaught exception occurs, then all the
buffers are rolled back to the status they had at the beginning of the transaction.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.124 transform.cpp File Reference 507

14.124 transform.cpp File Reference


Implementation of the base class used by the transforms.
#include "../../base/include/exception.h"
#include "../include/transform.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.124.1 Detailed Description

Implementation of the base class used by the transforms.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


508 File Documentation

14.125 transform.h File Reference


Declaration of the base class used by all the transforms.
#include "../../base/include/baseObject.h"
#include "dataSet.h"
#include <map>

Classes
• class puntoexe::imebra::transforms::transform
This is the base class for the transforms (p. 79).

• class puntoexe::imebra::transforms::transformException
This is the base class of the exceptions thrown by the classes derived from transform
(p. 285).

• class puntoexe::imebra::transforms::transformExceptionDataSetNotDefined

This exception is thrown by the transforms (p. 79) that need a defined dataSet (p. 155)
(see declareDataSet()) but don’t have any.

• class puntoexe::imebra::transforms::transformExceptionDataInputImageDefined

This exception is thrown by a transforms (p. 79) when an input image (p. 232) is
required but hasn’t been defined (see declareInputImage()).

• class puntoexe::imebra::transforms::transformExceptionOutputImageNotDefined

This exception is thrown by a transforms (p. 79) when an output image (p. 232) is
required but hasn’t been defined (see declareOutputImage()).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.125 transform.h File Reference 509

14.125.1 Detailed Description

Declaration of the base class used by all the transforms.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


510 File Documentation

14.126 transformBuffers.cpp File Reference


Implementation of the class transformBuffers.
#include "../../base/include/exception.h"
#include "../include/transformBuffers.h"
#include <string.h>

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.126.1 Detailed Description

Implementation of the class transformBuffers.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.127 transformBuffers.h File Reference 511

14.127 transformBuffers.h File Reference


Declaration of the class transformBuffers.
#include "transform.h"
#include "image.h"

Classes
• class puntoexe::imebra::transforms::transformBuffers
This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels.

• class puntoexe::imebra::transforms::transformBuffersInputOutput
This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels and need two different buffers (one for the input image (p. 232) and one for the
outpu image (p. 232)).

• class puntoexe::imebra::transforms::transformBuffersInPlace
This class is used as a base class by some transforms (p. 79) that work on the image’s
pixels and don’t need two different buffers (input & output) but can work on a single
buffer (p. 107) that contains the input and output data (p. 139).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.127.1 Detailed Description

Declaration of the class transformBuffers.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


512 File Documentation

14.128 transformHighBit.cpp File Reference


Implementation of the class transformHighBit.
#include "../../base/include/exception.h"
#include "../include/transformHighBit.h"
#include "../include/dataSet.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.128.1 Detailed Description

Implementation of the class transformHighBit.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.129 transformHighBit.h File Reference 513

14.129 transformHighBit.h File Reference


Declaration of the class transformHighBit.
#include "transformBuffers.h"

Classes
• class puntoexe::imebra::transforms::transformHighBit
Shift the image’s content to adapt it to the specified high bit.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.129.1 Detailed Description

Declaration of the class transformHighBit.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


514 File Documentation

14.130 transformsChain.cpp File Reference


Implementation of the class transformsChain.
#include "../../base/include/exception.h"
#include "../include/transformsChain.h"
#include "../include/image.h"
#include "../include/dataSet.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.130.1 Detailed Description

Implementation of the class transformsChain.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.131 transformsChain.h File Reference 515

14.131 transformsChain.h File Reference


Declaration of the class transformsChain.
#include <list>
#include "transform.h"

Classes
• class puntoexe::imebra::transforms::transformsChain
Executes a sequence of transforms (p. 79).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.131.1 Detailed Description

Declaration of the class transformsChain.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


516 File Documentation

14.132 viewHelper.cpp File Reference


Implementation of the class view.
#include "../include/viewHelper.h"
#include "../include/image.h"
#include "../include/colorTransformsFactory.h"
#include "../include/transformHighBit.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.132.1 Detailed Description

Implementation of the class view.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.133 viewHelper.h File Reference 517

14.133 viewHelper.h File Reference


Declaration of the a class that help a view or window class to draw a dicom image on
the screen.
#include "../../base/include/baseObject.h"
#include "image.h"
#include "dataSet.h"
#include "drawBitmap.h"
#include <list>

Classes
• class puntoexe::imebra::view
This class can be used as a base class by the windows that need to display a Dicom
image (p. 232).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.133.1 Detailed Description

Declaration of the a class that help a view or window class to draw a dicom image on
the screen.
This file is not included automatically by imebra.h (p. 461)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


518 File Documentation

14.134 VOILUT.cpp File Reference


Implementation of the class VOILUT.
#include "../../base/include/exception.h"
#include "../include/VOILUT.h"
#include "../include/dataSet.h"
#include "../include/LUT.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.134.1 Detailed Description

Implementation of the class VOILUT.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.135 VOILUT.h File Reference 519

14.135 VOILUT.h File Reference


Declaration of the class VOILUT.
#include "transformBuffers.h"
#include "image.h"

Classes
• class puntoexe::imebra::transforms::VOILUT
Transform the value of the input image’s pixels by using the presentation VOI/LUT
defined in the dataSet (p. 155).

• class puntoexe::imebra::transforms::VOILUTInverse
Execute the inverse of the transformation executed by VOILUT (p. 300).

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

14.135.1 Detailed Description

Declaration of the class VOILUT.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


520 File Documentation

14.136 waveform.cpp File Reference


Implementation of the class waveform.
#include "../include/waveform.h"
#include "../include/dataHandlerNumeric.h"
#include "../include/dataSet.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

14.136.1 Detailed Description

Implementation of the class waveform.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.137 waveform.h File Reference 521

14.137 waveform.h File Reference


Declaration of the class waveform.
#include "../../base/include/baseObject.h"

Classes
• class puntoexe::imebra::waveform
Represents a single waveform (p. 319) of a dicom dataset.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::handlers
All the data (p. 139) handlers (p. 77) returned by the class buffer (p. 107) are defined
in this namespace.

14.137.1 Detailed Description

Declaration of the class waveform.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


522 File Documentation

14.138 YBRFULLToMONOCHROME2.cpp File Ref-


erence
Implementation of the class YBRFULLToMONOCHROME2.
#include "../../base/include/exception.h"
#include "../include/YBRFULLToMONOCHROME2.h"
#include "../include/dataHandler.h"
#include "../include/dataSet.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.138.1 Detailed Description

Implementation of the class YBRFULLToMONOCHROME2.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.139 YBRFULLToMONOCHROME2.h File Reference 523

14.139 YBRFULLToMONOCHROME2.h File Refer-


ence
Declaration of the class YBRFULLToMONOCHROME2.
#include "colorTransform.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::YBRFULLToMONOCHROME2

Transforms an image (p. 232) from the colorspace YBR_FULL into the color space
MONOCHROME2.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.139.1 Detailed Description

Declaration of the class YBRFULLToMONOCHROME2.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


524 File Documentation

14.140 YBRFULLToRGB.cpp File Reference


Implementation of the class YBRFULLToRGB.
#include "../../base/include/exception.h"
#include "../include/YBRFULLToRGB.h"
#include "../include/dataHandler.h"
#include "../include/dataSet.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.140.1 Detailed Description

Implementation of the class YBRFULLToRGB.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.141 YBRFULLToRGB.h File Reference 525

14.141 YBRFULLToRGB.h File Reference


Declaration of the class YBRFULLToRGB.
#include "colorTransform.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::YBRFULLToRGB

Transforms an image (p. 232) from the colorspace YBR_FULL into the color space
RGB.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.141.1 Detailed Description

Declaration of the class YBRFULLToRGB.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


526 File Documentation

14.142 YBRPARTIALToRGB.cpp File Reference


Implementation of the class YBRPARTIALToRGB.
#include "../../base/include/exception.h"
#include "../include/YBRPARTIALToRGB.h"
#include "../include/dataHandler.h"
#include "../include/dataSet.h"
#include "../include/image.h"

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.142.1 Detailed Description

Implementation of the class YBRPARTIALToRGB.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


14.143 YBRPARTIALToRGB.h File Reference 527

14.143 YBRPARTIALToRGB.h File Reference


Declaration of the class YBRPARTIALToRGB.
#include "colorTransform.h"

Classes
• class puntoexe::imebra::transforms::colorTransforms::YBRPARTIALToRGB

Transforms an image (p. 232) from the colorspace YBR_PARTIAL into the color space
RGB.

Namespaces
• namespace puntoexe
The base services and classes are defined in this namespace.

• namespace puntoexe::imebra
All the functions related to the dicom standard are defined in this namespace.

• namespace puntoexe::imebra::transforms
This namespace contains all the transforms (p. 79) of the imebra (p. 71) library.

• namespace puntoexe::imebra::transforms::colorTransforms
This namespace contains all the classes involved in the transformation between sev-
eral color spaces.

14.143.1 Detailed Description

Declaration of the class YBRPARTIALToRGB.

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


528 File Documentation

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Chapter 15

Example Documentation

15.1 dicom2jpeg/dicom2jpeg.cpp
This application converts dicom file into one or more jpeg files, or into movies.
FFMPEG To convert dicom files into movies this application needs the open source
program ffmpeg, available for Windows and linux platforms.
Ffmpeg is not redistributed with Imebra and must be downloaded from here:

• http://ffmpeg.mplayerhq.hu/ (Linux)

• http://ffmpeg.arrozcru.org/ (Windows)

• http://winff.org/html/ (Linux and Windows, with GUI)

Usage

dicom2jpeg dicomFileName jpegFileName [-ffmpeg mpegPath [mpegOptions]]

• dicomFileName: the name of the dicom file to convert

• jpegFileName: the name of the resulting jpeg file

• mpegPath: the path to the ffmpeg executable

• mpegOptions: the list of options to be passed to ffmpeg, using the ffmpeg format.
The input file and the frame rate are added automatically by dicom2jpeg

Examples
The following command converts a dicom file named "input.dcm" to a jpeg file named
"output.jpg". If the file output.jpg already exists then it will be overwritten.

dicom2jpeg input.dcm output.jpg


530 Example Documentation

The following code converts a multiframe file named "multiframe.dcm" to several jpeg
files named "output.jpg", "output1.jpg", "output2.jpg", ..., "outputN.jpg" (N=number
of frames-1)

dicom2jpeg multiframe.dcm output.jpg

The following command converts a multiframe file named "multiframe.dcm" to a swf


movie named "movie.swf".
Before producing the movie, dicom2jpeg creates a serie of jpg images named out-
put0.jpg, output1.jpg, ..., outputN.jpg (N=number of frames-1). Then dicom2jpeg ex-
ecutes ffmpeg and specifies the created jpg images as input images and also specifies
the frame rate; other options must be specified in the call to dicom2jpeg.

dicom2jpeg multiframe.dcm output.jpg -ffmpeg ffmpeg.exe movie.swf

/*

Imebra v. 0.0.48

Imebra: a C++ dicom library.


Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 by Paolo Brandoli

This program is free software; you can redistribute it and/or modify


it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE Version 3
as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,


but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU AFFERO GENERAL PUBLIC LICENSE Version 3 for more details.

You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE Version
3
along with this program; If not, see http://www.gnu.org/licenses/

-------------------

If you want to use Imebra commercially then you have to buy the commercial
license available at http://puntoexe.com

After you buy the commercial license then you can use Imebra according
to the terms described in the Imebra Commercial License Version 1.
A copy of the Imebra Commercial License Version 1 is available in the
documentation pages.

Imebra is available at http://puntoexe.com

The author can be contacted by email at paolo@puntoexe.com or by mail at


the following address:
Paolo Brandoli
Preglov trg 6
1000 Ljubljana
Slovenia

*/

#include <iostream>

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


15.1 dicom2jpeg/dicom2jpeg.cpp 531

#include "../../imebra/include/imebra.h"
#include <sstream>

#ifdef PUNTOEXE_WINDOWS
#include <process.h>
#else
#include <spawn.h>
#include <sys/wait.h>
#endif

#include <memory>
#include <list>

using namespace puntoexe;


using namespace puntoexe::imebra;

int findArgument(const char* argument, int argc, char* argv[])


{
for(int scanArg(0); scanArg != argc; ++scanArg)
{
if(std::string(argv[scanArg]) == argument)
{
return scanArg;
}
}
return -1;
}

int main(int argc, char* argv[])


{
std::wstring version(L"1.0.0.1");
std::wcout << L"dicom2jpeg version " << version << L"\n";

try
{

if(argc < 3)
{
std::wcout <<
L"\
Usage: dicom2jpeg dicomFileName jpegFileName [-ffmpeg FFMPEGPATH FFMPEGOPT]\n\
\n\
dicomFileName = name of the dicom file\n\
jpegFileName = name of the final jpeg file\n\
-ffmpeg FFMPEGPATH = launches FFMPEG after generating the jpeg images.\n\
FFMPEGPATH is the path to FFMPEG and FFMPEGOPT\n\
are the options for ffmpeg.n\
The input images and the frame rate are\n\
added automatically to the options\
";
return 1;
}

// Separate the extension from the file name


std::string outputFileName(argv[2]);
std::string extension;
size_t dotPos(outputFileName.rfind(’.’));
if(dotPos != outputFileName.npos)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


532 Example Documentation

{
extension = outputFileName.substr(dotPos);
outputFileName.erase(dotPos);
}
else
{
extension = ".jpg";
}

// Open the file containing the dicom dataset


ptr<puntoexe::stream> inputStream(new puntoexe::stream);
inputStream->openFile(argv[1], std::ios_base::in);

// Connect a stream reader to the dicom stream. Several stream re


ader
// can share the same stream
ptr<puntoexe::streamReader> reader(new streamReader(inputStream))
;

// Get a codec factory and let it use the right codec to create a
dataset
// from the input stream
ptr<codecs::codecFactory> codecsFactory(codecs::codecFactory::get
CodecFactory());
ptr<dataSet> loadedDataSet(codecsFactory->load(reader, 2048));

// Check for the -ffmpeg flag


int ffmpegFlag(findArgument("-ffmpeg", argc, argv));

size_t framesCount(0);

try
{
// Scan through the frames
for(imbxUint32 frameNumber(0); ; ++frameNumber)
{
// Apply the modality VOI/LUT
ptr<transforms::modalityVOILUT> modVOILUT(new
transforms::modalityVOILUT);
modVOILUT->declareDataSet(loadedDataSet);
modVOILUT->declareInputImage(0, loadedDataSet->ge
tImage(frameNumber));
modVOILUT->doTransform();
ptr<image> finalImage(modVOILUT->getOutputImage(0
));

// Apply the presentation VOI/LUT


ptr<transforms::VOILUT> presentationVOILUT(new
transforms::VOILUT);
presentationVOILUT->declareDataSet(loadedDataSet)
;
imbxUint32 firstVOILUTID(presentationVOILUT->getV
OILUTId(0));
if(firstVOILUTID != 0)
{
presentationVOILUT->setVOILUT(firstVOILUT
ID);
presentationVOILUT->declareInputImage(0,
finalImage);
presentationVOILUT->doTransform();
finalImage = presentationVOILUT->getOutpu
tImage(0);

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


15.1 dicom2jpeg/dicom2jpeg.cpp 533

// Color transform to YCrCb

ptr<transforms::colorTransforms::colorTransformsFactory> colorFactory(transforms:
:colorTransforms::colorTransformsFactory::getColorTransformsFactory());
ptr<transforms::transform> colorTransform(colorFa
ctory->getTransform(finalImage->getColorSpace(), L"YBR_FULL"));
if(colorTransform != 0)
{
colorTransform->declareDataSet(loadedData
Set);
colorTransform->declareInputImage(0, fina
lImage);
colorTransform->doTransform();
finalImage = colorTransform->getOutputIma
ge(0);
}

// Adjust high bit


if(finalImage->getHighBit() != 7)
{
ptr<image> eightBitImage(new image);
imbxUint32 width, height;
finalImage->getSize(&width, &height);
eightBitImage->create(width, height, imag
e::depthU8, L"YBR_FULL", 7);
ptr<transforms::transformHighBit> modifyH
ighBit(new transforms::transformHighBit);
modifyHighBit->declareDataSet(loadedDataS
et);
modifyHighBit->declareInputImage(0, final
Image);
modifyHighBit->declareOutputImage(0, eigh
tBitImage);
modifyHighBit->doTransform();
finalImage = eightBitImage;
}

// Open a stream for the jpeg


const std::wstring jpegTransferSyntax(L"1.2.840.1
0008.1.2.4.50");
std::ostringstream jpegFileName;
jpegFileName << outputFileName;
if(frameNumber != 0 || ffmpegFlag >= 0)
{
jpegFileName << "_" << frameNumber;
}
jpegFileName << extension;
ptr<puntoexe::stream> jpegStream(new
puntoexe::stream);
jpegStream->openFile(jpegFileName.str(), std::ios
_base::out | std::ios_base::trunc);
ptr<puntoexe::streamWriter> jpegWriter(new
streamWriter(jpegStream));
ptr<codecs::codec> outputCodec(codecsFactory->get
Codec(jpegTransferSyntax));

// Write the jpeg image to the stream


outputCodec->setImage(jpegWriter, finalImage, jpe
gTransferSyntax, codecs::codec::veryHigh,

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


534 Example Documentation

"OB", 8, false, false, false, false);

++framesCount;
}

}
catch(dataSetImageDoesntExist&)
{
// Ignore this exception. It is thrown when we reach the
// end of the images list
exceptionsManager::getMessage();
}

// All the images have been generated.


// Should we launch FFMPEG?
if(ffmpegFlag >= 0 && framesCount != 0)
{
// List of arguments to be passed to ffmpeg
typedef std::list<std::string> tOptionsList;
tOptionsList options;

// The first argument is the application’s name


options.push_back(argv[ffmpegFlag + 1]);

// Calculate the frames per second from the available tag


s
double framesPerSecond(0);
double frameTime(loadedDataSet->getDouble(0x0018, 0, 0x10
63, 0));
if(frameTime > 0.1)
{
framesPerSecond = 1000 / frameTime;
}
if(framesPerSecond < 0.1)
{
framesPerSecond = loadedDataSet->getUnsignedLong(
0x0018, 0x0, 0x0040, 0x0);
}
if(framesPerSecond < 0.1)
{
framesPerSecond = loadedDataSet->getUnsignedLong(
0x0008, 0x0, 0x2144, 0x0);
}

// Add the ffmpeg argument for the frames per second


if(framesPerSecond > 0.1)
{
options.push_back("-r");
std::ostringstream frameRate;
frameRate << framesPerSecond;
options.push_back(frameRate.str());
}

// Add the ffmpeg argument for the input files


options.push_back("-i");
options.push_back(outputFileName + "_%d" + extension);

// Add the ffmpeg argument for the number of frames


options.push_back("-dframes");
std::ostringstream frameCount;
frameCount << (unsigned long)framesCount;
options.push_back(frameCount.str());

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


15.1 dicom2jpeg/dicom2jpeg.cpp 535

// Add the arguments specified when dicom2jpeg was launch


ed
for(int copyArguments(ffmpegFlag + 2); copyArguments < ar
gc; ++copyArguments)
{
options.push_back(argv[copyArguments]);
}

// Build the arguments array


std::auto_ptr<const char*> ffArgv(new const char*[options
.size() + 1]);
size_t insertPosition(0);
for(tOptionsList::iterator scanOptions(options.begin());
scanOptions != options.end(); ++scanOptions, ++insertPosition)
{
ffArgv.get()[insertPosition] = (*scanOptions).c_s
tr();
}
ffArgv.get()[options.size()] = 0;

// Launch ffmpeg
#ifdef PUNTOEXE_WINDOWS
return (int)_spawnvp(_P_WAIT , argv[ffmpegFlag + 1], ffArgv.get());
#else
char *environment[] = {0};

pid_t process_id;
posix_spawnp (&process_id, argv[ffmpegFlag + 1],
0, 0, (char* const*)ffArgv.get(), (char* const*)envir
onment);
wait(0);
#endif

return 0;

}
catch(...)
{
std::wcout << exceptionsManager::getMessage();
return 1;
}
}

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


536 Example Documentation

15.2 dicomdirItems/dicomdirItems.cpp
This application reads a DICOMDIR file and output the file’s content in XML format
to the standard output stream.
Usage:

dicomdirItems dicomdirFile

• dicomdirFile: the name of the dicom file containing the DICOMDIR structure

In the generated XML file, all the information regarding the DICOMDIR structure is
enclosed in the root tag <dicomdir>.
Each DICOMDIR item is enclosed in the tag <record>, which has the attributes id
(unique numeric id) and type (could be "IMAGE", "SERIES", "PATIENT" and others.
See puntoexe::imebra::directoryRecord::tDirectoryRecordType (p. 191) for more
information).
A <record> item can include:

• a <children> item which includes the children records (a sequence of 0 or more


<record> items
• a <file> item which specifies the name of the file referenced by the record
• a <class> item which specifies the class UID
• a <instance> item which specifies the instance UID
• a <transfer> item which specifies the transfer syntax
• one or more <group> items, containing the record’s tags

A <group> item has the attribute id which specifies the dicom group id in decimal
format. A <group> item may contain 0 or more <tag> items.
Each tag has the attribute id which specifies the tag id in decimal format.
The <tag> item contains the dicom tag’s content.

// dicomdirItems.cpp
//

#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include "../../imebra/include/imebra.h"

using namespace puntoexe;


using namespace puntoexe::imebra;

//
// Convert a string to XML entities that can be safely
// embedded in a XML file

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


15.2 dicomdirItems/dicomdirItems.cpp 537

//
std::wstring xmlEntities(std::wstring value)
{
std::wostringstream outputStream;
for(std::wstring::iterator scanValue(value.begin()); scanValue != value.e
nd(); ++scanValue)
{
switch(*scanValue)
{
case L’"’:
outputStream << L"&quot;";
break;
case L’&’:
outputStream << L"&amp;";
break;
case L’\’’:
outputStream << L"&apos;";
break;
case L’<’:
outputStream << L"&lt;";
break;
case ’>’:
outputStream << L"&gt;";
break;
default:
if(*scanValue < 33)
{
outputStream << L"&#" << (int)(*scanValue) << L";
";
break;
}
outputStream << *scanValue;
}
}

return outputStream.str();
}

//
// Output a tag from the dataset in an XML tag
//
void outputTag(ptr<dataSet> pDataSet, imbxUint16 group, imbxUint16 tag, std::wost
ream* pOutputStream, std::wstring tagName, imbxUint16 id = 0)
{
ptr<handlers::dataHandler> tagHandler(pDataSet->getDataHandler(group, 0,
tag, 0, false));
if(tagHandler == 0)
{
*pOutputStream << L"<" << tagName << L" />\n";
return;
}

*pOutputStream << L"<" << tagName;


if(id != 0)
{
*pOutputStream << L" tagid=\"" << id << L"\" ";
}
*pOutputStream << L">";

for(bool bSeparator(false); tagHandler->pointerIsValid(); bSeparator = tr


ue)

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


538 Example Documentation

{
if(bSeparator)
{
*pOutputStream << L"\\";
}
*pOutputStream << xmlEntities(tagHandler->getUnicodeString());
tagHandler->incPointer();
}

*pOutputStream << L"</" << tagName << L">\n";


}

//
// Scan all the sibling records (and their children) of
// the specified one
//
void scanChildren(ptr<directoryRecord> pRecord, std::wostream* pOutputStream)
{
for(;pRecord != 0; pRecord = pRecord->getNextRecord())
{
ptr<dataSet> pRecordDataSet(pRecord->getRecordDataSet());

// Output the record


(*pOutputStream) <<
L"<record id=\"" <<
pRecordDataSet->getItemOffset() <<
L"\" type=\"" <<
pRecord->getTypeString() << L"\">\n";

// Output the file parts


outputTag(pRecordDataSet, 0x4, 0x1500, pOutputStream, L"file");

// Output the class UID


outputTag(pRecordDataSet, 0x4, 0x1510, pOutputStream, L"class");

// Output the instance UID


outputTag(pRecordDataSet, 0x4, 0x1511, pOutputStream, L"instance"
);

// Output the transfer syntax


outputTag(pRecordDataSet, 0x4, 0x1512, pOutputStream, L"transfer"
);

// Output the groups (everything but group 2 and 4)


ptr<dataCollectionIterator<dataGroup> > scanGroups(pRecordDataSet
->getDataIterator());
for(scanGroups->reset(); scanGroups->isValid(); scanGroups->incIt
erator())
{
imbxUint16 groupId(scanGroups->getId());
if(groupId == 2 || groupId == 4)
{
continue;
}
*pOutputStream << L"<group groupid=\"" << groupId << L"\"
>";

ptr<dataCollectionIterator<data> > scanTags(scanGroups->g


etData()->getDataIterator());
for(scanTags->reset(); scanTags->isValid(); scanTags->inc
Iterator())

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


15.2 dicomdirItems/dicomdirItems.cpp 539

{
imbxUint16 id(scanTags->getId());
if(id == 0)
{
continue;
}
outputTag(pRecordDataSet, groupId, id, pOutputStr
eam, L"tag", id);
}

*pOutputStream << L"</group>";

// Output the child records


(*pOutputStream) << L"<children>\n";
scanChildren(pRecord->getFirstChildRecord(), pOutputStream);
(*pOutputStream) << L"</children>\n";

(*pOutputStream) << L"</record>\n";


}
}

//
// Entry point
//
int main(int argc, char* argv[])
{

// Output the help if the parameters have not been


// specified
if(argc < 2)
{
std::wstring version(L"1.0.0.1");
std::wcout << L"dicomdirItems version " << version << L"\n";
std::wcout << L"Usage: dicomdirItems dicomdirFileName outputFileN
ame\n";
std::wcout << L" dicomdirFileName = name of the DICOMDIR file\n";

return 1;
}

// Open the file containing the dicom directory


ptr<puntoexe::stream> inputStream(new puntoexe::stream);
inputStream->openFile(argv[1], std::ios_base::in);

// Connect a stream reader to the dicom stream


ptr<puntoexe::streamReader> reader(new streamReader(inputStream));

// Get a codec factory and let it use the right codec to create a dataset

// from the input stream


ptr<codecs::codecFactory> codecsFactory(codecs::codecFactory::getCodecFac
tory());
ptr<dataSet> loadedDataSet(codecsFactory->load(reader, 2048));

// Now create a dicomdir object


ptr<dicomDir> directory(new dicomDir(loadedDataSet));

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


540 Example Documentation

try
{
std::wcout << L"<dicomdir>";
scanChildren(directory->getFirstRootRecord(), &(std::wcout));
std::wcout << L"</dicomdir>";
return 0;
}
catch(...)
{
std::wcout << exceptionsManager::getMessage();
return 1;
}
}

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


Index

∼criticalSection puntoexe::baseObject, 87
puntoexe::criticalSection, 95 baseObject.cpp, 365
∼lockCriticalSection baseObject.h, 366
puntoexe::lockCriticalSection, 321 baseStream.cpp, 367
∼lockMultipleObjects baseStream.h, 368
puntoexe::lockMultipleObjects, 323 belowMedium
∼lockObject puntoexe::imebra::codecs::codec,
puntoexe::lockObject, 324 119
∼streamWriter bitDepth
puntoexe::streamWriter, 357 puntoexe::imebra::image, 231
∼transaction buffer
puntoexe::imebra::transaction, 248 puntoexe::imebra::buffer, 108, 109
buffer.cpp, 369
abort buffer.h, 371
pun- bufferException
toexe::imebra::handlers::dataHandler, puntoexe::imebra::bufferException,
197 113
puntoexe::imebra::transaction, 248 bufferExceptionUnknownType
aboveMedium pun-
puntoexe::imebra::codecs::codec, toexe::imebra::bufferExceptionUnknownType,
119 114
addBit bufferExists
puntoexe::streamReader, 352 puntoexe::imebra::data, 140
addExceptionInfo buildDataSet
puntoexe::exceptionsManager, 101 puntoexe::imebra::dicomDir, 183
addTransform buildStream
pun- pun-
toexe::imebra::transforms::transformsChain,toexe::imebra::codecs::dicomCodec,
297 131
adjustEndian
puntoexe::streamController, 341 calcHuffmanCodesLength
appendDataSet puntoexe::huffmanTable, 104
puntoexe::imebra::data, 140 calcHuffmanTables
assign puntoexe::huffmanTable, 104
puntoexe::memory, 327 canHandleTransferSyntax
at puntoexe::imebra::codecs::codec,
pun- 119
canSubsample
toexe::imebra::handlers::dataHandlerNumeric,
211 pun-
toexe::imebra::transforms::colorTransforms::colorTransformsFactory,
baseObject 252
542 INDEX

charsetConversion.cpp, 372 puntoexe::memory, 327


charsetConversion.h, 373 copyFromInt32
charsetsList.cpp, 374 pun-
charsetsList.h, 375 toexe::imebra::handlers::dataHandler,
checkValidDataRange 198
puntoexe::imebra::lut, 240 copyFromInt32Interleaved
clear pun-
puntoexe::memory, 327 toexe::imebra::handlers::dataHandlerNumeric,
clearExceptionInfo 211
puntoexe::exceptionsManager, 101 copyToInt32
codec.cpp, 376 pun-
codec.h, 377 toexe::imebra::handlers::dataHandler,
codecException 198
pun- puntoexe::imebra::lut, 240
toexe::imebra::codecs::codecException,
copyToInt32Interleaved
124 pun-
codecExceptionCorruptedFile toexe::imebra::handlers::dataHandlerNumeric,
pun- 212
toexe::imebra::codecs::codecExceptionCorruptedFile,
create
125 puntoexe::imebra::image, 232
codecExceptionWrongFormat puntoexe::imebra::lut, 240
pun- createCodec
toexe::imebra::codecs::codecExceptionWrongFormat,
puntoexe::imebra::codecs::codec,
126 119
codecExceptionWrongTransferSyntax createColorTransform
pun- pun-
toexe::imebra::codecs::codecExceptionWrongTransferSyntax,
toexe::imebra::transforms::colorTransforms::colorTransfo
127 250
codecFactory.cpp, 378 criticalSection
codecFactory.h, 379 puntoexe::criticalSection, 95
colorTransform.cpp, 380 criticalSection.cpp, 387
colorTransform.h, 381 criticalSection.h, 388
colorTransformsFactory.cpp, 382
colorTransformsFactory.h, 383 data
commit puntoexe::memory, 327
pun- data.cpp, 389
data.h, 390
toexe::imebra::handlers::dataHandler,
197 dataCollection.h, 391
configuration.h, 385 dataGroup.cpp, 392
imbxInt16, 385 dataGroup.h, 393
imbxInt32, 385 dataHandler.cpp, 394
imbxInt8, 385 dataHandler.h, 395
imbxUint16, 385 dataHandlerDate.cpp, 396
imbxUint32, 386 dataHandlerDate.h, 397
imbxUint8, 386 dataHandlerDateTime.cpp, 398
copyBack dataHandlerDateTime.h, 399
pun- dataHandlerDateTimeBase.cpp, 400
dataHandlerDateTimeBase.h, 401
toexe::imebra::handlers::dataHandler,
197 dataHandlerNumeric.h, 402
copyFrom dataHandlerString.cpp, 403

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


INDEX 543

dataHandlerString.h, 404 284


dataHandlerStringAE.cpp, 405 declareInputImage
dataHandlerStringAE.h, 406 pun-
dataHandlerStringAS.cpp, 407 toexe::imebra::transforms::transform,
dataHandlerStringAS.h, 408 284
dataHandlerStringCS.cpp, 409 declareOutputImage
dataHandlerStringCS.h, 410 pun-
dataHandlerStringDS.cpp, 411 toexe::imebra::transforms::transform,
dataHandlerStringDS.h, 412 284
dataHandlerStringIS.cpp, 413 deleteBuffer
dataHandlerStringIS.h, 414 puntoexe::imebra::data, 141
dataHandlerStringLO.cpp, 415 depthS16
dataHandlerStringLO.h, 416 puntoexe::imebra::image, 231
dataHandlerStringLT.cpp, 417 depthS8
dataHandlerStringLT.h, 418 puntoexe::imebra::image, 231
dataHandlerStringPN.cpp, 419 depthU16
dataHandlerStringPN.h, 420 puntoexe::imebra::image, 231
dataHandlerStringSH.cpp, 421 depthU8
dataHandlerStringSH.h, 422 puntoexe::imebra::image, 231
dataHandlerStringST.cpp, 423 depthUnknown
dataHandlerStringST.h, 424 puntoexe::imebra::image, 231
dataHandlerStringUI.cpp, 425 dicomCodec.cpp, 436
dataHandlerStringUI.h, 426 dicomCodec.h, 437
dataHandlerStringUnicode.cpp, 427 IMEBRA_DATASET_MAX_-
dataHandlerStringUnicode.h, 428 DEPTH, 438
dataHandlerStringUT.cpp, 429 dicomCodecException
dataHandlerStringUT.h, 430 pun-
dataHandlerTime.cpp, 431 toexe::imebra::codecs::dicomCodecException,
dataHandlerTime.h, 432 134
dataSet.cpp, 433 dicomCodecExceptionDepthLimitReached
dataSet.h, 434 pun-
dataSetCorruptedOffsetTable toexe::imebra::codecs::dicomCodecExceptionDepthLimitReached,
pun- 135
toexe::imebra::dataSetCorruptedOffsetTable,
dicomDict.cpp, 439
172 dicomDict.h, 440
dataSetImageDoesntExist dicomDir
pun- puntoexe::imebra::dicomDir, 183
toexe::imebra::dataSetImageDoesntExist,
dicomDir.cpp, 441
178 dicomDir.h, 442
days dicomDirCircularReferenceException
pun- pun-
toexe::imebra::handlers::dataHandlerStringAS,
toexe::imebra::dicomDirCircularReferenceException,
218 186
declareBitmapType dicomDirException
pun- pun-
toexe::imebra::transforms::drawBitmap, toexe::imebra::dicomDirException,
274 187
declareDataSet dicomDirUnknownDirectoryRecordType
pun- pun-
toexe::imebra::transforms::transform, toexe::imebra::dicomDirUnknownDirectoryRecordType,

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


544 INDEX

188 getBackgroundColor
doTransform puntoexe::imebra::view, 308
pun- getBits
toexe::imebra::transforms::transform, puntoexe::imebra::lut, 241
285 getBitsAllocated
draw puntoexe::imebra::waveform, 318
puntoexe::imebra::view, 306 getBitsStored
drawBitmap puntoexe::imebra::waveform, 318
puntoexe::imebra::view, 306 getBufferSize
drawBitmap.cpp, 443 puntoexe::imebra::data, 141
drawBitmap.h, 444 getBufferSizeBytes
drawCursorLine puntoexe::imebra::buffer, 109
puntoexe::imebra::view, 307 getCenterWidth
drawRectangle pun-
puntoexe::imebra::view, 308 toexe::imebra::transforms::VOILUT,
299
empty getChannels
puntoexe::memory, 327 puntoexe::imebra::waveform, 318
encapsulated getChannelsNumber
puntoexe::imebra::codecs::codec, puntoexe::imebra::image, 232
120 getCharsetsList
endReached puntoexe::imebra::buffer, 109
puntoexe::streamReader, 353 getCodec
endTransformsChain pun-
pun- toexe::imebra::codecs::codecFactory,
toexe::imebra::transforms::transformsChain,129
297 getCodecFactory
exception.cpp, 446 pun-
exception.h, 447 toexe::imebra::codecs::codecFactory,
PUNTOEXE_FUNCTION_END, 129
448 getColorSpace
PUNTOEXE_FUNCTION_START, puntoexe::imebra::image, 232
448 getColorTransformsFactory
PUNTOEXE_RETHROW, 449 pun-
PUNTOEXE_THROW, 449 toexe::imebra::transforms::colorTransforms::colorTransfo
exceptionInfo 253
puntoexe::exceptionInfo, 98 getControlledStream
fillHandlers puntoexe::streamController, 341
puntoexe::imebra::lut, 241 getControlledStreamPosition
flush puntoexe::streamController, 342
puntoexe::memoryPool, 330 getData
flushDataBuffer pun-
puntoexe::streamWriter, 357 toexe::imebra::dataCollectionIterator,
148
get getDataHandler
puntoexe::ptr, 335 puntoexe::imebra::buffer, 110
getAge puntoexe::imebra::data, 141
pun- puntoexe::imebra::dataGroup, 151
toexe::imebra::handlers::dataHandlerStringAS,
puntoexe::imebra::dataSet, 157
218 puntoexe::imebra::image, 232

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


INDEX 545

getDataHandlerRaw getFilePart
puntoexe::imebra::buffer, 110 puntoexe::imebra::directoryRecord,
puntoexe::imebra::data, 142 190
puntoexe::imebra::dataGroup, 151 getFinalColorSpace
puntoexe::imebra::dataSet, 158 pun-
getDataIterator toexe::imebra::transforms::colorTransforms::colorTransform,
puntoexe::imebra::dataCollection, 250
145 getFirstAvailFrameBufferId
getDataSet puntoexe::imebra::dataSet, 160
puntoexe::imebra::data, 143 getFirstChildRecord
pun- puntoexe::imebra::directoryRecord,
toexe::imebra::transforms::transform, 191
285 getFirstMapped
getDataType puntoexe::imebra::lut, 241
puntoexe::imebra::buffer, 111 getFirstRootRecord
puntoexe::imebra::data, 143 puntoexe::imebra::dicomDir, 184
puntoexe::imebra::dataGroup, 152 getFrameBufferId
puntoexe::imebra::dataSet, 159 puntoexe::imebra::dataSet, 160
pun- getFrameBufferIds
toexe::imebra::handlers::dataHandler, puntoexe::imebra::dataSet, 160
198 getFrameOffset
getDate puntoexe::imebra::dataSet, 161
pun- getGroup
toexe::imebra::handlers::dataHandler, puntoexe::imebra::dataSet, 161
198 getHighBit
getDefaultDataType puntoexe::imebra::image, 233
puntoexe::imebra::dataSet, 159 getId
getDepth pun-
puntoexe::imebra::image, 233 toexe::imebra::dataCollectionIterator,
getDescription 148
puntoexe::imebra::lut, 241 getImage
getDicomDictionary puntoexe::imebra::codecs::codec,
puntoexe::imebra::dicomDictionary, 120
180 puntoexe::imebra::dataSet, 162
getDirectoryDataSet puntoexe::imebra::view, 308
puntoexe::imebra::dicomDir, 184 getImageRect
getDouble puntoexe::imebra::view, 309
puntoexe::imebra::dataSet, 159 getInitialColorSpace
pun- pun-
toexe::imebra::handlers::dataHandler, toexe::imebra::transforms::colorTransforms::colorTransform,
199 250
pun- getInputImage
toexe::imebra::handlers::dataHandlerStringAS,
pun-
219 toexe::imebra::transforms::transform,
getDoubleIncPointer 285
pun- getIntegerData
toexe::imebra::handlers::dataHandler, puntoexe::imebra::waveform, 318
199 getInterpretation
getExceptionInfo puntoexe::imebra::waveform, 319
puntoexe::exceptionsManager, 101 getItemOffset

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


546 INDEX

puntoexe::imebra::dataSet, 162 200


getLongLength getRecordDataSet
puntoexe::imebra::dicomDictionary, puntoexe::imebra::directoryRecord,
180 191
getLut getReferencedRecord
puntoexe::imebra::dataSet, 162 puntoexe::imebra::directoryRecord,
getMaxHighBit 191
puntoexe::imebra::codecs::codec, getSamples
120 puntoexe::imebra::waveform, 319
getMaxSize getScreenDPI
puntoexe::imebra::dicomDictionary, puntoexe::imebra::view, 309
180 getScrollPosition
getMemory puntoexe::imebra::view, 309
pun- getScrollSize
toexe::imebra::handlers::dataHandlerNumeric,
puntoexe::imebra::view, 310
213 getSequenceItem
puntoexe::memoryPool, 330 puntoexe::imebra::dataSet, 163
getMemoryBuffer getSignedLong
pun-
puntoexe::imebra::dataSet, 163
toexe::imebra::handlers::dataHandlerNumeric,
pun-
213
toexe::imebra::handlers::dataHandler,
getMemoryPool
200
puntoexe::memoryPool, 330
pun-
getMessage
toexe::imebra::handlers::dataHandlerStringAS,
puntoexe::exceptionInfo, 98
219
puntoexe::exceptionsManager, 102
getSignedLongIncPointer
getNewRecord
pun-
puntoexe::imebra::dicomDir, 184
toexe::imebra::handlers::dataHandler,
getNextRecord
200
puntoexe::imebra::directoryRecord,
getSize
191
pun-
getNumberOfChannels
toexe::imebra::handlers::dataHandler,
pun-
200
toexe::imebra::transforms::colorTransforms::colorTransformsFactory,
253 puntoexe::imebra::image, 233
getOrder puntoexe::imebra::lut, 242
pun- getSizeMm
toexe::imebra::dataCollectionIterator, puntoexe::imebra::image, 234
148 getStreamReader
getOutputBitmap puntoexe::imebra::buffer, 111
pun- puntoexe::imebra::data, 143
toexe::imebra::transforms::drawBitmap,puntoexe::imebra::dataGroup, 152
274 puntoexe::imebra::dataSet, 164
getOutputImage getStreamWriter
pun- puntoexe::imebra::buffer, 111
toexe::imebra::transforms::transform, puntoexe::imebra::data, 144
285 puntoexe::imebra::dataGroup, 153
getPaddingByte puntoexe::imebra::dataSet, 164
pun- getString
toexe::imebra::handlers::dataHandler, puntoexe::imebra::dataSet, 165

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


INDEX 547

pun- 202
toexe::imebra::handlers::dataHandler,
getVOILUTDescription
201 pun-
getTag toexe::imebra::transforms::VOILUT,
puntoexe::imebra::dataGroup, 153 299
puntoexe::imebra::dataSet, 165 getVOILUTId
getTagName pun-
puntoexe::imebra::dicomDictionary, toexe::imebra::transforms::VOILUT,
180 299
getTagType getWaveform
puntoexe::imebra::dicomDictionary, puntoexe::imebra::dataSet, 167
181 GetWaveformItem
getThreadId puntoexe::imebra::waveform, 319
puntoexe::thread, 360 getWindowSize
getTransform puntoexe::imebra::view, 310
pun- getWordSize
toexe::imebra::transforms::colorTransforms::colorTransformsFactory,
puntoexe::imebra::dicomDictionary,
253 181
getType getZoomFactor
puntoexe::imebra::directoryRecord, puntoexe::imebra::view, 310
191
getTypeString high
puntoexe::imebra::directoryRecord, puntoexe::imebra::codecs::codec,
192 119
getUnicodeString highByteEndian
puntoexe::imebra::dataSet, 166 puntoexe::streamController, 340
pun- huffmanTable
toexe::imebra::handlers::dataHandler, puntoexe::huffmanTable, 104
201 huffmanTable.cpp, 451
pun- huffmanTable.h, 452
toexe::imebra::handlers::dataHandlerDate,
207 image.cpp, 453
pun- image.h, 454
imageException
toexe::imebra::handlers::dataHandlerTime,
228 puntoexe::imebra::imageException,
getUnitSize 235
pun- imageHandler
toexe::imebra::handlers::dataHandler, puntoexe::imebra::handlers, 78
201 imagePosToMillimitersX
getUnsignedLong puntoexe::imebra::view, 311
puntoexe::imebra::dataSet, 166 imagePosToMillimitersY
pun- puntoexe::imebra::view, 311
imbxInt16
toexe::imebra::handlers::dataHandler,
201 configuration.h, 385
pun- imbxInt32
configuration.h, 385
toexe::imebra::handlers::dataHandlerStringAS,
219 imbxInt8
getUnsignedLongIncPointer configuration.h, 385
pun- imbxUint16
toexe::imebra::handlers::dataHandler, configuration.h, 385

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


548 INDEX

imbxUint32 pun-
configuration.h, 386 toexe::imebra::transforms::colorTransforms::colorTransfo
imbxUint8 254
configuration.h, 386 isSubsampledY
imebra.h, 456 pun-
IMEBRA_COMMIT_- toexe::imebra::transforms::colorTransforms::colorTransfo
TRANSACTION_START 254
transaction.h, 500 isValid
IMEBRA_DATASET_MAX_DEPTH pun-
dicomCodec.h, 438 toexe::imebra::dataCollectionIterator,
IMEBRA_TRANSACTION_ABORT 149
transaction.h, 500
IMEBRA_TRANSACTION_END jpegCodec.cpp, 459
transaction.h, 500 jpegCodec.h, 460
IMEBRA_TRANSACTION_START jpegCodecCannotHandleSyntax
transaction.h, 501 pun-
toexe::imebra::codecs::jpegCodecCannotHandleSyntax,
incIterator
137
pun-
toexe::imebra::dataCollectionIterator,
load
149
pun-
incPointer
toexe::imebra::codecs::codecFactory,
pun-
129
toexe::imebra::handlers::dataHandler,
lock
202
puntoexe::criticalSection, 96
incValueFreq lockCriticalSection
puntoexe::huffmanTable, 105 puntoexe::lockCriticalSection, 321
invalidate lockMultipleObjects
puntoexe::imebra::view, 311 puntoexe::lockMultipleObjects, 322
isAutoZoom lockObject
puntoexe::imebra::view, 312 puntoexe::lockObject, 324
isDataTypeValid low
puntoexe::imebra::dicomDictionary, puntoexe::imebra::codecs::codec,
181 119
isEmpty lowByteEndian
pun- puntoexe::streamController, 340
toexe::imebra::transforms::transform,
LUT.cpp, 461
286 LUT.h, 462
pun-
toexe::imebra::transforms::transformsChain,
m_bJpegTags
297 puntoexe::streamController, 342
isMonochrome m_dataBuffer
pun- puntoexe::streamController, 342
toexe::imebra::transforms::colorTransforms::colorTransformsFactory,
m_exceptionMessage
254 puntoexe::exceptionInfo, 98
isReferencedOnce m_exceptionType
puntoexe::baseObject, 87 puntoexe::exceptionInfo, 98
isRunning m_fileName
puntoexe::thread, 360 puntoexe::exceptionInfo, 98
isSubsampledX m_functionName

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


INDEX 549

puntoexe::exceptionInfo, 98 pun-
m_lineNumber toexe::imebra::transforms::colorTransforms::colorTransformsFactory,
puntoexe::exceptionInfo, 98 255
m_pControlledStream nullStream.h, 477
puntoexe::streamController, 343
m_virtualLength openFile
puntoexe::streamController, 343 puntoexe::stream, 337
m_virtualStart operator destType ∗
puntoexe::streamController, 343 puntoexe::ptr, 335
makeSubsampled operator ptr< destType >
pun- puntoexe::ptr, 335
toexe::imebra::transforms::colorTransforms::colorTransformsFactory,
operator->
255 puntoexe::ptr, 335
mappedValue operator=
puntoexe::imebra::lut, 242 puntoexe::ptr, 335
mappedValueRev operator==
puntoexe::imebra::lut, 242 puntoexe::ptr, 336
medium operator[]
puntoexe::imebra::codecs::codec, pun-
119 toexe::imebra::handlers::dataHandlerNumeric,
memory.cpp, 463 213
memory.h, 464
memoryStream PALETTECOLORToRGB.cpp, 478
puntoexe::memoryStream, 331 PALETTECOLORToRGB.h, 479
memoryStream.cpp, 465 parseStream
memoryStream.h, 466 pun-
millimitersToImagePosX toexe::imebra::codecs::dicomCodec,
puntoexe::imebra::view, 312 132
millimitersToImagePosY pointerIsValid
puntoexe::imebra::view, 312 pun-
modalityVOILUT.cpp, 467 toexe::imebra::handlers::dataHandler,
modalityVOILUT.h, 468 202
MONOCHROME1ToMONOCHROME2.cpp, position
469 puntoexe::streamController, 342
MONOCHROME1ToMONOCHROME2.h, processDataBuffers
470 pun-
MONOCHROME1ToRGB.cpp, 471 toexe::imebra::transforms::transformBuffers,
MONOCHROME1ToRGB.h, 472 287
MONOCHROME2ToRGB.cpp, 473 ptr
MONOCHROME2ToRGB.h, 474 puntoexe::ptr, 334
MONOCHROME2ToYBRFULL.cpp, puntoexe, 67
475 puntoexe::baseObject, 85
MONOCHROME2ToYBRFULL.h, 476 baseObject, 87
months isReferencedOnce, 87
pun- puntoexe::baseStream, 89
toexe::imebra::handlers::dataHandlerStringAS,
read, 90
218 write, 90
puntoexe::charsetConversionException,
normalizeColorSpace 91

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


550 INDEX

puntoexe::charsetConversionExceptionNoSupportedTable,
bufferExceptionUnknownType, 114
92 puntoexe::imebra::charsetsList::charsetListExceptionDiffDefault,
puntoexe::charsetConversionExceptionNoTable, 115
93 puntoexe::imebra::charsetsList::charsetsListException,
puntoexe::charsetConversionExceptionUtfSizeNotSupported,
116
94 puntoexe::imebra::codecs, 75
puntoexe::criticalSection, 95 puntoexe::imebra::codecs::codec, 117
∼criticalSection, 95 aboveMedium, 119
criticalSection, 95 belowMedium, 119
lock, 96 canHandleTransferSyntax, 119
tryLock, 96 createCodec, 119
unlock, 96 encapsulated, 120
puntoexe::exceptionInfo, 97 getImage, 120
exceptionInfo, 98 getMaxHighBit, 120
getMessage, 98 high, 119
m_exceptionMessage, 98 low, 119
m_exceptionType, 98 medium, 119
m_fileName, 98 quality, 119
m_functionName, 98 read, 121
m_lineNumber, 98 setImage, 121
puntoexe::exceptionsManager, 100 suggestAllocatedBits, 122
addExceptionInfo, 101 veryHigh, 119
clearExceptionInfo, 101 veryLow, 119
getExceptionInfo, 101 write, 123
getMessage, 102 puntoexe::imebra::codecs::codecException,
tExceptionInfoList, 101 124
puntoexe::huffmanTable, 103 codecException, 124
calcHuffmanCodesLength, 104 puntoexe::imebra::codecs::codecExceptionCorruptedFile,
calcHuffmanTables, 104 125
huffmanTable, 104 codecExceptionCorruptedFile, 125
incValueFreq, 105 puntoexe::imebra::codecs::codecExceptionWrongFormat,
readHuffmanCode, 105 126
removeLastCode, 105 codecExceptionWrongFormat, 126
reset, 105 puntoexe::imebra::codecs::codecExceptionWrongTransferSyntax,
writeHuffmanCode, 106 127
puntoexe::imebra, 71 codecExceptionWrongTransferSyn-
puntoexe::imebra::buffer, 107 tax, 127
buffer, 108, 109 puntoexe::imebra::codecs::codecFactory,
getBufferSizeBytes, 109 128
getCharsetsList, 109 getCodec, 129
getDataHandler, 110 getCodecFactory, 129
getDataHandlerRaw, 110 load, 129
getDataType, 111 registerCodec, 130
getStreamReader, 111 puntoexe::imebra::codecs::dicomCodec,
getStreamWriter, 111 131
setCharsetsList, 111 buildStream, 131
puntoexe::imebra::bufferException, 113 parseStream, 132
bufferException, 113 puntoexe::imebra::codecs::dicomCodecException,
puntoexe::imebra::bufferExceptionUnknownType, 134
114 dicomCodecException, 134

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


INDEX 551

puntoexe::imebra::codecs::dicomCodecExceptionDepthLimitReached,
getFrameOffset, 161
135 getGroup, 161
dicomCodecExceptionDepthLim- getImage, 162
itReached, 135 getItemOffset, 162
puntoexe::imebra::codecs::jpegCodec, getLut, 162
136 getSequenceItem, 163
puntoexe::imebra::codecs::jpegCodecCannotHandleSyntax,
getSignedLong, 163
137 getStreamReader, 164
jpegCodecCannotHandleSyntax, getStreamWriter, 164
137 getString, 165
puntoexe::imebra::codecs::jpegCodecException, getTag, 165
138 getUnicodeString, 166
puntoexe::imebra::data, 139 getUnsignedLong, 166
appendDataSet, 140 getWaveform, 167
bufferExists, 140 setDouble, 167
deleteBuffer, 141 setGroup, 168
getBufferSize, 141 setImage, 168
getDataHandler, 141 setItemOffset, 169
getDataHandlerRaw, 142 setSignedLong, 169
getDataSet, 143 setString, 169
getDataType, 143 setUnicodeString, 170
getStreamReader, 143 setUnsignedLong, 170
getStreamWriter, 144 updateCharsetTag, 171
setDataSet, 144 updateTagsCharset, 171
puntoexe::imebra::dataCollection, 145 puntoexe::imebra::dataSetCorruptedOffsetTable,
getDataIterator, 145 172
puntoexe::imebra::dataCollectionIterator, dataSetCorruptedOffsetTable, 172
147 puntoexe::imebra::dataSetException, 173
getData, 148 puntoexe::imebra::dataSetExceptionDifferentFormat,
getId, 148 174
getOrder, 148 puntoexe::imebra::dataSetExceptionOldFormat,
incIterator, 149 175
isValid, 149 puntoexe::imebra::dataSetExceptionUnknownTransferSyntax,
reset, 149 176
puntoexe::imebra::dataGroup, 150 puntoexe::imebra::dataSetExceptionWrongFrame,
getDataHandler, 151 177
getDataHandlerRaw, 151 puntoexe::imebra::dataSetImageDoesntExist,
getDataType, 152 178
getStreamReader, 152 dataSetImageDoesntExist, 178
getStreamWriter, 153 puntoexe::imebra::dicomDictionary, 179
getTag, 153 getDicomDictionary, 180
puntoexe::imebra::dataSet, 154 getLongLength, 180
getDataHandler, 157 getMaxSize, 180
getDataHandlerRaw, 158 getTagName, 180
getDataType, 159 getTagType, 181
getDefaultDataType, 159 getWordSize, 181
getDouble, 159 isDataTypeValid, 181
getFirstAvailFrameBufferId, 160 puntoexe::imebra::dicomDir, 182
getFrameBufferId, 160 buildDataSet, 183
getFrameBufferIds, 160 dicomDir, 183

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


552 INDEX

getDirectoryDataSet, 184 getUnsignedLongIncPointer, 202


getFirstRootRecord, 184 incPointer, 202
getNewRecord, 184 pointerIsValid, 202
setFirstRootRecord, 184 setDate, 203
puntoexe::imebra::dicomDirCircularReferenceException,
setDouble, 203
186 setDoubleIncPointer, 203
dicomDirCircularReferenceExcep- setPointer, 204
tion, 186 setSignedLong, 204
puntoexe::imebra::dicomDirException, setSignedLongIncPointer, 204
187 setSize, 204
dicomDirException, 187 setString, 205
puntoexe::imebra::dicomDirUnknownDirectoryRecordType,
setUnicodeString, 205
188 setUnsignedLong, 205
dicomDirUnknownDirecto- setUnsignedLongIncPointer, 206
ryRecordType, 188 skip, 206
puntoexe::imebra::directoryRecord, 189 puntoexe::imebra::handlers::dataHandlerDate,
getFilePart, 190 207
getFirstChildRecord, 191 getUnicodeString, 207
getNextRecord, 191 setUnicodeString, 208
getRecordDataSet, 191 puntoexe::imebra::handlers::dataHandlerDateTimeBase,
getReferencedRecord, 191 209
getType, 191 puntoexe::imebra::handlers::dataHandlerNumeric,
getTypeString, 192 210
setFirstChildRecord, 192 at, 211
setNextRecord, 192 copyFromInt32Interleaved, 211
setReferencedRecord, 192 copyToInt32Interleaved, 212
setType, 193 getMemory, 213
setTypeString, 193 getMemoryBuffer, 213
tDirectoryRecordType, 190 operator[], 213
puntoexe::imebra::handlers, 77 puntoexe::imebra::handlers::dataHandlerRaw,
imageHandler, 78 214
puntoexe::imebra::handlers::dataHandler, puntoexe::imebra::handlers::dataHandlerString,
194 215
abort, 197 puntoexe::imebra::handlers::dataHandlerStringAE,
commit, 197 216
copyBack, 197 puntoexe::imebra::handlers::dataHandlerStringAS,
copyFromInt32, 198 217
copyToInt32, 198 days, 218
getDataType, 198 getAge, 218
getDate, 198 getDouble, 219
getDouble, 199 getSignedLong, 219
getDoubleIncPointer, 199 getUnsignedLong, 219
getPaddingByte, 200 months, 218
getSignedLong, 200 setAge, 219
getSignedLongIncPointer, 200 setDouble, 220
getSize, 200 setSignedLong, 220
getString, 201 setUnsignedLong, 220
getUnicodeString, 201 tAgeUnit, 218
getUnitSize, 201 weeks, 218
getUnsignedLong, 201 years, 218

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


INDEX 553

puntoexe::imebra::handlers::dataHandlerStringCS,
setLutValue, 243
222 puntoexe::imebra::lutException, 244
puntoexe::imebra::handlers::dataHandlerStringDS,
puntoexe::imebra::lutExceptionCorrupted,
223 245
puntoexe::imebra::handlers::dataHandlerStringIS,
puntoexe::imebra::lutExceptionWrongIndex,
224 246
puntoexe::imebra::handlers::dataHandlerStringPN,
puntoexe::imebra::transaction, 247
225 ∼transaction, 248
puntoexe::imebra::handlers::dataHandlerStringUnicode,
abort, 248
227 transaction, 248
puntoexe::imebra::handlers::dataHandlerTime,
puntoexe::imebra::transforms, 79
228 puntoexe::imebra::transforms::colorTransforms,
getUnicodeString, 228 82
setUnicodeString, 229 puntoexe::imebra::transforms::colorTransforms::colorTransform,
puntoexe::imebra::image, 230 249
bitDepth, 231 createColorTransform, 250
create, 232 getFinalColorSpace, 250
depthS16, 231 getInitialColorSpace, 250
depthS8, 231 puntoexe::imebra::transforms::colorTransforms::colorTransformsFactory,
depthU16, 231 251
depthU8, 231 canSubsample, 252
depthUnknown, 231 getColorTransformsFactory, 253
getChannelsNumber, 232 getNumberOfChannels, 253
getColorSpace, 232 getTransform, 253
getDataHandler, 232 isMonochrome, 254
getDepth, 233 isSubsampledX, 254
getHighBit, 233 isSubsampledY, 254
getSize, 233 makeSubsampled, 255
getSizeMm, 234 normalizeColorSpace, 255
setSizeMm, 234 puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryExcept
puntoexe::imebra::imageException, 235 257
imageException, 235 puntoexe::imebra::transforms::colorTransforms::colorTransformsFactoryExcept
puntoexe::imebra::imageExceptionInvalidSize, 258
236 puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToMONOC
puntoexe::imebra::imageExceptionUnknownColorSpace, 259
237 puntoexe::imebra::transforms::colorTransforms::MONOCHROME1ToRGB,
puntoexe::imebra::imageExceptionUnknownDepth, 260
238 puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToMONOC
puntoexe::imebra::lut, 239 261
checkValidDataRange, 240 puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToRGB,
copyToInt32, 240 262
create, 240 puntoexe::imebra::transforms::colorTransforms::MONOCHROME2ToYBRFUL
fillHandlers, 241 263
getBits, 241 puntoexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB,
getDescription, 241 264
getFirstMapped, 241 setLut, 265
getSize, 242 puntoexe::imebra::transforms::colorTransforms::RGBToMONOCHROME2,
mappedValue, 242 266
mappedValueRev, 242 puntoexe::imebra::transforms::colorTransforms::RGBToPALETTECOLOR,
setLut, 242 267

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


554 INDEX

puntoexe::imebra::transforms::colorTransforms::RGBToYBRFULL,
puntoexe::imebra::transforms::transformExceptionDataSetNotDefin
268 293
puntoexe::imebra::transforms::transformExceptionOutputImageNot
puntoexe::imebra::transforms::colorTransforms::RGBToYBRPARTIAL,
269 294
puntoexe::imebra::transforms::transformHighBit,
puntoexe::imebra::transforms::colorTransforms::YBRFULLToMONOCHROME2,
270 295
puntoexe::imebra::transforms::transformsChain,
puntoexe::imebra::transforms::colorTransforms::YBRFULLToRGB,
271 296
addTransform,
puntoexe::imebra::transforms::colorTransforms::YBRPARTIALToRGB, 297
272 endTransformsChain, 297
puntoexe::imebra::transforms::drawBitmap, isEmpty, 297
273 puntoexe::imebra::transforms::VOILUT,
declareBitmapType, 274 298
getOutputBitmap, 274 getCenterWidth, 299
getVOILUTDescription,
puntoexe::imebra::transforms::drawBitmapException, 299
276 getVOILUTId, 299
setCenterWidth, 300
puntoexe::imebra::transforms::drawBitmapExceptionDataSetNotDeclared,
277 setLUT, 300
setVOILUT, 300
puntoexe::imebra::transforms::drawBitmapExceptionImageNotDeclared,
278 puntoexe::imebra::transforms::VOILUTInverse,
302
puntoexe::imebra::transforms::drawBitmapExceptionInvalidAlignByte,
279 puntoexe::imebra::view, 303
draw, 306
puntoexe::imebra::transforms::drawBitmapExceptionInvalidArea,
280 drawBitmap, 306
drawCursorLine, 307
puntoexe::imebra::transforms::modalityVOILUT,
drawRectangle, 308
281
getBackgroundColor, 308
puntoexe::imebra::transforms::modalityVOILUTInverse,
getImage, 308
282
getImageRect, 309
puntoexe::imebra::transforms::transform,
getScreenDPI, 309
283
getScrollPosition, 309
declareDataSet, 284
getScrollSize, 310
declareInputImage, 284 getWindowSize, 310
declareOutputImage, 284 getZoomFactor, 310
doTransform, 285 imagePosToMillimitersX, 311
getDataSet, 285 imagePosToMillimitersY, 311
getInputImage, 285 invalidate, 311
getOutputImage, 285 isAutoZoom, 312
isEmpty, 286 millimitersToImagePosX, 312
puntoexe::imebra::transforms::transformBuffers, millimitersToImagePosY, 312
287 setBackgroundColor, 312
processDataBuffers, 287 setImage, 313
puntoexe::imebra::transforms::transformBuffersInPlace,
setScrollPosition, 313
289 setScrollSize, 313
puntoexe::imebra::transforms::transformBuffersInputOutput,
setZoomFactor, 314
290 setZoomRect, 314
puntoexe::imebra::transforms::transformException,
updateWindow, 315
291 view, 306
puntoexe::imebra::transforms::transformExceptionDataInputImageDefined,
windowPosToImageX, 315
292 windowPosToImageY, 315

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


INDEX 555

zoomInOut, 316 adjustEndian, 341


puntoexe::imebra::waveform, 317 getControlledStream, 341
getBitsAllocated, 318 getControlledStreamPosition, 342
getBitsStored, 318 highByteEndian, 340
getChannels, 318 lowByteEndian, 340
getIntegerData, 318 m_bJpegTags, 342
getInterpretation, 319 m_dataBuffer, 342
getSamples, 319 m_pControlledStream, 343
GetWaveformItem, 319 m_virtualLength, 343
waveform, 318 m_virtualStart, 343
puntoexe::lockCriticalSection, 321 position, 342
∼lockCriticalSection, 321 streamController, 341
lockCriticalSection, 321 tByteOrdering, 340
puntoexe::lockMultipleObjects, 322 puntoexe::streamException, 344
∼lockMultipleObjects, 323 puntoexe::streamExceptionClose, 345
lockMultipleObjects, 322 puntoexe::streamExceptionEOF, 346
tObjectsList, 322 puntoexe::streamExceptionOpen, 347
unlock, 323 puntoexe::streamExceptionRead, 348
puntoexe::lockObject, 324 puntoexe::streamExceptionWrite, 349
∼lockObject, 324 puntoexe::streamJpegTagInStream, 350
lockObject, 324 puntoexe::streamReader, 351
unlock, 324 addBit, 352
puntoexe::memory, 326 endReached, 353
assign, 327 read, 353
clear, 327 readBit, 353
copyFrom, 327 readBits, 353
data, 327 readByte, 354
empty, 327 resetInBitsBuffer, 354
reserve, 328 seek, 354
resize, 328 streamReader, 352
size, 328 puntoexe::streamWriter, 356
transfer, 328 ∼streamWriter, 357
puntoexe::memoryPool, 329 flushDataBuffer, 357
flush, 330 resetOutBitsBuffer, 357
getMemory, 330 streamWriter, 357
getMemoryPool, 330 write, 357
puntoexe::memoryStream, 331 writeBits, 358
memoryStream, 331 writeByte, 358
puntoexe::nullStream, 332 puntoexe::thread, 359
puntoexe::ptr, 333 getThreadId, 360
get, 335 isRunning, 360
operator destType ∗, 335 shouldTerminate, 360
operator ptr< destType >, 335 start, 361
operator->, 335 terminate, 361
operator=, 335 thread, 360
operator==, 336 threadFunction, 361
ptr, 334 yield, 361
puntoexe::stream, 337 puntoexe::threadException, 362
openFile, 337 puntoexe::threadExceptionAlreadyRunning,
puntoexe::streamController, 339 363

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


556 INDEX

PUNTOEXE_FUNCTION_END RGBToYBRFULL.h, 485


exception.h, 448 RGBToYBRPARTIAL.cpp, 486
PUNTOEXE_FUNCTION_START RGBToYBRPARTIAL.h, 487
exception.h, 448
PUNTOEXE_RETHROW seek
exception.h, 449 puntoexe::streamReader, 354
PUNTOEXE_THROW setAge
exception.h, 449 pun-
toexe::imebra::handlers::dataHandlerStringAS,
quality 219
puntoexe::imebra::codecs::codec, setBackgroundColor
119 puntoexe::imebra::view, 312
setCenterWidth
read pun-
puntoexe::baseStream, 90 toexe::imebra::transforms::VOILUT,
puntoexe::imebra::codecs::codec, 300
121 setCharsetsList
puntoexe::streamReader, 353 puntoexe::imebra::buffer, 111
readBit setDataSet
puntoexe::streamReader, 353 puntoexe::imebra::data, 144
readBits setDate
puntoexe::streamReader, 353 pun-
readByte toexe::imebra::handlers::dataHandler,
puntoexe::streamReader, 354 203
readHuffmanCode setDouble
puntoexe::huffmanTable, 105 puntoexe::imebra::dataSet, 167
registerCodec pun-
pun- toexe::imebra::handlers::dataHandler,
toexe::imebra::codecs::codecFactory, 203
130 pun-
removeLastCode toexe::imebra::handlers::dataHandlerStringAS,
puntoexe::huffmanTable, 105 220
reserve setDoubleIncPointer
puntoexe::memory, 328 pun-
reset toexe::imebra::handlers::dataHandler,
puntoexe::huffmanTable, 105 203
pun- setFirstChildRecord
toexe::imebra::dataCollectionIterator, puntoexe::imebra::directoryRecord,
149 192
resetInBitsBuffer setFirstRootRecord
puntoexe::streamReader, 354 puntoexe::imebra::dicomDir, 184
resetOutBitsBuffer setGroup
puntoexe::streamWriter, 357 puntoexe::imebra::dataSet, 168
resize setImage
puntoexe::memory, 328 puntoexe::imebra::codecs::codec,
RGBToMONOCHROME2.cpp, 480 121
RGBToMONOCHROME2.h, 481 puntoexe::imebra::dataSet, 168
RGBToPALETTECOLOR.cpp, 482 puntoexe::imebra::view, 313
RGBToPALETTECOLOR.h, 483 setItemOffset
RGBToYBRFULL.cpp, 484 puntoexe::imebra::dataSet, 169

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


INDEX 557

setLUT puntoexe::imebra::directoryRecord,
pun- 193
toexe::imebra::transforms::VOILUT,setTypeString
300 puntoexe::imebra::directoryRecord,
setLut 193
puntoexe::imebra::lut, 242 setUnicodeString
pun- puntoexe::imebra::dataSet, 170
pun-
toexe::imebra::transforms::colorTransforms::PALETTECOLORToRGB,
265 toexe::imebra::handlers::dataHandler,
setLutValue 205
puntoexe::imebra::lut, 243 pun-
setNextRecord toexe::imebra::handlers::dataHandlerDate,
puntoexe::imebra::directoryRecord, 208
192 pun-
setPointer toexe::imebra::handlers::dataHandlerTime,
pun- 229
setUnsignedLong
toexe::imebra::handlers::dataHandler,
204 puntoexe::imebra::dataSet, 170
setReferencedRecord pun-
puntoexe::imebra::directoryRecord, toexe::imebra::handlers::dataHandler,
192 205
pun-
setScrollPosition
toexe::imebra::handlers::dataHandlerStringAS,
puntoexe::imebra::view, 313
220
setScrollSize
setUnsignedLongIncPointer
puntoexe::imebra::view, 313
pun-
setSignedLong
toexe::imebra::handlers::dataHandler,
puntoexe::imebra::dataSet, 169 206
pun- setVOILUT
toexe::imebra::handlers::dataHandler, pun-
204 toexe::imebra::transforms::VOILUT,
pun- 300
toexe::imebra::handlers::dataHandlerStringAS,
setZoomFactor
220 puntoexe::imebra::view, 314
setSignedLongIncPointer setZoomRect
pun- puntoexe::imebra::view, 314
toexe::imebra::handlers::dataHandler,
shouldTerminate
204 puntoexe::thread, 360
setSize size
pun- puntoexe::memory, 328
toexe::imebra::handlers::dataHandler,
skip
204 pun-
setSizeMm toexe::imebra::handlers::dataHandler,
puntoexe::imebra::image, 234 206
setString start
puntoexe::imebra::dataSet, 169 puntoexe::thread, 361
pun- stream.cpp, 488
toexe::imebra::handlers::dataHandler,
stream.h, 489
205 streamController
setType puntoexe::streamController, 341

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


558 INDEX

streamController.cpp, 490 transform.cpp, 502


streamController.h, 491 transform.h, 503
streamReader transformBuffers.cpp, 505
puntoexe::streamReader, 352 transformBuffers.h, 506
streamReader.cpp, 492 transformHighBit.cpp, 507
streamReader.h, 493 transformHighBit.h, 508
streamWriter transformsChain.cpp, 509
puntoexe::streamWriter, 357 transformsChain.h, 510
streamWriter.cpp, 494 tryLock
streamWriter.h, 495 puntoexe::criticalSection, 96
suggestAllocatedBits
puntoexe::imebra::codecs::codec, unlock
122 puntoexe::criticalSection, 96
puntoexe::lockMultipleObjects, 323
tAgeUnit puntoexe::lockObject, 324
pun- updateCharsetTag
toexe::imebra::handlers::dataHandlerStringAS,
puntoexe::imebra::dataSet, 171
218
updateTagsCharset
tByteOrdering
puntoexe::imebra::dataSet, 171
puntoexe::streamController, 340
updateWindow
tDirectoryRecordType
puntoexe::imebra::view, 315
puntoexe::imebra::directoryRecord,
190
terminate veryHigh
puntoexe::thread, 361 puntoexe::imebra::codecs::codec,
tExceptionInfoList 119
puntoexe::exceptionsManager, 101 veryLow
thread puntoexe::imebra::codecs::codec,
puntoexe::thread, 360 119
thread.cpp, 496 view
thread.h, 497 puntoexe::imebra::view, 306
threadFunction viewHelper.cpp, 511
puntoexe::thread, 361 viewHelper.h, 512
tObjectsList VOILUT.cpp, 513
puntoexe::lockMultipleObjects, 322 VOILUT.h, 514
transaction
puntoexe::imebra::transaction, 248 waveform
transaction.cpp, 498 puntoexe::imebra::waveform, 318
transaction.h, 499 waveform.cpp, 515
IMEBRA_COMMIT_- waveform.h, 516
TRANSACTION_START, weeks
500 pun-
IMEBRA_TRANSACTION_- toexe::imebra::handlers::dataHandlerStringAS,
ABORT, 500 218
IMEBRA_TRANSACTION_END, windowPosToImageX
500 puntoexe::imebra::view, 315
IMEBRA_TRANSACTION_- windowPosToImageY
START, 501 puntoexe::imebra::view, 315
transfer write
puntoexe::memory, 328 puntoexe::baseStream, 90

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen


INDEX 559

puntoexe::imebra::codecs::codec,
123
puntoexe::streamWriter, 357
writeBits
puntoexe::streamWriter, 358
writeByte
puntoexe::streamWriter, 358
writeHuffmanCode
puntoexe::huffmanTable, 106

YBRFULLToMONOCHROME2.cpp,
517
YBRFULLToMONOCHROME2.h, 518
YBRFULLToRGB.cpp, 519
YBRFULLToRGB.h, 520
YBRPARTIALToRGB.cpp, 521
YBRPARTIALToRGB.h, 522
years
pun-
toexe::imebra::handlers::dataHandlerStringAS,
218
yield
puntoexe::thread, 361

zoomInOut
puntoexe::imebra::view, 316

Generated on Wed Aug 12 22:31:02 2009 for imebra by Doxygen

Das könnte Ihnen auch gefallen