Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

gdcmDicomDirObject.cxx

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmDicomDirObject.cxx,v $
00005   Language:  C++
00006   Date:      $Date: 2005/02/01 10:29:55 $
00007   Version:   $Revision: 1.19 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
00016                                                                                 
00017 =========================================================================*/
00018 
00019 #include "gdcmDicomDirObject.h"
00020 #include "gdcmGlobal.h"
00021 #include "gdcmDebug.h"
00022 #include "gdcmValEntry.h"
00023 #include "gdcmDictSet.h"
00024 
00025 namespace gdcm 
00026 {
00027 //-----------------------------------------------------------------------------
00034 DicomDirObject::DicomDirObject(int depth) 
00035           : SQItem (depth)
00036 {
00037 }
00038 
00042 DicomDirObject::~DicomDirObject()
00043 {
00044 }
00045 
00046 //-----------------------------------------------------------------------------
00047 // Public
00048 
00049 //-----------------------------------------------------------------------------
00050 // Protected
00056 void DicomDirObject::FillObject(ListDicomDirMetaElem const &elemList)
00057 {
00058   // FillObject fills up the SQItem that will be conneected to the right place
00059    ListDicomDirMetaElem::const_iterator it;
00060    uint16_t tmpGr,tmpEl;
00061    DictEntry *dictEntry;
00062    ValEntry *entry;
00063       
00064    // for all the Elements found in they own part of the DicomDir dict.     
00065    for(it = elemList.begin(); it != elemList.end(); ++it)
00066    {
00067       tmpGr = it->Group;
00068       tmpEl = it->Elem;
00069       dictEntry = Global::GetDicts()->GetDefaultPubDict()->GetEntry(tmpGr,tmpEl);
00070       entry = new ValEntry(dictEntry);
00071       entry->SetOffset(0); // just to avoid further missprinting
00072       entry->SetValue(it->Value);
00073 
00074       AddEntry(entry);
00075    }   
00076 }   
00077 
00078 //-----------------------------------------------------------------------------
00079 // Private
00080 
00081 //-----------------------------------------------------------------------------
00082 // Print
00083 
00084 //-----------------------------------------------------------------------------
00085 } // end namespace gdcm

Generated on Thu Feb 10 22:17:56 2005 for gdcm by doxygen 1.3.6