skip_shadow removed from gdcmHeader constructor and dependencies.
* Example/*.cxx and Test/*.cxx changed accordingly.
enable_sequences removed from gdcmHeader constructor and dependencies.
* Example/PrintHeader.cxx: fixed accordingly (enable_sequences removal).
* gdcmPython/demo/PrintHeader.py: dummy fix.
+ * src/gdcmDocument.[h|cxx], gdcmFile.[h|cxx], gdcmHeader.[h|cxx]:
+ skip_shadow removed from gdcmHeader constructor and dependencies.
+ * Example/*.cxx and Test/*.cxx changed accordingly.
2004-07-27 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
* Test/CMakeLists.txt: newly re-introduced SIEMENS_Sonata-12-MONO2-SQ.dcm
std::string fileName;
if (argc != 2) {
- std::cout << " Usage : " << argv[0]
- << " filename." << std::endl;
+ std::cout << " Usage : "
+ << argv[0]
+ << " filename."
+ << std::endl;
}
if (argc > 1) {
fileName += "/test.acr";
}
- e1= new gdcmHeader
- (fileName.c_str(),false, true);
+ e1= new gdcmHeader( fileName.c_str(), false );
e1->SetPrintLevel(2);
fileName += "/test.acr";
}
- e1= new gdcmHeader
- (fileName.c_str(),false, true);
+ e1= new gdcmHeader( fileName.c_str(), false );
f1 = new gdcmFile(e1);
int main(int argc, char* argv[])
{
- bool dropPriv = false;
std::string fileName;
- if (argc == 1) {
- std::cout << argv[0] <<
- " fileName" << std::endl <<
- " [nopriv] if you don't want to print Shadow groups" << std::endl;
+ if (argc == 1)
+ {
+ std::cout << argv[0] << " fileName" << std::endl;
}
- if (argc > 1) {
+ if (argc > 1)
+ {
fileName=argv[1];
- } else {
+ }
+ else
+ {
fileName += GDCM_DATA_ROOT;
fileName += "/test.acr";
}
- for (int j=0;j<argc;j++) {
- if (strcmp(argv[j],"nopriv")==0)
- dropPriv=true;
- }
-
- gdcmFile *e2 = new gdcmFile(fileName.c_str(),false, dropPriv);
+ gdcmFile *e2 = new gdcmFile( fileName.c_str(), false );
gdcmHeader *e1 = e2->GetHeader();
if (argc > 2) {
toto = argv[1];
- e1 = new gdcmHeader(toto.c_str(), false, true);
- if (!e1->IsReadable()) {
+ e1 = new gdcmHeader( toto.c_str(), false );
+ if (!e1->IsReadable())
+ {
std::cerr << "Sorry, not a Readable DICOM / ACR File" <<std::endl;
return 0;
}
toto = argv[1];
- e1 = new gdcmHeader(toto.c_str(), false, true);
+ e1 = new gdcmHeader( toto.c_str(), false );
if (!e1->IsReadable()) {
std::cerr << "Sorry, not a Readable DICOM / ACR File" <<std::endl;
return 0;
std::cout << argv[1] << std::endl;
- e1 = new gdcmHeader(toto, false, true);
+ e1 = new gdcmHeader( toto, false );
if (!e1->IsReadable()) {
std::cerr << "Sorry, " << toto <<" not a Readable DICOM / ACR File"
<<std::endl;
// --------------------- we read the written image
- e2 = new gdcmHeader(zozo, false, true);
+ e2 = new gdcmHeader( zozo, false );
if (!e2->IsReadable()) {
std::cerr << "Sorry, " << zozo << " not a Readable DICOM / ACR File"
<<std::endl;
{
string fileName = DataPath + i->first;
cout << Indent << "FileName: " << fileName << endl;
- gdcmHeader* tested = new gdcmHeader( fileName.c_str(), false, true );
+ gdcmHeader* tested = new gdcmHeader( fileName.c_str(), false );
if( !tested->IsReadable() )
{
cerr << Indent << "Image not gdcm compatible:"
std::cout << " Testing: " << filename << std::endl;
- gdcmFile* tested = new gdcmFile( filename, false, true );
+ gdcmFile* tested = new gdcmFile( filename, false );
if( !tested->GetHeader()->IsReadable() )
{
std::cout << " Image not gdcm compatible:"
////// When reference file is not gdcm readable test is failed:
- gdcmFile* reference = new gdcmFile( referenceFileName.c_str(),
- false, true );
+ gdcmFile* reference = new gdcmFile( referenceFileName.c_str(), false );
if( !reference->GetHeader()->IsReadable() )
{
std::cout << " Reference image " << std::endl
//////////////// Step 1 (see above description):
- gdcmHeader *header = new gdcmHeader( filename, false, true );
+ gdcmHeader *header = new gdcmHeader( filename, false );
if( !header->IsReadable() )
{
std::cerr << "Test::TestReadWriteReadCompare: Image not gdcm compatible:"
//////////////// Step 3:
- gdcmFile* reread = new gdcmFile( "TestReadWriteReadCompare.dcm",
- false, true );
+ gdcmFile* reread = new gdcmFile( "TestReadWriteReadCompare.dcm", false );
if( !reread->GetHeader()->IsReadable() )
{
std::cerr << "Test::TestReadWriteReadCompare: Could not reread image "
Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
- Date: $Date: 2004/07/30 11:40:13 $
- Version: $Revision: 1.60 $
+ Date: $Date: 2004/07/30 16:09:27 $
+ Version: $Revision: 1.61 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
gdcmDicomDir::gdcmDicomDir(std::string const & fileName, bool parseDir,
bool exception_on_error):
- gdcmDocument( fileName, exception_on_error, true) // true : enable SeQuences
+ gdcmDocument( fileName, exception_on_error)
{
// que l'on ai passe un root directory ou un DICOMDIR
// et quelle que soit la valeur de parseDir,
break;
}
- header = new gdcmHeader(it->c_str(),false,true);
- if(!header) {
- std::cout << "failure in new Header " << it->c_str() << std::endl; // JPR
- }
- if(header->IsReadable()) {
- list.push_back(header); // adds the file header to the chained list
- std::cout << "readable : " <<it->c_str() << std::endl; // JPR
- }
- else
+ header = new gdcmHeader( it->c_str(),false );
+ if( !header )
{
- delete header;
+ dbg.Verbose( 1,
+ "gdcmDicomDir::CreateDicomDirChainedList: "
+ "failure in new Header ",
+ it->c_str() );
}
- count++;
-
+ if( header->IsReadable() )
+ {
+ // Add the file header to the chained list:
+ list.push_back(header);
+ dbg.Verbose( 1,
+ "gdcmDicomDir::CreateDicomDirChainedList: readable ",
+ it->c_str() );
+ }
+ else
+ {
+ delete header;
+ }
+ count++;
}
+
// sorts Patient/Study/Serie/
std::sort(list.begin(), list.end(), gdcmDicomDir::HeaderLessThan );
Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2004/07/30 11:40:13 $
- Version: $Revision: 1.59 $
+ Date: $Date: 2004/07/30 16:09:27 $
+ 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
* \brief constructor
* @param inFilename file to be opened for parsing
* @param exception_on_error whether we throw an exception or not
- * @param ignore_shadow to allow skipping the shadow elements,
- * to save memory space.
*/
gdcmDocument::gdcmDocument( std::string const & filename,
- bool exception_on_error,
- bool ignore_shadow)
+ bool exception_on_error)
: gdcmElementSet(-1)
{
- IgnoreShadow = ignore_shadow;
SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE);
Filename = filename;
Initialise();
Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2004/07/30 11:40:13 $
- Version: $Revision: 1.24 $
+ Date: $Date: 2004/07/30 16:09:27 $
+ Version: $Revision: 1.25 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// gdcmDicomDir are meaningfull).
gdcmDocument(bool exception_on_error = false);
gdcmDocument(std::string const & filename,
- bool exception_on_error = false,
- bool ignore_shadow = false);
+ bool exception_on_error = false);
virtual ~gdcmDocument();
void gdcmDocument::Parse7FE0 ();
Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2004/07/30 11:40:13 $
- Version: $Revision: 1.117 $
+ Date: $Date: 2004/07/30 16:09:27 $
+ Version: $Revision: 1.118 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* seen as a side effect).
* @param filename file to be opened for parsing
* @param exception_on_error whether we throw an exception or not
- * @param ignore_shadow to allow skipping the shadow elements,
- * to save memory space.
*/
gdcmFile::gdcmFile(std::string const & filename,
- bool exception_on_error,
- bool ignore_shadow)
+ bool exception_on_error )
{
- Header = new gdcmHeader( filename,
- exception_on_error,
- ignore_shadow );
+ Header = new gdcmHeader( filename, exception_on_error );
SelfHeader = true;
PixelRead = -1; // no ImageData read yet.
Program: gdcm
Module: $RCSfile: gdcmFile.h,v $
Language: C++
- Date: $Date: 2004/07/30 11:40:13 $
- Version: $Revision: 1.39 $
+ Date: $Date: 2004/07/30 16:09:27 $
+ Version: $Revision: 1.40 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
public:
gdcmFile(gdcmHeader *header);
gdcmFile(std::string const & filename,
- bool exception_on_error = false,
- bool skip_shadow = false);
+ bool exception_on_error = false);
virtual ~gdcmFile();
Program: gdcm
Module: $RCSfile: gdcmHeader.cxx,v $
Language: C++
- Date: $Date: 2004/07/30 11:40:13 $
- Version: $Revision: 1.179 $
+ Date: $Date: 2004/07/30 16:09:27 $
+ Version: $Revision: 1.180 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* \brief Constructor
* @param filename name of the file whose header we want to analyze
* @param exception_on_error whether we want to throw an exception or not
- * @param ignore_shadow = true if user wants to skip shadow groups
- * during parsing, to save memory space
*/
gdcmHeader::gdcmHeader( std::string const & filename,
- bool exception_on_error,
- bool ignore_shadow ):
+ bool exception_on_error ):
gdcmDocument( filename,
- exception_on_error,
- ignore_shadow )
+ exception_on_error )
{
// for some ACR-NEMA images GrPixel, NumPixel is *not* 7fe0,0010
// We may encounter the 'RETired' (0x0028, 0x0200) tag
// Inside the group pointed by "Image Location" the searched element
// is conventionally the element 0x0010 (when the norm is respected).
// When the "Image Location" is absent we default to group 0x7fe0.
-
- // This IS the right place for the code
+ // Note: this IS the right place for the code
// Image Location
std::string imgLocation = GetEntryByNumber(0x0028, 0x0200);
Program: gdcm
Module: $RCSfile: gdcmHeader.h,v $
Language: C++
- Date: $Date: 2004/07/30 11:40:13 $
- Version: $Revision: 1.82 $
+ Date: $Date: 2004/07/30 16:09:27 $
+ Version: $Revision: 1.83 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
public:
gdcmHeader(bool exception_on_error = false);
gdcmHeader(std::string const & filename,
- bool exception_on_error = false,
- bool skip_shadow = false);
+ bool exception_on_error = false);
virtual ~gdcmHeader();
#include <vtkPointData.h>
#include <vtkLookupTable.h>
-vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.46 $");
+vtkCxxRevisionMacro(vtkGdcmReader, "$Revision: 1.47 $");
vtkStandardNewMacro(vtkGdcmReader);
//-----------------------------------------------------------------------------
fclose(fp);
// Stage 1.2: check for Gdcm parsability
- gdcmHeader GdcmHeader(FileName->c_str(), false, true);
- // true : for enableSequences
+ gdcmHeader GdcmHeader(FileName->c_str(), false );
if (!GdcmHeader.IsReadable())
{
vtkErrorMacro("Gdcm cannot parse file " << FileName->c_str());
unsigned long & UpdateProgressCount)
{
vtkDebugMacro("Copying to memory image [" << FileName.c_str() << "]");
- gdcmFile GdcmFile(FileName.c_str(),false,true);
- // true : to enable SeQuences
+ gdcmFile GdcmFile( FileName.c_str(), false );
size_t size;
// If the data structure of vtk for image/volume representation