OFFIS DCMTK
Version 3.6.0
Main Page
Related Pages
Classes
Files
File List
File Members
dcmdata
apps
mdfconen.h
1
/*
2
*
3
* Copyright (C) 2003-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 for modifying DICOM files from comandline
19
*
20
* Last Update: $Author: joergr $
21
* Update Date: $Date: 2010-10-14 13:17:52 $
22
* CVS/RCS Revision: $Revision: 1.19 $
23
* Status: $State: Exp $
24
*
25
* CVS/RCS Log at end of file
26
*
27
*/
28
29
#ifndef MDFCONEN_H
30
#define MDFCONEN_H
31
32
#include "dcmtk/config/osconfig.h"
// make sure OS specific configuration is included first
33
34
#include "dcmtk/ofstd/ofcond.h"
35
#include "dcmtk/dcmdata/dcxfer.h"
36
37
38
// forward declarations
39
class
MdfDatasetManager
;
40
class
OFConsoleApplication
;
41
class
OFCommandLine
;
42
43
46
class
MdfJob
{
47
48
public
:
49
50
OFString
option;
51
OFString
path;
52
OFString
value;
53
56
OFBool
operator==
(
const
MdfJob
&j)
const
;
57
58
private
:
59
62
MdfJob
&
operator=
(
const
MdfJob
&j);
63
};
64
65
69
class
MdfConsoleEngine
70
{
71
public
:
72
79
MdfConsoleEngine
(
int
argc,
80
char
*argv[],
81
const
char
*appl_name);
82
85
~MdfConsoleEngine
();
86
92
int
startProvidingService
();
93
94
protected
:
95
99
void
parseNonJobOptions
();
100
105
void
parseCommandLine
();
106
112
static
OFBool
jobOptionExpectsParameters
(
const
OFString
&job);
113
121
static
void
splitPathAndValue
(
const
OFString
&whole,
122
OFString
&path,
123
OFString
&value);
124
130
int
executeJob
(
const
MdfJob
&job,
131
const
char
*filename = NULL);
132
138
OFCondition
loadFile
(
const
char
*filename);
139
144
OFCondition
backupFile
(
const
char
*file_name);
145
150
OFCondition
restoreFile
(
const
char
*filename);
151
152
private
:
153
155
OFConsoleApplication
*
app
;
156
158
OFCommandLine
*
cmd
;
159
161
MdfDatasetManager
*
ds_man
;
162
164
OFBool
ignore_errors_option
;
165
167
OFBool
update_metaheader_uids_option
;
168
170
OFBool
no_backup_option
;
171
173
E_FileReadMode
read_mode_option
;
174
176
E_TransferSyntax
input_xfer_option
;
177
179
OFBool
output_dataset_option
;
180
182
E_TransferSyntax
output_xfer_option
;
183
185
E_GrpLenEncoding
glenc_option
;
186
188
E_EncodingType
enctype_option
;
189
191
E_PaddingEncoding
padenc_option
;
192
194
OFCmdUnsignedInt
filepad_option
;
195
OFCmdUnsignedInt itempad_option;
196
199
OFBool
ignore_missing_tags_option
;
200
203
OFBool
no_reservation_checks
;
204
207
OFBool
ignore_un_modifies
;
208
210
OFList<MdfJob>
*
jobs
;
211
213
OFList<OFString>
*
files
;
214
217
MdfConsoleEngine
&
operator=
(
const
MdfConsoleEngine
&);
218
221
MdfConsoleEngine
(
const
MdfConsoleEngine
&);
222
};
223
224
#endif // MDFCONEN_H
225
226
227
/*
228
** CVS/RCS Log:
229
** $Log: mdfconen.h,v $
230
** Revision 1.19 2010-10-14 13:17:52 joergr
231
** Updated copyright header. Added reference to COPYRIGHT file.
232
**
233
** Revision 1.18 2010-05-20 15:45:21 joergr
234
** Removed some unnecessary include directives.
235
**
236
** Revision 1.17 2009-11-04 09:58:06 uli
237
** Switched to logging mechanism provided by the "new" oflog module
238
**
239
** Revision 1.16 2009-01-15 16:11:55 onken
240
** Reworked dcmodify to work with the new DcmPath classes for supporting
241
** wildcard paths and automatic insertion of missing attributes and items.
242
** Added options for private tag handling and modification of UN values and
243
** for ignoring errors resulting from missing tags during modify and erase
244
** operations. Further cleanups.
245
**
246
** Revision 1.15 2008-06-23 13:39:16 joergr
247
** Fixed inconsistencies in Doxygen API documentation.
248
**
249
** Revision 1.14 2006/12/06 09:31:49 onken
250
** Added "--no-backup" option to prevent dcmodify from creating backup files
251
**
252
** Revision 1.13 2006/11/23 15:32:58 onken
253
** Made member variables private (before: protected)
254
**
255
** Revision 1.12 2005/12/08 15:46:50 meichel
256
** Updated Makefiles to correctly install header files
257
**
258
** Revision 1.11 2005/12/02 09:19:26 joergr
259
** Added new command line option that checks whether a given file starts with a
260
** valid DICOM meta header.
261
**
262
** Revision 1.10 2004/11/05 17:17:24 onken
263
** Added input and output options for dcmodify. minor code enhancements.
264
**
265
** Revision 1.9 2004/10/22 16:53:26 onken
266
** - fixed ignore-errors-option
267
** - major enhancements for supporting private tags
268
** - removed '0 Errors' output
269
** - modifications to groups 0000,0001,0002,0003,0005 and 0007 are blocked,
270
** removing tags with group 0001,0003,0005 and 0007 is still possible
271
** - UID options:
272
** - generate new study, series and instance UIDs
273
** - When changing UIDs in dataset, related metaheader tags are updated
274
** automatically
275
** - minor code improvements
276
**
277
** Revision 1.8 2004/04/19 14:45:07 onken
278
** Restructured code to avoid default parameter values for "complex types" like
279
** OFString. Required for Sun CC 2.0.1.
280
**
281
** Revision 1.7 2003/12/10 16:19:20 onken
282
** Changed API of MdfDatasetManager, so that its transparent for user, whether
283
** he wants to modify itemtags or tags at 1. level.
284
**
285
** Complete rewrite of MdfConsoleEngine. It doesn't support a batchfile any more,
286
** but now a user can give different modify-options at the same time on
287
** commandline. Other purifications and simplifications were made.
288
**
289
** Revision 1.6 2003/11/11 10:55:51 onken
290
** - debug-mechanism doesn't use debug(..) any more
291
** - comments purified
292
** - headers adjustet to debug-modifications
293
**
294
** Revision 1.5 2003/10/13 14:51:49 onken
295
** improved backup-strategy
296
**
297
** Revision 1.4 2003/10/01 14:04:03 onken
298
** Corrected doxygen-information in headerfiles
299
**
300
** Revision 1.3 2003/09/19 12:43:54 onken
301
** major bug fixes, corrections for "dcmtk-coding-style", better error-handling
302
**
303
** Revision 1.2 2003/07/09 12:13:13 meichel
304
** Included dcmodify in MSVC build system, updated headers
305
**
306
** Revision 1.1 2003/06/26 09:17:18 onken
307
** Added commandline-application dcmodify.
308
**
309
**
310
*/
Generated on Thu Dec 20 2012 for
OFFIS DCMTK
Version 3.6.0 by
Doxygen
1.8.2