[med-svn] r22281 - trunk/packages/mriconvert/trunk/debian/patches
Gert Wollny
gert-guest at moszumanska.debian.org
Thu Jun 30 19:43:07 UTC 2016
Author: gert-guest
Date: 2016-06-30 19:43:06 +0000 (Thu, 30 Jun 2016)
New Revision: 22281
Added:
trunk/packages/mriconvert/trunk/debian/patches/gcc-6.patch
Modified:
trunk/packages/mriconvert/trunk/debian/patches/series
Log:
Add patch to compile with g++-6
Added: trunk/packages/mriconvert/trunk/debian/patches/gcc-6.patch
===================================================================
--- trunk/packages/mriconvert/trunk/debian/patches/gcc-6.patch (rev 0)
+++ trunk/packages/mriconvert/trunk/debian/patches/gcc-6.patch 2016-06-30 19:43:06 UTC (rev 22281)
@@ -0,0 +1,177 @@
+Description: compile with gcc-6
+Forwarded: no
+Bug-Debian: http://bugs.debian.org/811811
+Author: Gert Wollny <gw.fossdev at gmail.com>
+
+--- a/DicomFile.cpp
++++ b/DicomFile.cpp
+@@ -1046,7 +1046,9 @@
+
+ if ((element.tag > tag) || !input.good() || element.tag == DicomTag(0,0)) {
+ input.clear();
+- if (input == mInputFile) {
++
++ // it seems that this should always be true anyway
++ if (&input == &mInputFile) {
+ input.seekg(mBeginning);
+ }
+ else {
+--- a/DicomTree.cpp
++++ b/DicomTree.cpp
+@@ -154,7 +154,7 @@
+ if (!series->Find("SeriesNumber", number)) {
+ number = "0";
+ }
+- number = itos(stoi(number));
++ number = itos(jcs::stoi(number));
+ std::string protocol;
+ series->Find("ProtocolName", protocol);
+ std::string desc;
+--- a/DicomViewer.cpp
++++ b/DicomViewer.cpp
+@@ -243,7 +243,7 @@
+ int loc = e.value.find(delim);
+ std::string group = e.value.substr(0, loc);
+ std::string element = e.value.substr(loc + 1);
+- mpDicomList->SetItem(i, 4, wxString::Format(_T("(%.4x,%.4x)"), stoi(group), stoi(element)));
++ mpDicomList->SetItem(i, 4, wxString::Format(_T("(%.4x,%.4x)"), jcs::stoi(group), jcs::stoi(element)));
+ }
+ else {
+ // The use of From8BitData presumes Unicode encoding, true in the case of
+--- a/EnhancedMrHandler.cpp
++++ b/EnhancedMrHandler.cpp
+@@ -163,7 +163,7 @@
+ }
+
+ if (file.FindInSequence(*fc_it, "InStackPositionNumber", vals)) {
+- inStackPositions.push_back(stoi(vals.front()));
++ inStackPositions.push_back(jcs::stoi(vals.front()));
+ vals.clear();
+ }
+ else {
+@@ -172,7 +172,7 @@
+
+ double rescale_val;
+ if (pvt_found && file.FindInSequence(*pvt_it, "RescaleIntercept", vals)) {
+- intercepts.push_back(stof(vals.front()));
++ intercepts.push_back(jcs::stof(vals.front()));
+ vals.clear();
+ }
+ else {
+@@ -185,7 +185,7 @@
+ }
+
+ if (pvt_found && file.FindInSequence(*pvt_it, "RescaleSlope", vals)) {
+- slopes.push_back(stof(vals.front()));
++ slopes.push_back(jcs::stof(vals.front()));
+ vals.clear();
+ }
+ else if (file.Find("RescaleSlope", rescale_val)) {
+@@ -314,10 +314,10 @@
+ std::vector<double> r = GetRotationMatrix(*vols.begin());
+
+ for (std::set<VolId>::iterator it = vols.begin(); it != vols.end(); ++it) {
+- info.values.push_back(stof(bvalMap[*it]));
+- info.xGrads.push_back(stof(bvecMap[*it], 0));
+- info.yGrads.push_back(stof(bvecMap[*it], 1));
+- info.zGrads.push_back(stof(bvecMap[*it], 2));
++ info.values.push_back(jcs::stof(bvalMap[*it]));
++ info.xGrads.push_back(jcs::stof(bvecMap[*it], 0));
++ info.yGrads.push_back(jcs::stof(bvecMap[*it], 1));
++ info.zGrads.push_back(jcs::stof(bvecMap[*it], 2));
+ };
+
+ wxLogWarning(_("Warning: bvecs have NOT been verified as correct for enhanced MR DICOM files. If you would like to help with this, please email jolinda at uoregon.edu."));
+--- a/OutputterBase.cpp
++++ b/OutputterBase.cpp
+@@ -219,8 +219,8 @@
+ prefix.append("_");
+ }
+ // Any numbers should be padded out to at least 3 digits
+- if (itos(stoi(str)) == str) {
+- str = itos(stoi(str), 3);
++ if (itos(jcs::stoi(str)) == str) {
++ str = itos(jcs::stoi(str), 3);
+ }
+ prefix.append(str);
+ first = false;
+@@ -243,8 +243,8 @@
+ lookup = true;
+ if (series->Find(it->second.name, str)) {
+ // Any numbers should be padded out to at least 3 digits
+- if (itos(stoi(str)) == str) {
+- str = itos(stoi(str), 3);
++ if (itos(jcs::stoi(str)) == str) {
++ str = itos(jcs::stoi(str), 3);
+ }
+ prefix.append(wxString::From8BitData(str.c_str()));
+ }
+--- a/SyngoHandler.cpp
++++ b/SyngoHandler.cpp
+@@ -58,7 +58,7 @@
+ std::stringstream stream(mos_acq);
+ std::vector<double> acq_times;
+ while(getline(stream, word, '/')) {
+- acq_times.push_back(stof(word));
++ acq_times.push_back(jcs::stof(word));
+ }
+ sort(acq_times.begin(), acq_times.end());
+ duration = SeriesHandler::GetMeanVolumeInterval(acq_times);
+@@ -221,7 +221,7 @@
+ int err = file.ReadCSAImageHeader("B_value", bValue);
+
+ if (err > 0) {
+- info.values.push_back(stof(bValue));
++ info.values.push_back(jcs::stof(bValue));
+ }
+
+ err = file.ReadCSAImageHeader("DiffusionGradientDirection", gradDir);
+@@ -231,9 +231,9 @@
+ info.zGrads.push_back(0);
+ }
+ else {
+- info.xGrads.push_back(stof(gradDir.at(0)));
+- info.yGrads.push_back(stof(gradDir.at(1)));
+- info.zGrads.push_back(stof(gradDir.at(2)));
++ info.xGrads.push_back(jcs::stof(gradDir.at(0)));
++ info.yGrads.push_back(jcs::stof(gradDir.at(1)));
++ info.zGrads.push_back(jcs::stof(gradDir.at(2)));
+ }
+ }
+
+@@ -264,7 +264,7 @@
+ if (file.ReadCSAImageHeader("TimeAfterStart", str) <= 0) {
+ return retval;
+ }
+- time = stof(str);
++ time = jcs::stof(str);
+ vtmap[it->second.front()].push_back(time);
+ }
+ retval = CalculateVolIntVal(vtmap, 3);
+@@ -347,4 +347,4 @@
+ }
+
+ return v;
+-}
+\ No newline at end of file
++}
+--- a/SyngoMosaicHandler.cpp
++++ b/SyngoMosaicHandler.cpp
+@@ -150,7 +150,7 @@
+ wxLogError(_("Number of slices not provided"));
+ }
+ else {
+- n_slices = stoi(slices);
++ n_slices = jcs::stoi(slices);
+ }
+ }
+
+@@ -260,7 +260,7 @@
+ std::string str;
+ bool BottomUpMosaic = true;
+ if (ReadCSAImageHeader("ProtocolSliceNumber", str)) {
+- if (stoi(str) != 0) {
++ if (jcs::stoi(str) != 0) {
+ // we'll assume top down and not some weird order
+ BottomUpMosaic = false;
+ }
Modified: trunk/packages/mriconvert/trunk/debian/patches/series
===================================================================
--- trunk/packages/mriconvert/trunk/debian/patches/series 2016-06-30 18:50:44 UTC (rev 22280)
+++ trunk/packages/mriconvert/trunk/debian/patches/series 2016-06-30 19:43:06 UTC (rev 22281)
@@ -1 +1,2 @@
build-with-fPIC
+gcc-6.patch
More information about the debian-med-commit
mailing list