Program: gdcm
Module: $RCSfile: gdcmDebug.h,v $
Language: C++
- Date: $Date: 2005/02/04 16:51:36 $
- Version: $Revision: 1.29 $
+ Date: $Date: 2005/02/05 01:37:08 $
+ Version: $Revision: 1.30 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* @param msg message part
*/
#ifdef NDEBUG
-#define gdcmVerboseMacro(msg) \
+#define gdcmWarningMacro(msg) \
{ \
}
#else
-#define gdcmVerboseMacro(msg) \
+#define gdcmWarningMacro(msg) \
{ \
if( Debug::GetDebugFlag() ) \
{ \
Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 14:52:24 $
- Version: $Revision: 1.127 $
+ Date: $Date: 2005/02/05 01:37:08 $
+ Version: $Revision: 1.128 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if ( GetFirstEntry() == 0 ) // when user passed a Directory to parse
{
if (!parseDir)
- gdcmVerboseMacro( "Entry HT empty for file: "<<fileName);
+ gdcmWarningMacro( "Entry HT empty for file: "<<fileName);
// Only if user passed a root directory
// ------------------------------------
{
NewMeta();
- gdcmVerboseMacro( "Parse directory and create the DicomDir");
+ gdcmWarningMacro( "Parse directory and create the DicomDir");
ParseDirectory();
}
else
DocEntry *e = GetDocEntry(0x0004, 0x1220);
if ( !e )
{
- gdcmVerboseMacro( "NO 'Directory record sequence' (0x0004,0x1220)"
+ gdcmWarningMacro( "NO 'Directory record sequence' (0x0004,0x1220)"
<< " in file " << fileName);
/// \todo FIXME : what do we do when the parsed file IS NOT a
/// DICOMDIR file ?
{
if( Filetype == Unknown)
{
- gdcmVerboseMacro( "Wrong filetype");
+ gdcmWarningMacro( "Wrong filetype");
return false;
}
if( !MetaElems )
{
- gdcmVerboseMacro( "Meta Elements missing in DicomDir");
+ gdcmWarningMacro( "Meta Elements missing in DicomDir");
return false;
}
if( Patients.size() <= 0 )
{
- gdcmVerboseMacro( "NO Patient in DicomDir");
+ gdcmWarningMacro( "NO Patient in DicomDir");
return false;
}
std::ios::out | std::ios::binary);
if( !fp )
{
- gdcmVerboseMacro("Failed to open(write) File: " << fileName.c_str());
+ gdcmWarningMacro("Failed to open(write) File: " << fileName.c_str());
return false;
}
header = new File( it->c_str() );
if( !header )
{
- gdcmVerboseMacro( "Failure in new gdcm::File " << it->c_str() );
+ gdcmWarningMacro( "Failure in new gdcm::File " << it->c_str() );
continue;
}
{
// Add the file to the chained list:
list.push_back(header);
- gdcmVerboseMacro( "Readable " << it->c_str() );
+ gdcmWarningMacro( "Readable " << it->c_str() );
}
else
{
DocEntry *e = GetDocEntry(0x0004, 0x1220);
if ( !e )
{
- gdcmVerboseMacro( "No Directory Record Sequence (0004,1220) found");
+ gdcmWarningMacro( "No Directory Record Sequence (0004,1220) found");
/// \todo FIXME: what to do when the parsed file IS NOT a DICOMDIR file ?
return;
}
SeqEntry *s = dynamic_cast<SeqEntry *>(e);
if ( !s )
{
- gdcmVerboseMacro( "Element (0004,1220) is not a Sequence ?!?");
+ gdcmWarningMacro( "Element (0004,1220) is not a Sequence ?!?");
return;
}
}
else
{
- gdcmVerboseMacro( "Not a ValEntry.");
+ gdcmWarningMacro( "Not a ValEntry.");
continue;
}
{
if( header->GetFileName().substr(0, path.length()) != path )
{
- gdcmVerboseMacro( "The base path of file name is incorrect");
+ gdcmWarningMacro( "The base path of file name is incorrect");
val = header->GetFileName();
}
else
if ( type == GDCM_DICOMDIR_META ) // fusible : should never print !
{
- gdcmVerboseMacro("GDCM_DICOMDIR_META ?!? should never print that");
+ gdcmWarningMacro("GDCM_DICOMDIR_META ?!? should never print that");
}
si->AddEntry(entry);
}
Program: gdcm
Module: $RCSfile: gdcmDicomDirElement.cxx,v $
Language: C++
- Date: $Date: 2005/02/01 10:29:54 $
- Version: $Revision: 1.33 $
+ Date: $Date: 2005/02/05 01:37:08 $
+ Version: $Revision: 1.34 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::ifstream from(filename.c_str());
if(!from)
{
- gdcmVerboseMacro( "Can't open DicomDirElement dictionary"
+ gdcmWarningMacro( "Can't open DicomDirElement dictionary"
<< filename.c_str());
FillDefaultDIRDict( this );
}
type = DD_IMAGE;
else
{
- gdcmVerboseMacro("Unknown type found in the file : "
+ gdcmWarningMacro("Unknown type found in the file : "
<<filename.c_str());
type = DD_UNKNOWN;
}
Program: gdcm
Module: $RCSfile: gdcmDict.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 15:07:41 $
- Version: $Revision: 1.72 $
+ Date: $Date: 2005/02/05 01:37:08 $
+ Version: $Revision: 1.73 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::ifstream from( filename.c_str() );
if( !from )
{
- gdcmVerboseMacro( "Can't open dictionary" << filename.c_str());
+ gdcmWarningMacro( "Can't open dictionary" << filename.c_str());
// Using default embeded one:
FillDefaultDataDict( this );
}
if(KeyHt.count(key) == 1)
{
- gdcmVerboseMacro( "Already present" << key.c_str());
+ gdcmWarningMacro( "Already present" << key.c_str());
return false;
}
else
}
else
{
- gdcmVerboseMacro( "Unfound entry" << key.c_str());
+ gdcmWarningMacro( "Unfound entry" << key.c_str());
return false;
}
}
Program: gdcm
Module: $RCSfile: gdcmDictSet.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 15:07:41 $
- Version: $Revision: 1.59 $
+ Date: $Date: 2005/02/05 01:37:08 $
+ Version: $Revision: 1.60 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
resultPath += '/';
}
- gdcmVerboseMacro( "Dictionary path set from environnement");
+ gdcmWarningMacro( "Dictionary path set from environnement");
}
else
{
Program: gdcm
Module: $RCSfile: gdcmDocEntrySet.cxx,v $
Language: C++
- Date: $Date: 2005/02/04 14:49:01 $
- Version: $Revision: 1.53 $
+ Date: $Date: 2005/02/05 01:37:08 $
+ Version: $Revision: 1.54 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
DocEntry *currentEntry = GetDocEntry(group, elem);
if ( !currentEntry )
{
- gdcmVerboseMacro( "No corresponding BinEntry " << std::hex << group <<
+ gdcmWarningMacro( "No corresponding BinEntry " << std::hex << group <<
"," << elem);
return NULL;
}
DocEntry *currentEntry = GetDocEntry(group, elem);
if ( !currentEntry )
{
- gdcmVerboseMacro( "No corresponding SeqEntry " << std::hex << group <<
+ gdcmWarningMacro( "No corresponding SeqEntry " << std::hex << group <<
"," << elem);
return NULL;
}
ValEntry *entry = GetValEntry(group, elem);
if (!entry )
{
- gdcmVerboseMacro( "No corresponding ValEntry " << std::hex << group <<
+ gdcmWarningMacro( "No corresponding ValEntry " << std::hex << group <<
"," << elem << " element (try promotion first).");
return false;
}
BinEntry *entry = GetBinEntry(group, elem);
if (!entry )
{
- gdcmVerboseMacro( "No corresponding ValEntry " << std::hex << group <<
+ gdcmWarningMacro( "No corresponding ValEntry " << std::hex << group <<
"," << elem << " element (try promotion first).");
return false;
}
{
if( !RemoveEntry(currentEntry) )
{
- gdcmVerboseMacro( "Removal of previous DocEntry failed.");
+ gdcmWarningMacro( "Removal of previous DocEntry failed.");
return NULL;
}
if ( !AddEntry(valEntry) )
{
- gdcmVerboseMacro("AddEntry failed although this is a creation.");
+ gdcmWarningMacro("AddEntry failed although this is a creation.");
delete valEntry;
return NULL;
{
if( !RemoveEntry(currentEntry) )
{
- gdcmVerboseMacro( "Removal of previous DocEntry failed.");
+ gdcmWarningMacro( "Removal of previous DocEntry failed.");
return NULL;
}
if ( !AddEntry(binEntry) )
{
- gdcmVerboseMacro( "AddEntry failed allthough this is a creation.");
+ gdcmWarningMacro( "AddEntry failed allthough this is a creation.");
delete binEntry;
return NULL;
{
if (!RemoveEntry(currentEntry))
{
- gdcmVerboseMacro( "Removal of previous DocEntry failed.");
+ gdcmWarningMacro( "Removal of previous DocEntry failed.");
return NULL;
}
if( !AddEntry(seqEntry) )
{
- gdcmVerboseMacro( "AddEntry failed allthough this is a creation.");
+ gdcmWarningMacro( "AddEntry failed allthough this is a creation.");
delete seqEntry;
return NULL;
ValEntry *newEntry = new ValEntry(dictEntry);
if (!newEntry)
{
- gdcmVerboseMacro( "Failed to allocate ValEntry");
+ gdcmWarningMacro( "Failed to allocate ValEntry");
return 0;
}
return newEntry;
BinEntry *newEntry = new BinEntry(dictEntry);
if (!newEntry)
{
- gdcmVerboseMacro( "Failed to allocate BinEntry");
+ gdcmWarningMacro( "Failed to allocate BinEntry");
return 0;
}
return newEntry;
SeqEntry *newEntry = new SeqEntry( dictEntry );
if (!newEntry)
{
- gdcmVerboseMacro( "Failed to allocate SeqEntry");
+ gdcmWarningMacro( "Failed to allocate SeqEntry");
return 0;
}
return newEntry;
Dict *pubDict = Global::GetDicts()->GetDefaultPubDict();
if (!pubDict)
{
- gdcmVerboseMacro( "We SHOULD have a default dictionary");
+ gdcmWarningMacro( "We SHOULD have a default dictionary");
}
else
{
Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/02/03 10:03:07 $
- Version: $Revision: 1.222 $
+ Date: $Date: 2005/02/05 01:37:08 $
+ Version: $Revision: 1.223 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Group0002Parsed = false;
- gdcmVerboseMacro( "Starting parsing of file: " << Filename.c_str());
+ gdcmWarningMacro( "Starting parsing of file: " << Filename.c_str());
// Fp->seekg( 0, std::ios::beg);
Fp->seekg(0, std::ios::end);
{
if( Filetype == Unknown)
{
- gdcmVerboseMacro( "Wrong filetype");
+ gdcmWarningMacro( "Wrong filetype");
return false;
}
if ( IsEmpty() )
{
- gdcmVerboseMacro( "No tag in internal hash table.");
+ gdcmWarningMacro( "No tag in internal hash table.");
return false;
}
}
if ( transferSyntax == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Unfound Transfer Syntax (0002,0010)");
+ gdcmWarningMacro( "Unfound Transfer Syntax (0002,0010)");
return "Uncompressed ACR-NEMA";
}
if(Fp)
{
- gdcmVerboseMacro( "File already open: " << Filename.c_str());
+ gdcmWarningMacro( "File already open: " << Filename.c_str());
CloseFile();
}
{
std::string msg
= Util::Format("ACR/DICOM with no preamble: (%04x)\n", zero);
- gdcmVerboseMacro( msg.c_str() );
+ gdcmWarningMacro( msg.c_str() );
return Fp;
}
}
CloseFile();
- gdcmVerboseMacro( "Not DICOM/ACR (missing preamble)" << Filename.c_str());
+ gdcmWarningMacro( "Not DICOM/ACR (missing preamble)" << Filename.c_str());
return 0;
}
uint8_t *a = new uint8_t[l];
if( !a )
{
- gdcmVerboseMacro( "Cannot allocate BinEntry content");
+ gdcmWarningMacro( "Cannot allocate BinEntry content");
return;
}
!Global::GetVR()->IsVROfBinaryRepresentable(vr) )
{
////// Neither ValEntry NOR BinEntry: should mean UNKOWN VR
- gdcmVerboseMacro( std::hex << newDocEntry->GetGroup()
+ gdcmWarningMacro( std::hex << newDocEntry->GetGroup()
<< "|" << newDocEntry->GetElement()
<< " : Neither Valentry, nor BinEntry."
"Probably unknown VR.");
if( length % 2 )
{
newValue = Util::DicomString(str, length+1);
- gdcmVerboseMacro("Warning: bad length: " << length <<
+ gdcmWarningMacro("Warning: bad length: " << length <<
",For string :" << newValue.c_str());
// Since we change the length of string update it length
//entry->SetReadLength(length+1);
{
if ( Fp->fail() || Fp->eof())
{
- gdcmVerboseMacro("Unread element value");
+ gdcmWarningMacro("Unread element value");
valEntry->SetValue(GDCM_UNREAD);
return;
}
if ( group != 0xfffe || ( ( elem != 0xe0dd ) && ( elem != 0xe000 ) ) )
{
long filePosition = Fp->tellg();
- gdcmVerboseMacro( "Neither an Item tag nor a Sequence delimiter tag on :"
+ gdcmWarningMacro( "Neither an Item tag nor a Sequence delimiter tag on :"
<< std::hex << group << " , " << elem
<< ") -before- position x(" << filePosition << ")" );
if ( foundLength % 2)
{
- gdcmVerboseMacro( "Warning : Tag with uneven length " << foundLength
+ gdcmWarningMacro( "Warning : Tag with uneven length " << foundLength
<< " in x(" << std::hex << gr << "," << elem <<")");
}
// encounter such an ill-formed image, we simply display a warning
// message and proceed on parsing (while crossing fingers).
long filePosition = Fp->tellg();
- gdcmVerboseMacro( "Erroneous Group Length element length on : ("
+ gdcmWarningMacro( "Erroneous Group Length element length on : ("
<< std::hex << group << " , " << elem
<< ") -before- position x(" << filePosition << ")"
<< "lgt : " << length );
char *entCur = deb + 128;
if( memcmp(entCur, "DICM", (size_t)4) == 0 )
{
- gdcmVerboseMacro( "Looks like DICOM Version3 (preamble + DCM)" );
+ gdcmWarningMacro( "Looks like DICOM Version3 (preamble + DCM)" );
// Group 0002 should always be VR, and the first element 0000
// Let's be carefull (so many wrong headers ...)
// instead of just checking for UL, OB and UI !? group 0000
{
Filetype = ExplicitVR;
- gdcmVerboseMacro( "Group 0002 : Explicit Value Representation");
+ gdcmWarningMacro( "Group 0002 : Explicit Value Representation");
}
else
{
Filetype = ImplicitVR;
- gdcmVerboseMacro( "Group 0002 :Not an explicit Value Representation;"
+ gdcmWarningMacro( "Group 0002 :Not an explicit Value Representation;"
<< "Looks like a bugged Header!");
}
if ( net2host )
{
SwapCode = 4321;
- gdcmVerboseMacro( "HostByteOrder != NetworkByteOrder");
+ gdcmWarningMacro( "HostByteOrder != NetworkByteOrder");
}
else
{
SwapCode = 1234;
- gdcmVerboseMacro( "HostByteOrder = NetworkByteOrder");
+ gdcmWarningMacro( "HostByteOrder = NetworkByteOrder");
}
// Position the file position indicator at first tag
// Alas, this is not a DicomV3 file and whatever happens there is no file
// preamble. We can reset the file position indicator to where the data
// is (i.e. the beginning of the file).
- gdcmVerboseMacro( "Not a DICOM Version3 file");
+ gdcmWarningMacro( "Not a DICOM Version3 file");
Fp->seekg(0, std::ios::beg);
// Our next best chance would be to be considering a 'clean' ACR/NEMA file.
Filetype = ACR;
return true;
default :
- gdcmVerboseMacro( "ACR/NEMA unfound swap info (Really hopeless !)");
+ gdcmWarningMacro( "ACR/NEMA unfound swap info (Really hopeless !)");
Filetype = Unknown;
return false;
}
*/
void Document::SwitchByteSwapCode()
{
- gdcmVerboseMacro( "Switching Byte Swap code from "<< SwapCode);
+ gdcmWarningMacro( "Switching Byte Swap code from "<< SwapCode);
if ( SwapCode == 1234 )
{
SwapCode = 4321;
std::string msg;
msg = Util::Format("Entry (%04x,%04x) should be Explicit VR\n",
newEntry->GetGroup(), newEntry->GetElement());
- gdcmVerboseMacro( msg.c_str() );
+ gdcmWarningMacro( msg.c_str() );
}
}
newEntry->SetImplicitVR();
std::string ts = GetTransferSyntax();
if ( !Global::GetTS()->IsTransferSyntax(ts) )
{
- gdcmVerboseMacro("True DICOM File, with NO Tansfer Syntax: " << ts );
+ gdcmWarningMacro("True DICOM File, with NO Tansfer Syntax: " << ts );
return;
}
//'Implicit VR Transfer Syntax (GE Private)
if ( Global::GetTS()->GetSpecialTransferSyntax(ts) == TS::ExplicitVRBigEndian )
{
- gdcmVerboseMacro("Transfer Syntax Name = ["
+ gdcmWarningMacro("Transfer Syntax Name = ["
<< GetTransferSyntaxName() << "]" );
SwitchByteSwapCode();
group = SwapShort(group);
Program: gdcm
Module: $RCSfile: gdcmElementSet.cxx,v $
Language: C++
- Date: $Date: 2005/02/04 23:49:23 $
- Version: $Revision: 1.55 $
+ Date: $Date: 2005/02/05 01:37:08 $
+ Version: $Revision: 1.56 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if( TagHT.count(key) == 1 )
{
- gdcmVerboseMacro( "Key already present: " << key.c_str());
+ gdcmWarningMacro( "Key already present: " << key.c_str());
return false;
}
else
if( TagHT.count(key) == 1 )
{
TagHT.erase(key);
- //gdcmVerboseMacro( "One element erased.");
+ //gdcmWarningMacro( "One element erased.");
delete entryToRemove;
return true;
}
- gdcmVerboseMacro( "Key not present");
+ gdcmWarningMacro( "Key not present");
return false ;
}
if( TagHT.count(key) == 1 )
{
TagHT.erase(key);
- //gdcmVerboseMacro( "One element erased.");
+ //gdcmWarningMacro( "One element erased.");
return true;
}
- gdcmVerboseMacro( "Key not present");
+ gdcmWarningMacro( "Key not present");
return false ;
}
Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2005/02/05 01:31:36 $
- Version: $Revision: 1.211 $
+ Date: $Date: 2005/02/05 01:37:08 $
+ Version: $Revision: 1.212 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if ( strSpacing == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Unfound Pixel Spacing (0028,0030)" );
+ gdcmWarningMacro( "Unfound Pixel Spacing (0028,0030)" );
return 1.;
}
if ( xspacing == 0.)
{
- gdcmVerboseMacro("gdcmData/CT-MONO2-8-abdo.dcm problem");
+ gdcmWarningMacro("gdcmData/CT-MONO2-8-abdo.dcm problem");
// seems to be a bug in the header ...
nbValues = sscanf( strSpacing.c_str(), "%f\\0\\%f", &yspacing, &xspacing);
gdcmAssertMacro( nbValues == 2 );
if ( strSpacing == GDCM_UNFOUND )
{
- gdcmVerboseMacro("Unfound Pixel Spacing (0028,0030)");
+ gdcmWarningMacro("Unfound Pixel Spacing (0028,0030)");
return 1.;
}
if ( strSpacingBSlices == GDCM_UNFOUND )
{
- gdcmVerboseMacro("Unfound Spacing Between Slices (0018,0088)");
+ gdcmWarningMacro("Unfound Spacing Between Slices (0018,0088)");
const std::string &strSliceThickness = GetEntryValue(0x0018,0x0050);
if ( strSliceThickness == GDCM_UNFOUND )
{
- gdcmVerboseMacro("Unfound Slice Thickness (0018,0050)");
+ gdcmWarningMacro("Unfound Slice Thickness (0018,0050)");
return 1.;
}
else
if ( strImPos == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Unfound Image Position Patient (0020,0032)");
+ gdcmWarningMacro( "Unfound Image Position Patient (0020,0032)");
strImPos = GetEntryValue(0x0020,0x0030); // For ACR-NEMA images
if ( strImPos == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Unfound Image Position (RET) (0020,0030)");
+ gdcmWarningMacro( "Unfound Image Position (RET) (0020,0030)");
return 0.;
}
}
if ( strImPos == GDCM_UNFOUND)
{
- gdcmVerboseMacro( "Unfound Image Position Patient (0020,0032)");
+ gdcmWarningMacro( "Unfound Image Position Patient (0020,0032)");
strImPos = GetEntryValue(0x0020,0x0030); // For ACR-NEMA images
if ( strImPos == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Unfound Image Position (RET) (0020,0030)");
+ gdcmWarningMacro( "Unfound Image Position (RET) (0020,0030)");
return 0.;
}
}
{
if( sscanf( strImPos.c_str(), "%f\\%f\\%f", &xImPos, &yImPos, &zImPos) != 3)
{
- gdcmVerboseMacro( "Wrong Image Position Patient (0020,0032)");
+ gdcmWarningMacro( "Wrong Image Position Patient (0020,0032)");
return 0.; // bug in the element 0x0020,0x0032
}
else
if( sscanf( strImPos.c_str(),
"%f\\%f\\%f", &xImPos, &yImPos, &zImPos ) != 3 )
{
- gdcmVerboseMacro( "Wrong Image Position (RET) (0020,0030)");
+ gdcmWarningMacro( "Wrong Image Position (RET) (0020,0030)");
return 0.; // bug in the element 0x0020,0x0032
}
else
{
if( sscanf( strSliceLocation.c_str(), "%f", &zImPos) != 1)
{
- gdcmVerboseMacro( "Wrong Slice Location (0020,1041)");
+ gdcmWarningMacro( "Wrong Slice Location (0020,1041)");
return 0.; // bug in the element 0x0020,0x1041
}
else
return zImPos;
}
}
- gdcmVerboseMacro( "Unfound Slice Location (0020,1041)");
+ gdcmWarningMacro( "Unfound Slice Location (0020,1041)");
std::string strLocation = GetEntryValue(0x0020,0x0050);
if ( strLocation != GDCM_UNFOUND )
{
if( sscanf( strLocation.c_str(), "%f", &zImPos) != 1)
{
- gdcmVerboseMacro( "Wrong Location (0020,0050)");
+ gdcmWarningMacro( "Wrong Location (0020,0050)");
return 0.; // bug in the element 0x0020,0x0050
}
else
return zImPos;
}
}
- gdcmVerboseMacro( "Unfound Location (0020,0050)");
+ gdcmWarningMacro( "Unfound Location (0020,0050)");
return 0.; // Hopeless
}
if( sscanf( strImOriPat.c_str(), "%f\\%f\\%f\\%f\\%f\\%f",
&iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 )
{
- gdcmVerboseMacro( "Wrong Image Orientation Patient (0020,0037). Less than 6 values were found." );
+ gdcmWarningMacro( "Wrong Image Orientation Patient (0020,0037). Less than 6 values were found." );
}
}
//For ACR-NEMA
if( sscanf( strImOriPat.c_str(), "%f\\%f\\%f\\%f\\%f\\%f",
&iop[0], &iop[1], &iop[2], &iop[3], &iop[4], &iop[5]) != 6 )
{
- gdcmVerboseMacro( "wrong Image Orientation Patient (0020,0035). Less than 6 values were found." );
+ gdcmWarningMacro( "wrong Image Orientation Patient (0020,0035). Less than 6 values were found." );
}
}
}
std::string strSize = GetEntryValue( 0x0028, 0x0101 );
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro("(0028,0101) is supposed to be mandatory");
+ gdcmWarningMacro("(0028,0101) is supposed to be mandatory");
return 0; // It's supposed to be mandatory
// the caller will have to check
}
std::string strSize = GetEntryValue(0x0028,0x0100);
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "(0028,0100) is supposed to be mandatory");
+ gdcmWarningMacro( "(0028,0100) is supposed to be mandatory");
return 0; // It's supposed to be mandatory
// the caller will have to check
}
std::string strSize = GetEntryValue( 0x0028, 0x0102 );
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "(0028,0102) is supposed to be mandatory");
+ gdcmWarningMacro( "(0028,0102) is supposed to be mandatory");
return 0;
}
return atoi( strSize.c_str() );
const std::string &strSize = GetEntryValue(0x0028,0x0002);
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "(0028,0002) is supposed to be mandatory");
+ gdcmWarningMacro( "(0028,0002) is supposed to be mandatory");
return 1; // Well, it's supposed to be mandatory ...
// but sometimes it's missing : *we* assume Gray pixels
}
std::string strSize = GetEntryValue(0x0028,0x0006);
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Not found : Planar Configuration (0028,0006)");
+ gdcmWarningMacro( "Not found : Planar Configuration (0028,0006)");
return 0;
}
return atoi( strSize.c_str() );
{
return 8;
}
- gdcmVerboseMacro( "Unknown pixel type");
+ gdcmWarningMacro( "Unknown pixel type");
return 0;
}
std::string bitsAlloc = GetEntryValue(0x0028, 0x0100); // Bits Allocated
if ( bitsAlloc == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Missing Bits Allocated (0028,0100)");
+ gdcmWarningMacro( "Missing Bits Allocated (0028,0100)");
bitsAlloc = "16"; // default and arbitrary value, not to polute the output
}
if (sign == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Missing Pixel Representation (0028,0103)");
+ gdcmWarningMacro( "Missing Pixel Representation (0028,0103)");
sign = "U"; // default and arbitrary value, not to polute the output
}
else if ( sign == "0" )
std::string strSize = GetEntryValue( 0x0028, 0x0103 );
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "(0028,0103) is supposed to be mandatory");
+ gdcmWarningMacro( "(0028,0103) is supposed to be mandatory");
return false;
}
int sign = atoi( strSize.c_str() );
}
if ( PhotometricInterp == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Not found : Photometric Interpretation (0028,0004)");
+ gdcmWarningMacro( "Not found : Photometric Interpretation (0028,0004)");
}
return false;
}
}
if ( PhotometricInterp == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Not found : Palette color (0028,0004)");
+ gdcmWarningMacro( "Not found : Palette color (0028,0004)");
}
return false;
}
}
if ( PhotometricInterp == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Not found : YBR Full (0028,0004)");
+ gdcmWarningMacro( "Not found : YBR Full (0028,0004)");
}
return false;
}
if( sscanf( strRescInter.c_str(), "%f", &resInter) != 1 )
{
// bug in the element 0x0028,0x1052
- gdcmVerboseMacro( "Rescale Intercept (0028,1052) is empty." );
+ gdcmWarningMacro( "Rescale Intercept (0028,1052) is empty." );
}
}
if( sscanf( strRescSlope.c_str(), "%f", &resSlope) != 1)
{
// bug in the element 0x0028,0x1053
- gdcmVerboseMacro( "Rescale Slope (0028,1053) is empty.");
+ gdcmWarningMacro( "Rescale Slope (0028,1053) is empty.");
}
}
std::ios::out | std::ios::binary);
if (*fp == NULL)
{
- gdcmVerboseMacro("Failed to open (write) File: " << fileName.c_str());
+ gdcmWarningMacro("Failed to open (write) File: " << fileName.c_str());
return false;
}
if ( nbRleSegments > 16 )
{
// There should be at most 15 segments (refer to RLEFrame class)
- gdcmVerboseMacro( "Too many segments.");
+ gdcmWarningMacro( "Too many segments.");
}
uint32_t rleSegmentOffsetTable[16];
// Delimiter Item':
if ( !ReadTag(0xfffe, 0xe0dd) )
{
- gdcmVerboseMacro( "No sequence delimiter item at end of RLE item sequence");
+ gdcmWarningMacro( "No sequence delimiter item at end of RLE item sequence");
}
}
// Delimiter Item':
if ( !ReadTag(0xfffe, 0xe0dd) )
{
- gdcmVerboseMacro( "No sequence delimiter item at end of JPEG item sequence");
+ gdcmWarningMacro( "No sequence delimiter item at end of JPEG item sequence");
}
}
}
if ( itemTagGroup != testGroup || itemTagElement != testElement )
{
- gdcmVerboseMacro( "Wrong Item Tag found:"
+ gdcmWarningMacro( "Wrong Item Tag found:"
<< " We should have found tag ("
<< std::hex << testGroup << "," << testElement << ")" << std::endl
<< " but instead we encountered tag ("
long currentPosition = Fp->tellg();
uint32_t itemLength = ReadInt32();
{
- gdcmVerboseMacro( "Basic Item Length is: "
+ gdcmWarningMacro( "Basic Item Length is: "
<< itemLength << std::endl
<< " at address: " << std::hex << (unsigned int)currentPosition);
}
{
uint32_t individualLength = str2num( &basicOffsetTableItemValue[i],
uint32_t);
- gdcmVerboseMacro( "Read one length: " <<
+ gdcmWarningMacro( "Read one length: " <<
std::hex << individualLength );
}
#endif //GDCM_DEBUG
Program: gdcm
Module: $RCSfile: gdcmFileHelper.cxx,v $
Language: C++
- Date: $Date: 2005/02/04 14:49:01 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2005/02/05 01:37:08 $
+ Version: $Revision: 1.13 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
if ( PixelReadConverter->GetRGBSize() > maxSize )
{
- gdcmVerboseMacro( "Pixel data bigger than caller's expected MaxSize");
+ gdcmWarningMacro( "Pixel data bigger than caller's expected MaxSize");
return 0;
}
memcpy( destination,
// Either no LUT conversion necessary or LUT conversion failed
if ( PixelReadConverter->GetRawSize() > maxSize )
{
- gdcmVerboseMacro( "Pixel data bigger than caller's expected MaxSize");
+ gdcmWarningMacro( "Pixel data bigger than caller's expected MaxSize");
return 0;
}
memcpy( destination,
std::ofstream fp1(fileName.c_str(), std::ios::out | std::ios::binary );
if (!fp1)
{
- gdcmVerboseMacro( "Fail to open (write) file:" << fileName.c_str());
+ gdcmWarningMacro( "Fail to open (write) file:" << fileName.c_str());
return false;
}
case WMODE_RAW :
if( decSize!=PixelWriteConverter->GetUserDataSize() )
{
- gdcmVerboseMacro( "Data size (Raw) is incorrect. Should be "
+ gdcmWarningMacro( "Data size (Raw) is incorrect. Should be "
<< decSize << " / Found :"
<< PixelWriteConverter->GetUserDataSize() );
return false;
case WMODE_RGB :
if( rgbSize!=PixelWriteConverter->GetUserDataSize() )
{
- gdcmVerboseMacro( "Data size (RGB) is incorrect. Should be "
+ gdcmWarningMacro( "Data size (RGB) is incorrect. Should be "
<< decSize << " / Found "
<< PixelWriteConverter->GetUserDataSize() );
return false;
raw = PixelReadConverter->GetRaw();
if ( ! raw )
{
- gdcmVerboseMacro( "Read/decompress of pixel data apparently went wrong.");
+ gdcmWarningMacro( "Read/decompress of pixel data apparently went wrong.");
return 0;
}
}
Program: gdcm
Module: $RCSfile: gdcmGlobal.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 15:07:41 $
- Version: $Revision: 1.18 $
+ Date: $Date: 2005/02/05 01:37:08 $
+ Version: $Revision: 1.19 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
if (ValRes || TranSyn || Dicts || ddElem)
{
- gdcmVerboseMacro( "VR or TS or Dicts already allocated");
+ gdcmWarningMacro( "VR or TS or Dicts already allocated");
return;
}
Dicts = new DictSet();
Program: gdcm
Module: $RCSfile: gdcmJpeg2000.cxx,v $
Language: C++
- Date: $Date: 2005/02/05 01:31:36 $
- Version: $Revision: 1.18 $
+ Date: $Date: 2005/02/05 01:37:09 $
+ Version: $Revision: 1.19 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bool gdcm_read_JPEG2000_file (std::ifstream* , void* )
{
- gdcmVerboseMacro( "Sorry JPEG 2000 File not yet taken into account" );
+ gdcmWarningMacro( "Sorry JPEG 2000 File not yet taken into account" );
return false;
}
Program: gdcm
Module: $RCSfile: gdcmJpegLS.cxx,v $
Language: C++
- Date: $Date: 2005/02/05 01:31:36 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2005/02/05 01:37:09 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bool gdcm_read_JPEGLS_file (std::ifstream* , void* )
{
- gdcmVerboseMacro( "Sorry JPEG-LS File not yet taken into account" );
+ gdcmWarningMacro( "Sorry JPEG-LS File not yet taken into account" );
return false;
}
} // end namespace gdcm
Program: gdcm
Module: $RCSfile: gdcmPixelReadConvert.cxx,v $
Language: C++
- Date: $Date: 2005/02/04 16:51:36 $
- Version: $Revision: 1.48 $
+ Date: $Date: 2005/02/05 01:37:09 $
+ Version: $Revision: 1.49 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
LutRedData = (uint8_t*)file->GetEntryBinArea( 0x0028, 0x1201 );
if ( ! LutRedData )
{
- gdcmVerboseMacro( "Unable to read Red LUT data" );
+ gdcmWarningMacro( "Unable to read Red LUT data" );
}
// //// Green round:
LutGreenData = (uint8_t*)file->GetEntryBinArea(0x0028, 0x1202 );
if ( ! LutGreenData)
{
- gdcmVerboseMacro( "Unable to read Green LUT data" );
+ gdcmWarningMacro( "Unable to read Green LUT data" );
}
// //// Blue round:
LutBlueData = (uint8_t*)file->GetEntryBinArea( 0x0028, 0x1203 );
if ( ! LutBlueData )
{
- gdcmVerboseMacro( "Unable to read Blue LUT data" );
+ gdcmWarningMacro( "Unable to read Blue LUT data" );
}
}
//// First stage: get our hands on the Pixel Data.
if ( !fp )
{
- gdcmVerboseMacro( "Unavailable file pointer." );
+ gdcmWarningMacro( "Unavailable file pointer." );
return false;
}
fp->seekg( PixelOffset, std::ios::beg );
if( fp->fail() || fp->eof())
{
- gdcmVerboseMacro( "Unable to find PixelOffset in file." );
+ gdcmWarningMacro( "Unable to find PixelOffset in file." );
return false;
}
// variable). But RawSize is the right size of the image !
if( PixelDataLength != RawSize)
{
- gdcmVerboseMacro( "Mismatch between PixelReadConvert : "
+ gdcmWarningMacro( "Mismatch between PixelReadConvert : "
<< PixelDataLength << " and RawSize : " << RawSize );
}
if( PixelDataLength > RawSize)
if ( fp->fail() || fp->eof())
{
- gdcmVerboseMacro( "Reading of Raw pixel data failed." );
+ gdcmWarningMacro( "Reading of Raw pixel data failed." );
return false;
}
}
{
if ( ! RLEInfo->DecompressRLEFile( fp, Raw, XSize, YSize, ZSize, BitsAllocated ) )
{
- gdcmVerboseMacro( "RLE decompressor failed." );
+ gdcmWarningMacro( "RLE decompressor failed." );
return false;
}
}
// Default case concerns JPEG family
if ( ! ReadAndDecompressJPEGFile( fp ) )
{
- gdcmVerboseMacro( "JPEG decompressor failed." );
+ gdcmWarningMacro( "JPEG decompressor failed." );
return false;
}
}
{
if ( IsJPEG2000 )
{
- gdcmVerboseMacro( "Sorry, JPEG2000 not yet taken into account" );
+ gdcmWarningMacro( "Sorry, JPEG2000 not yet taken into account" );
fp->seekg( JPEGInfo->GetFirstFragment()->GetOffset(), std::ios::beg);
// if ( ! gdcm_read_JPEG2000_file( fp,Raw ) )
return false;
if ( IsJPEGLS )
{
- gdcmVerboseMacro( "Sorry, JPEG-LS not yet taken into account" );
+ gdcmWarningMacro( "Sorry, JPEG-LS not yet taken into account" );
fp->seekg( JPEGInfo->GetFirstFragment()->GetOffset(), std::ios::beg);
// if ( ! gdcm_read_JPEGLS_file( fp,Raw ) )
return false;
&lengthR, &debR, &nbitsR );
if( nbRead != 3 )
{
- gdcmVerboseMacro( "Wrong Red LUT descriptor" );
+ gdcmWarningMacro( "Wrong Red LUT descriptor" );
}
int lengthG; // Green LUT length in Bytes
&lengthG, &debG, &nbitsG );
if( nbRead != 3 )
{
- gdcmVerboseMacro( "Wrong Green LUT descriptor" );
+ gdcmWarningMacro( "Wrong Green LUT descriptor" );
}
int lengthB; // Blue LUT length in Bytes
&lengthB, &debB, &nbitsB );
if( nbRead != 3 )
{
- gdcmVerboseMacro( "Wrong Blue LUT descriptor" );
+ gdcmWarningMacro( "Wrong Blue LUT descriptor" );
}
////////////////////////////////////////////////////////
}
break;
default:
- gdcmVerboseMacro("SwapCode value (16 bits) not allowed.");
+ gdcmWarningMacro("SwapCode value (16 bits) not allowed.");
}
}
else if( BitsAllocated == 32 )
}
break;
default:
- gdcmVerboseMacro("SwapCode value (32 bits) not allowed." );
+ gdcmWarningMacro("SwapCode value (32 bits) not allowed." );
}
}
}
}
else
{
- gdcmVerboseMacro("Weird image");
+ gdcmWarningMacro("Weird image");
throw FormatError( "Weird image !?" );
}
}
}
else
{
- gdcmVerboseMacro("Set as RLE file but NO RLEinfo present.");
+ gdcmWarningMacro("Set as RLE file but NO RLEinfo present.");
}
}
}
else
{
- gdcmVerboseMacro("Set as JPEG file but NO JPEGinfo present.");
+ gdcmWarningMacro("Set as JPEG file but NO JPEGinfo present.");
}
}
}
Program: gdcm
Module: $RCSfile: gdcmRLEFrame.cxx,v $
Language: C++
- Date: $Date: 2005/02/01 13:00:16 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2005/02/05 01:37:09 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if ( numberOfReadBytes > fragmentSize )
{
- gdcmVerboseMacro( "Read more bytes than the segment size.");
+ gdcmWarningMacro( "Read more bytes than the segment size.");
return false;
}
}
Program: gdcm
Module: $RCSfile: gdcmSQItem.cxx,v $
Language: C++
- Date: $Date: 2005/02/04 23:49:23 $
- Version: $Revision: 1.68 $
+ Date: $Date: 2005/02/05 01:37:09 $
+ Version: $Revision: 1.69 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if( *it == entryToRemove )
{
DocEntries.erase(it);
- gdcmVerboseMacro( "One element erased: " << entryToRemove->GetKey() );
+ gdcmWarningMacro( "One element erased: " << entryToRemove->GetKey() );
delete entryToRemove;
return true;
}
}
- gdcmVerboseMacro( "Entry not found: " << entryToRemove->GetKey() );
+ gdcmWarningMacro( "Entry not found: " << entryToRemove->GetKey() );
return false ;
}
if( *it == entryToRemove )
{
DocEntries.erase(it);
- gdcmVerboseMacro( "One element erased, no destroyed: "
+ gdcmWarningMacro( "One element erased, no destroyed: "
<< entryToRemove->GetKey() );
return true;
}
}
- gdcmVerboseMacro( "Entry not found:" << entryToRemove->GetKey() );
+ gdcmWarningMacro( "Entry not found:" << entryToRemove->GetKey() );
return false ;
}
Program: gdcm
Module: $RCSfile: gdcmSeqEntry.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 16:18:49 $
- Version: $Revision: 1.53 $
+ Date: $Date: 2005/02/05 01:37:09 $
+ Version: $Revision: 1.54 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
else
{
// fuse
- gdcmVerboseMacro(" -------- should have a sequence terminator item");
+ gdcmWarningMacro(" -------- should have a sequence terminator item");
}
}
}
Program: gdcm
Module: $RCSfile: gdcmSerieHelper.cxx,v $
Language: C++
- Date: $Date: 2005/02/05 01:25:03 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2005/02/05 01:37:09 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if ( CoherentGdcmFileListHT.count(uid) == 0 )
{
- gdcmVerboseMacro(" New Serie UID :[" << uid << "]");
+ gdcmWarningMacro(" New Serie UID :[" << uid << "]");
// create a std::list in 'uid' position
CoherentGdcmFileListHT[uid] = new GdcmFileList;
}
}
else
{
- gdcmVerboseMacro("Could not read file: " << filename );
+ gdcmWarningMacro("Could not read file: " << filename );
delete header;
}
}
CoherentGdcmFileVector[pos] = *it2;
else
{
- gdcmVerboseMacro( "2 files same position");
+ gdcmWarningMacro( "2 files same position");
return false;
}
}
CoherentFileListmap::iterator itl = CoherentGdcmFileListHT.begin();
if ( itl == CoherentGdcmFileListHT.end() )
{
- gdcmVerboseMacro( "No Coherent File list found" );
+ gdcmWarningMacro( "No Coherent File list found" );
return;
}
while (itl != CoherentGdcmFileListHT.end())
Program: gdcm
Module: $RCSfile: gdcmTS.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 15:07:41 $
- Version: $Revision: 1.41 $
+ Date: $Date: 2005/02/05 01:37:09 $
+ Version: $Revision: 1.42 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::ifstream from(filename.c_str());
if( !from )
{
- gdcmVerboseMacro("Can't open dictionary" << filename.c_str());
+ gdcmWarningMacro("Can't open dictionary" << filename.c_str());
FillDefaultTSDict( TsMap );
}
else
Program: gdcm
Module: $RCSfile: gdcmUtil.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 18:13:57 $
- Version: $Revision: 1.131 $
+ Date: $Date: 2005/02/05 01:37:09 $
+ Version: $Revision: 1.132 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
else
{
- gdcmVerboseMacro("Problem in finding the MAC Address");
+ gdcmWarningMacro("Problem in finding the MAC Address");
return "";
}
}
Program: gdcm
Module: $RCSfile: gdcmVR.cxx,v $
Language: C++
- Date: $Date: 2005/02/01 10:29:56 $
- Version: $Revision: 1.34 $
+ Date: $Date: 2005/02/05 01:37:09 $
+ Version: $Revision: 1.35 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::ifstream from(filename.c_str());
if(!from)
{
- gdcmVerboseMacro("Can't open dictionary" << filename.c_str());
+ gdcmWarningMacro("Can't open dictionary" << filename.c_str());
FillDefaultVRDict(vr);
}
else
/* Expanded data destination object for stdio output */
extern "C" {
- typedef unsigned char(*uc_jpeg_compress_struct)(jpeg_compress_struct*);
+ typedef boolean(*boolean_jpeg_compress_struct)(jpeg_compress_struct*);
typedef void(*void_jpeg_compress_struct)(jpeg_compress_struct*);
}
dest = (my_dest_ptr) cinfo->dest;
dest->pub.init_destination = reinterpret_cast<void_jpeg_compress_struct>(init_destination);
- dest->pub.empty_output_buffer = reinterpret_cast<uc_jpeg_compress_struct>(empty_output_buffer);
+ dest->pub.empty_output_buffer = reinterpret_cast<boolean_jpeg_compress_struct>(empty_output_buffer);
dest->pub.term_destination = reinterpret_cast<void_jpeg_compress_struct>(term_destination);
dest->outfile = outfile;
}
/* Expanded data source object for stdio input */
extern "C" {
- typedef unsigned char(*uc_jpeg_decompress_struct)(jpeg_decompress_struct*);
+ typedef boolean(*boolean_jpeg_decompress_struct)(jpeg_decompress_struct*);
typedef void(*void_jpeg_decompress_struct)(jpeg_decompress_struct*);
typedef void(*void_jpeg_decompress_struct_long)(jpeg_decompress_struct*,long);
}
src = (my_src_ptr) cinfo->src;
src->pub.init_source = reinterpret_cast<void_jpeg_decompress_struct>(init_source);
- src->pub.fill_input_buffer = reinterpret_cast<uc_jpeg_decompress_struct>(fill_input_buffer);
+ src->pub.fill_input_buffer = reinterpret_cast<boolean_jpeg_decompress_struct>(fill_input_buffer);
src->pub.skip_input_data = reinterpret_cast<void_jpeg_decompress_struct_long>(skip_input_data);
src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */
src->pub.term_source = reinterpret_cast<void_jpeg_decompress_struct>(term_source);