From: Vivien Delmon Date: Wed, 20 Apr 2011 09:34:42 +0000 (+0200) Subject: migration gdcm 2.0 Add macro for itkv3 compatibility X-Git-Tag: v1.2.0~29 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d18345ee8cc28fd83e4033c44faea5291ee96e30;p=clitk.git migration gdcm 2.0 Add macro for itkv3 compatibility * Forgot to include Print on gdcm::File into gdcm 2.0 Macro --- diff --git a/vv/vvQDicomSeriesSelector.cxx b/vv/vvQDicomSeriesSelector.cxx index 51f11a8..c1f8215 100644 --- a/vv/vvQDicomSeriesSelector.cxx +++ b/vv/vvQDicomSeriesSelector.cxx @@ -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 } //====================================================================