}
}
- end=i;
+ end=GetListEntry().end();
AddObjectToEnd(type,begin,end);
}
fread(&b2,1,1,fp);
//Two steps is necessary to please VC++
*pdestination++ = ((b0 >> 4) << 8) + ((b0 & 0x0f) << 4) + (b1 & 0x0f);
- /* A */ /* B */ /* D */
+ /* A */ /* B */ /* D */
*pdestination++ = ((b2 & 0x0f) << 8) + ((b1 >> 4) << 4) + (b2 >> 4);
- /* F */ /* C */ /* E */
+ /* F */ /* C */ /* E */
// Troubles expected on Big-Endian processors ?
}
Header->IsDeflatedExplicitVRLittleEndianTransferSyntax() ) {
size_t ItemRead = fread(destination, Header->GetPixelAreaLength(), 1, fp);
-
if ( ItemRead != 1 ) {
Header->CloseFile();
return false;
LoadHeaderEntrySafe(Element);
std::string Transfer = Element->GetValue();
- if ( Transfer == "1.2.840.10008.1.2.5" )
+ if ( Transfer == "1.2.840.10008.1.2.5" ) {
return true;
+ }
return false;
}
gdcmHeaderEntry* PixelElement = GetHeaderEntryByNumber(grPixel,numPixel);
if (PixelElement)
return PixelElement->GetLength();
- else
+ else {
+ std::cout << "Big trouble : Pixel Element ("
+ << std::hex << grPixel<<","<< numPixel<< ") NOT found"
+ << std::endl;
return 0;
+ }
}
/**
unsigned short int g, e;
char st[20];
TSKey v;
- std::string d2;
+ std::string d2, vr;
gdcmTS * ts = gdcmGlobal::GetTS();
std::ostringstream s;
guint32 lgth;
char greltag[10]; //group element tag
-
- g = GetGroup();
- e = GetElement();
- v = GetValue();
- o = GetOffset();
+ g = GetGroup();
+ e = GetElement();
+ v = GetValue();
+ o = GetOffset();
+ vr = GetVR();
sprintf(greltag,"%04x|%04x ",g,e);
s << greltag ;
s << std::setw(8) << o;
}
- s << "[" << GetVR() << "] ";
+ s << "[" << vr << "] ";
if (printLevel>=1) {
s.setf(std::ios::left);
s << " ==>\t[" << ts->GetValue(v) << "]";
}
}
- if (e == 0x0000) { // elem 0x0000 --> group length
+ //if (e == 0x0000) { // elem 0x0000 --> group length
+ if ( (vr == "UL") || (vr == "US") || (vr == "SL") || (vr == "SS") ) {
if (v == "4294967295") // to avoid troubles in convertion
sprintf (st," x(ffffffff)");
else
- sprintf(st," x(%08x)",atoi(v.c_str()));
+ sprintf(st," x(%x)",atoi(v.c_str()));
s << st;
}
s << std::endl;
ftellRes=ftell(fp);
fread(&ln,4,1,fp);
if(Header->GetSwapCode())
- ln=Header->SwapLong(ln); // Basic Offset Table Item Lentgh
- printf("at %x : Basic Offset Table Item Lentgh (??) %d x(%08x)\n",
+ ln=Header->SwapLong(ln); // Basic Offset Table Item Length
+ printf("at %x : Basic Offset Table Item Length (??) %d x(%08x)\n",
ftellRes,ln,ln);
if (ln != 0) {
// What is it used for ??
ftellRes=ftell(fp);
fread(&ln,4,1,fp);
if(Header->GetSwapCode())
- ln=Header->SwapLong(ln); // Basic Offset Table Item Lentgh
- printf("at %x : Basic Offset Table Item Lentgh (??) %d x(%08x)\n",
+ ln=Header->SwapLong(ln); // Basic Offset Table Item Length
+ printf("at %x : Basic Offset Table Item Length (??) %d x(%08x)\n",
ftellRes,ln,ln);
if (ln != 0) {
// What is it used for ??
CloseFile();
wasUpdated = 0; // will be set to 1 if user adds an entry
- printLevel = 1; // 'Heavy' header print by default
+ printLevel = 1; // 'Medium' print level by default
}
/**
Initialise();
wasUpdated = 0; // will be set to 1 if user adds an entry
- printLevel = 1; // 'Heavy' header print by default
+ printLevel = 1; // 'Medium' print level by default
}
/**
{
std::ostringstream s;
- s << "------------ using listEntries ----------------" << std::endl;
for (ListTag::iterator i = listEntries.begin();
i != listEntries.end();
++i)
* \brief Prints The Dict Entries of THE public Dicom Dictionnry
* @return
*/
-void gdcmParser::PrintPubDict(std::ostream & os)
-{
+void gdcmParser::PrintPubDict(std::ostream & os) {
RefPubDict->Print(os);
}
* \brief Prints The Dict Entries of THE shadow Dicom Dictionnry
* @return
*/
-void gdcmParser::PrintShaDict(std::ostream & os)
-{
+void gdcmParser::PrintShaDict(std::ostream & os) {
RefShaDict->Print(os);
}
std::ostringstream s;
s << "Erroneous Group Length element length on :" \
<< std::hex << group << " , " << element;
- dbg.Error("gdcmParser::IsAnInteger",
+ dbg.Error("gdcmParser::IsHeaderEntryAnInteger",
s.str().c_str());
}
}