Program: gdcm
Module: $RCSfile: PrintDocument.cxx,v $
Language: C++
- Date: $Date: 2005/07/06 15:49:31 $
- Version: $Revision: 1.16 $
+ Date: $Date: 2005/07/19 15:19:25 $
+ Version: $Revision: 1.17 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if (argc > 4)
e1->SetLoadMode(NO_SEQ | NO_SHADOW);
- e1->Load( fileName.c_str() );
+ e1->SetFileName( fileName.c_str() );
+ e1->Load( );
// we use PrintDocument, because we want to print what we get
Program: gdcm
Module: $RCSfile: TestCopyDicom.cxx,v $
Language: C++
- Date: $Date: 2005/07/08 12:02:02 $
- Version: $Revision: 1.25 $
+ Date: $Date: 2005/07/19 15:19:25 $
+ Version: $Revision: 1.26 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::cout << "--- Original ----------------------" << std::endl;
//original->GetFile()->Print();
- gdcm::FileHelper *copy = new gdcm::FileHelper( output );
+ gdcm::FileHelper *copy = new gdcm::FileHelper( );
+ copy->SetFileName( output );
+ copy->Load();
size_t dataSize = original->GetImageDataSize();
uint8_t *imageData = original->GetImageData();
Program: gdcm
Module: $RCSfile: exColorToRGB.cxx,v $
Language: C++
- Date: $Date: 2005/07/07 17:31:54 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2005/07/19 15:19:25 $
+ 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
// ------ without Sequences -------------
- gdcm::FileHelper *copy = new gdcm::FileHelper( output );
+ gdcm::FileHelper *copy = new gdcm::FileHelper( );
+ copy->SetFileName( output );
+ copy->Load();
gdcm::DocEntry *d = f->GetFirstEntry();
while(d)
Program: gdcm
Module: $RCSfile: exGC.cxx,v $
Language: C++
- Date: $Date: 2005/07/07 17:31:54 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2005/07/19 15:19:25 $
+ 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
// ------ without Sequences -------------
- gdcm::FileHelper *copy = new gdcm::FileHelper( output );
+ gdcm::FileHelper *copy = new gdcm::FileHelper( );
+ copy->SetFileName( output );
+ copy->Load();
gdcm::DocEntry *d = f->GetFirstEntry();
while(d)
Program: gdcm
Module: $RCSfile: exGrey2RGB.cxx,v $
Language: C++
- Date: $Date: 2005/07/07 17:31:54 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2005/07/19 15:19:25 $
+ 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
}
}
- gdcm::FileHelper *fh = new gdcm::FileHelper( filename );
+ gdcm::FileHelper *fh = new gdcm::FileHelper( );
+ fh->SetFileName( filename );
+ fh->Load();
size_t dataSize = fh->GetImageDataSize();
uint8_t *imageData = fh->GetImageData();
Program: gdcm
Module: $RCSfile: exImageLighten.cxx,v $
Language: C++
- Date: $Date: 2005/07/07 17:31:54 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2005/07/19 15:19:25 $
+ 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 a new gdcm::Filehelper, to hold new image.
// ============================================================
- gdcm::FileHelper *copy = new gdcm::FileHelper( output );
+ gdcm::FileHelper *copy = new gdcm::FileHelper( );
+ copy->SetFileName( output );
+ copy->Load();
// ============================================================
// Selective copy of the entries (including Pixel Element).
Program: gdcm
Module: $RCSfile: exReadWriteFile.cxx,v $
Language: C++
- Date: $Date: 2005/07/06 15:49:31 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2005/07/19 15:19:25 $
+ 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
// First, let's create a gdcm::File
// that will contain all the Dicom fields but the Pixels Element
- gdcm::File *f1= new gdcm::File( filename );
+ gdcm::File *f1= new gdcm::File( );
+ f1->SetFileName( filename );
+ f1->Load();
// Ask content to be printed
// ------ User wants write a new image without shadow groups -------------
- gdcm::FileHelper *copy = new gdcm::FileHelper( output );
+ gdcm::FileHelper *copy = new gdcm::FileHelper( );
+ copy->SetFileName( output );
+ copy->Load();
d = f1->GetFirstEntry();
while(d)
Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/07/12 17:08:12 $
- Version: $Revision: 1.148 $
+ Date: $Date: 2005/07/19 15:19:26 $
+ Version: $Revision: 1.149 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
f = new File( );
f->SetLoadMode(LoadMode); // we allow user not to load Sequences, or Shadow
// groups, or ......
- f->Load( it->c_str() );
+ f->SetFileName( it->c_str() );
+ /*int res = */f->Load( );
// if ( !f )
// {
Program: gdcm
Module: $RCSfile: gdcmFile.cxx,v $
Language: C++
- Date: $Date: 2005/07/19 14:43:48 $
- Version: $Revision: 1.250 $
+ Date: $Date: 2005/07/19 15:19:26 $
+ Version: $Revision: 1.251 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
NumPixel = 0x0010;
}
-/**
- * \brief Constructor
- * @param filename name of the file whose header we want to analyze
- */
-File::File( std::string const &filename )
- :Document( )
-{
- RLEInfo = new RLEFramesInfo;
- JPEGInfo = new JPEGFragmentsInfo;
-
- Load( filename ); // gdcm::Document is first Loaded, then the 'File part'
-}
/**
* \brief Canonical destructor.
// These are the deprecated method that one day should be removed (after the next release)
#ifndef GDCM_LEGACY_REMOVE
+/**
+ * \brief Constructor
+ * @param filename name of the file whose header we want to analyze
+ * @deprecated do not use anymore
+ */
+File::File( std::string const &filename )
+ :Document( )
+{
+ RLEInfo = new RLEFramesInfo;
+ JPEGInfo = new JPEGFragmentsInfo;
+
+ Load( filename ); // gdcm::Document is first Loaded, then the 'File part'
+}
+
/**
* \brief Loader. (DEPRECATED : not to break the API)
* @param fileName file to be open for parsing
Program: gdcm
Module: $RCSfile: gdcmFile.h,v $
Language: C++
- Date: $Date: 2005/07/19 14:44:57 $
- Version: $Revision: 1.109 $
+ Date: $Date: 2005/07/19 15:19:26 $
+ Version: $Revision: 1.110 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#ifndef GDCMFILE_H
#define GDCMFILE_H
+#include "gdcmDebug.h"
#include "gdcmDocument.h"
namespace gdcm
{
public:
File();
- File( std::string const &filename );
+ GDCM_LEGACY(File( std::string const &filename ));
~File();
// Loading
Module: $RCSfile: gdcmFileHelper.cxx,v $
Language: C++
- Date: $Date: 2005/07/11 08:30:39 $
- Version: $Revision: 1.48 $
+ Date: $Date: 2005/07/19 15:19:27 $
+ Version: $Revision: 1.49 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Initialize();
}
-/**
- * \brief DEPRECATED : use SetFilename() + Load() methods
- * Constructor dedicated to deal with the *pixels* area of a ACR/DICOMV3
- * file (gdcm::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
- * \note the in-memory representation of all available tags found in
- * the DICOM header is post-poned to first header information access.
- * This avoid a double parsing of public part of the header when
- * one sets an a posteriori shadow dictionary (efficiency can be
- * seen as a side effect).
- * @param filename file to be opened for parsing
- */
-FileHelper::FileHelper(std::string const &filename )
-{
- FileInternal = new File( filename );
- SelfHeader = true;
- Initialize();
-}
/**
* \brief canonical destructor
PixelReadConverter->Print(os);
}
+#ifndef GDCM_LEGACY_REMOVE
+/**
+ * \brief
+ * Constructor dedicated to deal with the *pixels* area of a ACR/DICOMV3
+ * file (gdcm::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
+ * \note the in-memory representation of all available tags found in
+ * the DICOM header is post-poned to first header information access.
+ * This avoid a double parsing of public part of the header when
+ * one sets an a posteriori shadow dictionary (efficiency can be
+ * seen as a side effect).
+ * @param filename file to be opened for parsing
+ * @deprecated use SetFilename() + Load() methods
+ */
+FileHelper::FileHelper(std::string const &filename )
+{
+ FileInternal = new File( filename );
+ SelfHeader = true;
+ Initialize();
+}
+#endif
//-----------------------------------------------------------------------------
} // end namespace gdcm
Program: gdcm
Module: $RCSfile: gdcmFileHelper.h,v $
Language: C++
- Date: $Date: 2005/07/08 14:36:48 $
- Version: $Revision: 1.18 $
+ Date: $Date: 2005/07/19 15:19:27 $
+ Version: $Revision: 1.19 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#ifndef GDCMFILEHELPER_H
#define GDCMFILEHELPER_H
-#include <iostream>
+#include "gdcmDebug.h"
#include "gdcmBase.h"
+//#include <iostream>
namespace gdcm
{
public:
FileHelper( );
FileHelper( File *header );
- FileHelper( std::string const &filename );
+ GDCM_LEGACY(FileHelper( std::string const &filename ));
virtual ~FileHelper();