From d18345ee8cc28fd83e4033c44faea5291ee96e30 Mon Sep 17 00:00:00 2001 From: Vivien Delmon Date: Wed, 20 Apr 2011 11:34:42 +0200 Subject: [PATCH] migration gdcm 2.0 Add macro for itkv3 compatibility * Forgot to include Print on gdcm::File into gdcm 2.0 Macro --- vv/vvQDicomSeriesSelector.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 } //==================================================================== -- 2.47.1