Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/11/14 14:23:44 $
- Version: $Revision: 1.327 $
+ Date: $Date: 2005/11/21 16:28:06 $
+ Version: $Revision: 1.331 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return false;
}
return DoTheLoadingDocumentJob( );
-}
-/**
- * \brief Loader. (DEPRECATED : not to break the API)
- * @param fileName 'Document' (File or DicomDir) to be open for parsing
- * @return false if file cannot be open or no swap info was found,
- * or no tag was found.
- */
+}
+
+/*
+//#ifndef GDCM_LEGACY_REMOVE
bool Document::Load( std::string const &fileName )
{
Filename = fileName;
return DoTheLoadingDocumentJob( );
}
+//#endif
+*/
/**
* \brief Performs the Loading Job (internal use only)
* @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.