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

gdcmDebug.h File Reference

#include "gdcmCommon.h"
#include <sstream>
#include <fstream>
#include <assert.h>
#include <errno.h>

Go to the source code of this file.

Namespaces

namespace  gdcm

Defines

#define GDCM_FUNCTION   "<unknow>"
#define gdcmDebugMacro(msg)
 Debug.

#define gdcmWarningMacro(msg)
 Verbose.

#define gdcmErrorMacro(msg)
 Error.

#define gdcmAssertMacro(arg)
 Assert.


Define Documentation

#define GDCM_FUNCTION   "<unknow>"
 

Definition at line 94 of file gdcmDebug.h.

#define gdcmAssertMacro arg   ) 
 

Value:

{                                                           \
   if( !(arg) )                                             \
   {                                                        \
   std::ostringstream osmacro;                              \
   osmacro << "Assert: In " __FILE__ ", line " << __LINE__  \
           << ", function " << GDCM_FUNCTION                \
           << "\n\n";                                       \
   if( Debug::GetDebugToFile() )                            \
      Debug::GetDebugFile() << osmacro.str() << std::endl;  \
   else                                                     \
      std::cerr << osmacro.str() << std::endl;              \
   assert ( arg );                                          \
   }                                                        \
}
Assert.

Parameters:
arg argument to test An easy solution to pass also a message is to do: gdcmAssertMacro( "my message" && 2 < 3 )

Definition at line 173 of file gdcmDebug.h.

Referenced by gdcm::Util::DicomString(), gdcm::RLEFrame::GetLength(), gdcm::SerieHelper::GetNextCoherentFileList(), gdcm::ElementSet::GetNextEntry(), gdcm::DictSet::GetNextEntry(), gdcm::Dict::GetNextEntry(), gdcm::JPEGFragmentsInfo::GetNextFragment(), gdcm::RLEFramesInfo::GetNextFrame(), gdcm::DicomDirSerie::GetNextImage(), gdcm::DicomDir::GetNextPatient(), gdcm::DicomDirStudy::GetNextSerie(), gdcm::SeqEntry::GetNextSQItem(), gdcm::DicomDirPatient::GetNextStudy(), gdcm::RLEFrame::GetOffset(), gdcm::File::GetXSpacing(), gdcm::DocEntrySet::NewBinEntry(), gdcm::DocEntrySet::NewSeqEntry(), gdcm::DocEntrySet::NewValEntry(), gdcm::RLEFrame::SetLength(), gdcm::RLEFrame::SetOffset(), gdcm::ValEntry::SetValue(), gdcm::ValEntry::WriteContent(), and gdcm::DocEntry::WriteContent().

#define gdcmDebugMacro msg   ) 
 

Value:

{                                                           \
   if( Debug::GetDebugFlag() )                              \
   {                                                        \
   std::ostringstream osmacro;                              \
   osmacro << "Debug: In " __FILE__ ", line " << __LINE__   \
           << ", function " << GDCM_FUNCTION << '\n'        \
           << "Last system error was: " << strerror(errno)  \
           << '\n' << msg << "\n\n";                        \
   if( Debug::GetDebugToFile() )                            \
      Debug::GetDebugFile() << osmacro.str() << std::endl;  \
   else                                                     \
      std::cerr << osmacro.str() << std::endl;              \
   }                                                        \
}
Debug.

Parameters:
msg message part

Definition at line 104 of file gdcmDebug.h.

Referenced by gdcm::File::GetPixelAreaLength(), gdcm::File::GetPixelOffset(), and gdcm::Document::OpenFile().

#define gdcmErrorMacro msg   ) 
 

Value:

{                                                           \
   std::ostringstream osmacro;                              \
   osmacro << "Error: In " __FILE__ ", line " << __LINE__   \
           << ", function " << GDCM_FUNCTION << '\n'        \
           << msg << "\n\n";                                \
   if( Debug::GetDebugToFile() )                            \
      Debug::GetDebugFile() << osmacro.str() << std::endl;  \
   else                                                     \
      std::cerr << osmacro.str() << std::endl;              \
}
Error.

Parameters:
msg second message part

Definition at line 151 of file gdcmDebug.h.

Referenced by gdcm::DicomDir::CreateDicomDir(), gdcm::Util::CreateUniqueUID(), gdcm::JPEGFragment::DecompressJPEGFramesFromFile(), gdcm::Document::GetTransferSyntaxName(), gdcm::Document::LoadDocEntry(), gdcm::DicomDir::SetElement(), gdcm::DictEntry::SetVM(), gdcm::DictEntry::SetVR(), gdcm::Document::SwapLong(), and gdcm::FileHelper::WriteRawData().

#define gdcmWarningMacro msg   ) 
 

Value:

{                                                           \
   if( Debug::GetDebugFlag() )                              \
   {                                                        \
   std::ostringstream osmacro;                              \
   osmacro << "Verbose: In " __FILE__ ", line " << __LINE__ \
           << ", function " << GDCM_FUNCTION << "\n"        \
           << msg << "\n\n";                                \
   if( Debug::GetDebugToFile() )                            \
      Debug::GetDebugFile() << osmacro.str() << std::endl;  \
   else                                                     \
      std::cerr << osmacro.str() << std::endl;              \
   }                                                        \
}
Verbose.

Parameters:
msg message part

Definition at line 128 of file gdcmDebug.h.

Referenced by gdcm::ElementSet::AddEntry(), gdcm::Dict::AddEntry(), gdcm::SerieHelper::AddFileName(), gdcm::DictSet::BuildDictPath(), gdcm::PixelReadConvert::BuildLUTRGBA(), gdcm::Document::CheckSwap(), gdcm::FileHelper::CheckWriteIntegrity(), gdcm::File::ComputeJPEGFragmentInfo(), gdcm::File::ComputeRLEInfo(), gdcm::PixelReadConvert::ConvertReArrangeBits(), gdcm::PixelReadConvert::ConvertSwapZone(), gdcm::DicomDir::CreateDicomDir(), gdcm::DicomDir::CreateDicomDirChainedList(), gdcm::DicomDir::DicomDir(), gdcm::DicomDirElement::DicomDirElement(), gdcm::Dict::Dict(), gdcm::Document::Document(), gdcm::Document::FindDocEntryLengthOBOrOW(), gdcm::Document::FixDocEntryFoundLength(), gdcm::gdcm_read_JPEG2000_file(), gdcm::gdcm_read_JPEGLS_file(), gdcm::DocEntrySet::GetBinEntry(), gdcm::File::GetBitsAllocated(), gdcm::File::GetBitsStored(), gdcm::DocEntrySet::GetDictEntry(), gdcm::File::GetHighBitPosition(), gdcm::FileHelper::GetImageDataIntoVector(), gdcm::File::GetImageOrientationPatient(), gdcm::Util::GetMACAddress(), gdcm::File::GetPixelSize(), gdcm::File::GetPixelType(), gdcm::File::GetPlanarConfiguration(), gdcm::FileHelper::GetRaw(), gdcm::File::GetRescaleIntercept(), gdcm::File::GetRescaleSlope(), gdcm::File::GetSamplesPerPixel(), gdcm::DocEntrySet::GetSeqEntry(), gdcm::Document::GetTransferSyntaxName(), gdcm::File::GetXOrigin(), gdcm::File::GetXSpacing(), gdcm::File::GetYOrigin(), gdcm::File::GetYSpacing(), gdcm::File::GetZOrigin(), gdcm::File::GetZSpacing(), gdcm::Global::Global(), gdcm::PixelReadConvert::GrabInformationsFromFile(), gdcm::Document::HandleOutOfGroup0002(), gdcm::SerieHelper::ImagePositionPatientOrdering(), gdcm::DocEntrySet::InsertBinEntry(), gdcm::DocEntrySet::InsertSeqEntry(), gdcm::DocEntrySet::InsertValEntry(), gdcm::Document::IsDocEntryAnInteger(), gdcm::File::IsMonochrome(), gdcm::File::IsPaletteColor(), gdcm::Document::IsReadable(), gdcm::DicomDir::IsReadable(), gdcm::File::IsSignedPixelData(), gdcm::File::IsYBRFull(), gdcm::Document::LoadDocEntry(), gdcm::Document::LoadEntryBinArea(), gdcm::DocEntrySet::NewBinEntry(), gdcm::DocEntrySet::NewSeqEntry(), gdcm::DocEntrySet::NewValEntry(), gdcm::Document::OpenFile(), gdcm::Document::ParseDES(), gdcm::SerieHelper::Print(), gdcm::SeqEntry::Print(), gdcm::PixelReadConvert::Print(), gdcm::PixelReadConvert::ReadAndDecompressJPEGFile(), gdcm::PixelReadConvert::ReadAndDecompressPixelData(), gdcm::RLEFrame::ReadAndDecompressRLEFragment(), gdcm::File::ReadAndSkipEncapsulatedBasicOffsetTable(), gdcm::Document::ReadNextDocEntry(), gdcm::File::ReadTag(), gdcm::File::ReadTagLength(), gdcm::SQItem::RemoveEntry(), gdcm::ElementSet::RemoveEntry(), gdcm::Dict::RemoveEntry(), gdcm::SQItem::RemoveEntryNoDestroy(), gdcm::ElementSet::RemoveEntryNoDestroy(), gdcm::DocEntrySet::SetBinEntry(), gdcm::DicomDir::SetElement(), gdcm::DocEntrySet::SetValEntry(), gdcm::Document::SwitchByteSwapCode(), gdcm::VR::VR(), gdcm::File::Write(), gdcm::DicomDir::WriteDicomDir(), and gdcm::FileHelper::WriteRawData().


Generated on Thu Feb 10 22:18:01 2005 for gdcm by doxygen 1.3.6