OFFIS DCMTK  Version 3.6.0
dsrcsidl.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: dcmsr
15  *
16  * Author: Joerg Riesmeier
17  *
18  * Purpose:
19  * classes: DSRCodingSchemeIdentificationList
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:16:32 $
23  * CVS/RCS Revision: $Revision: 1.12 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 
31 #ifndef DSRCSIDL_H
32 #define DSRCSIDL_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/oflist.h"
39 
40 
41 /*---------------------*
42  * class declaration *
43  *---------------------*/
44 
50  : public DSRTypes
51 {
52 
53  public:
54 
57  struct ItemStruct
58  {
62  ItemStruct(const OFString &codingSchemeDesignator)
63  : CodingSchemeDesignator(codingSchemeDesignator),
70  {}
71 
74  void clear()
75  {
82  }
83 
98  };
99 
103 
107 
110  void clear();
111 
115  OFBool empty() const;
116 
120  size_t getNumberOfItems() const;
121 
126  OFCondition read(DcmItem &dataset);
127 
133  OFCondition write(DcmItem &dataset) const;
134 
142  DSRXMLCursor cursor,
143  const size_t flags);
144 
150  OFCondition writeXML(STD_NAMESPACE ostream &stream,
151  const size_t flags = 0) const;
152 
159 
169  OFCondition addItem(const OFString &codingSchemeDesignator);
170 
176 
182  OFCondition removeItem(const OFString &codingSchemeDesignator);
183 
188  OFCondition gotoItem(const OFString &codingSchemeDesignator);
189 
195 
201 
208  const OFString &getCodingSchemeDesignator(OFString &stringValue) const;
209 
214  const OFString &getCodingSchemeRegistry(OFString &stringValue) const;
215 
220  const OFString &getCodingSchemeUID(OFString &stringValue) const;
221 
226  const OFString &getCodingSchemeExternalID(OFString &stringValue) const;
227 
232  const OFString &getCodingSchemeName(OFString &stringValue) const;
233 
238  const OFString &getCodingSchemeVersion(OFString &stringValue) const;
239 
244  const OFString &getResponsibleOrganization(OFString &stringValue) const;
245 
252 
259 
266 
273 
280 
287 
288 
289  protected:
290 
296  OFCondition addItem(const OFString &codingSchemeDesignator,
297  ItemStruct *&item);
298 
302  ItemStruct *getCurrentItem() const;
303 
304 
305  private:
306 
310  OFListIterator(ItemStruct *) Iterator;
311 
312  // copy constructor - not implemented!
314  // assignment operator - not implemented!
315  DSRCodingSchemeIdentificationList &operator=(const DSRCodingSchemeIdentificationList &);
316 };
317 
318 
319 #endif
320 
321 
322 /*
323  * CVS/RCS Log:
324  * $Log: dsrcsidl.h,v $
325  * Revision 1.12 2010-10-14 13:16:32 joergr
326  * Updated copyright header. Added reference to COPYRIGHT file.
327  *
328  * Revision 1.11 2010-02-22 11:39:55 uli
329  * Remove some unneeded includes.
330  *
331  * Revision 1.10 2009-10-13 14:57:50 uli
332  * Switched to logging mechanism provided by the "new" oflog module.
333  *
334  * Revision 1.9 2007-11-15 16:33:19 joergr
335  * Fixed coding style to be more consistent.
336  *
337  * Revision 1.8 2006/08/15 16:40:03 meichel
338  * Updated the code in module dcmsr to correctly compile when
339  * all standard C++ classes remain in namespace std.
340  *
341  * Revision 1.7 2006/05/11 09:18:21 joergr
342  * Moved containsExtendedCharacters() from dcmsr to dcmdata module.
343  *
344  * Revision 1.6 2005/12/08 16:04:57 meichel
345  * Changed include path schema for all DCMTK header files
346  *
347  * Revision 1.5 2004/11/22 16:39:09 meichel
348  * Added method that checks if the SR document contains non-ASCII characters
349  * in any of the strings affected by SpecificCharacterSet.
350  *
351  * Revision 1.4 2004/04/07 12:02:53 joergr
352  * Added missing member variables to constructor's member initialization list
353  * to avoid warnings reported by gcc.
354  *
355  * Revision 1.3 2004/01/16 09:57:33 joergr
356  * Added clear() method to struct ItemStruct.
357  *
358  * Revision 1.2 2003/12/16 16:18:35 joergr
359  * Added note on coding scheme identfication and private coding schemes.
360  *
361  * Revision 1.1 2003/09/10 13:16:13 joergr
362  * Replaced PrivateCodingSchemeUID by new CodingSchemeIdenticationSequence as
363  * required by CP 324.
364  *
365  *
366  */
a class representing a list of DICOM elements in which each element has a different tag and elements ...
Definition: dcitem.h:51
OFCondition addPrivateDcmtkCodingScheme()
add private OFFIS DCMTK coding scheme entry to the list.
OFString CodingSchemeVersion
Coding Scheme Version (VR=SH, VM=1, Type=3)
Definition: dsrcsidl.h:95
void clear()
empty the string of all contents
Definition: ofstring.h:457
OFCondition readXML(const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags)
read list of items from XML document
Class for XML documents.
Definition: dsrxmld.h:63
OFString CodingSchemeUID
Coding Scheme UID (VR=UI, VM=1, Type=1C)
Definition: dsrcsidl.h:89
OFCondition writeXML(STD_NAMESPACE ostream &stream, const size_t flags=0) const
write current list in XML format
ItemStruct(const OFString &codingSchemeDesignator)
constructor
Definition: dsrcsidl.h:62
void clear()
clear additional information
Definition: dsrcsidl.h:74
const OFString & getCodingSchemeVersion(OFString &stringValue) const
get the coding scheme version of the currently selected item
OFListIterator(ItemStruct *) Iterator
internal cursor to current (selected) list item
OFCondition setCodingSchemeVersion(const OFString &value)
set the coding scheme version of the currently selected entry.
double linked list template class.
Definition: oflist.h:161
const OFString & getCodingSchemeDesignator(OFString &stringValue) const
get the coding scheme designator of the currently selected item.
ItemStruct * getCurrentItem() const
get pointer to currently selected item structure (if any)
Class that maps Coding Scheme Designators to an external coding system registration, or to a private or local coding scheme.
Definition: dsrcsidl.h:49
OFCondition addItem(const OFString &codingSchemeDesignator)
add the specified coding scheme to the list.
OFCondition setResponsibleOrganization(const OFString &value)
set the responsible organization of the currently selected entry.
size_t getNumberOfItems() const
get number of items stored in the list
OFCondition setCodingSchemeUID(const OFString &value)
set the coding scheme UID of the currently selected entry.
OFCondition gotoFirstItem()
select the first item in the list
OFString CodingSchemeName
Coding Scheme Name (VR=ST, VM=1, Type=3)
Definition: dsrcsidl.h:93
void clear()
clear the list
OFString CodingSchemeExternalID
Coding Scheme External ID (VR=ST, VM=1, Type=2C)
Definition: dsrcsidl.h:91
OFCondition removeItem()
remove the current item from the list.
DSRCodingSchemeIdentificationList()
constructor (default)
OFCondition setCodingSchemeName(const OFString &value)
set the coding scheme name of the currently selected entry.
const OFString & getCodingSchemeUID(OFString &stringValue) const
get the coding scheme UID of the currently selected item
OFList< ItemStruct * > ItemList
list of items
Definition: dsrcsidl.h:308
Internal structure defining the list items.
Definition: dsrcsidl.h:57
OFCondition write(DcmItem &dataset) const
write list of items to the coding scheme identification sequence.
const OFString & getCodingSchemeRegistry(OFString &stringValue) const
get the coding scheme registry of the currently selected item
OFString CodingSchemeRegistry
Coding Scheme Registry (VR=LO, VM=1, Type=1C)
Definition: dsrcsidl.h:87
OFCondition setCodingSchemeExternalID(const OFString &value)
set the coding scheme external ID of the currently selected entry.
General purpose class hiding global functions, constants and types from the global namespace...
Definition: dsrtypes.h:150
a simple string class that implements a subset of std::string.
Definition: ofstring.h:86
OFBool empty() const
check whether list is empty
const OFString CodingSchemeDesignator
Coding Scheme Designator (VR=SH, VM=1, Type=1)
Definition: dsrcsidl.h:85
const OFString & getResponsibleOrganization(OFString &stringValue) const
get the responsible organization of the currently selected item
const OFString & getCodingSchemeExternalID(OFString &stringValue) const
get the coding scheme external ID of the currently selected item
OFCondition gotoItem(const OFString &codingSchemeDesignator)
select the specified item as the current one
Class for XML document cursors.
Definition: dsrxmlc.h:73
OFString ResponsibleOrganization
Responsible Organization (VR=ST, VM=1, Type=3)
Definition: dsrcsidl.h:97
~DSRCodingSchemeIdentificationList()
destructor
OFCondition gotoNextItem()
select the next item in the list
const OFString & getCodingSchemeName(OFString &stringValue) const
get the coding scheme name of the currently selected item
OFCondition setCodingSchemeRegistry(const OFString &value)
set the coding scheme registry of the currently selected entry.
General purpose class for condition codes.
Definition: ofcond.h:305
OFCondition read(DcmItem &dataset)
read list of items from the coding scheme identification sequence


Generated on Wed Dec 28 2016 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.8