Program: gdcm
Module: $RCSfile: gdcmDicomDirElement.cxx,v $
Language: C++
- Date: $Date: 2004/11/03 18:08:56 $
- Version: $Revision: 1.21 $
+ Date: $Date: 2005/01/18 07:53:42 $
+ Version: $Revision: 1.27 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::ifstream from(filename.c_str());
if(!from)
{
- dbg.Verbose(2,
- "DicomDirElement::DicomDirElement: can't open dictionary",
- filename.c_str());
+ gdcmVerboseMacro( "Can't open dictionary" << filename.c_str());
FillDefaultDIRDict( this );
}
else
from.getline(buff, 1024, ' ');
type = buff;
- if( (type=="metaElem") || (type=="patientElem") ||
- (type=="studyElem") || (type=="serieElem") ||
- (type=="imageElem") )
+ if( type == "metaElem" || type == "patientElem" ||
+ type == "studyElem" || type == "serieElem" ||
+ type == "imageElem" )
{
from >> std::hex >> elem.Group >> elem.Elem;
from >> std::ws;
from.getline(buff, 1024, '"');
elem.Value = buff;
-
+
AddNewEntry(type, elem);
}
- else
- {
- dbg.Error("DicomDirElement::DicomDirElement: Error parsing file",
- filename.c_str());
- dbg.Error("Type", type.c_str(), " is not registered as valid" );
- }
from.getline(buff, 1024, '\n');
}
- from.close();
+ from.close();
}
}
/**
- * \ingroup DicomDirElement
* \brief canonical destructor
*/
DicomDirElement::~DicomDirElement()
//-----------------------------------------------------------------------------
// Print
/**
- * \ingroup DicomDirElement
* \brief Print all
* \todo add a 'Print Level' check
* @param os The output stream to be written to.
//-----------------------------------------------------------------------------
// Public
-bool DicomDirElement::AddNewEntry(std::string const & type,
- Element const & elem)
+/**
+ * \brief AddNewEntry
+ * @param type type
+ * @param elem elem
+ */
+bool DicomDirElement::AddNewEntry(std::string const &type,
+ Element const &elem)
{
if( type == "metaElem" )
{