# The list of available languages.
#SET(GDCM_LANGUAGES "Python")
+# The gdcm namespace
+SET(GDCM_NAME_SPACE @GDCM_NAME_SPACE@)
+
# The CMake macros dir.
SET(GDCM_CMAKE_DIR "@GDCM_CMAKE_DIR_CONFIG@")
Program: gdcm
Module: $RCSfile: PcpdenseToDicom.cxx,v $
Language: C++
- Date: $Date: 2008/09/08 08:10:33 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/09/15 15:49:20 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
- delete []image;
+ delete []image;
return 1;
}
Program: gdcm
Module: $RCSfile: TestAllEntryVerify.cxx,v $
Language: C++
- Date: $Date: 2005/10/18 08:35:45 $
- Version: $Revision: 1.29 $
+ Date: $Date: 2008/09/15 15:49:20 $
+ Version: $Revision: 1.30 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include <sstream>
typedef std::string EntryValueType; // same type as DataEntry::value
-typedef std::map< gdcm::TagKey, EntryValueType > MapEntryValues;
+typedef std::map< GDCM_NAME_SPACE::TagKey, EntryValueType > MapEntryValues;
typedef MapEntryValues *MapEntryValuesPtr;
typedef std::string FileNameType;
typedef std::map< FileNameType, MapEntryValuesPtr > MapFileValuesType;
std::string fileName = DataPath + fileIt->first;
std::cout << Indent << "FileName: " << fileName << std::endl;
- gdcm::File *tested;
- tested = new gdcm::File( );
+ GDCM_NAME_SPACE::File *tested;
+ tested = new GDCM_NAME_SPACE::File( );
tested->SetFileName( fileName.c_str() );
tested->Load( );
if( !tested->IsReadable() )
bool ReferenceFileParser::SecondPassReferenceFile()
throw ( ParserException )
{
- gdcm::TagKey key;
+ GDCM_NAME_SPACE::TagKey key;
EntryValueType value;
std::string line;
bool inBlock = false;
Program: gdcm
Module: $RCSfile: TestAllPrint.cxx,v $
Language: C++
- Date: $Date: 2006/03/17 14:33:54 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ Version: $Revision: 1.8 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
filename += "/";
filename += gdcmDataImages[i];
- gdcm::File file;
- //file.SetLoadMode( gdcm::LD_NOSEQ | gdcm::LD_NOSHADOWSEQ );
+ GDCM_NAME_SPACE::File file;
+ //file.SetLoadMode( GDCM_NAME_SPACE::LD_NOSEQ | GDCM_NAME_SPACE::LD_NOSHADOWSEQ );
file.SetFileName( filename );
if( !file.Load() )
return 1;
Program: gdcm
Module: $RCSfile: TestAllReadCompareDicom.cxx,v $
Language: C++
- Date: $Date: 2007/07/26 09:25:38 $
- Version: $Revision: 1.61 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ Version: $Revision: 1.62 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
//if (gdcmDataImages[i] == "D_CLUNIE_CT2_RLE.dcm")
-// gdcm::Debug::DebugOn(); // track pb on BigEndian Proc
+// GDCM_NAME_SPACE::Debug::DebugOn(); // track pb on BigEndian Proc
//else
GDCM_NAME_SPACE::Debug::DebugOff();
Program: gdcm
Module: $RCSfile: TestAnonymize.cxx,v $
Language: C++
- Date: $Date: 2005/10/18 08:35:46 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ 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::cout << " 1...";
std::cout << std::endl;
- gdcm::File *f;
- f = new gdcm::File( );
+ GDCM_NAME_SPACE::File *f;
+ f = new GDCM_NAME_SPACE::File( );
f->SetFileName( filename );
f->Load();
// Write a new file
// ============================================================
- // We need a gdcm::FileHelper, since we want to load the pixels
- gdcm::FileHelper *fh = new gdcm::FileHelper(f);
+ // We need a GDCM_NAME_SPACE::FileHelper, since we want to load the pixels
+ GDCM_NAME_SPACE::FileHelper *fh = new GDCM_NAME_SPACE::FileHelper(f);
// --- Don't forget to load the Pixels ...
// We shall not use them, but we have to load them
delete fh;
// Read the file we just wrote
- f = new gdcm::File( output );
+ f = new GDCM_NAME_SPACE::File( output );
std::cout << " Anonymized File... Re-Read ! " << std::endl;
// Compare and abort if different.
v = f->GetEntryValue(0x0008, 0x0080);
- if ( v != gdcm::GDCM_UNFOUND )
+ if ( v != GDCM_NAME_SPACE::GDCM_UNFOUND )
if (v.find("Xanadoo") >= v.length() )
plouf = true;
v = f->GetEntryValue(0x0010, 0x0010);
- if ( v != gdcm::GDCM_UNFOUND )
+ if ( v != GDCM_NAME_SPACE::GDCM_UNFOUND )
if (v.find("Fantomas") >= v.length() )
plouf = true;
- if ( v != gdcm::GDCM_UNFOUND )
+ if ( v != GDCM_NAME_SPACE::GDCM_UNFOUND )
v = f->GetEntryValue(0x0010, 0x0020);
if (v.find("1515") >= v.length() )
plouf = true;
- if ( v != gdcm::GDCM_UNFOUND )
+ if ( v != GDCM_NAME_SPACE::GDCM_UNFOUND )
v = f->GetEntryValue(0x0010, 0x000d);
if (v.find("9.99.999.9999") >= v.length() )
plouf = true;
// Read the file we just anonymize and check
- f = new gdcm::File( output );
+ f = new GDCM_NAME_SPACE::File( output );
// First, we set values to replace the ones we want to hide
// --------------------- we overwrite the file
// No need to load the pixels.
- // The gdcm::File remains untouched in memory
+ // The GDCM_NAME_SPACE::File remains untouched in memory
std::cout <<"Let's AnonymizeNoLoad " << std::endl;;
f->AnonymizeNoLoad();
// No need to write the File : modif were done on disc !
delete f;
- f = new gdcm::File( output );
+ f = new GDCM_NAME_SPACE::File( output );
std::string val;
plouf = false;
val = f->GetEntryValue(0x0010, 0x0010);
- if ( val != gdcm::GDCM_UNFOUND )
+ if ( val != GDCM_NAME_SPACE::GDCM_UNFOUND )
if (val.find("XXL") >= v.length() )
plouf = true;
- if ( val != gdcm::GDCM_UNFOUND )
+ if ( val != GDCM_NAME_SPACE::GDCM_UNFOUND )
val = f->GetEntryValue(0x0010, 0x0020);
if (val.find("007") >= v.length() )
plouf = true;
- if ( val != gdcm::GDCM_UNFOUND )
+ if ( val != GDCM_NAME_SPACE::GDCM_UNFOUND )
val = f->GetEntryValue(0x0010, 0x000d);
if (val.find("6.66.666.6666") >= v.length() )
plouf = true;
int TestAnonymize(int argc, char *argv[])
{
- //gdcm::Debug::DebugOn();
+ //GDCM_NAME_SPACE::Debug::DebugOn();
if ( argc == 3 )
{
Program: gdcm
Module: $RCSfile: TestBuildUpDicomDir.cxx,v $
Language: C++
- Date: $Date: 2007/08/20 13:25:32 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ 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
std::cerr << "Usage: " << argv[0] << " dummy " << std::endl;
}
- // gdcm::Debug::DebugOn();
+ // GDCM_NAME_SPACE::Debug::DebugOn();
bool errorFound = false;
GDCM_NAME_SPACE::DicomDir *dcmdir;
Program: gdcm
Module: $RCSfile: TestChangeHeader.cxx,v $
Language: C++
- Date: $Date: 2005/07/08 13:39:57 $
- Version: $Revision: 1.35 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ Version: $Revision: 1.36 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string firstArgument = argv[1];
- gdcm::File *f1 = new gdcm::File();
+ GDCM_NAME_SPACE::File *f1 = new GDCM_NAME_SPACE::File();
f1->SetFileName(firstArgument);
f1->Load( );
std::string secondArgument = argv[2];
- gdcm::File *f2 = new gdcm::File(secondArgument);
+ GDCM_NAME_SPACE::File *f2 = new GDCM_NAME_SPACE::File(secondArgument);
//f1->PrintPubElVal();
Program: gdcm
Module: $RCSfile: TestDataEntry.cxx,v $
Language: C++
- Date: $Date: 2006/04/07 14:14:40 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ 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
(we don't use any longer DictEntry to build a DocEntry!
unsigned int i;
- gdcm::DictEntry *dict;
- gdcm::DataEntry *entry;
+ GDCM_NAME_SPACE::DictEntry *dict;
+ GDCM_NAME_SPACE::DataEntry *entry;
- dict = gdcm::DictEntry::New(0x0003,0x0004);
+ dict = GDCM_NAME_SPACE::DictEntry::New(0x0003,0x0004);
// SetVR *before* making the DataEntry!
dict->SetVR("US");
- entry = gdcm::DataEntry::New(dict);
+ entry = GDCM_NAME_SPACE::DataEntry::New(dict);
std::cout << "Test for VR = " << dict->GetVR() << "..." << std::endl;
entry->Delete();
//------------------------------------------------------------------
- dict = gdcm::DictEntry::New(0x0000,0x0000);
+ dict = GDCM_NAME_SPACE::DictEntry::New(0x0000,0x0000);
// SetVR *before* making the DataEntry!
dict->SetVR("LT");
- entry = gdcm::DataEntry::New(dict);
+ entry = GDCM_NAME_SPACE::DataEntry::New(dict);
std::cout << "Test for VR = " << dict->GetVR() << "..." << std::endl;
entry->SetString(data);
entry->Delete();
//------------------------------------------------------------------
- dict = gdcm::DictEntry::New(0x0000,0x0000);
+ dict = GDCM_NAME_SPACE::DictEntry::New(0x0000,0x0000);
// SetVR *before* making the DataEntry!
dict->SetVR("US");
- entry = gdcm::DataEntry::New(dict);
+ entry = GDCM_NAME_SPACE::DataEntry::New(dict);
std::cout << "Test for VR = " << dict->GetVR() << "..." << std::endl;
entry->Delete();
//------------------------------------------------------------------
- dict = gdcm::DictEntry::New(0x0000,0x0000);
+ dict = GDCM_NAME_SPACE::DictEntry::New(0x0000,0x0000);
dict->SetVR("UL");
- entry = gdcm::DataEntry::New(dict);
+ entry = GDCM_NAME_SPACE::DataEntry::New(dict);
std::cout << "Test for VR = " << dict->GetVR() << "..." << std::endl;
entry->SetString(data);
entry->Delete();
//------------------------------------------------------------------
- dict = gdcm::DictEntry::New(0x0000,0x0000);
+ dict = GDCM_NAME_SPACE::DictEntry::New(0x0000,0x0000);
dict->SetVR("FL");
- entry = gdcm::DataEntry::New(dict);
+ entry = GDCM_NAME_SPACE::DataEntry::New(dict);
std::cout << "Test for VR = " << dict->GetVR() << "..." << std::endl;
entry->SetString(fdata);
entry->Delete();
//------------------------------------------------------------------
- dict = gdcm::DictEntry::New(0x0000,0x0000);
+ dict = GDCM_NAME_SPACE::DictEntry::New(0x0000,0x0000);
dict->SetVR("FD");
- entry = gdcm::DataEntry::New(dict);
+ entry = GDCM_NAME_SPACE::DataEntry::New(dict);
std::cout << "Test for VR = " << dict->GetVR() << "..." << std::endl;
entry->SetString(fdata);
Program: gdcm
Module: $RCSfile: TestDicomDir.cxx,v $
Language: C++
- Date: $Date: 2007/06/21 14:59:06 $
- Version: $Revision: 1.46 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ Version: $Revision: 1.47 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include <stdlib.h>
-// check *all* the dicom elements (gdcm::DocEntry)
-// of this gdcm::DicomDirObject
+// check *all* the dicom elements (GDCM_NAME_SPACE::DocEntry)
+// of this GDCM_NAME_SPACE::DicomDirObject
int CompareSQItem(GDCM_NAME_SPACE::SQItem *pa1, GDCM_NAME_SPACE::SQItem *pa2 )
{
GDCM_NAME_SPACE::DocEntry *e1;
<<"' is readable"<<std::endl;
}
- // Test if the gdcm::DicomDir contains any patient
+ // Test if the GDCM_NAME_SPACE::DicomDir contains any patient
if( !dicomdir->GetFirstPatient() )
{
std::cout<<" DicomDir '"<<file
pa1 = dicomdir->GetFirstPatient();
while ( pa1 )
- { // we process all the PATIENT of this gdcm::DicomDir
+ { // we process all the PATIENT of this GDCM_NAME_SPACE::DicomDir
std::cout << pa1->GetEntryString(0x0010, 0x0010) << std::endl; // Patient's Name
st1 = pa1->GetFirstStudy();
Program: gdcm
Module: $RCSfile: TestFileAccessors.cxx,v $
Language: C++
- Date: $Date: 2007/06/21 14:59:06 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ 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
float iop[6];
float ipp[3];
- // gdcm::Debug::DebugOn();
+ // GDCM_NAME_SPACE::Debug::DebugOn();
while( gdcmDataImages[i] != 0 )
{
// for all the OS.
// if (gdcmDataImages[i] == "00191113.dcm" )
- // gdcm::Debug::DebugOn();
+ // GDCM_NAME_SPACE::Debug::DebugOn();
// else
- // gdcm::Debug::DebugOff();
+ // GDCM_NAME_SPACE::Debug::DebugOff();
std::string filename;
if (argc ==2)
Program: gdcm
Module: $RCSfile: TestInline.cxx,v $
Language: C++
- Date: $Date: 2008/04/10 12:15:34 $
- Version: $Revision: 1.19 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ Version: $Revision: 1.20 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::cout << "Use inline, .h defined, WITH inline keyword, param passed by pointer"
<< std::endl;
- gdcm::Util util;
+ GDCM_NAME_SPACE::Util util;
GET_TIME(tms1);
for(i = 0 ; i< nbLoop ; i++)
GET_TIME(tms1);
for(i = 0 ; i< nbLoop ; i++)
{
- gdcm::Util::sthifpswap (&a, &b);
+ GDCM_NAME_SPACE::Util::sthifpswap (&a, &b);
}
GET_TIME(tms2);
HOW_LONG(tms2,tms1);
GET_TIME(tms1);
for(i = 0 ; i< nbLoop ; i++)
{
- gdcm::Util::sthNoifpswap (&a, &b);
+ GDCM_NAME_SPACE::Util::sthNoifpswap (&a, &b);
}
GET_TIME(tms2);
HOW_LONG(tms2,tms1);
+
+ // ----------------------------------------
+
+ // Just to point out that playing with pointers doesn't save so much time ...
+
+ std::cout << "Play with arrays\n================" << std::endl;
+
+ nbLoop=1000;
+
+ std::cout << "Copy 2 arrays [i][j]"
+ << std::endl;
+
+ unsigned short int z1[128][3118], z2[128][3118];
+ GET_TIME(tms1);
+ for(i = 0 ; i< nbLoop ; i++)
+ {
+ unsigned short int *pv1=&z1[0][0], *pv2=&z2[0][0];
+ for (int j=0;j<3118;j++)
+ for(int i=0; i<128;i++)
+ z2[i][j] = z1[i][j];
+ }
+ GET_TIME(tms2);
+ HOW_LONG(tms2,tms1);
+
+ std::cout << "Copy 2 arrays ([i][j], pointer)"
+ << std::endl;
+
+ GET_TIME(tms1);
+ for(i = 0 ; i< nbLoop ; i++)
+ {
+ unsigned short int *pv1=&z1[0][0], *pv2=&z2[0][0];
+ for (int j=0;j<3118;j++)
+ for(int i=0; i<128;i++)
+ z2[i][j] = *pv1++;
+ }
+ GET_TIME(tms2);
+ HOW_LONG(tms2,tms1);
+
+ std::cout << "Copy 2 arrays (2 pointers)" << std::endl;
+ GET_TIME(tms1);
+ // unsigned short int w1[3118*128], w2[3118][128];
+ for(i = 0 ; i< nbLoop ; i++)
+ {
+ unsigned short int *pw1=&z1[0][0], *pw2=&z2[0][0];
+ for (int j=0;j<3118;j++)
+ for(int i=0; i<128;i++)
+ *pw2++ = *pw1++;
+ }
+ GET_TIME(tms2);
+ HOW_LONG(tms2,tms1);
+
+
+ std::cout << "Copy 2 arrays (memcpy)" << std::endl;
+ GET_TIME(tms1);
+ for(i = 0 ; i< nbLoop ; i++)
+ {
+ unsigned short int *pw1=&z1[0][0], *pw2=&z2[0][0];
+ memcpy(pw2,pw1,3118*128*sizeof(unsigned short int));
+ }
+ GET_TIME(tms2);
+ HOW_LONG(tms2,tms1);
+
+
+
+ std::cout << "Transpose 2 arrays [i][j]"
+ << std::endl;
+
+ unsigned short int t1[3118][128], t2[128][3118];
+ GET_TIME(tms1);
+ for(i = 0 ; i< nbLoop ; i++)
+ {
+ unsigned short int *pv1=&t1[0][0], *pv2=&t2[0][0];
+ for (int j=0;j<3118;j++)
+ for(int i=0; i<128;i++)
+ t2[i][j] = t1[j][i];
+ }
+ GET_TIME(tms2);
+ HOW_LONG(tms2,tms1);
+
+
+ std::cout << "Transpose 2 arrays ([i][j], pointer)"
+ << std::endl;
+
+ unsigned short int w1[3118*128], w2[3118][128];
+ GET_TIME(tms1);
+ for(i = 0 ; i< nbLoop ; i++)
+ {
+ unsigned short int *pw1=w1, *pw2=&w2[0][0];
+ for (int j=0;j<3118;j++)
+ for(int i=0; i<128;i++)
+ w2[i][j] = *pw1++;
+ }
+ GET_TIME(tms2);
+ HOW_LONG(tms2,tms1);
+
+
+ std::cout << "Transpose 2 arrays (2 pointers)"
+ << std::endl;
+
+ unsigned short int v1[3118*128], v2[128*3118];
+ GET_TIME(tms1);
+ for(i = 0 ; i< nbLoop ; i++)
+ {
+ unsigned short int *pv1=v1, *pv2=v2;
+ for (int j=0;j<3118;j++)
+ for(int i=0; i<128;i++)
+ *(pv2+i*128+j) = *pv1++;
+ }
+ GET_TIME(tms2);
+ HOW_LONG(tms2,tms1);
+
+
+
//return 1; // will generate an error,
// just to allow us to see the full log in the dashboard
return 0;
Program: gdcm
Module: $RCSfile: TestLoadAllDocumentsNoPrivNoSeq.cxx,v $
Language: C++
- Date: $Date: 2007/06/21 14:59:06 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ 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
std::string strImageOrientationPatient =
f->GetEntryValue(0x0020,0x0037);
- if ( strImageOrientationPatient != gdcm::GDCM_UNFOUND )
+ if ( strImageOrientationPatient != GDCM_NAME_SPACE::GDCM_UNFOUND )
{
- gdcm::Orientation o;
+ GDCM_NAME_SPACE::Orientation o;
double orient = o.TypeOrientation( f );
std::cout << " ---------------------- Orientation " << orient
<< std::endl;
Program: gdcm
Module: $RCSfile: TestLoadAllDocumentsNoShadow.cxx,v $
Language: C++
- Date: $Date: 2007/07/27 21:20:13 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ 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
filename += "/";
filename += gdcmDataImages[i];
- GDCM_NAME_SPACE::File *file = gdcm::File::New();;
+ GDCM_NAME_SPACE::File *file = GDCM_NAME_SPACE::File::New();;
file->SetLoadMode( GDCM_NAME_SPACE::LD_NOSHADOW );
file->SetFileName( filename );
std::cout << "File Name [" << filename << "]" << std::endl;
Program: gdcm
Module: $RCSfile: TestMakeDicomDir.cxx,v $
Language: C++
- Date: $Date: 2007/06/21 14:59:06 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ 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
* (or GDCM_DATA_ROOT by default)
* - Orders the gdcm-readable found Files
* according their Patient/Study/Serie/Image characteristics
- * - Makes the gdcm::DicomDir.
+ * - Makes the GDCM_NAME_SPACE::DicomDir.
* - Writes a file named "NewDICOMDIR".
* - Reads "NewDICOMDIR" file.
*/
int TestMakeDicomDir(int argc, char *argv[])
{
- //gdcm::Debug::DebugOn();
+ //GDCM_NAME_SPACE::Debug::DebugOn();
std::string dirName;
if (argc > 1)
GDCM_NAME_SPACE::CommandManager::SetCommand(dcmdir,GDCM_NAME_SPACE::CMD_ENDPROGRESS,cmd);
cmd->Delete();
- // dcmdir->SetLoadMode(gdcm::LD_NOSEQ | gdcm::LD_NOSHADOW);
+ // dcmdir->SetLoadMode(GDCM_NAME_SPACE::LD_NOSEQ | GDCM_NAME_SPACE::LD_NOSHADOW);
// some images have a wrong length for element 0x0000 of private groups
dcmdir->SetLoadMode(GDCM_NAME_SPACE::LD_NOSEQ);
dcmdir->SetDirectoryName(dirName);
Program: gdcm
Module: $RCSfile: TestPrintAllDocument.cxx,v $
Language: C++
- Date: $Date: 2007/06/22 11:01:58 $
- Version: $Revision: 1.17 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ Version: $Revision: 1.18 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
unsigned int l;
l = strlen("PALETTE COLOR ");
- //gdcm::Debug::DebugOn();
+ //GDCM_NAME_SPACE::Debug::DebugOn();
while( gdcmDataImages[i] != 0 )
{
Program: gdcm
Module: $RCSfile: TestSerieHelper.cxx,v $
Language: C++
- Date: $Date: 2008/02/13 19:08:34 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ 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
}
//if (argc > 2)
- // gdcm::Debug::DebugOn();
+ // GDCM_NAME_SPACE::Debug::DebugOn();
std::cout << "-------------- Dir Name :[" << dirName << "]" << std::endl;
<< std::endl;
int nbFiles;
- // For all the SingleSerieUID filesets of the gdcm::Serie
+ // For all the SingleSerieUID filesets of the GDCM_NAME_SPACE::Serie
GDCM_NAME_SPACE::FileList *l = s->GetFirstSingleSerieUIDFileSet();
while (l)
{
Program: gdcm
Module: $RCSfile: VTKTestRead.cxx,v $
Language: C++
- Date: $Date: 2007/09/18 07:58:38 $
- Version: $Revision: 1.15 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ Version: $Revision: 1.16 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
return ret;
}
- //gdcm::Debug::DebugOn(); // Comment out when no bug is to be tracked
+ //GDCM_NAME_SPACE::Debug::DebugOn(); // Comment out when no bug is to be tracked
// Test for all images
int i = 0;
Program: gdcm
Module: $RCSfile: VTKTestWrite.cxx,v $
Language: C++
- Date: $Date: 2007/09/18 07:58:38 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ 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
}
}
-// gdcm::Debug::DebugOn();
+// GDCM_NAME_SPACE::Debug::DebugOn();
int ret = 0;
vtkTesting *t = vtkTesting::New();
Program: gdcm
Module: $RCSfile: dynmodule.cxx,v $
Language: C++
- Date: $Date: 2005/11/08 08:31:42 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ 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
// Create an instance of a gdcm class. This makes sure
// that the problematic gdcm-library is linked.
- gdcm::File *file = gdcm::File::New();
+ GDCM_NAME_SPACE::File *file = GDCM_NAME_SPACE::File::New();
file->SetLoadMode(0); // To avoid warning
std::cerr << "End of function afunc" << std::endl;
Program: gdcm
Module: $RCSfile: loadmodule.cxx,v $
Language: C++
- Date: $Date: 2005/11/07 10:18:20 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/09/15 15:49:21 $
+ 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
// Create an instance of the GDCMImageIO class. This makes sure
// that the problematic gdcm-library is linked.
//itk::GDCMImageIO::Pointer gdcmio = itk::GDCMImageIO::New();
- gdcm::File *file = gdcm::File::New();
+ GDCM_NAME_SPACE::File *file = GDCM_NAME_SPACE::File::New();
file->Print(); // to avoid warning
std::cerr << "Closing libs" << std::endl;
Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2008/06/12 13:18:15 $
- Version: $Revision: 1.380 $
+ Date: $Date: 2008/09/15 15:49:22 $
+ Version: $Revision: 1.381 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string RecCode;
RecCode = GetEntryString(0x0008, 0x0010); // recognition code (RET)
+
if(RecCode.find("ACRNEMA_LIBIDO") == 0 || // any version
RecCode.find("CANRME_AILIBOD") == 0) // for brain-damaged softwares
// with "little-endian strings"
{
+
Filetype = ACR_LIBIDO;
std::string rows = GetEntryString(0x0028, 0x0010);
std::string columns = GetEntryString(0x0028, 0x0011);
Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2008/02/13 18:53:33 $
- Version: $Revision: 1.153 $
+ Date: $Date: 2008/09/15 15:49:22 $
+ Version: $Revision: 1.154 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//-----------------------------------------------------------------------------
/**
- * \brief Derived by both gdcm::File and gdcm::DicomDir
+ * \brief Derived by both GDCM_NAME_SPACE::File and GDCM_NAME_SPACE::DicomDir
*/
class GDCM_EXPORT Document : public ElementSet
{
bool SetShaDict(Dict *dict);
bool SetShaDict(DictKey const &dictName);
-// Informations contained in the gdcm::Document
+// Informations contained in the GDCM_NAME_SPACE::Document
bool IsParsable();
virtual bool IsReadable();
bool IsDicomV3();
protected:
// Methods
// Constructor and destructor are protected to forbid end user
- // to instanciate from this class Document (only gdcm::File and
- // gdcm::DicomDir are meaningfull).
+ // to instanciate from this class Document (only GDCM_NAME_SPACE::File and
+ // GDCM_NAME_SPACE::DicomDir are meaningfull).
Document();
virtual ~Document();
/// Probabely, some more to add
int LoadMode;
- /// \brief Whether the gdcm::Document is already parsed/loaded :
- /// False from the creation of the gdcm::Document untill
- /// gdcm::Document:Load()
+ /// \brief Whether the GDCM_NAME_SPACE::Document is already parsed/loaded :
+ /// False from the creation of the GDCM_NAME_SPACE::Document untill
+ /// GDCM_NAME_SPACE::Document:Load()
bool IsDocumentAlreadyLoaded; // FIXME : probabely useless now
- /// Whether the gdcm::Document was modified since the last Load()
+ /// Whether the GDCM_NAME_SPACE::Document was modified since the last Load()
bool IsDocumentModified;
private:
Module: $RCSfile: gdcmFileHelper.cxx,v $
Language: C++
- Date: $Date: 2008/06/12 13:18:15 $
- Version: $Revision: 1.137 $
+ Date: $Date: 2008/09/15 15:49:22 $
+ Version: $Revision: 1.138 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
These lines will be moved to the document-to-be 'User's Guide'
-// To read an image, user needs a gdcm::File
-gdcm::File *f = new gdcm::File(fileName);
+// To read an image, user needs a GDCM_NAME_SPACE::File
+GDCM_NAME_SPACE::File *f = new GDCM_NAME_SPACE::File(fileName);
// or (advanced) :
// user may also decide he doesn't want to load some parts of the header
-gdcm::File *f = new gdcm::File();
+GDCM_NAME_SPACE::File *f = new GDCM_NAME_SPACE::File();
f->SetFileName(fileName);
f->SetLoadMode(LD_NOSEQ); // or
f->SetLoadMode(LD_NOSHADOW); // or
// user can now check some values
std::string v = f->GetEntryValue(groupNb,ElementNb);
-// to get the pixels, user needs a gdcm::FileHelper
-gdcm::FileHelper *fh = new gdcm::FileHelper(f);
+// to get the pixels, user needs a GDCM_NAME_SPACE::FileHelper
+GDCM_NAME_SPACE::FileHelper *fh = new GDCM_NAME_SPACE::FileHelper(f);
// user may ask not to convert Palette (if any) to RGB
uint8_t *pixels = fh->GetImageDataRaw();
// He can now use the pixels, create a new image, ...
uint8_t *userPixels = ...
-//To re-write the image, user re-uses the gdcm::FileHelper
-gdcm::File *fh = new gdcm::FileHelper();
+//To re-write the image, user re-uses the GDCM_NAME_SPACE::FileHelper
+GDCM_NAME_SPACE::File *fh = new GDCM_NAME_SPACE::FileHelper();
fh->SetTypeToRaw(); // Even if it was possible to convert Palette to RGB
// (WriteMode is set)
ElementSet::WriteContent(fp, writetype);
writes recursively all DataElements
RestoreWrite();
- (moves back to the gdcm::File all the archived elements)
+ (moves back to the GDCM_NAME_SPACE::File all the archived elements)
*/
// Constructor / Destructor
/**
* \brief Constructor dedicated to deal with the *pixels* area of a ACR/DICOMV3
- * file (gdcm::File only deals with the ... header)
+ * file (GDCM_NAME_SPACE::File only deals with the ... header)
* Opens (in read only and when possible) an existing file and checks
* for DICOM compliance. Returns NULL on failure.
* It will be up to the user to load the pixels into memory
/**
* \brief canonical destructor
- * \note If the header (gdcm::File) was created by the FileHelper constructor,
+ * \note If the header (GDCM_NAME_SPACE::File) was created by the FileHelper constructor,
* it is destroyed by the FileHelper
*/
FileHelper::~FileHelper()
// Public
/**
- * \brief Sets the LoadMode of the internal gdcm::File as a boolean string.
+ * \brief Sets the LoadMode of the internal GDCM_NAME_SPACE::File as a boolean string.
* NO_SEQ, NO_SHADOW, NO_SHADOWSEQ ... (nothing more, right now)
* WARNING : before using NO_SHADOW, be sure *all* your files
* contain accurate values in the 0x0000 element (if any)
GetFile()->SetLoadMode( loadMode );
}
/**
- * \brief Sets the LoadMode of the internal gdcm::File
+ * \brief Sets the LoadMode of the internal GDCM_NAME_SPACE::File
* @param fileName name of the file to be open
*/
void FileHelper::SetFileName(std::string const &fileName)
-Probabely some more to be added.
--> Set it with FileHelper::SetContentType(int);
-gdcm::FileHelper::CheckMandatoryElements() deals automatically with these cases.
+GDCM_NAME_SPACE::FileHelper::CheckMandatoryElements() deals automatically with these cases.
1)2)3)4)
0008 0012 Instance Creation Date
Bellow follows the full description (hope so !) of the consistency checks performed
-by gdcm::FileHelper::CheckMandatoryElements()
+by GDCM_NAME_SPACE::FileHelper::CheckMandatoryElements()
-->'Media Storage SOP Class UID' (0x0002,0x0002)