Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/01/10 03:09:07 $
- Version: $Revision: 1.169 $
+ Date: $Date: 2005/01/10 17:09:49 $
+ Version: $Revision: 1.170 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
static const char *TransferSyntaxStrings[] = {
// Implicit VR Little Endian
"1.2.840.10008.1.2",
- // Implicit VR Big Endian DLX G.E?
+ // Implicit VR Big Endian DLX (G.E Private)
"1.2.840.113619.5.2",
// Explicit VR Little Endian
"1.2.840.10008.1.2.1",
*/
bool Document::IsDocEntryAnInteger(DocEntry *entry)
{
- uint16_t element = entry->GetElement();
+ uint16_t elem = entry->GetElement();
uint16_t group = entry->GetGroup();
const std::string &vr = entry->GetVR();
uint32_t length = entry->GetLength();
// When we have some semantics on the element we just read, and if we
// a priori know we are dealing with an integer, then we shall be
// able to swap it's element value properly.
- if ( element == 0 ) // This is the group length of the group
+ if ( elem == 0 ) // This is the group length of the group
{
if ( length == 4 )
{
// message and proceed on parsing (while crossing fingers).
long filePosition = Fp->tellg();
gdcmVerboseMacro( "Erroneous Group Length element length on : ("
- << std::hex << group << " , " << element
+ << std::hex << group << " , " << elem
<< ") -before- position x(" << filePosition << ")"
<< "lgt : " << length );
}
}
catch ( FormatError )
{
- throw FormatError("Document::FindDocEntryLengthOBOrOW()",
- " group or element not present.");
+ throw FormatError("Unexpected end of file encountered during ",
+ "Document::FindDocEntryLengthOBOrOW()");
}
// We have to decount the group and element we just read
if ( group != 0xfffe || ( ( elem != 0xe0dd ) && ( elem != 0xe000 ) ) )
{
- gdcmVerboseMacro( "Neither an Item tag nor a Sequence delimiter tag.");
+ long filePosition = Fp->tellg();
+ gdcmVerboseMacro( "Neither an Item tag nor a Sequence delimiter tag on :"
+ << std::hex << group << " , " << elem
+ << ") -before- position x(" << filePosition << ")" );
+
Fp->seekg(positionOnEntry, std::ios::beg);
throw FormatUnexpected( "Neither an Item tag nor a Sequence delimiter tag.");
}
Program: gdcm
Module: $RCSfile: gdcmHeader.cxx,v $
Language: C++
- Date: $Date: 2005/01/08 15:03:59 $
- Version: $Revision: 1.227 $
+ Date: $Date: 2005/01/10 17:09:49 $
+ Version: $Revision: 1.228 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// is found by indirection through the "Image Location").
// Inside the group pointed by "Image Location" the searched element
// is conventionally the element 0x0010 (when the norm is respected).
- // When the "Image Location" is absent we default to group 0x7fe0.
+ // When the "Image Location" is Missing we default to group 0x7fe0.
// Note: this IS the right place for the code
// Image Location
* \brief Retrieve the number of planes of volume or the number
* of frames of a multiframe.
* \warning When present we consider the "Number of Frames" as the third
- * dimension. When absent we consider the third dimension as
+ * dimension. When Missing we consider the third dimension as
* being the ACR-NEMA "Planes" tag content.
* @return The encountered size when found, 1 by default (single image).
*/
// disjointes (Spacing between Slices > Slice Thickness)
// Slice Thickness : epaisseur de tissus sur laquelle est acquis le signal
// ca interesse le physicien de l'IRM, pas le visualisateur de volumes ...
- // Si le Spacing Between Slices est absent,
+ // Si le Spacing Between Slices est Missing,
// on suppose que les coupes sont jointives
const std::string &strSpacingBSlices = GetEntry(0x0018,0x0088);
if ( strSpacingBSlices == GDCM_UNFOUND )
{
- gdcmVerboseMacro("Unfound StrSpacingBSlices");
+ gdcmVerboseMacro("Unfound Spacing Between Slices (0018,0088)");
const std::string &strSliceThickness = GetEntry(0x0018,0x0050);
if ( strSliceThickness == GDCM_UNFOUND )
{
+ gdcmVerboseMacro("Unfound Slice Thickness (0018,0050)");
return 1.;
}
else
if( sscanf( strRescInter.c_str(), "%f", &resInter) != 1 )
{
// bug in the element 0x0028,0x1052
- gdcmVerboseMacro( "Rescale Intercept is empty." );
+ gdcmVerboseMacro( "Rescale Intercept (0028,1052) is empty." );
}
}
if( sscanf( strRescSlope.c_str(), "%f", &resSlope) != 1)
{
// bug in the element 0x0028,0x1053
- gdcmVerboseMacro( "Rescale Slope is empty.");
+ gdcmVerboseMacro( "Rescale Slope (0028,1053) is empty.");
}
}
std::string strSize = GetEntry( 0x0028, 0x0101 );
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro("This is supposed to be mandatory");
+ gdcmVerboseMacro("(0028,0101) is supposed to be mandatory");
return 0; // It's supposed to be mandatory
// the caller will have to check
}
/**
* \brief Retrieve the high bit position.
- * \warning The method defaults to 0 when information is absent.
+ * \warning The method defaults to 0 when information is Missing.
* The responsability of checking this value is left to the caller.
- * @return The high bit positin when present. 0 when absent.
+ * @return The high bit positin when present. 0 when Missing.
*/
int Header::GetHighBitPosition()
{
std::string strSize = GetEntry( 0x0028, 0x0102 );
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "This is supposed to be mandatory");
+ gdcmVerboseMacro( "(0028,0102) is supposed to be mandatory");
return 0;
}
return atoi( strSize.c_str() );
/**
* \brief Check wether the pixels are signed or UNsigned data.
- * \warning The method defaults to false (UNsigned) when information is absent.
+ * \warning The method defaults to false (UNsigned) when information is Missing.
* The responsability of checking this value is left to the caller.
* @return True when signed, false when UNsigned
*/
std::string strSize = GetEntry( 0x0028, 0x0103 );
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "This is supposed to be mandatory");
+ gdcmVerboseMacro( "(0028,0103) is supposed to be mandatory");
return false;
}
int sign = atoi( strSize.c_str() );
std::string strSize = GetEntry(0x0028,0x0100);
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "This is supposed to be mandatory");
+ gdcmVerboseMacro( "(0028,0100) is supposed to be mandatory");
return 0; // It's supposed to be mandatory
// the caller will have to check
}
const std::string& strSize = GetEntry(0x0028,0x0002);
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "This is supposed to be mandatory");
+ gdcmVerboseMacro( "(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
}
}
if ( PhotometricInterp == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Absent Photometric Interpretation");
+ gdcmVerboseMacro( "Not found : Photometric Interpretation (0028,0004)");
}
return false;
}
}
if ( PhotometricInterp == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Absent Palette color");
+ gdcmVerboseMacro( "Not found : Palette color (0028,0004)");
}
return false;
}
}
if ( PhotometricInterp == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Absent YBR Full");
+ gdcmVerboseMacro( "Not found : YBR Full (0028,0004)");
}
return false;
}
std::string strSize = GetEntry(0x0028,0x0006);
if ( strSize == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Absent Planar Configuration");
+ gdcmVerboseMacro( "Not found : Planar Configuration (0028,0006)");
return 0;
}
return atoi( strSize.c_str() );
std::string bitsAlloc = GetEntry(0x0028, 0x0100); // Bits Allocated
if ( bitsAlloc == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Unfound Bits Allocated");
+ gdcmVerboseMacro( "Missing Bits Allocated (0028,0100)");
bitsAlloc = "16";
}
if (sign == GDCM_UNFOUND )
{
- gdcmVerboseMacro( "Unfound Pixel Representation");
+ gdcmVerboseMacro( "Missing Pixel Representation (0028,0103)");
bitsAlloc = "0";
}
else if ( sign == "0" )