Program: gdcm
Module: $RCSfile: testBruker2Dicom.cxx,v $
Language: C++
- Date: $Date: 2009/05/13 15:37:43 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/18 16:33:20 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if (am->ArgMgrDefined("debug"))
GDCM_NAME_SPACE::Debug::DebugOn();
- b2d.verbose = am->ArgMgrDefined("verbose");
+ b2d.verbose = am->ArgMgrDefined("verbose");
int listonly = am->ArgMgrDefined("listonly");
int dicom = am->ArgMgrDefined("D");
// patientName = am->ArgMgrGetString("patientname", "Patient^Name");
// b2d.day : unused ...
- b2d.day = am->ArgMgrGetString("day", "You_forget_the_Day");
+ b2d.day = am->ArgMgrGetString("day", "You_forget_the_Day");
delete am; // we don't need Argument Manager any longer
#include "bruker2dicom.h"
+#include <boost/filesystem/path.hpp>
+#include <boost/filesystem/operations.hpp>
#ifndef PATH_MAX // If not defined yet : do it
#define PATH_MAX 2048
bool bigEndian = GDCM_NAME_SPACE::Util::IsCurrentProcessorBigEndian();
- if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(InputDirName) )
+ //if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(InputDirName) )
+ if ( ! boost::filesystem::is_directory(InputDirName) )
{
std::cout << "KO : [" << InputDirName << "] is not a Directory." << std::endl;
return 0;
it != fileNames.end();
++it)
{
- if ( GDCM_NAME_SPACE::DirList::IsDirectory(*it) )
+ if ( boost::filesystem::is_directory(*it) )
{
if (verbose)
std::cout << "[" << *it << "] is a directory" << std::endl;
it != fileNames.end();
++it)
{
- if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(*it) )
+ if ( ! boost::filesystem::is_directory(*it) )
{
if (verbose)
std::cout << "--- [" << *it << "] is a file" << std::endl;
it != fileNames.end();
++it)
{
- if ( GDCM_NAME_SPACE::DirList::IsDirectory(*it) )
+ if ( boost::filesystem::is_directory(*it) )
{
// will be always "pdata" ...
if (verbose)
it != fileNames.end();
++it)
{
- if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(*it) )
+ if ( ! boost::filesystem::is_directory(*it) )
{
std::cout << "--- --- [" << *it << "] is a file" << std::endl;
}
it != fileNames.end();
++it)
{
- if ( GDCM_NAME_SPACE::DirList::IsDirectory(*it) )
+ if ( boost::filesystem::is_directory(*it) )
{
if (verbose)
it != fileNames.end();
++it)
{
- if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(*it) )
+ if ( ! boost::filesystem::is_directory(*it) )
{
if (verbose)
std::cout << "--- [" << *it << "] is a file" << std::endl;
if (verbose)
std::cout << "Check for output directory :[" << OutputDirName << "]."
<<std::endl;
- if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(OutputDirName) ) // dirout not found
+ if ( ! boost::filesystem::is_directory(OutputDirName) ) // dirout not found
{
std::string strDirNameout(OutputDirName); // to please gcc 4
systemCommand = "mkdir " + strDirNameout; // create it!
if (verbose)
std::cout << systemCommand << std::endl;
system (systemCommand.c_str());
- if ( ! GDCM_NAME_SPACE::DirList::IsDirectory(OutputDirName) ) // be sure it worked
+ if ( ! boost::filesystem::is_directory(OutputDirName) ) // be sure it worked
{
if (verbose)
std::cout << "KO : not a dir : [" << OutputDirName << "] (creation failure ?)" << std::endl;