Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/11/05 13:23:30 $
- Version: $Revision: 1.325 $
+ Date: $Date: 2005/11/15 10:30:46 $
+ Version: $Revision: 1.328 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* @return false when we're 150 % sure it's NOT a Dicom/Acr file,
* true otherwise.
*/
-bool Document::IsReadable()
+bool Document::IsParsable()
{
if ( Filetype == Unknown )
{
- gdcmErrorMacro( "Wrong filetype for " << GetFileName());
+ gdcmWarningMacro( "Wrong filetype for " << GetFileName());
return false;
}
if ( IsEmpty() )
{
- gdcmErrorMacro( "No tag in internal hash table.");
+ gdcmWarningMacro( "No tag in internal hash table.");
return false;
}
return true;
}
+/**
+ * \brief This predicate tells us whether or not the current Document
+ * was properly parsed and contains at least *one* Dicom Element
+ * (and nothing more, sorry).
+ * @return false when we're 150 % sure it's NOT a Dicom/Acr file,
+ * true otherwise.
+ */
+bool Document::IsReadable()
+{
+ return IsParsable();
+}
/**
* \brief Predicate for dicom version 3 file.
DocEntry *docEntry = GetDocEntry(group, elem);
if ( !docEntry )
{
- gdcmWarningMacro(std::hex << group << "|" << elem
- << "doesn't exist" );
+ gdcmDebugMacro(std::hex << group << "|" << elem
+ << " doesn't exist" );
return;
}
DataEntry *dataEntry = dynamic_cast<DataEntry *>(docEntry);
if ( !dataEntry )
{
gdcmWarningMacro(std::hex << group << "|" << elem
- << "is NOT a DataEntry");
+ << " is NOT a DataEntry");
return;
}
LoadEntryBinArea(dataEntry);
/**
* \brief skips bytes inside the source file
- * \warning NOT end user intended method !
* @return
*/
void Document::SkipBytes(uint32_t nBytes)
// Private
/**
* \brief Loads all the needed Dictionaries
- * \warning NOT end user intended method !
*/
void Document::Initialize()
{
/**
* \brief Find the Length till the next sequence delimiter
- * \warning NOT end user intended method !
* @return
*/
uint32_t Document::FindDocEntryLengthOBOrOW()
/**
* \brief Skip a given Header Entry
- * \warning NOT end user intended method !
* @param entry entry to skip
*/
void Document::SkipDocEntry(DocEntry *entry)
/**
* \brief Skips to the beginning of the next Header Entry
- * \warning NOT end user intended method !
* @param currentDocEntry entry to skip
*/
void Document::SkipToNextDocEntry(DocEntry *currentDocEntry)