Program: gdcm
Module: $RCSfile: gdcmBinEntry.cxx,v $
Language: C++
- Date: $Date: 2005/01/30 17:30:57 $
- Version: $Revision: 1.59 $
+ Date: $Date: 2005/02/02 10:02:16 $
+ Version: $Revision: 1.61 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace gdcm
{
-
//-----------------------------------------------------------------------------
// Constructor / Destructor
-
/**
* \brief Constructor from a given BinEntry
*/
-BinEntry::BinEntry(DictEntry *e) : ContentEntry(e)
+BinEntry::BinEntry(DictEntry *e)
+ :ContentEntry(e)
{
BinArea = 0;
SelfArea = true;
* \brief Constructor from a given BinEntry
* @param e Pointer to existing Doc entry
*/
-BinEntry::BinEntry(DocEntry *e) : ContentEntry(e->GetDictEntry())
+BinEntry::BinEntry(DocEntry *e)
+ : ContentEntry(e->GetDictEntry())
{
Copy(e);
}
}
-//-----------------------------------------------------------------------------
-// Print
-/**
- * \brief Prints a BinEntry (Dicom entry)
- * @param os ostream we want to print in
- * @param indent Indentation string to be prepended during printing
- */
-void BinEntry::Print(std::ostream &os, std::string const & )
-{
- os << "B ";
- DocEntry::Print(os);
- std::ostringstream s;
- void* binArea = GetBinArea();
- if (binArea)
- {
- //s << " [" << GDCM_BINLOADED
- s << " [" << GetValue()
- << "; length = " << GetLength() << "]";
- }
- else
- {
- if ( GetLength() == 0 )
- {
- s << " []";
- }
- else
- {
- //s << " [gdcm::Binary data NOT loaded]";
- s << " [" <<GetValue() << "]";
- }
- }
- os << s.str();
-}
-
//-----------------------------------------------------------------------------
// Public
/**
//-----------------------------------------------------------------------------
// Private
+//-----------------------------------------------------------------------------
+// Print
+/**
+ * \brief Prints a BinEntry (Dicom entry)
+ * @param os ostream we want to print in
+ * @param indent Indentation string to be prepended during printing
+ */
+void BinEntry::Print(std::ostream &os, std::string const & )
+{
+ os << "B ";
+ DocEntry::Print(os);
+ std::ostringstream s;
+ void* binArea = GetBinArea();
+ if (binArea)
+ {
+ s << " [" << GetValue()
+ << "; length = " << GetLength() << "]";
+ }
+ else
+ {
+ if ( GetLength() == 0 )
+ {
+ s << " []";
+ }
+ else
+ {
+ s << " [" <<GetValue() << "]";
+ }
+ }
+ os << s.str();
+}
+
//-----------------------------------------------------------------------------
} // end namespace gdcm