GDCM_NAME_SPACE::CallbackCommand Class Reference

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

#include <gdcmCallbackCommand.h>

Inheritance diagram for GDCM_NAME_SPACE::CallbackCommand:

Inheritance graph
[legend]
Collaboration diagram for GDCM_NAME_SPACE::CallbackCommand:

Collaboration graph
[legend]
List of all members.

Public Types

typedef void CbkMethod (CallbackCommand *)

Public Member Functions

void SetCallback (CallbackCommand::CbkMethod *callback)
 Set the callback method Set the callback method to delete the argument The argument is destroyed when the callback method is changed or when the class is destroyed Set the callback method.
virtual void Execute ()
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
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

 CallbackCommand ()
 Constructor used when we want to generate dicom files from scratch.
virtual ~CallbackCommand ()
 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 (CallbackCommand)
 gdcmNewMacro (CallbackCommand)

Private Attributes

CbkMethodCallback
 pointer to the initialisation method for any progress bar
CbkMethodCallbackArgDelete
 pointer to the ??? method for any progress bar
void * CallbackArg
 pointer to the ??? data for any progress bar

Detailed Description

CallbackCommand base class to react on a gdcm event.

Remarks:
The execution parameter depends on the

Definition at line 33 of file gdcmCallbackCommand.h.


Member Typedef Documentation

typedef void GDCM_NAME_SPACE::CallbackCommand::CbkMethod(CallbackCommand *)
 

Definition at line 40 of file gdcmCallbackCommand.h.


Constructor & Destructor Documentation

GDCM_NAME_SPACE::CallbackCommand::CallbackCommand  )  [protected]
 

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

Definition at line 28 of file gdcmCallbackCommand.cxx.

References Callback, CallbackArg, and CallbackArgDelete.

00029 {
00030    Callback             = NULL;
00031    CallbackArgDelete    = NULL;
00032    CallbackArg          = NULL;
00033 }

GDCM_NAME_SPACE::CallbackCommand::~CallbackCommand  )  [protected, virtual]
 

Canonical destructor.

Definition at line 38 of file gdcmCallbackCommand.cxx.

00039 {
00040 //   SetCallback(NULL,NULL,NULL);
00041 }


Member Function Documentation

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

Delete the object.

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

Definition at line 41 of file gdcmRefCounter.h.

Referenced by GDCM_NAME_SPACE::SerieHelper::AddFileName(), GDCM_NAME_SPACE::Document::Backtrack(), GDCM_NAME_SPACE::FileHelper::CheckMandatoryElements(), GDCM_NAME_SPACE::FileHelper::CheckMandatoryEntry(), GDCM_NAME_SPACE::FileHelper::CopyMandatoryEntry(), GDCM_NAME_SPACE::Dict::DoTheLoadingJob(), GDCM_NAME_SPACE::FillDefaultDataDict(), GDCM_NAME_SPACE::DicomDirObject::FillObject(), vtkGdcmReader::GetFileInformation(), GDCM_NAME_SPACE::DocEntrySet::InsertEntryBinArea(), GDCM_NAME_SPACE::DocEntrySet::InsertEntryString(), GDCM_NAME_SPACE::DocEntrySet::InsertSeqEntry(), vtkGdcmReader::LoadFileInformation(), GDCM_NAME_SPACE::DicomDir::NewMeta(), GDCM_NAME_SPACE::DicomDirStudy::NewVisit(), GDCM_NAME_SPACE::Document::ReadNextDocEntry(), GDCM_NAME_SPACE::DicomDir::SetElement(), GDCM_NAME_SPACE::FileHelper::SetMandatoryEntry(), GDCM_NAME_SPACE::FileHelper::SetWriteFileTypeToExplicitVR(), GDCM_NAME_SPACE::FileHelper::SetWriteFileTypeToImplicitVR(), GDCM_NAME_SPACE::FileHelper::SetWriteFileTypeToJPEG(), GDCM_NAME_SPACE::FileHelper::SetWriteFileTypeToJPEG2000(), GDCM_NAME_SPACE::FileHelper::SetWriteToLibido(), GDCM_NAME_SPACE::DicomDir::~DicomDir(), GDCM_NAME_SPACE::DictSet::~DictSet(), and GDCM_NAME_SPACE::Global::~Global().

00041 { Unregister(); }

void GDCM_NAME_SPACE::CallbackCommand::Execute  )  [virtual]
 

Reimplemented from GDCM_NAME_SPACE::Command.

Definition at line 92 of file gdcmCallbackCommand.cxx.

References Callback.

00093 {
00094    if(Callback)
00095       Callback(this);
00096 }

GDCM_NAME_SPACE::CallbackCommand::gdcmNewMacro CallbackCommand   )  [private]
 

GDCM_NAME_SPACE::CallbackCommand::gdcmTypeMacro CallbackCommand   )  [private]
 

const char * GDCM_NAME_SPACE::Command::GetCommandAsString unsigned int  command  )  [static, inherited]
 

Definition at line 93 of file gdcmCommand.cxx.

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

Referenced by GDCM_NAME_SPACE::CommandManager::Print(), and GDCM_NAME_SPACE::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_NAME_SPACE::Command::GetConstObject  )  const [inherited]
 

Definition at line 71 of file gdcmCommand.cxx.

References GDCM_NAME_SPACE::Command::ConstObject, and GDCM_NAME_SPACE::Command::GetObject().

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

Base * GDCM_NAME_SPACE::Command::GetObject  )  const [inherited]
 

Definition at line 61 of file gdcmCommand.cxx.

References GDCM_NAME_SPACE::Command::Object.

Referenced by GDCM_NAME_SPACE::Command::GetConstObject().

00062 {
00063    return Object;
00064 }

int GDCM_NAME_SPACE::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_NAME_SPACE::RefCounter::GetRefCount  )  const [inline, inherited]
 

Get the reference counting.

Returns:
Reference count

Definition at line 59 of file gdcmRefCounter.h.

00060    {
00061       return RefCount;
00062    }

const std::string & GDCM_NAME_SPACE::Command::GetText  )  const [inherited]
 

Definition at line 84 of file gdcmCommand.cxx.

References GDCM_NAME_SPACE::Command::Text.

00085 {
00086    return Text;
00087 }

unsigned int GDCM_NAME_SPACE::Command::GetType  )  const [inherited]
 

Definition at line 51 of file gdcmCommand.cxx.

References GDCM_NAME_SPACE::Command::Cmd.

00052 {
00053    return Cmd;
00054 }

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

Printer.

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

Definition at line 42 of file gdcmBase.h.

00043                                                {};

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

Register the object.

Remarks:
It increments the reference counting

Definition at line 46 of file gdcmRefCounter.h.

Referenced by GDCM_NAME_SPACE::SQItem::AddEntry(), GDCM_NAME_SPACE::SeqEntry::AddSQItem(), GDCM_NAME_SPACE::SeqEntry::Copy(), GDCM_NAME_SPACE::DicomDir::Copy(), GDCM_NAME_SPACE::FileHelper::FileHelper(), GDCM_NAME_SPACE::DocEntrySet::GetDictEntry(), GDCM_NAME_SPACE::DocEntry::GetName(), GDCM_NAME_SPACE::DocEntry::GetVM(), GDCM_NAME_SPACE::DocEntrySet::InsertEntryString(), GDCM_NAME_SPACE::CommandManager::InSetCommand(), GDCM_NAME_SPACE::DocEntryArchive::Push(), and GDCM_NAME_SPACE::SeqEntry::SetDelimitationItem().

00046 { RefCount++; }

void GDCM_NAME_SPACE::CallbackCommand::SetCallback CallbackCommand::CbkMethod callback  ) 
 

Set the callback method Set the callback method to delete the argument The argument is destroyed when the callback method is changed or when the class is destroyed Set the callback method.

Parameters:
method Method to call
arg Argument to pass to the method
argDelete Argument
Warning:
In python : the arg parameter isn't considered

Definition at line 87 of file gdcmCallbackCommand.cxx.

References Callback.

00088 {
00089    Callback=callback;
00090 }

void GDCM_NAME_SPACE::Command::SetConstObject const Base object  )  [inherited]
 

Definition at line 66 of file gdcmCommand.cxx.

References GDCM_NAME_SPACE::Command::ConstObject.

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

00067 {
00068    ConstObject = object;
00069 }

void GDCM_NAME_SPACE::Command::SetObject Base object  )  [inherited]
 

Definition at line 56 of file gdcmCommand.cxx.

References GDCM_NAME_SPACE::Command::Object.

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

00057 {
00058    Object = object;
00059 }

void GDCM_NAME_SPACE::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_NAME_SPACE::FileHelper::Print(), and GDCM_NAME_SPACE::DicomDir::Print().

00047 { PrintLevel = level; }

void GDCM_NAME_SPACE::Command::SetText const std::string &  text  )  [inherited]
 

Definition at line 79 of file gdcmCommand.cxx.

References GDCM_NAME_SPACE::Command::Text.

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

00080 {
00081    Text = text;
00082 }

void GDCM_NAME_SPACE::Command::SetType unsigned int  type  )  [inherited]
 

Definition at line 46 of file gdcmCommand.cxx.

References GDCM_NAME_SPACE::Command::Cmd.

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

00047 {
00048    Cmd = type;
00049 }

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

Unregister the object.

Remarks:
It decrements the reference counting

Definition at line 50 of file gdcmRefCounter.h.

Referenced by GDCM_NAME_SPACE::Document::ReadNextDocEntry(), GDCM_NAME_SPACE::SQItem::RemoveEntry(), GDCM_NAME_SPACE::ElementSet::RemoveEntry(), and GDCM_NAME_SPACE::FileHelper::~FileHelper().

00051    {
00052 //std::cout <<"================Unreg " << typeid(*this).name() << std::endl;
00053       RefCount--;
00054       if(RefCount<=0)
00055         delete this;
00056    }


Member Data Documentation

CbkMethod* GDCM_NAME_SPACE::CallbackCommand::Callback [private]
 

pointer to the initialisation method for any progress bar

Definition at line 63 of file gdcmCallbackCommand.h.

Referenced by CallbackCommand(), Execute(), and SetCallback().

void* GDCM_NAME_SPACE::CallbackCommand::CallbackArg [private]
 

pointer to the ??? data for any progress bar

Definition at line 67 of file gdcmCallbackCommand.h.

Referenced by CallbackCommand().

CbkMethod* GDCM_NAME_SPACE::CallbackCommand::CallbackArgDelete [private]
 

pointer to the ??? method for any progress bar

Definition at line 65 of file gdcmCallbackCommand.h.

Referenced by CallbackCommand().

int GDCM_NAME_SPACE::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_NAME_SPACE::SeqEntry::Print(), GDCM_NAME_SPACE::FileHelper::Print(), GDCM_NAME_SPACE::ElementSet::Print(), GDCM_NAME_SPACE::DocEntry::Print(), GDCM_NAME_SPACE::DictEntry::Print(), GDCM_NAME_SPACE::DicomDirStudy::Print(), GDCM_NAME_SPACE::DicomDirSerie::Print(), GDCM_NAME_SPACE::DicomDirPatient::Print(), GDCM_NAME_SPACE::DicomDirMeta::Print(), GDCM_NAME_SPACE::DicomDir::Print(), and GDCM_NAME_SPACE::DataEntry::Print().


The documentation for this class was generated from the following files:
Generated on Fri Aug 24 12:56:23 2007 for gdcm by  doxygen 1.4.6