X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvQDicomSeriesSelector.cxx;h=c1f821516be03f05f697cf00925bbf5040f5d5aa;hb=653bd3d5014f39b318c8d66f2532dde2c7e1879e;hp=f86efc28d769535c96872914426bb6c8e05a1456;hpb=a93034ff4e0f345e9d633bcb284b5ab5c7fd1bea;p=clitk.git diff --git a/vv/vvQDicomSeriesSelector.cxx b/vv/vvQDicomSeriesSelector.cxx index f86efc2..c1f8215 100644 --- a/vv/vvQDicomSeriesSelector.cxx +++ b/vv/vvQDicomSeriesSelector.cxx @@ -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 @@ -225,10 +225,10 @@ void vvDicomSeriesSelector::itemDetailsSelectionChanged() if (isize()) { 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(header)->GetEntryValue(group, elem)); #endif } //====================================================================