OFFIS DCMTK
Version 3.6.0
Main Page
Related Pages
Classes
Files
File List
File Members
dcmdata
include
dcmtk
dcmdata
libi2d
i2d.h
1
/*
2
*
3
* Copyright (C) 2001-2010, OFFIS e.V.
4
* All rights reserved. See COPYRIGHT file for details.
5
*
6
* This software and supporting documentation were developed by
7
*
8
* OFFIS e.V.
9
* R&D Division Health
10
* Escherweg 2
11
* D-26121 Oldenburg, Germany
12
*
13
*
14
* Module: dcmdata
15
*
16
* Author: Michael Onken
17
*
18
* Purpose: Class to control conversion of image format to DICOM
19
*
20
* Last Update: $Author: joergr $
21
* Update Date: $Date: 2010-10-14 13:15:46 $
22
* CVS/RCS Revision: $Revision: 1.13 $
23
* Status: $State: Exp $
24
*
25
* CVS/RCS Log at end of file
26
*
27
*/
28
29
#ifndef I2D_H
30
#define I2D_H
31
32
#include "dcmtk/config/osconfig.h"
33
#include "dcmtk/dcmdata/libi2d/i2doutpl.h"
34
#include "dcmtk/dcmdata/libi2d/i2dplvlp.h"
35
#include "dcmtk/dcmdata/libi2d/i2dplsc.h"
36
#include "dcmtk/dcmdata/libi2d/i2djpgs.h"
37
#include "dcmtk/dcmdata/dcpixel.h"
38
39
class
Image2Dcm
40
{
41
42
public
:
43
47
Image2Dcm
();
48
59
OFCondition
convert
(
I2DImgSource
*inputPlug,
60
I2DOutputPlug
*outPlug,
61
DcmDataset
*& resultDset,
62
E_TransferSyntax& proposedTS);
63
69
void
setTemplateFile
(
const
OFString
& file);
70
75
void
setSeriesFrom
(
const
OFString
& file);
76
81
void
setStudyFrom
(
const
OFString
& file);
82
89
void
setIncrementInstanceNumber
(OFBool incInstNo);
90
101
void
setISOLatin1
(OFBool
insertLatin1
);
102
114
void
setOverrideKeys
(
const
OFList<OFString>
& ovkeys);
115
126
void
setValidityChecking
(OFBool doChecks,
127
OFBool insertMissingType2 = OFTrue,
128
OFBool inventMissingType1 = OFTrue);
129
133
~Image2Dcm
();
134
135
protected
:
136
142
void
cleanupTemplate
(
DcmDataset
*targetDset);
143
149
OFCondition
applyStudyOrSeriesFromFile
(
DcmDataset
*targetDset);
150
155
OFCondition
incrementInstanceNumber
(
DcmDataset
*targetDset);
156
162
OFCondition
generateUIDs
(
DcmDataset
*dset);
163
171
OFCondition
readAndInsertPixelData
(
I2DImgSource
* imageSource,
172
DcmDataset
* dset,
173
E_TransferSyntax& outputTS);
174
180
OFString
isValid
(
DcmDataset
& dataset)
const
;
181
186
OFCondition
applyOverrideKeys
(
DcmDataset
*outputDset);
187
193
OFCondition
insertLatin1
(
DcmDataset
*outputDset);
194
203
OFString
checkAndInventType1Attrib
(
const
DcmTagKey
& key,
204
DcmDataset
* targetDset,
205
const
OFString
& defaultValue =
""
)
const
;
206
207
214
OFString
checkAndInventType2Attrib
(
const
DcmTagKey
& key,
215
DcmDataset
* targetDset)
const
;
216
217
private
:
218
226
OFCondition
insertEncapsulatedPixelData
(
DcmDataset
* dset,
227
char
*pixData,
228
Uint32 length,
229
const
E_TransferSyntax& outputTS)
const
;
230
231
/* Attributes for writing DICOM dataset */
232
235
OFList<OFString>
m_overrideKeys
;
236
240
OFString
m_templateFile
;
241
243
OFBool
m_readStudyLevel
;
244
246
OFBool
m_readSeriesLevel
;
247
249
OFString
m_studySeriesFile
;
250
252
OFBool
m_incInstNoFromFile
;
253
256
OFBool
m_disableAttribChecks
;
257
260
OFBool
m_inventMissingType2Attribs
;
261
264
OFBool
m_inventMissingType1Attribs
;
265
269
OFBool
m_insertLatin1
;
270
};
271
272
#endif // I2D_H
273
274
/*
275
* CVS/RCS Log:
276
* $Log: i2d.h,v $
277
* Revision 1.13 2010-10-14 13:15:46 joergr
278
* Updated copyright header. Added reference to COPYRIGHT file.
279
*
280
* Revision 1.12 2010-08-09 13:03:07 joergr
281
* Updated data dictionary to 2009 edition of the DICOM standard. From now on,
282
* the official "keyword" is used for the attribute name which results in a
283
* number of minor changes (e.g. "PatientsName" is now called "PatientName").
284
*
285
* Revision 1.11 2010-03-25 09:44:07 onken
286
* Pixel data is now already marked with the correct transfer syntax in memory
287
* not only when writing to disk. This permits conversion in memory, e. g. for
288
* sending the converted DICOM images directly over the network.
289
*
290
* Revision 1.10 2009-11-04 09:58:08 uli
291
* Switched to logging mechanism provided by the "new" oflog module
292
*
293
* Revision 1.9 2009-09-30 08:05:25 uli
294
* Stop including dctk.h in libi2d's header files.
295
*
296
* Revision 1.8 2009-07-16 14:23:37 onken
297
* Extended Image2Dcm engine to also work for uncompressed pixel data input.
298
*
299
* Revision 1.7 2009-07-10 13:16:16 onken
300
* Added path functionality for --key option and lets the code make use
301
* of the DcmPath classes.
302
*
303
* Revision 1.6 2009-03-31 13:06:09 onken
304
* Changed implementation of lossy compression attribute detection and writing.
305
*
306
* Revision 1.4 2009-01-16 09:51:55 onken
307
* Completed doxygen documentation for libi2d.
308
*
309
* Revision 1.3 2008-01-16 16:32:23 onken
310
* Fixed some empty or doubled log messages in libi2d files.
311
*
312
* Revision 1.2 2008-01-16 15:07:40 onken
313
* Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
314
*
315
* Revision 1.2 2008-01-11 14:17:53 onken
316
* Added various options to i2dlib. Changed logging to use a configurable
317
* logstream. Added output plugin for the new Multiframe Secondary Capture SOP
318
* Classes. Added mode for JPEG plugin to copy exsiting APPn markers (except
319
* JFIF). Changed img2dcm default behaviour to invent type1/type2 attributes (no
320
* need for templates any more). Added some bug fixes.
321
*
322
* Revision 1.1 2007/11/08 15:58:55 onken
323
* Initial checkin of img2dcm application and corresponding library i2dlib.
324
*
325
*
326
*/
Generated on Thu Dec 20 2012 for
OFFIS DCMTK
Version 3.6.0 by
Doxygen
1.8.2