if(strlen(Name)==1 && Name[0]=='.') { // user passed '.' as Name
// we get current directory name
- char*dummy=(char*) malloc(1000); // TODO : check with Windoze
+ char*dummy=(char*) malloc(1000); // TODO : check with Windoze // JPR
getcwd(dummy,(size_t)1000);
SetFileName(dummy); // will be converted into a string
free(dummy); // no longer needed
}
else {
CreateDicomDir();
- CheckBoundaries(); // JPR
- }
-
+ CheckBoundaries(); // to maintain consistency between
+ // home-made gdcmDicomDir
+ // and the ones comming from a DICOMDIR file
+ }
}
/*
fwrite(filePreamble,128,1,fp1);
fwrite("DICM",4,1,fp1);
free(filePreamble);
- //UpdateDirectoryRecordSequenceLength(); // a reecrire en utilisant
+ //UpdateDirectoryRecordSequenceLength(); // a reecrire en utilisant JPR
// la structure arborescente JPR
WriteDicomDirEntries(fp1);
* \sa SetPrintLevel
*/
void Print(std::ostream &os);
-
-
/**
* \ingroup gdcmDicomDirElement
* \brief returns a reference to the chained List
// Constructor / Destructor
/**
* \ingroup gdcmDicomDirSerie
- * \brief
+ * \brief Constructor
* @param begin iterator (inside the gdcmParser chained list)
* on the first Header Entry (i.e Dicom Element)
* related to this "SERIE" part
// Public
/**
* \ingroup gdcmFile
- * \brief
+ * \brief returns the gdcmHeader *Header
* @return
*/
gdcmHeader *gdcmFile::GetHeader(void) {
return (size_t)0;
}
}
-// DO NOT remove this code commented out.
+// DO NOT remove this commented out code .
// Nobody knows what's expecting you ...
// Just to 'see' what was actually read on disk :-(
void gdcmObject::Print(std::ostream &os) {
if(printLevel>=0) {
ListTag::iterator i;
- //for(ListTag::iterator i=beginObj;i!=endObj;++i) // JPR
for(i=beginObj;;++i) {
(*i)->SetPrintLevel(printLevel);
(*i)->Print(os);
* @return
*/
std::string gdcmObject::GetEntryByNumber(guint16 group, guint16 element) {
- //for(ListTag::iterator i=beginObj;i!=endObj;++i) // JPR
for(ListTag::iterator i=beginObj;;++i) {
if ( (*i)->GetGroup()==group && (*i)->GetElement()==element)
return (*i)->GetValue();
*/
TagHeaderEntryHT gdcmObject::GetEntry(void) {
TagHeaderEntryHT HT;
- //for(ListTag::iterator i=beginObj;i!=endObj;++i) // JPR
for(ListTag::iterator i=beginObj;;++i) {
HT.insert( PairHT( (*i)->GetKey(),(*i)) );
if (i == endObj) break;
*/
ListTag gdcmObject::GetListEntry(void) {
ListTag list;
- //for(ListTag::iterator i=beginObj;i!=endObj;++i) // JPR
for(ListTag::iterator i=beginObj;;++i) {
list.push_back(*i);
if (i == endObj) break;
tmpEl=it->elem;
dictEntry=gdcmGlobal::GetDicts()->GetDefaultPubDict()->GetDictEntryByNumber(tmpGr,tmpEl);
entry=new gdcmHeaderEntry(dictEntry);
- entry->SetOffset(0); // just to avoid missprinting //JPR
+ entry->SetOffset(0); // just to avoid further missprinting
entry->SetValue(it->value);
if(dictEntry->GetGroup()==0xfffe)
entry->SetLength(entry->GetValue().length());
}
ptagHT->insert( PairHT(entry->GetKey(),entry) ); // add in the (multimap) H Table
- plistEntries->insert(debInsertion ,entry); // en tete de liste des Patients
+ plistEntries->insert(debInsertion ,entry); // add at the begining of the Patient list
++finInsertion;
}
TagHeaderEntryHT *ptagHT, ListTag *plistEntries);
~gdcmObject(void);
- void SetPrintLevel(int level) { printLevel = level; };
+ /**
+ * \ingroup gdcmParser
+ * \brief Sets the print level for the Dicom Header
+ * \note 0 for Light Print; 1 for 'medium' Print, 2 for Heavy
+ */
+ void SetPrintLevel(int level)
+ { printLevel = level; };
virtual void Print(std::ostream &os = std::cout);
std::string GetEntryByNumber(guint16 group, guint16 element);
}
if( (vr == "UI") ) // Because of correspondance with the VR dic
- Entry->SetValue(NewValue.c_str()); // ??? JPR ???
+ Entry->SetValue(NewValue.c_str());
else
Entry->SetValue(NewValue);
}
/* Pb : how to propagate the element length (used in SkipHeaderEntry)
// direct call to SkipBytes ?
- if (ignoreShadow == 1 && g%2 ==1) //JPR
+ if (ignoreShadow == 1 && g%2 ==1)
// if user wants to skip shadow groups
// and current element *is* a shadow element
// we don't create anything