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

gdcm::Command Class Reference

Command base class to react on a gdcm event. More...

#include <gdcmCommand.h>

Inheritance diagram for gdcm::Command:

Inheritance graph
[legend]
Collaboration diagram for gdcm::Command:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void SetType (unsigned int type)
unsigned int GetType () const
void SetObject (Base *object)
BaseGetObject () const
void SetConstObject (const Base *object)
const BaseGetConstObject () const
void SetText (const std::string &text)
const std::string & GetText () const
virtual void Execute ()
void Delete ()
 Delete the object.
void Register ()
 Register the object.
void Unregister ()
 Unregister the object.
const unsigned long & GetRefCount () const
 Get the reference counting.
virtual void Print (std::ostream &=std::cout, std::string const &="")
 Printer.
void SetPrintLevel (int level)
 Sets the print level for the Dicom Header Elements.
int GetPrintLevel ()
 Gets the print level for the Dicom Entries.

Static Public Member Functions

static const char * GetCommandAsString (unsigned int command)

Protected Member Functions

 Command ()
 Constructor used when we want to generate dicom files from scratch.
virtual ~Command ()
 Canonical destructor.

Protected Attributes

int PrintLevel
 Amount of printed details for each Dicom Entries : 0 : stands for the least detail level.

Private Member Functions

 gdcmTypeMacro (Command)
 gdcmNewMacro (Command)

Private Attributes

std::string Text
BaseObject
const BaseConstObject
unsigned int Cmd

Detailed Description

Command base class to react on a gdcm event.

Remarks:
The execution parameter depends on the

Definition at line 48 of file gdcmCommand.h.


Constructor & Destructor Documentation

gdcm::Command::Command  )  [protected]
 

Constructor used when we want to generate dicom files from scratch.

Definition at line 28 of file gdcmCommand.cxx.

References Cmd, gdcm::CMD_UNKNOWN, ConstObject, Object, and Text.

00029 {
00030    Cmd = CMD_UNKNOWN;
00031    Object = NULL;
00032    ConstObject = NULL;
00033    Text = "";
00034 }

gdcm::Command::~Command  )  [protected, virtual]
 

Canonical destructor.

Definition at line 40 of file gdcmCommand.cxx.

00041 {
00042 }


Member Function Documentation

void gdcm::RefCounter::Delete  )  [inline, inherited]
 

Delete the object.

Remarks:
The object is deleted only if its reference counting is to zero

Definition at line 39 of file gdcmRefCounter.h.

Referenced by gdcm::SerieHelper::AddFileName(), gdcm::Document::Backtrack(), gdcm::FileHelper::CheckMandatoryElements(), gdcm::FileHelper::CheckMandatoryEntry(), gdcm::FileHelper::CopyMandatoryEntry(), gdcm::DicomDir::CreateDicomDirChainedList(), gdcm::File::DoTheLoadingJob(), gdcm::Dict::DoTheLoadingJob(), gdcm::DicomDirObject::FillObject(), gdcm::DocEntrySet::InsertEntryBinArea(), gdcm::DocEntrySet::InsertEntryString(), gdcm::DocEntrySet::InsertSeqEntry(), vtkGdcmReader::LoadFileInformation(), vtkGdcmReader::LoadImageInMemory(), main(), gdcm::DicomDir::NewMeta(), gdcm::DicomDirStudy::NewVisit(), gdcm::Document::ParseDES(), gdcm::Document::ParseSQ(), gdcm::Document::ReadNextDocEntry(), gdcm::DicomDir::SetElement(), gdcm::FileHelper::SetMandatoryEntry(), gdcm::FileHelper::SetWriteFileTypeToExplicitVR(), gdcm::FileHelper::SetWriteFileTypeToImplicitVR(), gdcm::FileHelper::SetWriteFileTypeToJPEG(), gdcm::FileHelper::SetWriteToLibido(), gdcm::FileHelper::SetWriteToNoLibido(), gdcm::FileHelper::SetWriteToRaw(), gdcm::FileHelper::SetWriteToRGB(), vtkGdcmWriter::WriteDcmFile(), gdcm::DicomDir::~DicomDir(), and gdcm::Global::~Global().

00039 { Unregister(); }

void gdcm::Command::Execute  )  [virtual]
 

Reimplemented in gdcm::CallbackCommand.

Definition at line 89 of file gdcmCommand.cxx.

Referenced by gdcm::CommandManager::InExecuteCommand(), and gdcm::CommandManager::InExecuteCommandConst().

00090 {
00091 }

gdcm::Command::gdcmNewMacro Command   )  [private]
 

gdcm::Command::gdcmTypeMacro Command   )  [private]
 

const char * gdcm::Command::GetCommandAsString unsigned int  command  )  [static]
 

Definition at line 93 of file gdcmCommand.cxx.

References gdcm::CMD_ASSERT, gdcm::CMD_DEBUG, gdcm::CMD_ENDPROGRESS, gdcm::CMD_ERROR, gdcm::CMD_PROGRESS, gdcm::CMD_STARTPROGRESS, gdcm::CMD_UNKNOWN, and gdcm::CMD_WARNING.

Referenced by gdcm::CommandManager::Print(), and gdcm::Debug::SendToOutput().

00094 {
00095    switch(command)
00096    {
00097       case CMD_UNKNOWN:
00098          return "Unknown";
00099       case CMD_DEBUG:
00100          return "Debug";
00101       case CMD_WARNING:
00102          return "Warning";
00103       case CMD_ERROR:
00104          return "Error";
00105       case CMD_ASSERT:
00106          return "Assert";
00107       case CMD_STARTPROGRESS:
00108          return "StartProgress";
00109       case CMD_ENDPROGRESS:
00110          return "EndProgress";
00111       case CMD_PROGRESS:
00112          return "Progress";
00113       default:
00114          return "Undefined !!!";
00115    }
00116 }

const Base * gdcm::Command::GetConstObject  )  const
 

Definition at line 71 of file gdcmCommand.cxx.

References ConstObject, and GetObject().

00072 {
00073    if(ConstObject)
00074       return ConstObject;
00075    else
00076       return GetObject();
00077 }

Base * gdcm::Command::GetObject  )  const
 

Definition at line 61 of file gdcmCommand.cxx.

References Object.

Referenced by GetConstObject().

00062 {
00063    return Object;
00064 }

int gdcm::Base::GetPrintLevel  )  [inline, inherited]
 

Gets the print level for the Dicom Entries.

Definition at line 50 of file gdcmBase.h.

00050 { return PrintLevel; }

const unsigned long& gdcm::RefCounter::GetRefCount  )  const [inline, inherited]
 

Get the reference counting.

Returns:
Reference count

Definition at line 56 of file gdcmRefCounter.h.

00057    {
00058       return RefCount;
00059    }

const std::string & gdcm::Command::GetText  )  const
 

Definition at line 84 of file gdcmCommand.cxx.

References Text.

00085 {
00086    return Text;
00087 }

unsigned int gdcm::Command::GetType  )  const
 

Definition at line 51 of file gdcmCommand.cxx.

References Cmd.

00052 {
00053    return Cmd;
00054 }

virtual void gdcm::Base::Print std::ostream &  = std::cout,
std::string const &  = ""
[inline, virtual, inherited]
 

Printer.

Reimplemented in gdcm::CommandManager, gdcm::DataEntry, gdcm::DicomDir, gdcm::DicomDirElement, gdcm::DicomDirImage, gdcm::DicomDirMeta, gdcm::DicomDirPatient, gdcm::DicomDirSerie, gdcm::DicomDirStudy, gdcm::DicomDirVisit, gdcm::DicomEntry, gdcm::Dict, gdcm::DictEntry, gdcm::DictGroupName, gdcm::DictSet, gdcm::DirList, gdcm::DocEntry, gdcm::ElementSet, gdcm::FileHelper, gdcm::JPEGFragment, gdcm::PixelReadConvert, gdcm::RLEFrame, gdcm::SeqEntry, gdcm::SerieHelper, gdcm::SQItem, and gdcm::VR.

Definition at line 42 of file gdcmBase.h.

00043                                                {};

void gdcm::RefCounter::Register  )  [inline, inherited]
 

Register the object.

Remarks:
It increments the reference counting

Definition at line 44 of file gdcmRefCounter.h.

Referenced by gdcm::SQItem::AddEntry(), gdcm::ElementSet::AddEntry(), gdcm::Dict::AddEntry(), gdcm::SeqEntry::AddSQItem(), gdcm::SeqEntry::Copy(), gdcm::DicomDir::Copy(), gdcm::DocEntry::DocEntry(), gdcm::FileHelper::FileHelper(), gdcm::DocEntrySet::GetDictEntry(), gdcm::CommandManager::InSetCommand(), gdcm::DocEntryArchive::Push(), gdcm::Dict::ReplaceEntry(), and gdcm::SeqEntry::SetDelimitationItem().

00044 { RefCount++; }

void gdcm::Command::SetConstObject const Base object  ) 
 

Definition at line 66 of file gdcmCommand.cxx.

References ConstObject.

Referenced by gdcm::CommandManager::InExecuteCommandConst().

00067 {
00068    ConstObject = object;
00069 }

void gdcm::Command::SetObject Base object  ) 
 

Definition at line 56 of file gdcmCommand.cxx.

References Object.

Referenced by gdcm::CommandManager::InExecuteCommand().

00057 {
00058    Object = object;
00059 }

void gdcm::Base::SetPrintLevel int  level  )  [inline, inherited]
 

Sets the print level for the Dicom Header Elements.

Note:
0 for Light Print; 1 for 'medium' Print, 2 for Heavy Print

Definition at line 47 of file gdcmBase.h.

Referenced by gdcm::SQItem::Print(), gdcm::SeqEntry::Print(), gdcm::FileHelper::Print(), gdcm::ElementSet::Print(), and gdcm::DicomDir::Print().

00047 { PrintLevel = level; }

void gdcm::Command::SetText const std::string &  text  ) 
 

Definition at line 79 of file gdcmCommand.cxx.

References Text.

Referenced by gdcm::CommandManager::InExecuteCommand(), and gdcm::CommandManager::InExecuteCommandConst().

00080 {
00081    Text = text;
00082 }

void gdcm::Command::SetType unsigned int  type  ) 
 

Definition at line 46 of file gdcmCommand.cxx.

References Cmd.

Referenced by gdcm::CommandManager::InExecuteCommand(), and gdcm::CommandManager::InExecuteCommandConst().

00047 {
00048    Cmd = type;
00049 }

void gdcm::RefCounter::Unregister  )  [inline, inherited]
 

Unregister the object.

Remarks:
It decrements the reference counting

Definition at line 48 of file gdcmRefCounter.h.

Referenced by gdcm::SeqEntry::ClearSQItem(), gdcm::DicomDir::Copy(), gdcm::DocEntrySet::GetDictEntry(), gdcm::CommandManager::InSetCommand(), gdcm::DocEntrySet::NewDataEntry(), gdcm::DocEntrySet::NewSeqEntry(), gdcm::Document::ReadNextDocEntry(), gdcm::SQItem::RemoveEntry(), gdcm::ElementSet::RemoveEntry(), gdcm::SeqEntry::SetDelimitationItem(), gdcm::DocEntry::~DocEntry(), and gdcm::FileHelper::~FileHelper().

00049    {
00050       RefCount--;
00051       if(RefCount<=0)
00052          delete this;
00053    }


Member Data Documentation

unsigned int gdcm::Command::Cmd [private]
 

Definition at line 78 of file gdcmCommand.h.

Referenced by Command(), GetType(), and SetType().

const Base* gdcm::Command::ConstObject [private]
 

Definition at line 77 of file gdcmCommand.h.

Referenced by Command(), GetConstObject(), and SetConstObject().

Base* gdcm::Command::Object [private]
 

Definition at line 76 of file gdcmCommand.h.

Referenced by Command(), GetObject(), and SetObject().

int gdcm::Base::PrintLevel [protected, inherited]
 

Amount of printed details for each Dicom Entries : 0 : stands for the least detail level.

Definition at line 55 of file gdcmBase.h.

Referenced by gdcm::SQItem::Print(), gdcm::SeqEntry::Print(), gdcm::FileHelper::Print(), gdcm::ElementSet::Print(), gdcm::DocEntry::Print(), gdcm::DictEntry::Print(), gdcm::DicomDirStudy::Print(), gdcm::DicomDirSerie::Print(), gdcm::DicomDirPatient::Print(), gdcm::DicomDirMeta::Print(), gdcm::DicomDir::Print(), and gdcm::DataEntry::Print().

std::string gdcm::Command::Text [private]
 

Definition at line 75 of file gdcmCommand.h.

Referenced by Command(), GetText(), and SetText().


The documentation for this class was generated from the following files:
Generated on Fri Jan 20 10:15:01 2006 for gdcm by  doxygen 1.4.4