OFFIS DCMTK  Version 3.6.0
dsrcodvl.h
1 /*
2  *
3  * Copyright (C) 2000-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: dcmsr
15  *
16  * Author: Joerg Riesmeier
17  *
18  * Purpose:
19  * classes: DSRCodedEntryValue
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:16:32 $
23  * CVS/RCS Revision: $Revision: 1.21 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 
31 #ifndef DSRCODVL_H
32 #define DSRCODVL_H
33 
34 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
35 
36 #include "dcmtk/dcmsr/dsrtypes.h"
37 
38 #include "dcmtk/ofstd/ofstring.h"
39 
40 
41 /*---------------------*
42  * class declaration *
43  *---------------------*/
44 
48 {
49  // allow access to getValuePtr()
50  friend class DSRContentItem;
51 
52  public:
53 
57 
68  DSRCodedEntryValue(const OFString &codeValue,
69  const OFString &codingSchemeDesignator,
70  const OFString &codeMeaning);
71 
86  DSRCodedEntryValue(const OFString &codeValue,
87  const OFString &codingSchemeDesignator,
88  const OFString &codingSchemeVersion,
89  const OFString &codeMeaning);
90 
94  DSRCodedEntryValue(const DSRCodedEntryValue &codedEntryValue);
95 
98  virtual ~DSRCodedEntryValue();
99 
104  DSRCodedEntryValue &operator=(const DSRCodedEntryValue &codedEntryValue);
105 
112  OFBool operator==(const DSRCodedEntryValue &codedEntryValue) const;
113 
117  virtual void clear();
118 
123  virtual OFBool isValid() const;
124 
129  virtual OFBool isEmpty() const;
130 
142  void print(STD_NAMESPACE ostream &stream,
143  const OFBool printCodeValue = OFTrue,
144  const OFBool printInvalid = OFFalse) const;
145 
157  const DcmTagKey &tagKey,
158  const OFString &type);
159 
166  const DcmTagKey &tagKey) const;
167 
174  DSRXMLCursor cursor);
175 
181  OFCondition writeXML(STD_NAMESPACE ostream &stream,
182  const size_t flags) const;
183 
193  OFCondition renderHTML(STD_NAMESPACE ostream &stream,
194  const size_t flags,
195  const OFBool fullCode = OFTrue,
196  const OFBool valueFirst = OFFalse) const;
197 
201  inline const DSRCodedEntryValue &getValue() const
202  {
203  return *this;
204  }
205 
210  OFCondition getValue(DSRCodedEntryValue &codedEntryValue) const;
211 
216  inline const OFString &getCodeValue() const
217  {
218  return CodeValue;
219  }
220 
228  inline const OFString &getCodingSchemeDesignator() const
229  {
230  return CodingSchemeDesignator;
231  }
232 
238  inline const OFString &getCodingSchemeVersion() const
239  {
240  return CodingSchemeVersion;
241  }
242 
248  inline const OFString &getCodeMeaning() const
249  {
250  return CodeMeaning;
251  }
252 
259  OFCondition setValue(const DSRCodedEntryValue &codedEntryValue);
260 
277  OFCondition setCode(const OFString &codeValue,
278  const OFString &codingSchemeDesignator,
279  const OFString &codeMeaning);
280 
301  OFCondition setCode(const OFString &codeValue,
302  const OFString &codingSchemeDesignator,
303  const OFString &codingSchemeVersion,
304  const OFString &codeMeaning);
305 
306 
307  protected:
308 
313  {
314  return this;
315  }
316 
322  OFCondition readItem(DcmItem &dataset,
323  const char *moduleName = NULL);
324 
329  OFCondition writeItem(DcmItem &dataset) const;
330 
340  OFBool checkCode(const OFString &codeValue,
341  const OFString &codingSchemeDesignator,
342  const OFString &codeMeaning) const;
343 
344 
345  private:
346 
355 };
356 
357 
358 #endif
359 
360 
361 /*
362  * CVS/RCS Log:
363  * $Log: dsrcodvl.h,v $
364  * Revision 1.21 2010-10-14 13:16:32 joergr
365  * Updated copyright header. Added reference to COPYRIGHT file.
366  *
367  * Revision 1.20 2009-10-13 14:57:50 uli
368  * Switched to logging mechanism provided by the "new" oflog module.
369  *
370  * Revision 1.19 2007-11-15 16:33:30 joergr
371  * Added support for output in XHTML 1.1 format.
372  *
373  * Revision 1.18 2006/08/15 16:40:03 meichel
374  * Updated the code in module dcmsr to correctly compile when
375  * all standard C++ classes remain in namespace std.
376  *
377  * Revision 1.17 2006/05/11 09:18:21 joergr
378  * Moved containsExtendedCharacters() from dcmsr to dcmdata module.
379  *
380  * Revision 1.16 2005/12/08 16:04:52 meichel
381  * Changed include path schema for all DCMTK header files
382  *
383  * Revision 1.15 2004/11/22 16:39:09 meichel
384  * Added method that checks if the SR document contains non-ASCII characters
385  * in any of the strings affected by SpecificCharacterSet.
386  *
387  * Revision 1.14 2003/12/16 15:56:53 joergr
388  * Added note on coding scheme identfication and private coding schemes.
389  *
390  * Revision 1.13 2003/12/11 17:14:28 joergr
391  * Adapted documentation of print() method to new output format of CodingScheme
392  * Version (square brackets instead of comma to separate from CodingScheme).
393  *
394  * Revision 1.12 2003/09/10 13:16:13 joergr
395  * Replaced PrivateCodingSchemeUID by new CodingSchemeIdenticationSequence as
396  * required by CP 324.
397  *
398  * Revision 1.11 2003/08/07 17:31:00 joergr
399  * Removed libxml dependency from header files. Simplifies linking (MSVC).
400  *
401  * Revision 1.10 2003/08/07 12:20:48 joergr
402  * Added readXML functionality.
403  *
404  * Revision 1.9 2001/09/26 13:04:04 meichel
405  * Adapted dcmsr to class OFCondition
406  *
407  * Revision 1.8 2001/06/01 15:50:59 meichel
408  * Updated copyright header
409  *
410  * Revision 1.7 2000/11/09 20:32:07 joergr
411  * Added support for non-ASCII characters in HTML 3.2 (use numeric value).
412  *
413  * Revision 1.6 2000/11/06 11:14:55 joergr
414  * Updated comments/formatting.
415  *
416  * Revision 1.5 2000/11/01 16:12:55 joergr
417  * Added support for conversion to XML.
418  *
419  * Revision 1.4 2000/10/23 15:08:33 joergr
420  * Added/updated doc++ comments.
421  *
422  * Revision 1.3 2000/10/19 16:02:13 joergr
423  * Renamed some set methods.
424  * Added optional module name to read method to provide more detailed warning
425  * messages.
426  *
427  * Revision 1.2 2000/10/18 17:00:29 joergr
428  * Added methods allowing direct access to certain content item values.
429  * Added doc++ comments.
430  *
431  * Revision 1.1 2000/10/13 07:49:23 joergr
432  * Added new module 'dcmsr' providing access to DICOM structured reporting
433  * documents (supplement 23). Doc++ documentation not yet completed.
434  *
435  *
436  */


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2