Authors belong to:
- University of LYON http://www.universite-lyon.fr/
- - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
+ - Léon Bérard cancer center http://www.centreleonberard.fr
- CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
This software is distributed WITHOUT ANY WARRANTY; without even
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- ======================================================================-====*/
+ ===========================================================================**/
#ifndef CLITKIMAGECOMMON_CXX
#define CLITKIMAGECOMMON_CXX
gdcm::File * clitk::readDicomHeader(const std::string & filename,
const bool verbose)
{
+#if GDCM_MAJOR_VERSION == 2
+ gdcm::Reader hreader;
+ hreader.SetFileName(filename.c_str());
+ hreader.Read();
+ gdcm::SmartPointer<gdcm::File> p = hreader.GetFile();
+ return p;
+#else
if (verbose) {
std::cout << "Reading DICOM <" << filename << ">" << std::endl;
}
header->SetMaxSizeLoadEntry(16384); // required ?
header->Load();
return header;
+#endif
}
///--------------------------------------------------------------------