Program: gdcm
Module: $RCSfile: gdcmBinEntry.cxx,v $
Language: C++
- Date: $Date: 2004/08/01 00:59:21 $
- Version: $Revision: 1.20 $
+ Date: $Date: 2004/08/01 03:20:23 $
+ Version: $Revision: 1.21 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
ReadLength = e->GetReadLength();
ImplicitVR = e->IsImplicitVR();
Offset = e->GetOffset();
- printLevel = e->GetPrintLevel();
+ PrintLevel = e->GetPrintLevel();
SQDepthLevel = e->GetDepthLevel();
voidArea = NULL; // let's be carefull !
Program: gdcm
Module: $RCSfile: gdcmDocEntry.cxx,v $
Language: C++
- Date: $Date: 2004/08/01 00:59:21 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2004/08/01 03:20:23 $
+ Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
gdcmDocEntry::gdcmDocEntry(gdcmDictEntry* in)
{
ImplicitVR = false;
- entry = in;
+ DictEntry = in;
}
//-----------------------------------------------------------------------------
*/
void gdcmDocEntry::Print(std::ostream & os)
{
- printLevel=2; // FIXME
+ PrintLevel = 2; // FIXME
size_t o;
unsigned short int g, e;
sprintf(greltag,"%04x|%04x ",g,e);
s << greltag ;
- if (printLevel>=2)
+ if (PrintLevel >= 2)
{
s << "lg : ";
lgth = GetReadLength(); // ReadLength, as opposed to UsableLength
s << "[" << vr << "] ";
- if (printLevel >= 1)
+ if (PrintLevel >= 1)
{
s.setf(std::ios::left);
s << std::setw(66-GetName().length()) << " ";
uint16_t el = GetElement();
uint32_t lgr = GetReadLength();
- if ( (group == 0xfffe) && (el == 0x0000) )
+ if ( group == 0xfffe && el == 0x0000 )
{
// Fix in order to make some MR PHILIPS images e-film readable
// see gdcmData/gdcm-MR-PHILIPS-16-Multi-Seq.dcm:
*/
void gdcmDocEntry::Copy (gdcmDocEntry* e)
{
- entry = e->entry;
+ DictEntry = e->DictEntry;
UsableLength = e->UsableLength;
ReadLength = e->ReadLength;
ImplicitVR = e->ImplicitVR;
Offset = e->Offset;
- printLevel = e->printLevel;
+ PrintLevel = e->PrintLevel;
// TODO : remove gdcmDocEntry SQDepth
}
* \brief tells us if entry is the last one of a 'no length' SequenceItem
* (fffe,e00d)
*/
-bool gdcmDocEntry::isItemDelimitor()
+bool gdcmDocEntry::IsItemDelimitor()
{
return (GetGroup() == 0xfffe && GetElement() == 0xe00d);
}
* \brief tells us if entry is the last one of a 'no length' Sequence
* (fffe,e0dd)
*/
-bool gdcmDocEntry::isSequenceDelimitor()
+bool gdcmDocEntry::IsSequenceDelimitor()
{
return (GetGroup() == 0xfffe && GetElement() == 0xe0dd);
}
Program: gdcm
Module: $RCSfile: gdcmDocEntry.h,v $
Language: C++
- Date: $Date: 2004/08/01 00:59:21 $
- Version: $Revision: 1.15 $
+ Date: $Date: 2004/08/01 03:20:23 $
+ Version: $Revision: 1.16 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
gdcmDocEntry(gdcmDictEntry*);
/// Returns the Dicom Group number of the current Dicom Header Entry
- uint16_t GetGroup() { return entry->GetGroup(); };
+ uint16_t GetGroup() { return DictEntry->GetGroup(); };
/// Returns the Dicom Element number of the current Dicom Header Entry
- uint16_t GetElement() { return entry->GetElement();};
+ uint16_t GetElement() { return DictEntry->GetElement();};
/// Returns the 'key' of the current Dicom Header Entry
- std::string GetKey() { return entry->GetKey(); };
+ std::string GetKey() { return DictEntry->GetKey(); };
/// \brief Returns the 'Name' '(e.g. "Patient's Name") found in the Dicom
/// Dictionnary of the current Dicom Header Entry
- std::string GetName() { return entry->GetName(); };
+ std::string GetName() { return DictEntry->GetName(); };
/// \brief Returns the 'Value Representation' (e.g. "PN" : Person Name,
/// "SL" : Signed Long), found in the Dicom Header or in the Dicom
/// Dictionnary, of the current Dicom Header Entry
- std::string GetVR() { return entry->GetVR(); };
+ std::string GetVR() { return DictEntry->GetVR(); };
/// \brief Returns offset (since the beginning of the file, including
/// the File Pramble, if any) of the value of the current Dicom HeaderEntry
uint32_t GetReadLength() { return ReadLength; };
/// Sets the 'Value Representation' of the current Dicom Header Entry
- void SetVR(std::string const & v) { entry->SetVR(v); };
+ void SetVR(std::string const & v) { DictEntry->SetVR(v); };
/// \brief Sets both 'Read Length' and 'Usable Length' of the current
/// Dicom Header Entry
- void SetLength(uint32_t l) { ReadLength=UsableLength=l;};
+ void SetLength(uint32_t l) { ReadLength = UsableLength = l;};
// The following 3 members, for internal use only !
/// \brief Sets only 'Read Length' (*not* 'Usable Length') of the current
/// Dicom Header Entry
- void SetReadLength(uint32_t l) { ReadLength = l; };
+ void SetReadLength(uint32_t l) { ReadLength = l; };
/// \brief Sets only 'Usable Length' (*not* 'Read Length') of the current
/// Dicom Header Entry
/// \brief Tells us if the VR of the current Dicom Element is Unknown
/// @return true if the VR is unkonwn
- bool IsVRUnknown() { return entry->IsVRUnknown(); };
+ bool IsVRUnknown() { return DictEntry->IsVRUnknown(); };
/// \brief Sets the DicEntry of the current Dicom Element
/// @param NewEntry pointer to the DictEntry
- void SetDictEntry(gdcmDictEntry *NewEntry) { entry = NewEntry; };
+ void SetDictEntry(gdcmDictEntry *newEntry) { DictEntry = newEntry; };
/// \brief Gets the DicEntry of the current Dicom Element
/// @return The DicEntry of the current Dicom Element
- gdcmDictEntry * GetDictEntry() { return entry; };
+ gdcmDictEntry * GetDictEntry() { return DictEntry; };
/// \brief Sets the print level for the Dicom Header Elements
/// \note 0 for Light Print; 1 for 'medium' Print, 2 for Heavy
- void SetPrintLevel(int level) { printLevel = level; };
+ void SetPrintLevel(int level) { PrintLevel = level; };
/// \brief Gets the print level for the Dicom Header Elements
- int GetPrintLevel() { return printLevel; };
+ int GetPrintLevel() { return PrintLevel; };
virtual void Print (std::ostream & os = std::cout);
virtual void Write(FILE *fp, FileType filetype);
void Copy(gdcmDocEntry *doc);
- bool isItemDelimitor();
- bool isSequenceDelimitor();
+ bool IsItemDelimitor();
+ bool IsSequenceDelimitor();
/// \brief Gets the depth level of a Dicom header entry embedded in
/// a SeQuence
/// \brief Sets the depth level of a Dicom header entry embedded in
/// a SeQuence
- void SetDepthLevel(int depth) {SQDepthLevel = depth;}
-
+ void SetDepthLevel(int depth) { SQDepthLevel = depth; }
+
private:
// FIXME: In fact we should be more specific and use :
// friend gdcmDocEntry * gdcmHeader::ReadNextElement(void);
// Variables
/// \brief pointer to the underlying Dicom dictionary element
- gdcmDictEntry *entry;
+ gdcmDictEntry *DictEntry;
/// \brief Updated from ReadLength, by FixFoungLentgh() for fixing a bug
/// in the header or helping the parser going on
size_t Offset;
/// How many details are to be printed (value : 0,1,2)
- int printLevel;
+ int PrintLevel;
/// Gives the depth level of elements inside SeQuences
int SQDepthLevel;
Program: gdcm
Module: $RCSfile: gdcmDocEntrySet.cxx,v $
Language: C++
- Date: $Date: 2004/07/30 11:40:13 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2004/08/01 03:20:23 $
+ Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* \ingroup gdcmDocEntrySet
* \brief Constructor from a given gdcmDocEntrySet
*/
-gdcmDocEntrySet::gdcmDocEntrySet(int depthLevel) {
- SQDepthLevel = depthLevel + 1;
+gdcmDocEntrySet::gdcmDocEntrySet(int depthLevel)
+{
+ SQDepthLevel = depthLevel + 1; //magic +1 !
}
/**
* \brief Canonical destructor.
*/
-gdcmDocEntrySet::~gdcmDocEntrySet(){
+gdcmDocEntrySet::~gdcmDocEntrySet()
+{
}
//-----------------------------------------------------------------------------
// Print
* @param Group group number of the underlying DictEntry
* @param Elem element number of the underlying DictEntry
*/
-gdcmValEntry *gdcmDocEntrySet::NewValEntryByNumber(uint16_t Group,
- uint16_t Elem)
+gdcmValEntry *gdcmDocEntrySet::NewValEntryByNumber(uint16_t group,
+ uint16_t elem)
{
// Find out if the tag we encountered is in the dictionaries:
- gdcmDictEntry *DictEntry = GetDictEntryByNumber(Group, Elem);
- if (!DictEntry)
- DictEntry = NewVirtualDictEntry(Group, Elem);
+ gdcmDictEntry *dictEntry = GetDictEntryByNumber(group, elem);
+ if (!dictEntry)
+ {
+ dictEntry = NewVirtualDictEntry(group, elem);
+ }
- gdcmValEntry *NewEntry = new gdcmValEntry(DictEntry);
- if (!NewEntry)
+ gdcmValEntry *newEntry = new gdcmValEntry(dictEntry);
+ if (!newEntry)
{
dbg.Verbose(1, "gdcmDocument::NewValEntryByNumber",
"failed to allocate gdcmValEntry");
- return NULL;
+ return 0;
}
- return NewEntry;
+ return newEntry;
}
* @param Group group number of the underlying DictEntry
* @param Elem element number of the underlying DictEntry
*/
-gdcmBinEntry *gdcmDocEntrySet::NewBinEntryByNumber(uint16_t Group,
- uint16_t Elem)
+gdcmBinEntry *gdcmDocEntrySet::NewBinEntryByNumber(uint16_t group,
+ uint16_t elem)
{
// Find out if the tag we encountered is in the dictionaries:
- gdcmDictEntry *DictEntry = GetDictEntryByNumber(Group, Elem);
- if (!DictEntry)
- DictEntry = NewVirtualDictEntry(Group, Elem);
+ gdcmDictEntry *dictEntry = GetDictEntryByNumber(group, elem);
+ if (!dictEntry)
+ {
+ dictEntry = NewVirtualDictEntry(group, elem);
+ }
- gdcmBinEntry *NewEntry = new gdcmBinEntry(DictEntry);
- if (!NewEntry)
+ gdcmBinEntry *newEntry = new gdcmBinEntry(dictEntry);
+ if (!newEntry)
{
dbg.Verbose(1, "gdcmDocument::NewBinEntryByNumber",
"failed to allocate gdcmBinEntry");
- return NULL;
+ return 0;
}
- return NewEntry;
+ return newEntry;
}
//-----------------------------------------------------------------------------
// Protected
* \brief Gets a Dicom Element inside a SQ Item Entry, by name
* @return
*/
- gdcmDocEntry *gdcmDocEntrySet::GetDocEntryByName(std::string name) {
- gdcmDict *PubDict=gdcmGlobal::GetDicts()->GetDefaultPubDict();
- gdcmDictEntry *dictEntry = (*PubDict).GetDictEntryByName(name);
- if( dictEntry == NULL)
- return NULL;
+ gdcmDocEntry *gdcmDocEntrySet::GetDocEntryByName(std::string const & name)
+ {
+ gdcmDict *pubDict = gdcmGlobal::GetDicts()->GetDefaultPubDict();
+ gdcmDictEntry *dictEntry = pubDict->GetDictEntryByName(name);
+ if( !dictEntry )
+ {
+ return 0;
+ }
+
return GetDocEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement());
}
* @return
*/
-std::string gdcmDocEntrySet::GetEntryByName(TagName name) {
- gdcmDict *PubDict=gdcmGlobal::GetDicts()->GetDefaultPubDict();
- gdcmDictEntry *dictEntry = (*PubDict).GetDictEntryByName(name);
+std::string gdcmDocEntrySet::GetEntryByName(TagName const & name)
+{
+ gdcmDict *pubDict = gdcmGlobal::GetDicts()->GetDefaultPubDict();
+ gdcmDictEntry *dictEntry = pubDict->GetDictEntryByName(name);
- if( dictEntry == NULL)
+ if( !dictEntry )
+ {
return GDCM_UNFOUND;
- return GetEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement());
+ }
+
+ return GetEntryByNumber(dictEntry->GetGroup(), dictEntry->GetElement());
}
*/
gdcmDictEntry* gdcmDocEntrySet::NewVirtualDictEntry(uint16_t group,
uint16_t element,
- std::string vr,
- std::string fourth,
- std::string name)
+ std::string const & vr,
+ std::string const & fourth,
+ std::string const & name)
{
return gdcmGlobal::GetDicts()->NewVirtualDictEntry(group,element,vr,fourth,name);
}
uint16_t elem)
{
// Find out if the tag we encountered is in the dictionaries:
- gdcmDict *PubDict=gdcmGlobal::GetDicts()->GetDefaultPubDict();
- gdcmDictEntry *DictEntry = (*PubDict).GetDictEntryByNumber(group, elem);
- if (!DictEntry)
- DictEntry = NewVirtualDictEntry(group, elem);
+ gdcmDict *pubDict = gdcmGlobal::GetDicts()->GetDefaultPubDict();
+ gdcmDictEntry *dictEntry = pubDict->GetDictEntryByNumber(group, elem);
+ if (!dictEntry)
+ {
+ dictEntry = NewVirtualDictEntry(group, elem);
+ }
- gdcmDocEntry *NewEntry = new gdcmDocEntry(DictEntry);
- if (!NewEntry)
+ gdcmDocEntry *newEntry = new gdcmDocEntry(dictEntry);
+ if (!newEntry)
{
dbg.Verbose(1, "gdcmSQItem::NewDocEntryByNumber",
"failed to allocate gdcmDocEntry");
- return (gdcmDocEntry*)0;
+ return 0;
}
- return NewEntry;
+ return newEntry;
}
/// \brief
-gdcmDocEntry *gdcmDocEntrySet::NewDocEntryByName (std::string Name) {
-
- gdcmDict *PubDict=gdcmGlobal::GetDicts()->GetDefaultPubDict();
- gdcmDictEntry *NewTag = (*PubDict).GetDictEntryByName(Name);
- if (!NewTag)
- NewTag = NewVirtualDictEntry(0xffff, 0xffff, "LO", "unkn", Name);
+gdcmDocEntry *gdcmDocEntrySet::NewDocEntryByName (std::string const & name)
+{
+ gdcmDict *pubDict = gdcmGlobal::GetDicts()->GetDefaultPubDict();
+ gdcmDictEntry *newTag = pubDict->GetDictEntryByName(name);
+ if (!newTag)
+ {
+ newTag = NewVirtualDictEntry(0xffff, 0xffff, "LO", "unkn", name);
+ }
- gdcmDocEntry* NewEntry = new gdcmDocEntry(NewTag);
- if (!NewEntry)
+ gdcmDocEntry* newEntry = new gdcmDocEntry(newTag);
+ if (!newEntry)
{
dbg.Verbose(1, "gdcmSQItem::ObtainDocEntryByName",
"failed to allocate gdcmDocEntry");
- return (gdcmDocEntry *)0;
+ return 0;
}
- return NewEntry;
+
+ return newEntry;
}
* @param Name name of the searched DictEntry
* @return Corresponding DictEntry when it exists, NULL otherwise.
*/
-gdcmDictEntry *gdcmDocEntrySet::GetDictEntryByName(std::string Name)
+gdcmDictEntry *gdcmDocEntrySet::GetDictEntryByName(std::string const & name)
{
- gdcmDictEntry *found = (gdcmDictEntry *)0;
- gdcmDict *PubDict=gdcmGlobal::GetDicts()->GetDefaultPubDict();
- if (!PubDict)
+ gdcmDictEntry *found = 0;
+ gdcmDict *pubDict = gdcmGlobal::GetDicts()->GetDefaultPubDict();
+ if (!pubDict)
{
dbg.Verbose(0, "gdcmDocument::GetDictEntry",
"we SHOULD have a default dictionary");
}
- else
- found = PubDict->GetDictEntryByName(Name);
+ else
+ {
+ found = pubDict->GetDictEntryByName(name);
+ }
return found;
}
gdcmDictEntry *gdcmDocEntrySet::GetDictEntryByNumber(uint16_t group,
uint16_t element)
{
- gdcmDictEntry *found = (gdcmDictEntry *)0;
- gdcmDict *PubDict=gdcmGlobal::GetDicts()->GetDefaultPubDict();
- if (!PubDict)
+ gdcmDictEntry *found = 0;
+ gdcmDict *pubDict = gdcmGlobal::GetDicts()->GetDefaultPubDict();
+ if (!pubDict)
{
dbg.Verbose(0, "gdcmDocument::GetDictEntry",
"we SHOULD have a default dictionary");
}
- else
- found = PubDict->GetDictEntryByNumber(group, element);
+ else
+ {
+ found = pubDict->GetDictEntryByNumber(group, element);
+ }
return found;
}
Program: gdcm
Module: $RCSfile: gdcmDocEntrySet.h,v $
Language: C++
- Date: $Date: 2004/07/02 13:55:27 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2004/08/01 03:20:23 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
virtual void Print (std::ostream & os = std::cout) = 0;// pure virtual
/// \brief write any type of entry to the entry set
- virtual void Write (FILE *fp, FileType filetype)=0;// pure virtual
+ virtual void Write (FILE *fp, FileType filetype) = 0;// pure virtual
/// \brief Gets the depth level of a Dicom Header Entry embedded in a
/// SeQuence
- int GetDepthLevel(void) { return SQDepthLevel; }
+ int GetDepthLevel() { return SQDepthLevel; }
/// \brief Sets the depth level of a Dicom Header Entry embedded in a
/// SeQuence
virtual gdcmDocEntry* GetDocEntryByNumber(uint16_t group,
uint16_t element) = 0;
- gdcmDocEntry *GetDocEntryByName(std::string name);
+ gdcmDocEntry *GetDocEntryByName(std::string const & name);
virtual std::string GetEntryByNumber(uint16_t group,uint16_t element) = 0;
- std::string GetEntryByName(TagName name);
+ std::string GetEntryByName(TagName const & name);
gdcmDictEntry *NewVirtualDictEntry(uint16_t group,
uint16_t element,
- std::string vr = "unkn",
- std::string fourth = "unkn",
- std::string name = "unkn");
+ std::string const & vr = "unkn",
+ std::string const & fourth = "unkn",
+ std::string const & name = "unkn");
protected:
uint16_t element);
gdcmDocEntry* NewDocEntryByNumber(uint16_t group,
uint16_t element);
- gdcmDocEntry* NewDocEntryByName (std::string Name);
+ gdcmDocEntry* NewDocEntryByName (std::string const & name);
// DictEntry related utilities
- gdcmDictEntry *GetDictEntryByName (std::string Name);
+ gdcmDictEntry *GetDictEntryByName (std::string const & name);
gdcmDictEntry *GetDictEntryByNumber(uint16_t, uint16_t);
/// Gives the depth level of the element set inside SeQuences
int SQDepthLevel;
-
private:
-
};
Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2004/08/01 00:59:21 $
- Version: $Revision: 1.62 $
+ Date: $Date: 2004/08/01 03:20:23 $
+ Version: $Revision: 1.63 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* \brief Set the shadow dictionary used
* \param dictName name of the dictionary to use in shadow
*/
-bool gdcmDocument::SetShaDict(DictKey dictName)
+bool gdcmDocument::SetShaDict(DictKey const & dictName)
{
RefShaDict = gdcmGlobal::GetDicts()->GetDict(dictName);
return !RefShaDict;
* @param tagName name of the searched Dicom Element.
* @return true when found
*/
-bool gdcmDocument::SetEntryByName(std::string content,std::string tagName)
+bool gdcmDocument::SetEntryByName(std::string const & content,std::string const & tagName)
{
gdcmDictEntry *dictEntry = RefPubDict->GetDictEntryByName(tagName);
if( !dictEntry )
* @param group group number of the Dicom Element to modify
* @param element element number of the Dicom Element to modify
*/
-bool gdcmDocument::SetEntryByNumber(std::string content,
+bool gdcmDocument::SetEntryByNumber(std::string const & content,
uint16_t group,
uint16_t element)
{
return false;
}
// Non even content must be padded with a space (020H)...
- if( content.length() % 2 )
+ std::string evenContent = content;
+ if( evenContent.length() % 2 )
{
- content += '\0'; // ... therefore we padd with (000H) .!?!
+ evenContent += '\0'; // ... therefore we padd with (000H) .!?!
}
- valEntry->SetValue(content);
+ valEntry->SetValue(evenContent);
// Integers have a special treatement for their length:
gdcmVRKey vr = valEntry->GetVR();
}
else
{
- valEntry->SetLength(content.length());
+ valEntry->SetLength(evenContent.length());
}
return true;
//content = content + '\0'; // fing a trick to enlarge a binary field?
}
*/
- gdcmBinEntry * a;
- a = (gdcmBinEntry *)TagHT[key];
+ gdcmBinEntry* a = (gdcmBinEntry *)TagHT[key];
a->SetVoidArea(content);
//a->SetLength(lgth); // ???
+
return true;
}
{
return false;
}
- // This was for multimap ?
- (( gdcmBinEntry *)( ((TagHT.equal_range(key)).first)->second ))->SetVoidArea(area);
+
+ // This was for multimap ?
+ (( gdcmBinEntry *)( ((TagHT.equal_range(key)).first)->second ))->SetVoidArea(area);
return true;
}
{
if ( SwapCode == 4321 || SwapCode == 2143 )
{
- a =((( a << 8 ) & 0x0ff00 ) | (( a >> 8 ) & 0x00ff ) );
+ a = ((( a << 8 ) & 0x0ff00 ) | (( a >> 8 ) & 0x00ff ) );
}
return a;
}
newValEntry->SetDepthLevel(depth);
set->AddEntry(newValEntry);
LoadDocEntry(newValEntry);
- if (newValEntry->isItemDelimitor())
+ if (newValEntry->IsItemDelimitor())
{
break;
}
}
if( delim_mode )
{
- if ( newDocEntry->isSequenceDelimitor() )
+ if ( newDocEntry->IsSequenceDelimitor() )
{
set->SetSequenceDelimitationItem( newDocEntry );
break;
// endian encoding". When this is the case, chances are we have got our
// hands on a big endian encoded file: we switch the swap code to
// big endian and proceed...
- if ( (element == 0x0000) && (length16 == 0x0400) )
+ if ( element == 0x0000 && length16 == 0x0400 )
{
- if ( ! IsExplicitVRBigEndianTransferSyntax() )
+ if ( !IsExplicitVRBigEndianTransferSyntax() )
{
dbg.Verbose(0, "gdcmDocument::FindLength", "not explicit VR");
errno = 1;
// expected VR read happens to be non-ascii characters we consider
// we hit falsely explicit VR tag.
- if ( (!isalpha(vr[0])) && (!isalpha(vr[1])) )
+ if ( !isalpha(vr[0]) && !isalpha(vr[1]) )
{
realExplicit = false;
}
{
// Call it quits
delete newEntry;
- return NULL;
+ return 0;
}
newEntry->SetOffset(ftell(Fp));
*/
uint32_t gdcmDocument::ReadTagLength(uint16_t testGroup, uint16_t testElement)
{
- long PositionOnEntry = ftell(Fp);
- (void)PositionOnEntry;
+ long positionOnEntry = ftell(Fp);
+ (void)positionOnEntry;
if ( !ReadTag(testGroup, testElement) )
{
// Make sure that at the end of the item we encounter a 'Sequence
// Delimiter Item':
- if ( ! ReadTag(0xfffe, 0xe0dd) )
+ if ( !ReadTag(0xfffe, 0xe0dd) )
{
dbg.Verbose(0, "gdcmDocument::Parse7FE0: no sequence delimiter item");
dbg.Verbose(0, " at end of RLE item sequence");
Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2004/07/31 23:30:04 $
- Version: $Revision: 1.27 $
+ Date: $Date: 2004/08/01 03:20:23 $
+ Version: $Revision: 1.28 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
gdcmDict *GetPubDict();
gdcmDict *GetShaDict();
bool SetShaDict(gdcmDict *dict);
- bool SetShaDict(DictKey dictName);
+ bool SetShaDict(DictKey const & dictName);
// Informations contained in the parser
virtual bool IsReadable();
- bool IsGivenTransferSyntax(std::string const & SyntaxToCheck);
+ bool IsGivenTransferSyntax(std::string const & syntaxToCheck);
bool IsImplicitVRLittleEndianTransferSyntax();
bool IsExplicitVRLittleEndianTransferSyntax();
bool IsDeflatedExplicitVRLittleEndianTransferSyntax();
virtual std::string GetEntryVRByNumber(uint16_t group, uint16_t elem);
virtual int GetEntryLengthByNumber(uint16_t group, uint16_t elem);
protected:
- virtual bool SetEntryByName (std::string content, std::string tagName);
- virtual bool SetEntryByNumber(std::string content,
+ virtual bool SetEntryByName (std::string const & content,
+ std::string const & tagName);
+ virtual bool SetEntryByNumber(std::string const & content,
uint16_t group, uint16_t element);
virtual bool SetEntryByNumber(void *content, int lgth,
uint16_t group, uint16_t element);
private:
// Read
long ParseDES(gdcmDocEntrySet *set, long offset, long l_max,bool delim_mode);
- long ParseSQ(gdcmSeqEntry *seq, long offset, long l_max, bool delim_mode);
+ long ParseSQ (gdcmSeqEntry *seq, long offset, long l_max, bool delim_mode);
void LoadDocEntry (gdcmDocEntry *);
void FindDocEntryLength(gdcmDocEntry *);
Program: gdcm
Module: $RCSfile: gdcmSQItem.cxx,v $
Language: C++
- Date: $Date: 2004/08/01 00:59:21 $
- Version: $Revision: 1.22 $
+ Date: $Date: 2004/08/01 03:20:23 $
+ Version: $Revision: 1.23 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// (when it exists) we don't write it right now
// It will be written outside, because ALL the SQItems are written
// as 'no length'
- if ( (*i)->isItemDelimitor() )
+ if ( (*i)->IsItemDelimitor() )
{
break;
}
Program: gdcm
Module: $RCSfile: gdcmValEntry.cxx,v $
Language: C++
- Date: $Date: 2004/08/01 00:59:22 $
- Version: $Revision: 1.19 $
+ Date: $Date: 2004/08/01 03:20:23 $
+ Version: $Revision: 1.20 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
ReadLength = e->GetReadLength();
ImplicitVR = e->IsImplicitVR();
Offset = e->GetOffset();
- printLevel = e->GetPrintLevel();
+ PrintLevel = e->GetPrintLevel();
SQDepthLevel = e->GetDepthLevel();
voidArea = NULL; // will be in BinEntry ?
v = GetValue(); // not applicable for SQ ...
d2 = CreateCleanString(v); // replace non printable characters by '.'
if( (GetLength()<=MAX_SIZE_PRINT_ELEMENT_VALUE) ||
- (printLevel>=3) || (d2.find("gdcm::NotLoaded.") < d2.length()) )
+ (PrintLevel>=3) || (d2.find("gdcm::NotLoaded.") < d2.length()) )
{
s << " [" << d2 << "]";
}