Program: gdcm
Module: $RCSfile: TestAllReadCompareDicom.cxx,v $
Language: C++
- Date: $Date: 2007/06/04 08:51:24 $
- Version: $Revision: 1.59 $
+ Date: $Date: 2007/06/21 14:59:05 $
+ Version: $Revision: 1.60 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Track BigEndian troubles
std::cout << " ScalarSize : " << GetScalarSize()
<< " IsCurrentProcessorBigEndian:"
- << gdcm::Util::IsCurrentProcessorBigEndian()
+ << GDCM_NAME_SPACE::Util::IsCurrentProcessorBigEndian()
<< std::endl;
//if (GetScalarSize() == 1 || GetSwapCode() == 1234)
- if (GetScalarSize() == 1 || !gdcm::Util::IsCurrentProcessorBigEndian() )
+ if (GetScalarSize() == 1 || !GDCM_NAME_SPACE::Util::IsCurrentProcessorBigEndian() )
{
return true;
}
std::cout << "1...";
// new style
- gdcm::File *f = gdcm::File::New();
- f->SetLoadMode ( gdcm::LD_ALL ); // Load everything
+ GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New();
+ f->SetLoadMode ( GDCM_NAME_SPACE::LD_ALL ); // Load everything
f->SetFileName( filename );
f->Load();
f->Delete();
return 1;
}
- gdcm::FileHelper *tested = gdcm::FileHelper::New( f );
+ GDCM_NAME_SPACE::FileHelper *tested = GDCM_NAME_SPACE::FileHelper::New( f );
////// Step 2:
////// Check for existence of reference baseline dicom file:
<< ") differ (as expanded in memory)."
<< std::endl
<< " compression : "
- << gdcm::Global::GetTS()->GetValue(ts) << std::endl;
+ << GDCM_NAME_SPACE::Global::GetTS()->GetValue(ts) << std::endl;
std::cout << " list of the first " << MAX_NUMBER_OF_DIFFERENCE
<< " pixels differing (pos : test - ref) :"
int TestAllReadCompareDicom(int argc, char *argv[])
{
// Temporarily added, to track BigEndian troubles
-gdcm::Debug::WarningOn();
+GDCM_NAME_SPACE::Debug::WarningOn();
if (argc == 4)
- gdcm::Debug::DebugOn();
+ GDCM_NAME_SPACE::Debug::DebugOn();
if ( argc >= 3 )
{
std::string baseLineDir = GDCM_DATA_ROOT;
baseLineDir += "/BaselineDicom";
- if( !gdcm::DirList::IsDirectory(baseLineDir) )
+ if( !GDCM_NAME_SPACE::DirList::IsDirectory(baseLineDir) )
{
std::cerr << " The reference baseline directory " << std::endl
<< " "
//if (gdcmDataImages[i] == "D_CLUNIE_CT2_RLE.dcm")
// gdcm::Debug::DebugOn(); // track pb on BigEndian Proc
//else
- gdcm::Debug::DebugOff();
+ GDCM_NAME_SPACE::Debug::DebugOff();
////// Step 1 (see above description):
std::string filename = GDCM_DATA_ROOT;
Program: gdcm
Module: $RCSfile: TestAllVM.cxx,v $
Language: C++
- Date: $Date: 2006/07/05 13:08:32 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
int DoTheVMTest(std::string const &filename)
{
- gdcm::File *file = gdcm::File::New();
+ GDCM_NAME_SPACE::File *file = GDCM_NAME_SPACE::File::New();
// - Do not test unknow VM in shadow groups (if element 0x0000 is present)
// - Skip Sequences (if they are 'True Length'); loading will be quicker
// (anyway, Sequences are skipped at processing time ...)
- file->SetLoadMode( gdcm::LD_NOSHADOW | gdcm::LD_NOSEQ );
+ file->SetLoadMode( GDCM_NAME_SPACE::LD_NOSHADOW | GDCM_NAME_SPACE::LD_NOSEQ );
file->SetFileName( filename );
if( !file->Load() ) //would be really bad...
return 1;
- gdcm::DocEntry *d = file->GetFirstEntry();
+ GDCM_NAME_SPACE::DocEntry *d = file->GetFirstEntry();
std::cerr << "Testing file : " << filename << std::endl;
- gdcm::DataEntry *de;
+ GDCM_NAME_SPACE::DataEntry *de;
while(d)
{
- if ( (de = dynamic_cast<gdcm::DataEntry *>(d)) )
+ if ( (de = dynamic_cast<GDCM_NAME_SPACE::DataEntry *>(d)) )
{
if ( !(de->GetGroup() % 2) ) // Don't check shadow elements. Righ now,
// Private Dictionnary are not dealt with
filename += gdcmDataImages[i];
if (!strcmp(gdcmDataImages[i],"00191113.dcm")) // Track bug on Darwin
- gdcm::Debug::DebugOn();
+ GDCM_NAME_SPACE::Debug::DebugOn();
else
- gdcm::Debug::DebugOff();
+ GDCM_NAME_SPACE::Debug::DebugOff();
if( DoTheVMTest( filename ) )
return 1;
Program: gdcm
Module: $RCSfile: TestBuildUpDicomDir.cxx,v $
Language: C++
- Date: $Date: 2007/04/12 13:06:02 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// gdcm::Debug::DebugOn();
bool errorFound = false;
- gdcm::DicomDir *dcmdir;
+ GDCM_NAME_SPACE::DicomDir *dcmdir;
std::string dirName;
- dcmdir = gdcm::DicomDir::New();
+ dcmdir = GDCM_NAME_SPACE::DicomDir::New();
- gdcm::DicomDirPatient *p1;
+ GDCM_NAME_SPACE::DicomDirPatient *p1;
// --- Forget these 4 lines :
// just to improve test coverage.
p1->SetEntryString("patientONE",0x0010, 0x0010);
// fill here other patient characteristics
- gdcm::DicomDirStudy *s11;
+ GDCM_NAME_SPACE::DicomDirStudy *s11;
// --- Forget these 4 lines :
// just to improve test coverage.
s11=p1->GetFirstStudy();
s11->InsertEntryString("Dr^Mabuse", 0x0008, 0x1060, "PN");
// fill here other Study characteristics
- gdcm::DicomDirStudy *s12 = p1->NewStudy();
+ GDCM_NAME_SPACE::DicomDirStudy *s12 = p1->NewStudy();
s12->SetEntryString("StudyDescrOne.Two",0x0008, 0x1030);
s12->InsertEntryString("Dr^Zorglub", 0x0008, 0x1060, "PN");
// fill here other Study characteristics
- gdcm::DicomDirStudy *s13 = p1->NewStudy();
+ GDCM_NAME_SPACE::DicomDirStudy *s13 = p1->NewStudy();
s13->SetEntryString("StudyDescrOne.Tree",0x0008, 0x1030);
s13->InsertEntryString("Dr^Follamour", 0x0008, 0x1060, "PN");
// fill here other Study characteristics
- gdcm::DicomDirSerie *s111;
+ GDCM_NAME_SPACE::DicomDirSerie *s111;
// --- Forget these 4 lines :
// just to improve test coverage.
s111=s11->GetFirstSerie();
s111->SetEntryString("01-01-111", 0x0008, 0x0021);
// fill here other Serie characteristics
- gdcm::DicomDirImage *s1111;
+ GDCM_NAME_SPACE::DicomDirImage *s1111;
// --- Forget these 4 lines :
// just to improve test coverage.
// Let's create and add a Image for this Serie
s1111 = s111->NewImage();
s1111->SetEntryString("imageFileName1111",0x0004,0x1500);
- gdcm::DicomDirImage *s1112 = s111->NewImage();
+ GDCM_NAME_SPACE::DicomDirImage *s1112 = s111->NewImage();
s1112->SetEntryString("imageFileName1112",0x0004,0x1500);
// Create patient TWO
// ------------------
- gdcm::DicomDirPatient *p2 = dcmdir->NewPatient();
+ GDCM_NAME_SPACE::DicomDirPatient *p2 = dcmdir->NewPatient();
p2->SetEntryString("patientTWO",0x0010, 0x0010);
// fill here other patient characteristics
- gdcm::DicomDirStudy *s21 = p2->NewStudy();
+ GDCM_NAME_SPACE::DicomDirStudy *s21 = p2->NewStudy();
s21->SetEntryString("StudyDescrTwo.One",0x0008, 0x1030);
// fill here other Study characteristics
- gdcm::DicomDirSerie *s211 = s21->NewSerie();
+ GDCM_NAME_SPACE::DicomDirSerie *s211 = s21->NewSerie();
s111->SetEntryString("01-01-211", 0x0008, 0x0021);
// fill here other Serie characteristics
- gdcm::DicomDirImage *s2111 = s211->NewImage();
+ GDCM_NAME_SPACE::DicomDirImage *s2111 = s211->NewImage();
s2111->SetEntryString("imageFileName2111",0x0004,0x1500);
// fill here other Image characteristics
- gdcm::DicomDirImage *s2112 = s211->NewImage();
+ GDCM_NAME_SPACE::DicomDirImage *s2112 = s211->NewImage();
s2112->SetEntryString("imageFileName1122",0x0004,0x1500);
// fill here other Image characteristics
// Create patient TREE
// -------------------
- gdcm::DicomDirPatient *p3 = dcmdir->NewPatient();
+ GDCM_NAME_SPACE::DicomDirPatient *p3 = dcmdir->NewPatient();
p3->SetEntryString("patientTHREE",0x0010, 0x0010);
// fill here other Patient characteristics
// Add a new Serie/Image for a Patient's Study created a long time ago
// -------------------------------------------------------------------
- gdcm::DicomDirSerie *s131 = s13->NewSerie();
+ GDCM_NAME_SPACE::DicomDirSerie *s131 = s13->NewSerie();
s111->SetEntryString("01-01-131", 0x0008, 0x0021);
// fill here other Serie characteristics
- gdcm::DicomDirImage *s1311 = s131->NewImage();
+ GDCM_NAME_SPACE::DicomDirImage *s1311 = s131->NewImage();
s1311->SetEntryString("imageFileName1311",0x0004,0x1500);
// fill here other Image characteristics
// Let's loop on Patients.
- gdcm::DicomDirPatient *p;
+ GDCM_NAME_SPACE::DicomDirPatient *p;
p=dcmdir->GetFirstPatient();
while (p) {
std::cout << "one more patient\n";
dcmdir->Delete();
// Read the newly written DicomDir
- gdcm::DicomDir *newDicomDir = gdcm::DicomDir::New();
+ GDCM_NAME_SPACE::DicomDir *newDicomDir = GDCM_NAME_SPACE::DicomDir::New();
newDicomDir->SetFileName("NewDICOMDIR");
newDicomDir->Load( );
if( !newDicomDir->IsReadable() )
valueStuff = s11->GetEntryString(0x0008, 0x1060);
std::cout << "----------------length-----------------" << valueStuff.length() <<
std::endl;
- if (!gdcm::Util::DicomStringEqual(valueStuff, "Dr^Mabuse") )
+ if (!GDCM_NAME_SPACE::Util::DicomStringEqual(valueStuff, "Dr^Mabuse") )
{
std::cout << "2 : 0x0008,0x1060 ["
<< s11->GetEntryString(0x0008,0x1060)
errorFound = true;
break;
}
- if ( gdcm::Util::DicomStringEqual(s12->GetEntryString(0x0008,
+ if ( GDCM_NAME_SPACE::Util::DicomStringEqual(s12->GetEntryString(0x0008,
0x1030),"StudyDescrOne.Two " ))
{
std::cout << "3 0x0008,0x1030 ["
<< s12->GetEntryString(0x0008,0x1030)
<< "]" << std::endl;
- if ( gdcm::Util::DicomStringEqual(s12->GetEntryString(0x0008,
+ if ( GDCM_NAME_SPACE::Util::DicomStringEqual(s12->GetEntryString(0x0008,
0x1060),"Dr^Zorglub " ))
{
std::cout << "4 0x0008,0x1060 ["
<< "]" << std::endl;
valueStuff = s13->GetEntryString(0x0008, 0x1060);
- if (!gdcm::Util::DicomStringEqual(valueStuff, "Dr^Follamour") )
+ if (!GDCM_NAME_SPACE::Util::DicomStringEqual(valueStuff, "Dr^Follamour") )
{
std::cout << "5 0x0008,0x1060 ["
<< valueStuff
}
valueStuff = s111->GetEntryString(0x0008, 0x0021);
- if (!gdcm::Util::DicomStringEqual(valueStuff, "01-01-131") )
+ if (!GDCM_NAME_SPACE::Util::DicomStringEqual(valueStuff, "01-01-131") )
{
std::cout << "6 0x0008,0x0021 ["
<< valueStuff
Program: gdcm
Module: $RCSfile: TestDicomDir.cxx,v $
Language: C++
- Date: $Date: 2007/04/12 13:06:02 $
- Version: $Revision: 1.45 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.46 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// check *all* the dicom elements (gdcm::DocEntry)
// of this gdcm::DicomDirObject
-int CompareSQItem(gdcm::SQItem *pa1, gdcm::SQItem *pa2 )
+int CompareSQItem(GDCM_NAME_SPACE::SQItem *pa1, GDCM_NAME_SPACE::SQItem *pa2 )
{
- gdcm::DocEntry *e1;
- gdcm::DocEntry *e2;
+ GDCM_NAME_SPACE::DocEntry *e1;
+ GDCM_NAME_SPACE::DocEntry *e2;
e2 = pa2->GetFirstEntry();
while (!e2)
return 1;
}
// skip SeqEntries (I don't want to deal with 'recursion pbs' here)
- if ( !dynamic_cast<gdcm::DataEntry *>(e1) ||
- !dynamic_cast<gdcm::DataEntry *>(e2) )
+ if ( !dynamic_cast<GDCM_NAME_SPACE::DataEntry *>(e1) ||
+ !dynamic_cast<GDCM_NAME_SPACE::DataEntry *>(e2) )
continue;
// a value is read as GDCM_UNFOUND
- if ( ((gdcm::DataEntry *)e1)->GetString() == gdcm::GDCM_UNFOUND )
+ if ( ((GDCM_NAME_SPACE::DataEntry *)e1)->GetString() == GDCM_NAME_SPACE::GDCM_UNFOUND )
{
std::cout << "for gdcm source DicomDir : element (" << std::hex
<< e1->GetGroup() << "," <<e1->GetElement()
- << ") has values [" << gdcm::GDCM_UNFOUND << "]"
+ << ") has values [" << GDCM_NAME_SPACE::GDCM_UNFOUND << "]"
<< std::endl;
return 1;
}
// values differ in source file and destination file
- if ( ((gdcm::DataEntry *)e1)->GetString() !=
- ((gdcm::DataEntry *)e2)->GetString() )
+ if ( ((GDCM_NAME_SPACE::DataEntry *)e1)->GetString() !=
+ ((GDCM_NAME_SPACE::DataEntry *)e2)->GetString() )
{
/// \todo : check the value *written on disc*, not the value converted as a std::string
std::cout << "for gdcm DicomDir element (" << std::hex
<< e2->GetGroup() << "," <<e2->GetElement()
<< ") values differ ["
- << ((gdcm::DataEntry *)e1)->GetString() << "] != ["
- << ((gdcm::DataEntry *)e2)->GetString() << "]"
+ << ((GDCM_NAME_SPACE::DataEntry *)e1)->GetString() << "] != ["
+ << ((GDCM_NAME_SPACE::DataEntry *)e2)->GetString() << "]"
<< std::endl;
return 1;
}
int TestDicomDir(int argc, char *argv[])
{
- gdcm::DicomDir *dicomdir;
+ GDCM_NAME_SPACE::DicomDir *dicomdir;
- gdcm::DicomDirPatient *pa1;
- gdcm::DicomDirStudy *st1;
- gdcm::DicomDirSerie *se1;
- gdcm::DicomDirImage *im1;
+ GDCM_NAME_SPACE::DicomDirPatient *pa1;
+ GDCM_NAME_SPACE::DicomDirStudy *st1;
+ GDCM_NAME_SPACE::DicomDirSerie *se1;
+ GDCM_NAME_SPACE::DicomDirImage *im1;
- gdcm::TSKey v;
+ GDCM_NAME_SPACE::TSKey v;
std::string file;
if (argc > 1)
std::cout << "DicomDir we're going to deal with : ["<< file << "]"
<< std::endl;
- dicomdir = gdcm::DicomDir::New();
+ dicomdir = GDCM_NAME_SPACE::DicomDir::New();
dicomdir->SetFileName(file);
dicomdir->Load();
if (argc > 2)
// ------------------------- second stage ---------------------------
- gdcm::Debug::DebugOn();
+ GDCM_NAME_SPACE::Debug::DebugOn();
// Write on disc what we read
<< "NewDICOMDIR written on disc ================================="
<< std::endl<< std::endl;
// Read what we wrote
- gdcm::DicomDir *d2 = gdcm::DicomDir::New();
+ GDCM_NAME_SPACE::DicomDir *d2 = GDCM_NAME_SPACE::DicomDir::New();
d2->SetFileName("NewDICOMDIR");
d2->Load();
if (!d2->IsReadable())
<< "NewDICOMDIR successfully read from disc ================================="
<< std::endl<< std::endl;
- gdcm::DicomDirPatient *pa2;
- gdcm::DicomDirStudy *st2;
- gdcm::DicomDirSerie *se2;
- gdcm::DicomDirImage *im2;
+ GDCM_NAME_SPACE::DicomDirPatient *pa2;
+ GDCM_NAME_SPACE::DicomDirStudy *st2;
+ GDCM_NAME_SPACE::DicomDirSerie *se2;
+ GDCM_NAME_SPACE::DicomDirImage *im2;
pa1 = dicomdir->GetFirstPatient();
pa2 = d2->GetFirstPatient();
Program: gdcm
Module: $RCSfile: TestDirList.cxx,v $
Language: C++
- Date: $Date: 2005/02/02 10:05:26 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string path = GDCM_DATA_ROOT;
std::cerr << path << std::endl;
- gdcm::DirList list(path, true);
+ GDCM_NAME_SPACE::DirList list(path, true);
list.Print();
return 0;
Program: gdcm
Module: $RCSfile: TestFileAccessors.cxx,v $
Language: C++
- Date: $Date: 2006/11/15 16:00:34 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::cout << " ----------------------------------------------"
<< "Begin with " << filename << std::endl;
- gdcm::File *f= gdcm::File::New( );
+ GDCM_NAME_SPACE::File *f= GDCM_NAME_SPACE::File::New( );
f->SetFileName( filename );
f->Load( );
{
std::cout << " " << filename << " is Readable" << std::endl;
- gdcm::FileHelper *fh= gdcm::FileHelper::New( f );
+ GDCM_NAME_SPACE::FileHelper *fh= GDCM_NAME_SPACE::FileHelper::New( f );
TestMethodMacro(std::dec,fh,GetImageDataSize)
TestMethodMacro(std::dec,fh,GetImageDataRawSize)
Program: gdcm
Module: $RCSfile: TestLoadAllDocumentsNoPrivNoSeq.cxx,v $
Language: C++
- Date: $Date: 2005/10/25 14:52:31 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
filename += "/"; //doh!
filename += gdcmDataImages[i];
- gdcm::File *f= gdcm::File::New( );
+ GDCM_NAME_SPACE::File *f= GDCM_NAME_SPACE::File::New( );
f->SetFileName( filename );
// just to improve coverage
- f->SetLoadMode (gdcm::LD_NOSEQ|gdcm::LD_NOSHADOW);
+ f->SetLoadMode (GDCM_NAME_SPACE::LD_NOSEQ|GDCM_NAME_SPACE::LD_NOSHADOW);
f->Load();
/*
Program: gdcm
Module: $RCSfile: TestMakeDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/11/28 16:31:19 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.13 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "gdcmDebug.h"
// ---
-class CommandStart : public gdcm::Command
+class CommandStart : public GDCM_NAME_SPACE::Command
{
gdcmTypeMacro(CommandStart);
gdcmNewMacro(CommandStart);
CommandStart() {}
};
-class CommandEnd : public gdcm::Command
+class CommandEnd : public GDCM_NAME_SPACE::Command
{
gdcmTypeMacro(CommandEnd);
gdcmNewMacro(CommandEnd);
CommandEnd() {}
};
-class CommandProgress : public gdcm::Command
+class CommandProgress : public GDCM_NAME_SPACE::Command
{
gdcmTypeMacro(CommandProgress);
gdcmNewMacro(CommandProgress);
public :
virtual void Execute()
{
- gdcm::DicomDir *dd=dynamic_cast<gdcm::DicomDir *>(GetObject());
+ GDCM_NAME_SPACE::DicomDir *dd=dynamic_cast<GDCM_NAME_SPACE::DicomDir *>(GetObject());
if(dd)
std::cerr << "Progress parsing (" << dd->GetProgress() << ")" << std::endl;
dirName = GDCM_DATA_ROOT;
}
- gdcm::DicomDir *dcmdir;
+ GDCM_NAME_SPACE::DicomDir *dcmdir;
// new style (user is allowed no to load Sequences an/or Shadow Groups)
- dcmdir = gdcm::DicomDir::New( );
+ dcmdir = GDCM_NAME_SPACE::DicomDir::New( );
- gdcm::Command *cmd;
+ GDCM_NAME_SPACE::Command *cmd;
cmd = CommandStart::New();
- gdcm::CommandManager::SetCommand(dcmdir,gdcm::CMD_STARTPROGRESS,cmd);
+ GDCM_NAME_SPACE::CommandManager::SetCommand(dcmdir,GDCM_NAME_SPACE::CMD_STARTPROGRESS,cmd);
cmd->Delete();
cmd = CommandProgress::New();
- gdcm::CommandManager::SetCommand(dcmdir,gdcm::CMD_PROGRESS,cmd);
+ GDCM_NAME_SPACE::CommandManager::SetCommand(dcmdir,GDCM_NAME_SPACE::CMD_PROGRESS,cmd);
cmd->Delete();
cmd = CommandEnd::New();
- gdcm::CommandManager::SetCommand(dcmdir,gdcm::CMD_ENDPROGRESS,cmd);
+ GDCM_NAME_SPACE::CommandManager::SetCommand(dcmdir,GDCM_NAME_SPACE::CMD_ENDPROGRESS,cmd);
cmd->Delete();
// dcmdir->SetLoadMode(gdcm::LD_NOSEQ | gdcm::LD_NOSHADOW);
// some images have a wrong length for element 0x0000 of private groups
- dcmdir->SetLoadMode(gdcm::LD_NOSEQ);
+ dcmdir->SetLoadMode(GDCM_NAME_SPACE::LD_NOSEQ);
dcmdir->SetDirectoryName(dirName);
dcmdir->Load();
dcmdir->Delete();
// Read from disc the just written DicomDir
- gdcm::DicomDir *newDicomDir = gdcm::DicomDir::New();
+ GDCM_NAME_SPACE::DicomDir *newDicomDir = GDCM_NAME_SPACE::DicomDir::New();
newDicomDir->SetFileName("NewDICOMDIR");
newDicomDir->Load();
Program: gdcm
Module: $RCSfile: TestMakeIcon.cxx,v $
Language: C++
- Date: $Date: 2006/04/11 16:05:03 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.12 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string output = "testIcon.dcm";
- gdcm::Debug::DebugOn();
+ GDCM_NAME_SPACE::Debug::DebugOn();
if ( argc == 3 )
{
<< " input filename.dcm output Filename.dcm" << std::endl;
}
- gdcm::File *f = gdcm::File::New( );
+ GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New( );
f->SetFileName( input );
f->Load( );
f->Delete();
return 1;
}
- gdcm::FileHelper *fh = gdcm::FileHelper::New(f);
+ GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f);
uint8_t *pixels = fh->GetImageData();
uint32_t lgth = fh->GetImageDataSize();
- gdcm::SeqEntry *icon = f->InsertSeqEntry(0x0088, 0x0200);
- gdcm::SQItem *sqi = gdcm::SQItem::New(1);
+ GDCM_NAME_SPACE::SeqEntry *icon = f->InsertSeqEntry(0x0088, 0x0200);
+ GDCM_NAME_SPACE::SQItem *sqi = GDCM_NAME_SPACE::SQItem::New(1);
icon->AddSQItem(sqi, 1);
sqi->Delete();
f->Delete();
fh->Delete();
- f = gdcm::File::New();
+ f = GDCM_NAME_SPACE::File::New();
f->SetFileName(output);
f->Load();
f->Print();
Program: gdcm
Module: $RCSfile: TestPrintAllDocument.cxx,v $
Language: C++
- Date: $Date: 2006/04/07 10:58:51 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::cout << " ----------------------------------------------"
<< "Begin with " << filename << std::endl;
- gdcm::File *f= gdcm::File::New( );
+ GDCM_NAME_SPACE::File *f= GDCM_NAME_SPACE::File::New( );
f->SetFileName( filename );
f->Load();
std::string strImageOrientationPatient =
f->GetEntryString(0x0020,0x0037);
- if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND )
+ if ( strImageOrientationPatient != GDCM_NAME_SPACE::GDCM_UNFOUND )
{
- gdcm::Orientation *o = gdcm::Orientation::New();
+ GDCM_NAME_SPACE::Orientation *o = GDCM_NAME_SPACE::Orientation::New();
- gdcm::OrientationType orient = o->GetOrientationType( f );
+ GDCM_NAME_SPACE::OrientationType orient = o->GetOrientationType( f );
std::cout << " ---------------------- Orientation " << orient
<< std::endl;
o->Delete();
Program: gdcm
Module: $RCSfile: TestReadWriteReadCompare.cxx,v $
Language: C++
- Date: $Date: 2006/05/05 22:13:55 $
- Version: $Revision: 1.28 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.29 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//////////////// Step 1 (see above description):
- gdcm::File *file = gdcm::File::New( );
+ GDCM_NAME_SPACE::File *file = GDCM_NAME_SPACE::File::New( );
file->SetFileName( filename );
file->Load ();
if( !file->IsReadable() )
std::cout << " step 1...";
//////////////// Step 2:
- gdcm::FileHelper *filehelper = gdcm::FileHelper::New( file );
+ GDCM_NAME_SPACE::FileHelper *filehelper = GDCM_NAME_SPACE::FileHelper::New( file );
int dataSize = filehelper->GetImageDataSize();
uint8_t *imageData = filehelper->GetImageData(); //EXTREMELY IMPORTANT
// Sure, it is : It's up to the user to decide if he wants to
std::cout << "2...";
//////////////// Step 3:
- gdcm::File *fileout = gdcm::File::New();
+ GDCM_NAME_SPACE::File *fileout = GDCM_NAME_SPACE::File::New();
fileout->SetFileName( output );
fileout->Load();
// gdcm::FileHelper *reread = new gdcm::FileHelper( output ); // deprecated
return 1;
}
- gdcm::FileHelper *reread = gdcm::FileHelper::New( fileout );
+ GDCM_NAME_SPACE::FileHelper *reread = GDCM_NAME_SPACE::FileHelper::New( fileout );
std::cout << "3...";
// For the next step:
int result = 0;
if (argc == 4)
- gdcm::Debug::DebugOn();
+ GDCM_NAME_SPACE::Debug::DebugOn();
if (argc >= 3)
{
Program: gdcm
Module: $RCSfile: TestSerieHelper.cxx,v $
Language: C++
- Date: $Date: 2005/11/14 15:56:55 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
int TestSerieHelper(int argc, char *argv[])
{
- gdcm::SerieHelper *s;
+ GDCM_NAME_SPACE::SerieHelper *s;
std::string dirName;
if (argc > 1)
std::cout << "Dir Name :[" << dirName << "]" << std::endl;
- s = gdcm::SerieHelper::New();
- s->SetLoadMode(gdcm::LD_ALL); // Load everything for each File
+ s = GDCM_NAME_SPACE::SerieHelper::New();
+ s->SetLoadMode(GDCM_NAME_SPACE::LD_ALL); // Load everything for each File
//s->AddRestriction(tagKey, valueToCheck); // Keep only files where
// restriction is true
s->SetDirectory(dirName, true); // true : recursive exploration
int nbFiles;
// For all the SingleSerieUID filesets of the gdcm::Serie
- gdcm::FileList *l = s->GetFirstSingleSerieUIDFileSet();
+ GDCM_NAME_SPACE::FileList *l = s->GetFirstSingleSerieUIDFileSet();
while (l)
{
nbFiles = l->size() ;
std::string fileName;
l = s->GetFirstSingleSerieUIDFileSet();
- for (std::vector<gdcm::File* >::iterator it = l->begin();
+ for (std::vector<GDCM_NAME_SPACE::File* >::iterator it = l->begin();
it != l->end();
++it)
{
Program: gdcm
Module: $RCSfile: TestValidate.cxx,v $
Language: C++
- Date: $Date: 2005/11/21 10:02:57 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
int Validate(std::string const &filename)
{
- gdcm::File *input = gdcm::File::New( );
+ GDCM_NAME_SPACE::File *input = GDCM_NAME_SPACE::File::New( );
input->SetFileName(filename);
input->Load();
- gdcm::Validator *v = gdcm::Validator::New();
+ GDCM_NAME_SPACE::Validator *v = GDCM_NAME_SPACE::Validator::New();
v->SetInput( input );
input->Delete();
v->Delete();
Program: gdcm
Module: $RCSfile: VTKTestWriteSeq.cxx,v $
Language: C++
- Date: $Date: 2005/09/08 14:40:15 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2007/06/21 14:59:06 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
}
- gdcm::Debug::DebugOn();
+ GDCM_NAME_SPACE::Debug::DebugOn();
int ret = 0;
vtkTesting *t = vtkTesting::New();