Program: gdcm
Module: $RCSfile: TestDataEntry.cxx,v $
Language: C++
- Date: $Date: 2005/10/20 08:58:15 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2005/10/20 15:24:05 $
+ 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
gdcm::DataEntry *entry;
//------------------------------------------------------------------
- dict = new gdcm::DictEntry(0x0000,0x0000);
+ dict = gdcm::DictEntry::New(0x0000,0x0000);
entry = new gdcm::DataEntry(dict);
dict->SetVR("US");
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: 1" << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: 2" << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: 0" << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
std::cout << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
//------------------------------------------------------------------
- dict = new gdcm::DictEntry(0x0000,0x0000);
+ dict = gdcm::DictEntry::New(0x0000,0x0000);
entry = new gdcm::DataEntry(dict);
dict->SetVR("LT");
<< " Size of string is incorrect" << std::endl
<< " Found: " << entry->GetLength()
<< " - Must be: " << strlen(data) + strlen(data)%2 << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: " << nbvalue << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
{
std::cout << " Failed" << std::endl
<< " Content of bin area is incorrect" << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of string is incorrect" << std::endl
<< " Found: " << entry->GetString().c_str()
<< " - Must be: " << data << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of entry's values is incorrect : id " << i << std::endl
<< " Found " << entry->GetValue(i)
<< " - Must be " << svalue[i] << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
}
std::cout << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
//------------------------------------------------------------------
- dict = new gdcm::DictEntry(0x0000,0x0000);
+ dict = gdcm::DictEntry::New(0x0000,0x0000);
entry = new gdcm::DataEntry(dict);
dict->SetVR("US");
<< " BinArea length is incorrect" << std::endl
<< " Found: " << entry->GetLength()
<< " - Must be: " << nbvalue*sizeof(uint16_t) << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of string is incorrect" << std::endl
<< " Found: " << entry->GetString().c_str()
<< " - Must be: " << data << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: " << nbvalue << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of entry's values is incorrect : id " << i << std::endl
<< " Found: " << entry->GetValue(i)
<< " - Must be: " << svalue[i] << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of string is incorrect" << std::endl
<< " Found: " << entry->GetString().c_str()
<< " - Must be: " << data << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: " << nbvalue << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of entry's values is incorrect : id " << i << std::endl
<< " Found: " << entry->GetValue(i)
<< " - Must be: " << svalue[i] << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
}
std::cout << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
//------------------------------------------------------------------
- dict = new gdcm::DictEntry(0x0000,0x0000);
+ dict = gdcm::DictEntry::New(0x0000,0x0000);
entry = new gdcm::DataEntry(dict);
dict->SetVR("UL");
<< " BinArea length is incorrect" << std::endl
<< " Found: " << entry->GetLength()
<< " - Must be: " << nbvalue*sizeof(uint32_t) << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of string is incorrect" << std::endl
<< " Found: " << entry->GetString().c_str()
<< " - Must be: " << data << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: " << nbvalue << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of entry's values is incorrect : id " << i << std::endl
<< " Found: " << entry->GetValue(i)
<< " - Must be: " << lvalue[i] << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of string is incorrect" << std::endl
<< " Found: " << entry->GetString().c_str()
<< " - Must be: " << data << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: " << nbvalue << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of entry's values is incorrect : id " << i << std::endl
<< " Found: " << entry->GetValue(i)
<< " - Must be: " << lvalue[i] << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
}
std::cout << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
//------------------------------------------------------------------
- dict = new gdcm::DictEntry(0x0000,0x0000);
+ dict = gdcm::DictEntry::New(0x0000,0x0000);
entry = new gdcm::DataEntry(dict);
dict->SetVR("FL");
<< " BinArea length is incorrect" << std::endl
<< " Found: " << entry->GetLength()
<< " - Must be: " << nbvalue*sizeof(float) << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of string is incorrect" << std::endl
<< " Found: " << entry->GetString().c_str()
<< " - Must be: " << fdata << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: " << nbvalue << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of entry's values is incorrect : id " << i << std::endl
<< " Found: " << entry->GetValue(i)
<< " - Must be: " << fvalue[i] << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of string is incorrect" << std::endl
<< " Found: " << entry->GetString().c_str()
<< " - Must be: " << fdata << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: " << nbvalue << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of entry's values is incorrect : id " << i << std::endl
<< " Found: " << entry->GetValue(i)
<< " - Must be: " << fvalue[i] << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
}
std::cout << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
//------------------------------------------------------------------
- dict = new gdcm::DictEntry(0x0000,0x0000);
+ dict = gdcm::DictEntry::New(0x0000,0x0000);
entry = new gdcm::DataEntry(dict);
dict->SetVR("FD");
<< " BinArea length is incorrect" << std::endl
<< " Found: " << entry->GetLength()
<< " - Must be: " << nbvalue*sizeof(double) << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of string is incorrect" << std::endl
<< " Found: " << entry->GetString().c_str()
<< " - Must be: " << fdata << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: " << nbvalue << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of entry's values is incorrect : id " << i << std::endl
<< " Found: " << entry->GetValue(i)
<< " - Must be: " << dvalue[i] << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of string is incorrect" << std::endl
<< " Found: " << entry->GetString().c_str()
<< " - Must be: " << fdata << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Number of content values is incorrect" << std::endl
<< " Found: " << entry->GetValueCount()
<< " - Must be: " << nbvalue << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
<< " Content of entry's values is incorrect : id " << i << std::endl
<< " Found: " << entry->GetValue(i)
<< " - Must be: " << dvalue[i] << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
return(1);
}
}
std::cout << std::endl;
- delete dict;
+ dict->Delete();
delete entry;
//------------------------------------------------------------------