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: 2007/05/23 14:18:08 $
00007   Version:   $Revision: 1.25 $
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 "gdcmDictSet.h"
00023 #include "gdcmDataEntry.h"
00024 
00025 namespace GDCM_NAME_SPACE 
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 connected to the right place
00059    ListDicomDirMetaElem::const_iterator it;
00060    //uint16_t tmpGr,tmpEl;
00061    //DictEntry *dictEntry;
00062    DataEntry *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 = DataEntry::New(dictEntry);
00071       entry = DataEntry::New(it->Group, it->Elem, it->VR );
00072       entry->SetOffset(0); // just to avoid further missprinting
00073       entry->SetString(it->Value);
00074 
00075       AddEntry(entry);
00076       entry->Delete();
00077    } 
00078 } 
00079 
00080 //-----------------------------------------------------------------------------
00081 // Private
00082 
00083 //-----------------------------------------------------------------------------
00084 // Print
00085 
00086 //-----------------------------------------------------------------------------
00087 } // end namespace gdcm

Generated on Fri Aug 24 12:59:29 2007 for gdcm by  doxygen 1.4.6