]> Creatis software - clitk.git/blobdiff - vv/vvQDicomSeriesSelector.cxx
Modified DisplayChanged to master the logic of the image tree and
[clitk.git] / vv / vvQDicomSeriesSelector.cxx
index f86efc28d769535c96872914426bb6c8e05a1456..c1f821516be03f05f697cf00925bbf5040f5d5aa 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 VVDICOMSERIESSELECTOR_CXX
 #define VVDICOMSERIESSELECTOR_CXX
 #include <itkGDCMImageIO.h>
@@ -225,10 +225,10 @@ void vvDicomSeriesSelector::itemDetailsSelectionChanged()
   if (i<mFilenames->size()) {
     if (mDicomDetails[(*mFilenames)[i]] == "") {
       std::ostringstream s;
-      mDicomHeader[mCurrentSerie].GetFile().Print(s);
-
       QString l;
+
 #if GDCM_MAJOR_VERSION == 2
+      mDicomHeader[mCurrentSerie].GetFile().Print(s);
       const gdcm::File& header = mDicomHeader[mCurrentSerie].GetFile();
       gdcm::StringFilter sf;
       sf.SetFile( header );
@@ -255,6 +255,7 @@ void vvDicomSeriesSelector::itemDetailsSelectionChanged()
           }
         }
 #else
+      mDicomHeader[mCurrentSerie]->Print(s);
       gdcm::File * header = mDicomHeader[mCurrentSerie];
       gdcm::DocEntry * e = header->GetFirstEntry();
       while (e) {
@@ -355,7 +356,7 @@ QString vvDicomSeriesSelector::AddInfo(const gdcm::File *header, QString n, uint
   std::string s = sf.ToString( t );
   return AddInfo(n.toStdString(), s);
 #else
-  return AddInfo(n.toStdString(), header->GetEntryValue(group, elem));
+  return AddInfo(n.toStdString(), const_cast<gdcm::File*>(header)->GetEntryValue(group, elem));
 #endif
 }
 //====================================================================