Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/11/05 13:16:34 $
- Version: $Revision: 1.170 $
+ Date: $Date: 2005/11/21 09:46:25 $
+ Version: $Revision: 1.173 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return DoTheLoadingJob( );
}
-#ifndef GDCM_LEGACY_REMOVE
-/* *
- * \ brief Loader. (DEPRECATED : kept not to break the API)
- * @ param fileName file to be open for parsing
- * @ return false if file cannot be open or no swap info was found,
- * or no tag was found.
- * @ deprecated use SetFileName(n) + Load() instead
- */
-bool DicomDir::Load(std::string const &fileName )
-{
- SetFileName(fileName);
- return Load();
-}
-
-/// DEPRECATED : use SetDirectoryName(dname) instead
-/* *
- * \brief Loader. (DEPRECATED : kept not to break the API)
- * @param paseDir Parse Dir
- * @deprecated use SetDirectoryName(dname) instead
- */
-void DicomDir::SetParseDir(bool parseDir)
-{
- ParseDir = parseDir;
-}
-#endif
-
/**
* \brief Does the Loading Job (internal use only)
* @return false if file cannot be open or no swap info was found,
{
// user passed '.' as Name
// we get current directory name
- char dummy[1000]; // Hope 1000 is enough!
- getcwd(dummy, (size_t)1000);
- SetFileName( dummy ); // will be converted into a string
+ char buf[2048];
+ const char *cwd = getcwd(buf, 2048);
+ if( cwd )
+ {
+ SetFileName( buf ); // will be converted into a string
+ }
+ else
+ {
+ gdcmErrorMacro( "Path was too long to fit on 2048 bytes" );
+ }
}
NewMeta();
gdcmDebugMacro( "Parse directory and create the DicomDir : "
val = it->Value;
}
+/* FIX later the pb of creating the 'Implementation Version Name'!
if (val == GDCM_UNFOUND)
val = "";
std::string val = "GDCM ";
val += Util::GetVersion();
}
-
+*/
entry->SetString( val ); // troubles expected when vr=SQ ...
if ( type == GDCM_DICOMDIR_META ) // fusible : should never print !