dsrcsidl.h

00001 /*
00002  *
00003  *  Copyright (C) 2003-2005, OFFIS
00004  *
00005  *  This software and supporting documentation were developed by
00006  *
00007  *    Kuratorium OFFIS e.V.
00008  *    Healthcare Information and Communication Systems
00009  *    Escherweg 2
00010  *    D-26121 Oldenburg, Germany
00011  *
00012  *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
00013  *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
00014  *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
00015  *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
00016  *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
00017  *
00018  *  Module: dcmsr
00019  *
00020  *  Author: Joerg Riesmeier
00021  *
00022  *  Purpose:
00023  *    classes: DSRCodingSchemeIdentificationList
00024  *
00025  *  Last Update:      $Author: meichel $
00026  *  Update Date:      $Date: 2005/12/08 16:04:57 $
00027  *  CVS/RCS Revision: $Revision: 1.6 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 
00035 #ifndef DSRCSIDL_H
00036 #define DSRCSIDL_H
00037 
00038 #include "dcmtk/config/osconfig.h"   /* make sure OS specific configuration is included first */
00039 
00040 #include "dcmtk/dcmsr/dsrtypes.h"
00041 
00042 #include "dcmtk/ofstd/oflist.h"
00043 #include "dcmtk/ofstd/ofconsol.h"
00044 
00045 
00046 /*---------------------*
00047  *  class declaration  *
00048  *---------------------*/
00049 
00054 class DSRCodingSchemeIdentificationList
00055   : public DSRTypes
00056 {
00057 
00058   public:
00059 
00062     struct ItemStruct
00063     {
00067         ItemStruct(const OFString &codingSchemeDesignator)
00068           : CodingSchemeDesignator(codingSchemeDesignator),
00069             CodingSchemeRegistry(),
00070             CodingSchemeUID(),
00071             CodingSchemeExternalID(),
00072             CodingSchemeName(),
00073             CodingSchemeVersion(),
00074             ResponsibleOrganization()
00075         {}
00076 
00079         void clear()
00080         {
00081             CodingSchemeRegistry.clear();
00082             CodingSchemeUID.clear();
00083             CodingSchemeExternalID.clear();
00084             CodingSchemeName.clear();
00085             CodingSchemeVersion.clear();
00086             ResponsibleOrganization.clear();
00087         }
00088 
00093         OFBool containsExtendedCharacters();
00094 
00096         const OFString CodingSchemeDesignator;
00098         OFString CodingSchemeRegistry;
00100         OFString CodingSchemeUID;
00102         OFString CodingSchemeExternalID;
00104         OFString CodingSchemeName;
00106         OFString CodingSchemeVersion;
00108         OFString ResponsibleOrganization;
00109     };
00110 
00113     DSRCodingSchemeIdentificationList();
00114 
00117     ~DSRCodingSchemeIdentificationList();
00118 
00121     void clear();
00122 
00126     OFBool empty() const;
00127 
00131     size_t getNumberOfItems() const;
00132 
00138     OFCondition read(DcmItem &dataset,
00139                      OFConsole *logStream);
00140 
00147     OFCondition write(DcmItem &dataset,
00148                       OFConsole *logStream) const;
00149 
00156     OFCondition readXML(const DSRXMLDocument &doc,
00157                         DSRXMLCursor cursor,
00158                         const size_t flags);
00159 
00165     OFCondition writeXML(ostream &stream,
00166                          const size_t flags = 0) const;
00167 
00173     OFCondition addPrivateDcmtkCodingScheme();
00174 
00184     OFCondition addItem(const OFString &codingSchemeDesignator);
00185 
00190     OFCondition removeItem();
00191 
00197     OFCondition removeItem(const OFString &codingSchemeDesignator);
00198 
00203     OFCondition gotoItem(const OFString &codingSchemeDesignator);
00204 
00209     OFCondition gotoFirstItem();
00210 
00215     OFCondition gotoNextItem();
00216 
00223     const OFString &getCodingSchemeDesignator(OFString &stringValue) const;
00224 
00229     const OFString &getCodingSchemeRegistry(OFString &stringValue) const;
00230 
00235     const OFString &getCodingSchemeUID(OFString &stringValue) const;
00236 
00241     const OFString &getCodingSchemeExternalID(OFString &stringValue) const;
00242 
00247     const OFString &getCodingSchemeName(OFString &stringValue) const;
00248 
00253     const OFString &getCodingSchemeVersion(OFString &stringValue) const;
00254 
00259     const OFString &getResponsibleOrganization(OFString &stringValue) const;
00260 
00266     OFCondition setCodingSchemeRegistry(const OFString &value);
00267 
00273     OFCondition setCodingSchemeUID(const OFString &value);
00274 
00280     OFCondition setCodingSchemeExternalID(const OFString &value);
00281 
00287     OFCondition setCodingSchemeName(const OFString &value);
00288 
00294     OFCondition setCodingSchemeVersion(const OFString &value);
00295 
00301     OFCondition setResponsibleOrganization(const OFString &value);
00302 
00307     OFBool containsExtendedCharacters();
00308 
00309 
00310   protected:
00311 
00318     OFCondition addItem(const OFString &codingSchemeDesignator,
00319                         ItemStruct *&item,
00320                         OFConsole *logStream = NULL);
00321 
00325     ItemStruct *getCurrentItem() const;
00326 
00327 
00328   private:
00329 
00331     OFList<ItemStruct *> ItemList;
00333     OFListIterator(ItemStruct *) Iterator;
00334 
00335     // copy constructor - not implemented!
00336     DSRCodingSchemeIdentificationList(const DSRCodingSchemeIdentificationList &);
00337     // assignment operator - not implemented!
00338     DSRCodingSchemeIdentificationList &operator=(const DSRCodingSchemeIdentificationList &);
00339 };
00340 
00341 
00342 #endif
00343 
00344 
00345 /*
00346  *  CVS/RCS Log:
00347  *  $Log: dsrcsidl.h,v $
00348  *  Revision 1.6  2005/12/08 16:04:57  meichel
00349  *  Changed include path schema for all DCMTK header files
00350  *
00351  *  Revision 1.5  2004/11/22 16:39:09  meichel
00352  *  Added method that checks if the SR document contains non-ASCII characters
00353  *    in any of the strings affected by SpecificCharacterSet.
00354  *
00355  *  Revision 1.4  2004/04/07 12:02:53  joergr
00356  *  Added missing member variables to constructor's member initialization list
00357  *  to avoid warnings reported by gcc.
00358  *
00359  *  Revision 1.3  2004/01/16 09:57:33  joergr
00360  *  Added clear() method to struct ItemStruct.
00361  *
00362  *  Revision 1.2  2003/12/16 16:18:35  joergr
00363  *  Added note on coding scheme identfication and private coding schemes.
00364  *
00365  *  Revision 1.1  2003/09/10 13:16:13  joergr
00366  *  Replaced PrivateCodingSchemeUID by new CodingSchemeIdenticationSequence as
00367  *  required by CP 324.
00368  *
00369  *
00370  */


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5