]> Creatis software - clitk.git/blobdiff - common/clitkImageCommon.cxx
Merge branch 'master' into GammaIndex3D
[clitk.git] / common / clitkImageCommon.cxx
index f5a8d3c813fbdc1e873693369e29f032e4ae6117..83b9435854ef3f7bec71e764ccee787ba314e0f9 100644 (file)
@@ -3,7 +3,7 @@
 
   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
@@ -14,7 +14,7 @@
 
   - 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
@@ -58,30 +58,6 @@ void clitk::ReadImageDimensionAndPixelType(const std::string & filename,
 }
 //--------------------------------------------------------------------
 
-//--------------------------------------------------------------------
-// Read a dicom header
-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;
-  }
-  gdcm::File *header = new gdcm::File();
-  header->SetFileName(filename);
-  header->SetMaxSizeLoadEntry(16384); // required ?
-  header->Load();
-  return header;
-#endif
-}
-///--------------------------------------------------------------------
-
 //--------------------------------------------------------------------
 itk::ImageIOBase::Pointer clitk::readImageHeader(const std::string & filename, bool exit_on_error)
 {
@@ -125,11 +101,11 @@ void clitk::printImageHeader(itk::ImageIOBase::Pointer header, std::ostream & os
     for(unsigned int i=0; i< dim-1; i++)
       os << inputSize[i] << "x";
     os << inputSize[dim-1]
-       << "  ";
+       << " ";
     for(unsigned int i=0; i< dim-1; i++)
       os << inputSpacing[i] << "x";
     os << inputSpacing[dim-1]
-       << "  ";
+       << " ";
     for(unsigned int i=0; i< dim-1; i++)
       os << inputOrigin[i] << "x";
     os << inputOrigin[dim-1] << " ";