From 8ecbe84efb64e3869ffaf0e3faa02608b8b3ebff Mon Sep 17 00:00:00 2001 From: mycae Date: Wed, 3 Aug 2016 21:34:00 -0400 Subject: [PATCH 1/7] * Update to 0.0.19 --- 3Depict-0.0.18-upstream.patch | 171 --- ...th.patch => 3Depict-0.0.19-font-path.patch | 0 ...tch => 3Depict-0.0.19-manual-pdf-loc.patch | 0 3Depict-0.0.19-upstream-effd078610a7.patch | 1243 +++++++++++++++++ 3Depict.spec | 31 +- 5 files changed, 1268 insertions(+), 177 deletions(-) delete mode 100644 3Depict-0.0.18-upstream.patch rename 3Depict-0.0.18-font-path.patch => 3Depict-0.0.19-font-path.patch (100%) rename 3Depict-0.0.18-manual-pdf-loc.patch => 3Depict-0.0.19-manual-pdf-loc.patch (100%) create mode 100644 3Depict-0.0.19-upstream-effd078610a7.patch diff --git a/3Depict-0.0.18-upstream.patch b/3Depict-0.0.18-upstream.patch deleted file mode 100644 index f52f426..0000000 --- a/3Depict-0.0.18-upstream.patch +++ /dev/null @@ -1,171 +0,0 @@ -diff -r 7510fdcc8b8a -r 185ccbce5421 src/3Depict.cpp ---- src/3Depict.cpp Mon Aug 25 14:41:48 2014 +0100 -+++ src/3Depict.cpp Mon Aug 25 14:42:29 2014 +0100 -@@ -39,6 +39,12 @@ - - class threeDepictApp: public wxApp { - private: -+#ifndef DEBUG -+ //instance of this class suppresses internal wx error dialogs. -+ // these are a nuisance in release code, as recovered errors often annoy the user -+ wxLogNull nullifyLogs; -+#endif -+ - MainWindowFrame* MainFrame ; - wxArrayString commandLineFiles; - wxLocale* usrLocale; -@@ -62,9 +68,6 @@ - void MacReopenFile(const wxString & fileName); - #endif - --#ifdef DEBUG -- void setEventloggerFile(const char *file); --#endif - }; - - //Check version is in place because wxT is deprecated for wx 2.9 -diff -r 185ccbce5421 -r c8ff86119e58 src/backend/filters/clusterAnalysis.cpp ---- src/backend/filters/clusterAnalysis.cpp Mon Aug 25 14:42:29 2014 +0100 -+++ src/backend/filters/clusterAnalysis.cpp Mon Aug 25 14:43:10 2014 +0100 -@@ -264,7 +264,7 @@ - - ClusterAnalysisFilter::ClusterAnalysisFilter() : algorithm(CLUSTER_LINK_ERODE), - enableCoreClassify(false), coreDist(0.0f), coreKNN(1), linkDist(0.5f), -- enableBulkLink(false), bulkLink(1), enableErosion(false), dErosion(0.25), -+ enableBulkLink(false), bulkLink(0.25), enableErosion(false), dErosion(0.25), - wantClusterID(false), wantCropSize(false), nMin(0),nMax(std::numeric_limits::max()), - wantClusterSizeDist(false),logClusterSize(false), - wantClusterComposition(true),normaliseComposition(true), -diff -r c8ff86119e58 -r 55ec5e056846 src/gui/mainFrame.cpp ---- src/gui/mainFrame.cpp Mon Aug 25 14:43:10 2014 +0100 -+++ src/gui/mainFrame.cpp Mon Aug 25 14:51:53 2014 +0100 -@@ -464,7 +464,7 @@ - fileExport->Append(ID_FILE_EXPORT_IMAGE, TRANS("&Image...\tCtrl+I"), TRANS("Export Current 3D View"), wxITEM_NORMAL); - fileExport->Append(ID_FILE_EXPORT_IONS, TRANS("Ion&s...\tCtrl+N"), TRANS("Export Ion Data"), wxITEM_NORMAL); - fileExport->Append(ID_FILE_EXPORT_RANGE, TRANS("Ran&ges...\tCtrl+G"), TRANS("Export Range Data"), wxITEM_NORMAL); -- fileExport->Append(ID_FILE_EXPORT_FILTER_ANIMATION, TRANS("&Animate Filters...\tCtrl+A"), TRANS("Export Animated Filter"), wxITEM_NORMAL); -+ fileExport->Append(ID_FILE_EXPORT_FILTER_ANIMATION, TRANS("&Animate Filters...\tCtrl+T"), TRANS("Export Animated Filter"), wxITEM_NORMAL); - fileExport->Append(ID_FILE_EXPORT_ANIMATION, TRANS("Ani&mate Camera...\tCtrl+M"), TRANS("Export Animated Camera"), wxITEM_NORMAL); - fileExport->Append(ID_FILE_EXPORT_PACKAGE, TRANS("Pac&kage...\tCtrl+K"), TRANS("Export analysis package"), wxITEM_NORMAL); - -diff -r 9d545342c3ad -r 3c853d1f5af7 src/backend/filters/externalProgram.cpp ---- src/backend/filters/externalProgram.cpp Mon Aug 25 14:52:42 2014 +0100 -+++ src/backend/filters/externalProgram.cpp Mon Aug 25 14:53:04 2014 +0100 -@@ -551,7 +551,7 @@ - - p.name=TRANS("Work Dir"); - p.data= workingDir; -- p.type=PROPERTY_TYPE_STRING; -+ p.type=PROPERTY_TYPE_DIR; - p.helpText=TRANS("Directory to run the command in"); - p.key=EXTERNALPROGRAM_KEY_WORKDIR; - propertyList.addProperty(p,curGroup); -diff -r 9d545342c3ad -r 3c853d1f5af7 src/common/constants.h ---- src/common/constants.h Mon Aug 25 14:52:42 2014 +0100 -+++ src/common/constants.h Mon Aug 25 14:53:04 2014 +0100 -@@ -57,6 +57,7 @@ - PROPERTY_TYPE_POINT3D, - PROPERTY_TYPE_CHOICE, - PROPERTY_TYPE_FILE, -+ PROPERTY_TYPE_DIR, - PROPERTY_TYPE_ENUM_END //Not a prop, just end of enum - }; - -diff -r 9d545342c3ad -r 3c853d1f5af7 src/wx/propertyGridUpdater.cpp ---- src/wx/propertyGridUpdater.cpp Mon Aug 25 14:52:42 2014 +0100 -+++ src/wx/propertyGridUpdater.cpp Mon Aug 25 14:53:04 2014 +0100 -@@ -61,7 +61,7 @@ - g->Append(new wxPropertyCategory(string("") + title,title)); - - -- //Set the children of thies property -+ //Set the children of this property - for(size_t uj=0;ujSetHelpString(fp.helpText); - -+ //add the property to the grid - g->Append(pgp); - - switch(fp.type) - { - case PROPERTY_TYPE_BOOL: - { -+ //if a bool property, use a checkbox to edit - g->SetPropertyEditor(pgp,wxPGEditor_CheckBox); - break; - } -diff -r 7372047ee6f9 src/common/basics.cpp ---- src/common/basics.cpp Sun Aug 03 16:58:06 2014 -0400 -+++ src/common/basics.cpp Sun Aug 03 17:01:04 2014 -0400 -@@ -1471,6 +1471,21 @@ - return 0; - } - -+bool isNotDirectory(const char *filename) -+{ -+ struct stat statbuf; -+ -+ if(stat(filename,&statbuf) == -1) -+ return false; -+ -+ return (statbuf.st_mode !=S_IFDIR); -+} -+ -+bool rmFile(const std::string &filename) -+{ -+ return remove(filename.c_str()) == 0; -+} -+ - #ifdef DEBUG - bool isValidXML(const char *filename) - { -@@ -1503,27 +1518,6 @@ - return true; - } - --#if !defined(__WIN32__) && !defined(__WIN64) - --bool isNotDirectory(const char *filename) --{ -- struct stat statbuf; -- -- if(stat(filename,&statbuf) == -1) -- return false; -- -- return (statbuf.st_mode !=S_IFDIR); --} -- --bool rmFile(const std::string &filename) --{ -- return remove(filename.c_str()) == 0; --} --#elif defined(__WIN32) || defined(__WIN64) --bool rmFile(const std::string &filename) --{ -- return DeleteFile((const wchar_t*)filename.c_str()) == 0; --} --#endif - - #endif diff --git a/3Depict-0.0.18-font-path.patch b/3Depict-0.0.19-font-path.patch similarity index 100% rename from 3Depict-0.0.18-font-path.patch rename to 3Depict-0.0.19-font-path.patch diff --git a/3Depict-0.0.18-manual-pdf-loc.patch b/3Depict-0.0.19-manual-pdf-loc.patch similarity index 100% rename from 3Depict-0.0.18-manual-pdf-loc.patch rename to 3Depict-0.0.19-manual-pdf-loc.patch diff --git a/3Depict-0.0.19-upstream-effd078610a7.patch b/3Depict-0.0.19-upstream-effd078610a7.patch new file mode 100644 index 0000000..34a4cc8 --- /dev/null +++ b/3Depict-0.0.19-upstream-effd078610a7.patch @@ -0,0 +1,1243 @@ +diff -r bcb9acfa66de -r effd078610a7 .hgtags +--- a/.hgtags Tue May 31 13:04:58 2016 +1000 ++++ b/.hgtags Tue Jun 21 12:45:20 2016 +0100 +@@ -16,3 +16,4 @@ + 9fcee7d53bc2a2b69db9dbe59c6f1264615a54e4 3Depict-0.0.16 + 19a65d51c5d65ebf3d8b7760cfa4edde36c251c0 3Depict-0.0.17 + 910618ab1f369c5a9253965e12f5d8f75fceb0c6 3Depict-0.0.18 ++bcb9acfa66de56f6531016d1e81a68d7118b7b35 3Depict-0.0.19 +diff -r bcb9acfa66de -r effd078610a7 docs/manual-latex/build-latex.sh +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/docs/manual-latex/build-latex.sh Tue Jun 21 12:45:20 2016 +0100 +@@ -0,0 +1,37 @@ ++#!/bin/bash ++LATEXBIN=pdflatex ++BIBTEXBIN=bibtex ++if [ x`which $LATEXBIN` == x"" ] ; then ++ echo "no $LATEXBIN" ++ exit 1 ++fi ++ ++if [ x`which $BIBTEXBIN` == x"" ] ; then ++ echo "no $BIBTEXBIN" ++ exit 1 ++fi ++ ++MANUAL=manual.tex ++ ++#check to see if the manual and its bib file are around ++if [ ! -f $MANUAL ] ; then ++ echo "$MANUAL is missing" ++ exit 1 ++fi ++ ++#Remove the old manul ++rm -f manual.pdf ++ ++ ++ ++#run the multi-pass latex build. ++$LATEXBIN $MANUAL || { echo "failed latex build (pass 1 of 2)"; exit 1 ; } ++$BIBTEXBIN `basename -s .tex $MANUAL` || { echo "failed bibtex build"; exit 1 ; } ++$LATEXBIN $MANUAL || { echo "failed latex build (pass 2 of 2)"; exit 1 ; } ++ ++ ++if [ ! -f manual.pdf ] ; then ++ echo "latex ran, but somehow we did not output the PDF...." ++ exit 1 ++fi ++ +diff -r bcb9acfa66de -r effd078610a7 src/backend/filter.cpp +--- a/src/backend/filter.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filter.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -553,7 +553,7 @@ + ASSERT(scatterIntensity.empty()); + + +- ASSERT(plotType < PLOT_TYPE_ENUM_END); ++ ASSERT(plotStyle < PLOT_TYPE_ENUM_END); + } + void RangeStreamData::checkSelfConsistent() const + { +diff -r bcb9acfa66de -r effd078610a7 src/backend/filter.h +--- a/src/backend/filter.h Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filter.h Tue Jun 21 12:45:20 2016 +0100 +@@ -395,7 +395,7 @@ + //Label for X, Y axes + std::string xLabel,yLabel; + +- unsigned int plotType; ++ unsigned int plotStyle; + + //!Structured XY data pairs for plotting curve + Array2D xyData; +diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/algorithms/rdf.cpp +--- a/src/backend/filters/algorithms/rdf.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filters/algorithms/rdf.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -862,6 +862,8 @@ + return RDF_ABORT_FAIL; + #endif + ++ *progressPtr=100; ++ + return 0; + } + +@@ -1003,6 +1005,8 @@ + #endif + + //Calculations complete! ++ *progressPtr=100; ++ + return 0; + } + +diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/annotation.cpp +--- a/src/backend/filters/annotation.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filters/annotation.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -167,8 +167,15 @@ + + //If we are not enabled, do not draw anything into the output + if(!active) ++ { ++ progress.filterProgress=100; + return 0; ++ } + ++ progress.step=1; ++ progress.maxStep=1; ++ progress.stepName=TRANS("Draw"); ++ + DrawStreamData *d; + d = new DrawStreamData; + d->parent=this; +@@ -505,6 +512,7 @@ + d->cached=0; + getOut.push_back(d); + ++ progress.filterProgress=100; + return 0; + } + +diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/boundingBox.cpp +--- a/src/backend/filters/boundingBox.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filters/boundingBox.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -510,7 +510,6 @@ + } + #endif + bTotal.expand(bThis); +- progress.filterProgress=100; + break; + } + default: +@@ -521,6 +520,7 @@ + getOut.push_back(dataIn[ui]); + } + ++ progress.filterProgress=100; + //Append the bounding box if it is valid + if(bTotal.isValid()) + { +diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/clusterAnalysis.cpp +--- a/src/backend/filters/clusterAnalysis.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filters/clusterAnalysis.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -685,7 +685,7 @@ + Plot2DStreamData *p = new Plot2DStreamData; + p->parent=this; + +- p->plotType=PLOT_2D_SCATTER; ++ p->plotStyle=PLOT_2D_SCATTER; + p->dataLabel=TRANS("Morphology Plot"); + p->xLabel=TRANS("\\lambda_1:\\lambda_2 ratio"); + p->yLabel=TRANS("\\lambda_2:\\lambda_3 ratio"); +diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionColour.cpp +--- a/src/backend/filters/ionColour.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filters/ionColour.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -271,12 +271,14 @@ + + + p.name=TRANS("Show Bar"); ++ p.helpText=TRANS("Display the colour legend in the 3D view"); + p.key=KEY_IONCOLOURFILTER_SHOWBAR; + p.data=boolStrEnc(showColourBar); + p.type=PROPERTY_TYPE_BOOL; + propertyList.addProperty(p,curGroup); + + p.name=TRANS("Opacity"); ++ p.helpText=TRANS("How see-through to make the legend (0- transparent, 1- solid)"); + p.key=KEY_IONCOLOURFILTER_ALPHA; + stream_cast(p.data,alpha); + p.type=PROPERTY_TYPE_REAL; +diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionDownsample.cpp +--- a/src/backend/filters/ionDownsample.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filters/ionDownsample.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -88,7 +88,7 @@ + rsdIncoming = new RangeStreamData; + *rsdIncoming=*c; + +- if(ionFractions.size() != c->rangeFile->getNumIons()) ++ if(ionFractions.size() != c->rangeFile->getNumIons()+1) + { + //set up some defaults; seeded from normal + ionFractions.resize(c->rangeFile->getNumIons()+1,fraction); +@@ -464,7 +464,8 @@ + + propertyList.setGroupTitle(curGroup,TRANS("Mode")); + curGroup++; +- if(rsdIncoming && perSpecies) ++ ++ if(rsdIncoming && perSpecies && rsdIncoming->enabledIons.size()) + { + unsigned int typeVal; + if(fixedNumOut) +diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionInfo.cpp +--- a/src/backend/filters/ionInfo.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filters/ionInfo.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -398,7 +398,7 @@ + + + //"Pairwise events" - where we perform an action if both +- //These ++ //these are set + if(wantIonCounts && wantVolume) + { + if(computedVol > sqrtf(std::numeric_limits::epsilon())) +@@ -420,6 +420,9 @@ + } + } + ++ ++ progress.filterProgress=100; ++ + return 0; + } + +diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/spatialAnalysis.cpp +--- a/src/backend/filters/spatialAnalysis.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filters/spatialAnalysis.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -655,115 +655,180 @@ + return ERR_FILE_READ_FAIL; + + +- +- progress.step=3; +- progress.stepName=TRANS("Build"); +- progress.filterProgress=0; +- +- //Build the search tree we will use to perform replacement +- K3DTreeMk2 tree; +- tree.resetPts(fileIons,false); +- if(!tree.build()) +- return ERR_ABORT_FAIL; +- BoundCube b; +- tree.getBoundCube(b); +- +- //map the offset of the nearest to +- //the tree ID +- vector nearestVec; +- nearestVec.resize(inIons.size()); +- +- //TODO: pair vector might be faster +- // as we can use it in sequence, and can use openmp +- map matchedMap; +- +- //Find the nearest point for all points in the dataset +- +- #pragma omp parallel for +- for(size_t ui=0;ui outIons; ++ if(inIons.empty() || fileIons.empty()) + { +- nearestVec[ui]=tree.findNearestUntagged(inIons[ui].getPos(),b,false); +- } +- +- float sqrReplaceTol=replaceTolerance*replaceTolerance; +- +- //Filter this to only points that had an NN within range +- #pragma omp parallel for +- for(size_t ui=0;ui outIons; +- switch(replaceMode) +- { +- case REPLACE_MODE_SUBTRACT: ++ ++ progress.step=3; ++ progress.stepName=TRANS("Build"); ++ progress.filterProgress=0; ++ ++ //TODO: Possible speed increase by finding the smaller of ++ // the two inputs, and using that to build the tree ++ ++ //Build the search tree we will use to perform replacement ++ K3DTreeMk2 tree; ++ tree.resetPts(fileIons,false); ++ if(!tree.build()) ++ return ERR_ABORT_FAIL; ++ BoundCube b; ++ tree.getBoundCube(b); ++ ++ //map the offset of the nearest to ++ //the tree ID ++ vector nearestVec; ++ nearestVec.resize(inIons.size()); ++ ++ //TODO: pair vector might be faster ++ // as we can use it in sequence, and can use openmp ++ map matchedMap; ++ ++ //Find the nearest point for all points in the dataset ++ // maps the ith ion in "inions" to the tree value ++ #pragma omp parallel for ++ for(size_t ui=0;ui matchedMap.size()) +- outIons.reserve(inIons.size()-matchedMap.size()); +- +- // +- #pragma omp parallel for +- for(unsigned int ui=0;ui::iterator it; +- it=matchedMap.find(ui); +- if(it != matchedMap.end()) +- continue; +- + #pragma omp critical +- outIons.push_back(inIons[ui]); ++ matchedMap[ui]=tree.getOrigIndex(nearestVec[ui]); + } +- break; + } +- case REPLACE_MODE_INTERSECT: ++ ++ nearestVec.clear(); ++ ++ ++ progress.step=4; ++ progress.stepName=TRANS("Compute"); ++ progress.filterProgress=0; ++ ++ ++ //now we have a map that matches as so: ++ // map ( "inIon" ID -> "fileIon" ID) ++ // inIon should be our "A" in "A operator B" ++ switch(replaceMode) + { +- outIons.reserve(matchedMap.size()); +- +- if(replaceMass) ++ case REPLACE_MODE_SUBTRACT: + { +- for(map::const_iterator it=matchedMap.begin();it!=matchedMap.end();++it) ++ //If no matches, A-0 = A. Just return input ++ if(matchedMap.empty()) + { +- outIons.push_back(fileIons[it->second]); +- ASSERT(fileIons[it->second].getPosRef().sqrDist(inIons[it->first].getPosRef()) < sqrReplaceTol); ++ outIons.swap(inIons); ++ break; + } ++ //In subtraction mode, we should have ++ // at least this many ions ++ if(inIons.size() > matchedMap.size()) ++ outIons.reserve(inIons.size()-matchedMap.size()); ++ ++ // ++ #pragma omp parallel for ++ for(unsigned int ui=0;ui::iterator it; ++ it=matchedMap.find(ui); ++ if(it != matchedMap.end()) ++ continue; ++ ++ #pragma omp critical ++ outIons.push_back(inIons[ui]); ++ } ++ break; + } +- else ++ case REPLACE_MODE_INTERSECT: + { +- for(map::const_iterator it=matchedMap.begin();it!=matchedMap.end();++it) ++ //Finish if no matches ++ if(matchedMap.empty()) ++ break; ++ ++ outIons.reserve(matchedMap.size()); ++ ++ if(replaceMass) + { +- outIons.push_back(inIons[it->first]); ++ for(map::const_iterator it=matchedMap.begin();it!=matchedMap.end();++it) ++ { ++ outIons.push_back(fileIons[it->second]); ++ ASSERT(fileIons[it->second].getPosRef().sqrDist(inIons[it->first].getPosRef()) < sqrReplaceTol); ++ } + } ++ else ++ { ++ for(map::const_iterator it=matchedMap.begin();it!=matchedMap.end();++it) ++ { ++ outIons.push_back(inIons[it->first]); ++ } ++ } ++ break; + } +- break; ++ case REPLACE_MODE_UNION: ++ { ++ outIons.swap(fileIons); ++ outIons.reserve(outIons.size() + fileIons.size() - matchedMap.size()); ++ map::const_iterator it=matchedMap.begin(); ++ ++ ++ for(unsigned int ui=0;uifirst == ui) ) ++ { ++ it++; ++ continue; ++ } ++ ++ ++ outIons.push_back(inIons[ui]); ++ } ++ ++ ++ break; ++ } ++ default: ++ ASSERT(false); + } +- case REPLACE_MODE_UNION: +- { +- ASSERT(false); +- break; +- } +- default: +- ASSERT(false); + } + + //Only output ions if any were found +@@ -2779,6 +2844,8 @@ + newD->data.resize(d->data.size()); + if(stopMode == STOP_MODE_NEIGHBOUR) + { ++ unsigned int nProg=0; ++ + bool spin=false; + #pragma omp parallel for shared(spin) + for(size_t uj=0;ujdata.size();uj++) +@@ -2811,14 +2878,15 @@ + } + + res.clear(); ++ #pragma atomic ++ nProg++; + + //Update progress as needed + if(!curProg--) + { + #pragma omp critical + { +- n+=NUM_CALLBACK/(nnMax); +- progress.filterProgress= (unsigned int)(((float)n/(float)totalDataSize)*100.0f); ++ progress.filterProgress= (unsigned int)(((float)nProg/(float)totalDataSize)*100.0f); + if(*Filter::wantAbort) + spin=true; + curProg=NUM_CALLBACK/(nnMax); +@@ -3063,9 +3131,10 @@ + IonStreamData *newD = new IonStreamData; + newD->parent=this; + +- //Adjust this number to provide more update thanusual, because we ++ //Adjust this number to provide more update than usual, because we + //are not doing an o(1) task between updates; yes, it is a hack +- unsigned int curProg=NUM_CALLBACK/(10*nnMax); ++ const unsigned int PROG_PER_PASS=NUM_CALLBACK/(10*nnMax); ++ unsigned int curProg=PROG_PER_PASS; + newD->data.reserve(d->data.size()); + if(stopMode == STOP_MODE_NEIGHBOUR) + { +@@ -3113,11 +3182,11 @@ + { + #pragma omp critical + { +- n+=NUM_CALLBACK/(nnMax); ++ n+=PROG_PER_PASS; + progress.filterProgress= (unsigned int)(((float)n/(float)totalDataSize)*100.0f); + if(*Filter::wantAbort) + spin=true; +- curProg=NUM_CALLBACK/(nnMax); ++ curProg=PROG_PER_PASS; + } + } + } +@@ -3263,6 +3332,8 @@ + break; + } + } ++ progress.filterProgress=100; ++ + //If we have bad points, let the user know. + if(!badPts.empty()) + { +@@ -4230,11 +4301,8 @@ + } + + //distance between search pt and found pt +- float sqrDistance; +- sqrDistance = searchTree.getPtRef(ptIdx).sqrDist(pSource[ui].getPosRef()); +- +- if(sqrDistance > DISTANCE_EPSILON) +- ptsFound.insert(ptIdx); ++ ++ ptsFound.insert(ptIdx); + } + + +@@ -4244,8 +4312,14 @@ + //Count the number of numerator and denominator ions, using the masses we set aside earlier + for(set::iterator it=ptsFound.begin(); it!=ptsFound.end(); ++it) + { ++ ++ //check that the distance is non-zero, to force no self-matching ++ float sqrDistance; ++ sqrDistance = searchTree.getPtRef(*it).sqrDist(pSource[ui].getPosRef()); ++ if(sqrDistance < DISTANCE_EPSILON) ++ continue; ++ + float ionMass; +- //check that the distance is non-zero, to force no self-matching + ionMass = dataMasses[searchTree.getOrigIndex(*it)]; + + unsigned int ionID; +@@ -4326,9 +4400,11 @@ + bool nnHistogramTest(); + bool rdfPlotTest(); + bool axialDistTest(); +-bool replaceTest(); ++bool replaceIntersectAndUnionTest(); + bool localConcTestRadius(); + bool localConcTestNN(); ++bool replaceSubtractTest(); ++bool replaceUnionTest(); + + bool SpatialAnalysisFilter::runUnitTests() + { +@@ -4343,8 +4419,15 @@ + + if(!axialDistTest()) + return false; +- if(!replaceTest()) ++ if(!replaceIntersectAndUnionTest()) + return false; ++ ++ if(!replaceSubtractTest()) ++ return false; ++ ++ if(!replaceUnionTest()) ++ return false; ++ + if(!localConcTestRadius()) + return false; + +@@ -4617,7 +4700,7 @@ + return true; + } + +-bool replaceTest() ++bool replaceIntersectAndUnionTest() + { + std::string ionFile=createTmpFilename(NULL,".pos"); + +@@ -4637,6 +4720,157 @@ + //Create a spatial analysis filter + SpatialAnalysisFilter *f=new SpatialAnalysisFilter; + f->setCaching(false); ++ //Set it to do a union calculation ++ bool needUp; ++ string s; ++ s=TRANS(SPATIAL_ALGORITHMS[ALGORITHM_REPLACE]); ++ TEST(f->setProperty(KEY_ALGORITHM,s,needUp),"Set prop"); ++ TEST(f->setProperty(KEY_REPLACE_FILE,ionFile,needUp),"Set prop"); ++ s="1"; ++ TEST(f->setProperty(KEY_REPLACE_VALUE,s,needUp),"Set prop"); ++ ++ vector opVec; ++ opVec.push_back(REPLACE_MODE_INTERSECT); ++ opVec.push_back(REPLACE_MODE_UNION); ++ ++ ProgressData p; ++ vector streamIn,streamOut; ++ streamIn.push_back(d); ++ for(unsigned int opId=0;opIdsetProperty(KEY_REPLACE_ALGORITHM,s,needUp),"Set prop"); ++ ++ //Do the refresh ++ TEST(!f->refresh(streamIn,streamOut,p),"refresh OK"); ++ ++ TEST(streamOut.size() == 1,"stream count"); ++ TEST(streamOut[0]->getStreamType() == STREAM_TYPE_IONS,"stream type"); ++ TEST(streamOut[0]->getNumBasicObjects() == NIONS,"Number objects"); ++ ++ //we should have taken the mass-to-charge from the file ++ const IonStreamData *outIons = (const IonStreamData*)streamOut[0]; ++ for(unsigned int ui=0;uidata[ui].getMassToCharge() == 1); ++ } ++ delete streamOut[0]; ++ streamOut.clear(); ++ } ++ delete f; ++ delete d; ++ ++ wxRemoveFile(ionFile); ++ ++ ++ return true; ++} ++ ++bool replaceSubtractTest() ++{ ++ std::string ionFile=createTmpFilename(NULL,".pos"); ++ ++ vector ions; ++ const unsigned int NIONS=10; ++ const unsigned int DIFF_COUNT=5; ++ for(unsigned int ui=0;ui tmpI; ++ for(unsigned int ui=0;uidata.swap(ions); ++ ++ //Create a spatial analysis filter ++ SpatialAnalysisFilter *f=new SpatialAnalysisFilter; ++ f->setCaching(false); ++ ++ //Set it to do a subtraction calculation ++ bool needUp; ++ string s; ++ s=TRANS(SPATIAL_ALGORITHMS[ALGORITHM_REPLACE]); ++ TEST(f->setProperty(KEY_ALGORITHM,s,needUp),"Set prop"); ++ TEST(f->setProperty(KEY_REPLACE_FILE,ionFile,needUp),"Set prop"); ++ s=TRANS(REPLACE_ALGORITHMS[REPLACE_MODE_SUBTRACT]); ++ TEST(f->setProperty(KEY_REPLACE_ALGORITHM,s,needUp),"Set prop"); ++ ++ //Do the refresh ++ ProgressData p; ++ vector streamIn,streamOut; ++ streamIn.push_back(d); ++ TEST(!f->refresh(streamIn,streamOut,p),"refresh OK"); ++ delete f; ++ delete d; ++ streamIn.clear(); ++ ++ TEST(streamOut.size() == 1,"stream count"); ++ TEST(streamOut[0]->getStreamType() == STREAM_TYPE_IONS,"stream type"); ++ TEST(streamOut[0]->getNumBasicObjects() == DIFF_COUNT,"Number objects"); ++ ++ //we should have taken the mass-to-charge from the original data, ++ // not the file ++ const IonStreamData *outIons = (const IonStreamData*)streamOut[0]; ++ for(unsigned int ui=0;uigetNumBasicObjects(); ui++) ++ { ++ ASSERT(outIons->data[ui].getMassToCharge() == 1); ++ ASSERT(outIons->data[ui].getPos()[2] >= 0); ++ } ++ ++ wxRemoveFile(ionFile); ++ ++ delete streamOut[0]; ++ ++ return true; ++} ++ ++bool replaceUnionTest() ++{ ++ std::string ionFile=createTmpFilename(NULL,".pos"); ++ ++ //"B" dataset ++ vector ions; ++ ions.push_back(IonHit(Point3D(0,0,0),1)); ++ ions.push_back(IonHit(Point3D(1,0,1),1)); ++ ions.push_back(IonHit(Point3D(0,1,1),1)); ++ ++ IonHit::makePos(ions,ionFile.c_str()); ++ ions.clear(); ++ ++ //"A" dataset ++ ions.push_back(IonHit(Point3D(0,0,0),2)); ++ ions.push_back(IonHit(Point3D(1,0,-1),2)); ++ ions.push_back(IonHit(Point3D(0,1,-1),2)); ++ ++ ++ IonStreamData *d = new IonStreamData; ++ d->data.swap(ions); ++ ++ //Create a spatial analysis filter ++ SpatialAnalysisFilter *f=new SpatialAnalysisFilter; ++ f->setCaching(false); + + //Set it to do a union calculation + bool needUp; +@@ -4644,13 +4878,11 @@ + s=TRANS(SPATIAL_ALGORITHMS[ALGORITHM_REPLACE]); + TEST(f->setProperty(KEY_ALGORITHM,s,needUp),"Set prop"); + TEST(f->setProperty(KEY_REPLACE_FILE,ionFile,needUp),"Set prop"); +- s=TRANS(REPLACE_ALGORITHMS[REPLACE_MODE_INTERSECT]); ++ s=TRANS(REPLACE_ALGORITHMS[REPLACE_MODE_UNION]); + TEST(f->setProperty(KEY_REPLACE_ALGORITHM,s,needUp),"Set prop"); +- + s="1"; + TEST(f->setProperty(KEY_REPLACE_VALUE,s,needUp),"Set prop"); + +- + //Do the refresh + ProgressData p; + vector streamIn,streamOut; +@@ -4662,14 +4894,16 @@ + + TEST(streamOut.size() == 1,"stream count"); + TEST(streamOut[0]->getStreamType() == STREAM_TYPE_IONS,"stream type"); +- TEST(streamOut[0]->getNumBasicObjects() == NIONS,"Number objects"); +- +- //we should have taken the mass-to-charge from the file ++ TEST(streamOut[0]->getNumBasicObjects() == 5,"Number objects"); ++ ++ //There should be + const IonStreamData *outIons = (const IonStreamData*)streamOut[0]; +- for(unsigned int ui=0;uigetNumBasicObjects(); ui++) + { +- ASSERT(outIons->data[ui].getMassToCharge() == 1); ++ sumV+=outIons->data[ui].getMassToCharge(); + } ++ TEST( EQ_TOL(sumV,7.0f),"mass-to-charge check"); + + wxRemoveFile(ionFile); + +@@ -4678,7 +4912,6 @@ + return true; + } + +- + //--- Local concentration tests -- + const IonStreamData *createLCIonStream() + { +diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/spectrumPlot.cpp +--- a/src/backend/filters/spectrumPlot.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filters/spectrumPlot.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -517,6 +517,8 @@ + + getOut.push_back(d); + ++ progress.filterProgress=100; ++ + return 0; + } + +diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/transform.cpp +--- a/src/backend/filters/transform.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/filters/transform.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -998,8 +998,10 @@ + break; + } + ++ } + } +- } ++ ++ progress.filterProgress=100; + } + else + { +@@ -1526,6 +1528,11 @@ + case KEY_CROP_MINIMUM: + { + ASSERT(scalarParams.size() ==2); ++ float tmp; ++ if(stream_cast(tmp,value) || tmp >=scalarParams[1]) ++ return false; ++ ++ + if(!applyPropertyNow(scalarParams[0],value,needUpdate)) + return false; + break; +@@ -1533,6 +1540,9 @@ + case KEY_CROP_MAXIMUM: + { + ASSERT(scalarParams.size() ==2); ++ float tmp; ++ if(stream_cast(tmp,value) || tmp <=scalarParams[0]) ++ return false; + if(!applyPropertyNow(scalarParams[1],value,needUpdate)) + return false; + break; +diff -r bcb9acfa66de -r effd078610a7 src/backend/plot.cpp +--- a/src/backend/plot.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/plot.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -29,7 +29,7 @@ + NTRANS("Moving avg.") + }; + +-const char *plotTypeStrings[]= { ++const char *traceStyleStrings[]= { + NTRANS("Lines"), + NTRANS("Bars"), + NTRANS("Steps"), +@@ -119,15 +119,15 @@ + string plotString(unsigned int plotMode) + { + ASSERT(plotMode< PLOT_TYPE_ENUM_END); +- return TRANS(plotTypeStrings[plotMode]); ++ return TRANS(traceStyleStrings[plotMode]); + } + + unsigned int plotID(const std::string &plotString) + { +- COMPILE_ASSERT(THREEDEP_ARRAYSIZE(plotTypeStrings) == PLOT_TYPE_ENUM_END); ++ COMPILE_ASSERT(THREEDEP_ARRAYSIZE(traceStyleStrings) == PLOT_TYPE_ENUM_END); + for(unsigned int ui=0;uigetPlotMode(); ++} ++ + void PlotWrapper::getVisibleIDs(vector &visiblePlotIDs ) const + { + +@@ -791,7 +797,7 @@ + if(!plottingData[ui]->visible) + continue; + +- if(plottingData[ui]->getType()!= PLOT_MODE_1D) ++ if(plottingData[ui]->getMode()!= PLOT_MODE_1D) + continue; + + if(((Plot1D*)plottingData[ui])->wantLogPlot()) +@@ -809,7 +815,7 @@ + float minYVal=0.1; + for(size_t ui=0;uivisible || plottingData[ui]->getType() !=PLOT_MODE_1D) ++ if(!plottingData[ui]->visible || plottingData[ui]->getMode() !=PLOT_MODE_1D) + continue; + + float tmp ; +@@ -929,7 +935,7 @@ + Plot2DFunc *curPlot; + curPlot=(Plot2DFunc*)plottingData[ui]; + +- if(curPlot->getType() == PLOT_2D_DENS) ++ if(curPlot->getMode() == PLOT_2D_DENS) + { + wantColourbar=true; + } +@@ -1047,11 +1053,6 @@ + plottingData[plotIDHandler.getPos(plotId)]->regionGroup.getRegion(regionId,region); + } + +-unsigned int PlotWrapper::plotType(unsigned int plotId) const +-{ +- return plottingData[plotIDHandler.getPos(plotId)]->getPlotMode(); +-} +- + + void PlotWrapper::moveRegion(unsigned int plotID, unsigned int regionId, bool regionSelfUpdate, + unsigned int movementType, float newX, float newY) const +@@ -1135,7 +1136,7 @@ + + void PlotBase::copyBase(PlotBase *target) const + { +- target->plotType=plotType; ++ target->traceStyle=traceStyle; + target->minX=minX; + target->maxX=maxX; + target->minY=minY; +@@ -1157,12 +1158,12 @@ + + unsigned int PlotBase::getType() const + { +- return plotType; ++ return traceStyle; + } + + unsigned int PlotBase::getMode() const + { +- switch(plotType) ++ switch(traceStyle) + { + case PLOT_LINE_LINES: + case PLOT_LINE_BARS: +@@ -1181,7 +1182,7 @@ + Plot1D::Plot1D() + { + //Set the default plot properties +- plotType=PLOT_LINE_LINES; ++ traceStyle=PLOT_LINE_LINES; + plotMode=PLOT_MODE_1D; + xLabel=""; + yLabel=""; +@@ -1489,7 +1490,7 @@ + + + //Plot the appropriate form +- switch(plotMode) ++ switch(traceStyle) + { + case PLOT_LINE_LINES: + //Unfortunately, when using line plots, mathgl moves the data points to the plot boundary, +@@ -1632,7 +1633,7 @@ + Plot2DFunc::Plot2DFunc() + { + plotMode = PLOT_MODE_2D; +- plotType=PLOT_2D_DENS; ++ traceStyle=PLOT_2D_DENS; + } + + void Plot2DFunc::setData(const Array2D &a, +@@ -1705,7 +1706,8 @@ + + Plot2DScatter::Plot2DScatter() + { +- plotType=PLOT_2D_SCATTER; ++ plotMode=PLOT_2D_SCATTER; ++ traceStyle=PLOT_LINE_POINTS; + scatterIntensityLog=false; + } + +diff -r bcb9acfa66de -r effd078610a7 src/backend/plot.h +--- a/src/backend/plot.h Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/plot.h Tue Jun 21 12:45:20 2016 +0100 +@@ -217,7 +217,7 @@ + class PlotBase + { + protected: +- //!Sub type of plot (eg lines, bars for 1D) ++ //!Type of plot + unsigned int plotMode; + //!xaxis label + std::string xLabel; +@@ -229,8 +229,9 @@ + //plot colour (for single coloured plots) + float r,g,b; + +- //The type of plot (ie what class is it?) +- unsigned int plotType; ++ //The sub-style of the plot trace (eg lines, points, bars, etc) ++ // FIXME: This is badly named, change to traceStyle, or dataStyle, or something ++ unsigned int traceStyle; + + void copyBase(PlotBase *target) const; + +@@ -297,8 +298,12 @@ + void setStrings(const std::string &x, + const std::string &y,const std::string &t); + ++ //Set the colour of the plot trace + void setColour(float rNew, float gNew, float bNew); + ++ //set the visual style for the trace (dots, lines, etc) ++ void setTraceStyle(unsigned int newStyle) { traceStyle=newStyle;} ++ + std::string getXLabel() const { return xLabel;} + std::string getTitle() const { return title;} + std::string getYLabel() const { return yLabel;} +@@ -309,6 +314,7 @@ + void setPlotMode(unsigned int newMode) { plotMode= newMode;} + + ++ //get the colour of the trace + void getColour(float &r, float &g, float &b) const ; + + #ifdef DEBUG +@@ -613,7 +619,7 @@ + + + //!obtain the type of a plot, given the plot's uniqueID +- unsigned int plotType(unsigned int plotId) const; ++ unsigned int getPlotMode(unsigned int plotId) const; + + //Retrieve the types of visible plots + unsigned int getVisibleMode() const; +diff -r bcb9acfa66de -r effd078610a7 src/backend/viscontrol.cpp +--- a/src/backend/viscontrol.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/backend/viscontrol.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -249,7 +249,7 @@ + plotData->yLabel,plotData->dataLabel); + + //set the appearance of the plot +- //plotNew->setTraceStyle(plotStyle); ++ plotNew->setTraceStyle(plotData->plotStyle); + plotNew->setColour(plotData->r,plotData->g,plotData->b); + + +@@ -275,7 +275,7 @@ + unsigned int plotID; + + PlotBase *plotNew; +- switch(plotData->plotType) ++ switch(plotData->plotStyle) + { + case PLOT_2D_DENS: + { +diff -r bcb9acfa66de -r effd078610a7 src/common/basics.cpp +--- a/src/common/basics.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/common/basics.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -1347,7 +1347,8 @@ + while(CFile.good() && !CFile.eof() && atHeader) + { + //Grab a line from the file +- CFile.getline(inBuffer,BUFFER_SIZE); ++ if(!CFile.getline(inBuffer,BUFFER_SIZE)) ++ break; + + if(!CFile.good()) + return ERR_FILE_FORMAT; +@@ -1457,10 +1458,8 @@ + + } + //Grab a line from the file +- CFile.getline(inBuffer,BUFFER_SIZE); +- +- if(!CFile.good() && !CFile.eof()) +- return ERR_FILE_FORMAT; ++ if(!CFile.getline(inBuffer,BUFFER_SIZE)) ++ break; + } + + return 0; +diff -r bcb9acfa66de -r effd078610a7 src/gui/mainFrame.cpp +--- a/src/gui/mainFrame.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/gui/mainFrame.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -1391,7 +1391,7 @@ + updateWxTreeCtrl(treeFilters); + + if(!noUpdate) +- return doSceneUpdate(true); ++ doSceneUpdate(true); + + return true; + } +@@ -3834,7 +3834,7 @@ + + } + +-bool MainWindowFrame::doSceneUpdate(bool ensureVisible) ++void MainWindowFrame::doSceneUpdate(bool ensureVisible) + { + //Update scene + ASSERT(!currentlyUpdatingScene); +@@ -3864,6 +3864,11 @@ + ensureResultVisible=ensureVisible; + + ASSERT(!refreshControl); ++ ++ //Hack to prevent crash on double-refresh ++ if(refreshControl) ++ return; ++ + refreshControl = new RefreshController(visControl.state.treeState); + refreshThread=new RefreshThread(this,refreshControl); + progressTimer->Start(PROGRESS_TIMER_DELAY); +@@ -3871,7 +3876,8 @@ + refreshThread->Create(); + refreshThread->Run(); + +- return true; ++ cerr << "Updating scene complete"<< endl; ++ return; + } + + void MainWindowFrame::updateWxTreeCtrl( wxTreeCtrl *t, const Filter *f) +@@ -3971,6 +3977,11 @@ + ASSERT(!visControl.state.treeState.isRefreshing()); + progressTimer->Stop(); + ++ //Hack to prevent crash on re-entry during refresh. Should never trigger. ++ if(!refreshControl) ++ return; ++ ++ + vector > consoleMessages; + consoleMessages=refreshControl->getConsoleMessages(); + +diff -r bcb9acfa66de -r effd078610a7 src/gui/mainFrame.h +--- a/src/gui/mainFrame.h Tue May 31 13:04:58 2016 +1000 ++++ b/src/gui/mainFrame.h Tue Jun 21 12:45:20 2016 +0100 +@@ -124,7 +124,7 @@ + //!Update the progress information in the status bar + void updateProgressStatus(); + //!Perform an update to the 3D Scene. Returns false if refresh failed +- bool doSceneUpdate(bool ensureResultVisible=false); ++ void doSceneUpdate(bool ensureResultVisible=false); + + //!Complete the scene update. Returns false if failed + void finishSceneUpdate(unsigned int errCode); +diff -r bcb9acfa66de -r effd078610a7 src/gui/mathglPane.cpp +--- a/src/gui/mathglPane.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/gui/mathglPane.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -627,7 +627,7 @@ + thePlot->getRegion(plotId,regionId,r); + + //TODO: Implement a more generic region handler? +- ASSERT(thePlot->plotType(plotId) == PLOT_MODE_1D); ++ ASSERT(thePlot->getPlotMode(plotId) == PLOT_MODE_1D); + + float mglStartX,mglStartY; + toPlotCoords(draggingStart.x, draggingStart.y,mglStartX,mglStartY); +@@ -1471,7 +1471,7 @@ + return; + + +- ASSERT(thePlot->plotType(startMousePlot) == PLOT_MODE_1D); ++ ASSERT(thePlot->getPlotMode(startMousePlot) == PLOT_MODE_1D); + + //See where extending the region is allowed up to. + thePlot->findRegionLimit(startMousePlot,startMouseRegion, +@@ -1550,7 +1550,7 @@ + { + //This needs to be extended to support more + //plot types. +- ASSERT(thePlot->plotType(startMousePlot) == PLOT_MODE_1D); ++ ASSERT(thePlot->getPlotMode(startMousePlot) == PLOT_MODE_1D); + + //Draw "ghost" limits markers for move, + //these appear as moving vertical bars to outline +diff -r bcb9acfa66de -r effd078610a7 src/wx/wxcomponents.cpp +--- a/src/wx/wxcomponents.cpp Tue May 31 13:04:58 2016 +1000 ++++ b/src/wx/wxcomponents.cpp Tue Jun 21 12:45:20 2016 +0100 +@@ -188,14 +188,14 @@ + + void CopyGrid::saveData() + { +- wxFileDialog *wxF = new wxFileDialog(this,TRANS("Save Data..."), wxT(""), ++ wxFileDialog wxF(this,TRANS("Save Data..."), wxT(""), + wxT(""),TRANS("Text File (*.txt)|*.txt|All Files (*)|*"),wxFD_SAVE); + +- if( (wxF->ShowModal() == wxID_CANCEL)) ++ if( (wxF.ShowModal() == wxID_CANCEL)) + return; + + +- std::string dataFile = stlStr(wxF->GetPath()); ++ std::string dataFile = stlStr(wxF.GetPath()); + ofstream f(dataFile.c_str()); + + if(!f) diff --git a/3Depict.spec b/3Depict.spec index 7427521..03a4d45 100644 --- a/3Depict.spec +++ b/3Depict.spec @@ -1,6 +1,6 @@ Name: 3Depict -Version: 0.0.18 -Release: 6%{?dist} +Version: 0.0.19 +Release: 1%{?dist} Summary: Valued 3D point cloud visualization and analysis Group: Applications/Engineering @@ -37,9 +37,8 @@ BuildRequires: qhull-devel Patch0: %{name}-%{version}-manual-pdf-loc.patch #Fedora specific font dir Patch1: %{name}-%{version}-font-path.patch -#Fix gcc6 compilation -Patch2: %{name}-gcc6.patch - +#Upstream post-release patches from hg repo +Patch2: %{name}-%{version}-upstream-effd078610a7.patch %description This software is designed to help users visualize and analyze 3D point clouds @@ -53,7 +52,17 @@ useful for general scalar valued point data purposes. %patch0 %patch1 -%patch2 -p1 -b .gcc6 +%patch2 + +%if 0%{?fedora} > 24 +# Installation directory has changed +sed -i -e 's,qhull/qhull_a.h,libqhull/qhull_a.h,' \ + src/backend/filters/filterCommon.h \ + src/backend/filters/algorithms/rdf.cpp \ + configure configure.ac +# Avoid rerunning the autotools +touch -r aclocal.m4 configure configure.ac +%endif %build #Due to bug 1077718, wx-config cannot be specified, due to @@ -111,6 +120,15 @@ mv docs/manual-latex/manual.pdf %{name}-%{version}-manual.pdf %changelog +* Wed Jun 01 2016 D Haley - 0.0.19-1 +- Update to 0.0.19 +- Remove gcc patch, fixed upstream +- Add upstream patch + +* Fri Apr 29 2016 Ralf Corsépius - 0.0.18-7 +- Rebuild for qhull-2015.2-1. +- Reflect qhull_a.h's location having changed. + * Tue Mar 8 2016 Orion Poplawski - 0.0.18-6 - Add patch for fix compilation with gcc 6 @@ -236,3 +254,4 @@ mv docs/manual-latex/manual.pdf %{name}-%{version}-manual.pdf * Sun Aug 08 2010 D Haley - 0.0.1-1 - Initial package + From 92a3f5935657a869f46352c973d5afeef55a83d1 Mon Sep 17 00:00:00 2001 From: mycae Date: Wed, 3 Aug 2016 22:11:07 -0400 Subject: [PATCH 2/7] * Update sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7909acc..101ae2b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /3Depict-0.0.16.tar.gz /3Depict-0.0.17.tar.gz /3Depict-0.0.18.tar.gz +/3Depict-0.0.19.tar.gz diff --git a/sources b/sources index 187026f..768b71f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -feddf0bf7b81d02e064a2b7cfe81aaeb 3Depict-0.0.18.tar.gz +09f6e960a3a2e7e2a217e64930a1a3d4 3Depict-0.0.19.tar.gz From 5665d96f8e613285f95dd01a3be7d3753d1a12bf Mon Sep 17 00:00:00 2001 From: mycae Date: Wed, 3 Aug 2016 22:35:41 -0400 Subject: [PATCH 3/7] * Fix broken patch --- 3Depict-0.0.19-upstream-effd078610a7.patch | 90 ++++++++++------------ 1 file changed, 41 insertions(+), 49 deletions(-) diff --git a/3Depict-0.0.19-upstream-effd078610a7.patch b/3Depict-0.0.19-upstream-effd078610a7.patch index 34a4cc8..d588967 100644 --- a/3Depict-0.0.19-upstream-effd078610a7.patch +++ b/3Depict-0.0.19-upstream-effd078610a7.patch @@ -1,14 +1,6 @@ -diff -r bcb9acfa66de -r effd078610a7 .hgtags ---- a/.hgtags Tue May 31 13:04:58 2016 +1000 -+++ b/.hgtags Tue Jun 21 12:45:20 2016 +0100 -@@ -16,3 +16,4 @@ - 9fcee7d53bc2a2b69db9dbe59c6f1264615a54e4 3Depict-0.0.16 - 19a65d51c5d65ebf3d8b7760cfa4edde36c251c0 3Depict-0.0.17 - 910618ab1f369c5a9253965e12f5d8f75fceb0c6 3Depict-0.0.18 -+bcb9acfa66de56f6531016d1e81a68d7118b7b35 3Depict-0.0.19 diff -r bcb9acfa66de -r effd078610a7 docs/manual-latex/build-latex.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/docs/manual-latex/build-latex.sh Tue Jun 21 12:45:20 2016 +0100 ++++ docs/manual-latex/build-latex.sh Tue Jun 21 12:45:20 2016 +0100 @@ -0,0 +1,37 @@ +#!/bin/bash +LATEXBIN=pdflatex @@ -48,8 +40,8 @@ diff -r bcb9acfa66de -r effd078610a7 docs/manual-latex/build-latex.sh +fi + diff -r bcb9acfa66de -r effd078610a7 src/backend/filter.cpp ---- a/src/backend/filter.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filter.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filter.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filter.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -553,7 +553,7 @@ ASSERT(scatterIntensity.empty()); @@ -60,8 +52,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filter.cpp void RangeStreamData::checkSelfConsistent() const { diff -r bcb9acfa66de -r effd078610a7 src/backend/filter.h ---- a/src/backend/filter.h Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filter.h Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filter.h Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filter.h Tue Jun 21 12:45:20 2016 +0100 @@ -395,7 +395,7 @@ //Label for X, Y axes std::string xLabel,yLabel; @@ -72,8 +64,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filter.h //!Structured XY data pairs for plotting curve Array2D xyData; diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/algorithms/rdf.cpp ---- a/src/backend/filters/algorithms/rdf.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filters/algorithms/rdf.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filters/algorithms/rdf.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filters/algorithms/rdf.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -862,6 +862,8 @@ return RDF_ABORT_FAIL; #endif @@ -93,8 +85,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/algorithms/rdf.cpp } diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/annotation.cpp ---- a/src/backend/filters/annotation.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filters/annotation.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filters/annotation.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filters/annotation.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -167,8 +167,15 @@ //If we are not enabled, do not draw anything into the output @@ -120,8 +112,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/annotation.cpp } diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/boundingBox.cpp ---- a/src/backend/filters/boundingBox.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filters/boundingBox.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filters/boundingBox.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filters/boundingBox.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -510,7 +510,6 @@ } #endif @@ -139,8 +131,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/boundingBox.cpp if(bTotal.isValid()) { diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/clusterAnalysis.cpp ---- a/src/backend/filters/clusterAnalysis.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filters/clusterAnalysis.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filters/clusterAnalysis.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filters/clusterAnalysis.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -685,7 +685,7 @@ Plot2DStreamData *p = new Plot2DStreamData; p->parent=this; @@ -151,8 +143,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/clusterAnalysis.cpp p->xLabel=TRANS("\\lambda_1:\\lambda_2 ratio"); p->yLabel=TRANS("\\lambda_2:\\lambda_3 ratio"); diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionColour.cpp ---- a/src/backend/filters/ionColour.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filters/ionColour.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filters/ionColour.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filters/ionColour.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -271,12 +271,14 @@ @@ -169,8 +161,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionColour.cpp stream_cast(p.data,alpha); p.type=PROPERTY_TYPE_REAL; diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionDownsample.cpp ---- a/src/backend/filters/ionDownsample.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filters/ionDownsample.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filters/ionDownsample.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filters/ionDownsample.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -88,7 +88,7 @@ rsdIncoming = new RangeStreamData; *rsdIncoming=*c; @@ -191,8 +183,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionDownsample.cpp unsigned int typeVal; if(fixedNumOut) diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionInfo.cpp ---- a/src/backend/filters/ionInfo.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filters/ionInfo.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filters/ionInfo.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filters/ionInfo.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -398,7 +398,7 @@ @@ -213,8 +205,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionInfo.cpp } diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/spatialAnalysis.cpp ---- a/src/backend/filters/spatialAnalysis.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filters/spatialAnalysis.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filters/spatialAnalysis.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filters/spatialAnalysis.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -655,115 +655,180 @@ return ERR_FILE_READ_FAIL; @@ -821,8 +813,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/spatialAnalysis.cpp const IonStreamData *createLCIonStream() { diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/spectrumPlot.cpp ---- a/src/backend/filters/spectrumPlot.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filters/spectrumPlot.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filters/spectrumPlot.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filters/spectrumPlot.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -517,6 +517,8 @@ getOut.push_back(d); @@ -833,8 +825,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/spectrumPlot.cpp } diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/transform.cpp ---- a/src/backend/filters/transform.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/filters/transform.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/filters/transform.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/filters/transform.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -998,8 +998,10 @@ break; } @@ -870,8 +862,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/transform.cpp return false; break; diff -r bcb9acfa66de -r effd078610a7 src/backend/plot.cpp ---- a/src/backend/plot.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/plot.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/plot.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/plot.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -29,7 +29,7 @@ NTRANS("Moving avg.") }; @@ -1023,8 +1015,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/plot.cpp } diff -r bcb9acfa66de -r effd078610a7 src/backend/plot.h ---- a/src/backend/plot.h Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/plot.h Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/plot.h Tue May 31 13:04:58 2016 +1000 ++++ src/backend/plot.h Tue Jun 21 12:45:20 2016 +0100 @@ -217,7 +217,7 @@ class PlotBase { @@ -1077,8 +1069,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/plot.h //Retrieve the types of visible plots unsigned int getVisibleMode() const; diff -r bcb9acfa66de -r effd078610a7 src/backend/viscontrol.cpp ---- a/src/backend/viscontrol.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/backend/viscontrol.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/backend/viscontrol.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/backend/viscontrol.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -249,7 +249,7 @@ plotData->yLabel,plotData->dataLabel); @@ -1098,8 +1090,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/backend/viscontrol.cpp case PLOT_2D_DENS: { diff -r bcb9acfa66de -r effd078610a7 src/common/basics.cpp ---- a/src/common/basics.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/common/basics.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/common/basics.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/common/basics.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -1347,7 +1347,8 @@ while(CFile.good() && !CFile.eof() && atHeader) { @@ -1124,8 +1116,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/common/basics.cpp return 0; diff -r bcb9acfa66de -r effd078610a7 src/gui/mainFrame.cpp ---- a/src/gui/mainFrame.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/gui/mainFrame.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/gui/mainFrame.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/gui/mainFrame.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -1391,7 +1391,7 @@ updateWxTreeCtrl(treeFilters); @@ -1179,8 +1171,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/gui/mainFrame.cpp consoleMessages=refreshControl->getConsoleMessages(); diff -r bcb9acfa66de -r effd078610a7 src/gui/mainFrame.h ---- a/src/gui/mainFrame.h Tue May 31 13:04:58 2016 +1000 -+++ b/src/gui/mainFrame.h Tue Jun 21 12:45:20 2016 +0100 +--- src/gui/mainFrame.h Tue May 31 13:04:58 2016 +1000 ++++ src/gui/mainFrame.h Tue Jun 21 12:45:20 2016 +0100 @@ -124,7 +124,7 @@ //!Update the progress information in the status bar void updateProgressStatus(); @@ -1191,8 +1183,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/gui/mainFrame.h //!Complete the scene update. Returns false if failed void finishSceneUpdate(unsigned int errCode); diff -r bcb9acfa66de -r effd078610a7 src/gui/mathglPane.cpp ---- a/src/gui/mathglPane.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/gui/mathglPane.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/gui/mathglPane.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/gui/mathglPane.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -627,7 +627,7 @@ thePlot->getRegion(plotId,regionId,r); @@ -1221,8 +1213,8 @@ diff -r bcb9acfa66de -r effd078610a7 src/gui/mathglPane.cpp //Draw "ghost" limits markers for move, //these appear as moving vertical bars to outline diff -r bcb9acfa66de -r effd078610a7 src/wx/wxcomponents.cpp ---- a/src/wx/wxcomponents.cpp Tue May 31 13:04:58 2016 +1000 -+++ b/src/wx/wxcomponents.cpp Tue Jun 21 12:45:20 2016 +0100 +--- src/wx/wxcomponents.cpp Tue May 31 13:04:58 2016 +1000 ++++ src/wx/wxcomponents.cpp Tue Jun 21 12:45:20 2016 +0100 @@ -188,14 +188,14 @@ void CopyGrid::saveData() From ca5f97eecb5ddae61b0dcea303d979b80ed46f9d Mon Sep 17 00:00:00 2001 From: D Haley Date: Sun, 5 Feb 2017 17:29:57 +0000 Subject: [PATCH 4/7] * Update spec and patch files from master --- 3Depict-0.0.20-font-path.patch | 26 ++++++++++++++++++++++++++ 3Depict-0.0.20-manual-pdf-loc.patch | 15 +++++++++++++++ 3Depict.spec | 18 ++++++++++-------- 3 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 3Depict-0.0.20-font-path.patch create mode 100644 3Depict-0.0.20-manual-pdf-loc.patch diff --git a/3Depict-0.0.20-font-path.patch b/3Depict-0.0.20-font-path.patch new file mode 100644 index 0000000..9a52b58 --- /dev/null +++ b/3Depict-0.0.20-font-path.patch @@ -0,0 +1,26 @@ +--- src/wx/wxcomponents.cpp ++++ src/wx/wxcomponents.cpp +@@ -555,16 +555,17 @@ std::string TTFFinder::nxFindFont(const char *fontFile) + //(Oh look Ma, I'm autoconf!) + + const char *dirs[] = { ".", +- "/usr/share/fonts/truetype", //Old debian ++ "/usr/local/share/fonts/truetype", // User fonts + "/usr/share/fonts/truetype/freefont", // New debian + "/usr/share/fonts/truetype/ttf-dejavu", //New debian +- "/usr/local/share/fonts/truetype", // User fonts ++ "/usr/share/fonts/truetype", //Old debian ++ "/usr/share/fonts/dejavu", //Fedora + "/usr/X11R6/lib/X11/fonts/truetype", + "/usr/X11R6/lib64/X11/fonts/truetype", +- "/usr/lib/X11/fonts/truetype",// Fedora 32 +- "/usr/lib64/X11/fonts/truetype", //Fedora 64 +- "/usr/local/lib/X11/fonts/truetype", // Fedora 32 new +- "/usr/local/lib64/X11/fonts/truetype",// Fedora 64 new ++ "/usr/lib/X11/fonts/truetype", ++ "/usr/lib64/X11/fonts/truetype", ++ "/usr/local/lib/X11/fonts/truetype", ++ "/usr/local/lib64/X11/fonts/truetype", + "", + }; //MUST end with "". + diff --git a/3Depict-0.0.20-manual-pdf-loc.patch b/3Depict-0.0.20-manual-pdf-loc.patch new file mode 100644 index 0000000..b2d23c4 --- /dev/null +++ b/3Depict-0.0.20-manual-pdf-loc.patch @@ -0,0 +1,15 @@ +--- src/gui/mainFrame.cpp ++++ src/gui/mainFrame.cpp +@@ -2904,9 +2904,9 @@ void MainWindowFrame::OnHelpHelp(wxCommandEvent &event) + string s; + s=locateDataFile("3Depict-manual.pdf"); + +- //Also Debian makes us use the lowercase "D", so check there too. +- if(!s.size()) +- s=locateDataFile("3depict-manual.pdf"); ++ //Also Fedora has diff dir ++ if(!wxFileExists(s)) ++ s="/usr/share/doc/3Depict-0.0.8/3Depict-0.0.8-manual.pdf"; + + //FIXME: under windows, currently we use "manual.pdf" + if(!s.size()) diff --git a/3Depict.spec b/3Depict.spec index 03a4d45..8f9c7cc 100644 --- a/3Depict.spec +++ b/3Depict.spec @@ -1,5 +1,5 @@ Name: 3Depict -Version: 0.0.19 +Version: 0.0.20 Release: 1%{?dist} Summary: Valued 3D point cloud visualization and analysis Group: Applications/Engineering @@ -37,8 +37,6 @@ BuildRequires: qhull-devel Patch0: %{name}-%{version}-manual-pdf-loc.patch #Fedora specific font dir Patch1: %{name}-%{version}-font-path.patch -#Upstream post-release patches from hg repo -Patch2: %{name}-%{version}-upstream-effd078610a7.patch %description This software is designed to help users visualize and analyze 3D point clouds @@ -52,22 +50,19 @@ useful for general scalar valued point data purposes. %patch0 %patch1 -%patch2 %if 0%{?fedora} > 24 # Installation directory has changed sed -i -e 's,qhull/qhull_a.h,libqhull/qhull_a.h,' \ src/backend/filters/filterCommon.h \ - src/backend/filters/algorithms/rdf.cpp \ + src/backend/filters/algorithms/spatial.cpp \ configure configure.ac # Avoid rerunning the autotools touch -r aclocal.m4 configure configure.ac %endif %build -#Due to bug 1077718, wx-config cannot be specified, due to -# wx2/wx3 conflict. -%configure --disable-debug-checks --enable-openmp-parallel --with-wx-config=wx-config-3.0 +%configure --disable-debug-checks --enable-openmp-parallel make %{?_smp_mflags} %install @@ -120,6 +115,13 @@ mv docs/manual-latex/manual.pdf %{name}-%{version}-manual.pdf %changelog +* Sun Feb 05 2017 D Haley - 0.0.20-1 +- Update to 0.0.20 +- Do not specify wx-config-3.0 (bug in wx, 1077718, fixed) +======= +* Sat Jan 14 2017 D Haley - 0.0.19-2 +- Rebuild for libmgl bump + * Wed Jun 01 2016 D Haley - 0.0.19-1 - Update to 0.0.19 - Remove gcc patch, fixed upstream From 1d86b38007320a67438c0a46754093ae8d5c5d76 Mon Sep 17 00:00:00 2001 From: D Haley Date: Sun, 5 Feb 2017 17:31:10 +0000 Subject: [PATCH 5/7] * remove old patches --- 3Depict-0.0.19-font-path.patch | 27 - 3Depict-0.0.19-manual-pdf-loc.patch | 16 - 3Depict-0.0.19-upstream-effd078610a7.patch | 1235 -------------------- 3 files changed, 1278 deletions(-) delete mode 100644 3Depict-0.0.19-font-path.patch delete mode 100644 3Depict-0.0.19-manual-pdf-loc.patch delete mode 100644 3Depict-0.0.19-upstream-effd078610a7.patch diff --git a/3Depict-0.0.19-font-path.patch b/3Depict-0.0.19-font-path.patch deleted file mode 100644 index 02f52fc..0000000 --- a/3Depict-0.0.19-font-path.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -r 7abb69436c2b src/wx/wxcomponents.cpp ---- src/wx/wxcomponents.cpp Sat Aug 02 05:39:24 2014 -0400 -+++ src/wx/wxcomponents.cpp Sat Aug 02 05:40:51 2014 -0400 -@@ -547,16 +547,17 @@ - //(Oh look Ma, I'm autoconf!) - - const char *dirs[] = { ".", -- "/usr/share/fonts/truetype", //Old debian -+ "/usr/local/share/fonts/truetype", // User fonts - "/usr/share/fonts/truetype/freefont", // New debian - "/usr/share/fonts/truetype/ttf-dejavu", //New debian -- "/usr/local/share/fonts/truetype", // User fonts -+ "/usr/share/fonts/truetype", //Old debian -+ "/usr/share/fonts/dejavu", //Fedora - "/usr/X11R6/lib/X11/fonts/truetype", - "/usr/X11R6/lib64/X11/fonts/truetype", -- "/usr/lib/X11/fonts/truetype",// Fedora 32 -- "/usr/lib64/X11/fonts/truetype", //Fedora 64 -- "/usr/local/lib/X11/fonts/truetype", // Fedora 32 new -- "/usr/local/lib64/X11/fonts/truetype",// Fedora 64 new -+ "/usr/lib/X11/fonts/truetype", -+ "/usr/lib64/X11/fonts/truetype", -+ "/usr/local/lib/X11/fonts/truetype", -+ "/usr/local/lib64/X11/fonts/truetype", - "", - }; //MUST end with "". - diff --git a/3Depict-0.0.19-manual-pdf-loc.patch b/3Depict-0.0.19-manual-pdf-loc.patch deleted file mode 100644 index 31178af..0000000 --- a/3Depict-0.0.19-manual-pdf-loc.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -r 7abb69436c2b src/gui/mainFrame.cpp ---- src/gui/mainFrame.cpp Sat Aug 02 05:39:24 2014 -0400 -+++ src/gui/mainFrame.cpp Sat Aug 02 05:40:32 2014 -0400 -@@ -2840,9 +2840,9 @@ - string s; - s=locateDataFile("3Depict-manual.pdf"); - -- //Also Debian makes us use the lowercase "D", so check there too. -- if(!s.size()) -- s=locateDataFile("3depict-manual.pdf"); -+ //Also Fedora has diff dir -+ if(!wxFileExists(s)) -+ s="/usr/share/doc/3Depict-0.0.8/3Depict-0.0.8-manual.pdf"; - - //FIXME: under windows, currently we use "manual.pdf" - if(!s.size()) diff --git a/3Depict-0.0.19-upstream-effd078610a7.patch b/3Depict-0.0.19-upstream-effd078610a7.patch deleted file mode 100644 index d588967..0000000 --- a/3Depict-0.0.19-upstream-effd078610a7.patch +++ /dev/null @@ -1,1235 +0,0 @@ -diff -r bcb9acfa66de -r effd078610a7 docs/manual-latex/build-latex.sh ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ docs/manual-latex/build-latex.sh Tue Jun 21 12:45:20 2016 +0100 -@@ -0,0 +1,37 @@ -+#!/bin/bash -+LATEXBIN=pdflatex -+BIBTEXBIN=bibtex -+if [ x`which $LATEXBIN` == x"" ] ; then -+ echo "no $LATEXBIN" -+ exit 1 -+fi -+ -+if [ x`which $BIBTEXBIN` == x"" ] ; then -+ echo "no $BIBTEXBIN" -+ exit 1 -+fi -+ -+MANUAL=manual.tex -+ -+#check to see if the manual and its bib file are around -+if [ ! -f $MANUAL ] ; then -+ echo "$MANUAL is missing" -+ exit 1 -+fi -+ -+#Remove the old manul -+rm -f manual.pdf -+ -+ -+ -+#run the multi-pass latex build. -+$LATEXBIN $MANUAL || { echo "failed latex build (pass 1 of 2)"; exit 1 ; } -+$BIBTEXBIN `basename -s .tex $MANUAL` || { echo "failed bibtex build"; exit 1 ; } -+$LATEXBIN $MANUAL || { echo "failed latex build (pass 2 of 2)"; exit 1 ; } -+ -+ -+if [ ! -f manual.pdf ] ; then -+ echo "latex ran, but somehow we did not output the PDF...." -+ exit 1 -+fi -+ -diff -r bcb9acfa66de -r effd078610a7 src/backend/filter.cpp ---- src/backend/filter.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filter.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -553,7 +553,7 @@ - ASSERT(scatterIntensity.empty()); - - -- ASSERT(plotType < PLOT_TYPE_ENUM_END); -+ ASSERT(plotStyle < PLOT_TYPE_ENUM_END); - } - void RangeStreamData::checkSelfConsistent() const - { -diff -r bcb9acfa66de -r effd078610a7 src/backend/filter.h ---- src/backend/filter.h Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filter.h Tue Jun 21 12:45:20 2016 +0100 -@@ -395,7 +395,7 @@ - //Label for X, Y axes - std::string xLabel,yLabel; - -- unsigned int plotType; -+ unsigned int plotStyle; - - //!Structured XY data pairs for plotting curve - Array2D xyData; -diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/algorithms/rdf.cpp ---- src/backend/filters/algorithms/rdf.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filters/algorithms/rdf.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -862,6 +862,8 @@ - return RDF_ABORT_FAIL; - #endif - -+ *progressPtr=100; -+ - return 0; - } - -@@ -1003,6 +1005,8 @@ - #endif - - //Calculations complete! -+ *progressPtr=100; -+ - return 0; - } - -diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/annotation.cpp ---- src/backend/filters/annotation.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filters/annotation.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -167,8 +167,15 @@ - - //If we are not enabled, do not draw anything into the output - if(!active) -+ { -+ progress.filterProgress=100; - return 0; -+ } - -+ progress.step=1; -+ progress.maxStep=1; -+ progress.stepName=TRANS("Draw"); -+ - DrawStreamData *d; - d = new DrawStreamData; - d->parent=this; -@@ -505,6 +512,7 @@ - d->cached=0; - getOut.push_back(d); - -+ progress.filterProgress=100; - return 0; - } - -diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/boundingBox.cpp ---- src/backend/filters/boundingBox.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filters/boundingBox.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -510,7 +510,6 @@ - } - #endif - bTotal.expand(bThis); -- progress.filterProgress=100; - break; - } - default: -@@ -521,6 +520,7 @@ - getOut.push_back(dataIn[ui]); - } - -+ progress.filterProgress=100; - //Append the bounding box if it is valid - if(bTotal.isValid()) - { -diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/clusterAnalysis.cpp ---- src/backend/filters/clusterAnalysis.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filters/clusterAnalysis.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -685,7 +685,7 @@ - Plot2DStreamData *p = new Plot2DStreamData; - p->parent=this; - -- p->plotType=PLOT_2D_SCATTER; -+ p->plotStyle=PLOT_2D_SCATTER; - p->dataLabel=TRANS("Morphology Plot"); - p->xLabel=TRANS("\\lambda_1:\\lambda_2 ratio"); - p->yLabel=TRANS("\\lambda_2:\\lambda_3 ratio"); -diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionColour.cpp ---- src/backend/filters/ionColour.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filters/ionColour.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -271,12 +271,14 @@ - - - p.name=TRANS("Show Bar"); -+ p.helpText=TRANS("Display the colour legend in the 3D view"); - p.key=KEY_IONCOLOURFILTER_SHOWBAR; - p.data=boolStrEnc(showColourBar); - p.type=PROPERTY_TYPE_BOOL; - propertyList.addProperty(p,curGroup); - - p.name=TRANS("Opacity"); -+ p.helpText=TRANS("How see-through to make the legend (0- transparent, 1- solid)"); - p.key=KEY_IONCOLOURFILTER_ALPHA; - stream_cast(p.data,alpha); - p.type=PROPERTY_TYPE_REAL; -diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionDownsample.cpp ---- src/backend/filters/ionDownsample.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filters/ionDownsample.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -88,7 +88,7 @@ - rsdIncoming = new RangeStreamData; - *rsdIncoming=*c; - -- if(ionFractions.size() != c->rangeFile->getNumIons()) -+ if(ionFractions.size() != c->rangeFile->getNumIons()+1) - { - //set up some defaults; seeded from normal - ionFractions.resize(c->rangeFile->getNumIons()+1,fraction); -@@ -464,7 +464,8 @@ - - propertyList.setGroupTitle(curGroup,TRANS("Mode")); - curGroup++; -- if(rsdIncoming && perSpecies) -+ -+ if(rsdIncoming && perSpecies && rsdIncoming->enabledIons.size()) - { - unsigned int typeVal; - if(fixedNumOut) -diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/ionInfo.cpp ---- src/backend/filters/ionInfo.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filters/ionInfo.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -398,7 +398,7 @@ - - - //"Pairwise events" - where we perform an action if both -- //These -+ //these are set - if(wantIonCounts && wantVolume) - { - if(computedVol > sqrtf(std::numeric_limits::epsilon())) -@@ -420,6 +420,9 @@ - } - } - -+ -+ progress.filterProgress=100; -+ - return 0; - } - -diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/spatialAnalysis.cpp ---- src/backend/filters/spatialAnalysis.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filters/spatialAnalysis.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -655,115 +655,180 @@ - return ERR_FILE_READ_FAIL; - - -- -- progress.step=3; -- progress.stepName=TRANS("Build"); -- progress.filterProgress=0; -- -- //Build the search tree we will use to perform replacement -- K3DTreeMk2 tree; -- tree.resetPts(fileIons,false); -- if(!tree.build()) -- return ERR_ABORT_FAIL; -- BoundCube b; -- tree.getBoundCube(b); -- -- //map the offset of the nearest to -- //the tree ID -- vector nearestVec; -- nearestVec.resize(inIons.size()); -- -- //TODO: pair vector might be faster -- // as we can use it in sequence, and can use openmp -- map matchedMap; -- -- //Find the nearest point for all points in the dataset -- -- #pragma omp parallel for -- for(size_t ui=0;ui outIons; -+ if(inIons.empty() || fileIons.empty()) - { -- nearestVec[ui]=tree.findNearestUntagged(inIons[ui].getPos(),b,false); -- } -- -- float sqrReplaceTol=replaceTolerance*replaceTolerance; -- -- //Filter this to only points that had an NN within range -- #pragma omp parallel for -- for(size_t ui=0;ui outIons; -- switch(replaceMode) -- { -- case REPLACE_MODE_SUBTRACT: -+ -+ progress.step=3; -+ progress.stepName=TRANS("Build"); -+ progress.filterProgress=0; -+ -+ //TODO: Possible speed increase by finding the smaller of -+ // the two inputs, and using that to build the tree -+ -+ //Build the search tree we will use to perform replacement -+ K3DTreeMk2 tree; -+ tree.resetPts(fileIons,false); -+ if(!tree.build()) -+ return ERR_ABORT_FAIL; -+ BoundCube b; -+ tree.getBoundCube(b); -+ -+ //map the offset of the nearest to -+ //the tree ID -+ vector nearestVec; -+ nearestVec.resize(inIons.size()); -+ -+ //TODO: pair vector might be faster -+ // as we can use it in sequence, and can use openmp -+ map matchedMap; -+ -+ //Find the nearest point for all points in the dataset -+ // maps the ith ion in "inions" to the tree value -+ #pragma omp parallel for -+ for(size_t ui=0;ui matchedMap.size()) -- outIons.reserve(inIons.size()-matchedMap.size()); -- -- // -- #pragma omp parallel for -- for(unsigned int ui=0;ui::iterator it; -- it=matchedMap.find(ui); -- if(it != matchedMap.end()) -- continue; -- - #pragma omp critical -- outIons.push_back(inIons[ui]); -+ matchedMap[ui]=tree.getOrigIndex(nearestVec[ui]); - } -- break; - } -- case REPLACE_MODE_INTERSECT: -+ -+ nearestVec.clear(); -+ -+ -+ progress.step=4; -+ progress.stepName=TRANS("Compute"); -+ progress.filterProgress=0; -+ -+ -+ //now we have a map that matches as so: -+ // map ( "inIon" ID -> "fileIon" ID) -+ // inIon should be our "A" in "A operator B" -+ switch(replaceMode) - { -- outIons.reserve(matchedMap.size()); -- -- if(replaceMass) -+ case REPLACE_MODE_SUBTRACT: - { -- for(map::const_iterator it=matchedMap.begin();it!=matchedMap.end();++it) -+ //If no matches, A-0 = A. Just return input -+ if(matchedMap.empty()) - { -- outIons.push_back(fileIons[it->second]); -- ASSERT(fileIons[it->second].getPosRef().sqrDist(inIons[it->first].getPosRef()) < sqrReplaceTol); -+ outIons.swap(inIons); -+ break; - } -+ //In subtraction mode, we should have -+ // at least this many ions -+ if(inIons.size() > matchedMap.size()) -+ outIons.reserve(inIons.size()-matchedMap.size()); -+ -+ // -+ #pragma omp parallel for -+ for(unsigned int ui=0;ui::iterator it; -+ it=matchedMap.find(ui); -+ if(it != matchedMap.end()) -+ continue; -+ -+ #pragma omp critical -+ outIons.push_back(inIons[ui]); -+ } -+ break; - } -- else -+ case REPLACE_MODE_INTERSECT: - { -- for(map::const_iterator it=matchedMap.begin();it!=matchedMap.end();++it) -+ //Finish if no matches -+ if(matchedMap.empty()) -+ break; -+ -+ outIons.reserve(matchedMap.size()); -+ -+ if(replaceMass) - { -- outIons.push_back(inIons[it->first]); -+ for(map::const_iterator it=matchedMap.begin();it!=matchedMap.end();++it) -+ { -+ outIons.push_back(fileIons[it->second]); -+ ASSERT(fileIons[it->second].getPosRef().sqrDist(inIons[it->first].getPosRef()) < sqrReplaceTol); -+ } - } -+ else -+ { -+ for(map::const_iterator it=matchedMap.begin();it!=matchedMap.end();++it) -+ { -+ outIons.push_back(inIons[it->first]); -+ } -+ } -+ break; - } -- break; -+ case REPLACE_MODE_UNION: -+ { -+ outIons.swap(fileIons); -+ outIons.reserve(outIons.size() + fileIons.size() - matchedMap.size()); -+ map::const_iterator it=matchedMap.begin(); -+ -+ -+ for(unsigned int ui=0;uifirst == ui) ) -+ { -+ it++; -+ continue; -+ } -+ -+ -+ outIons.push_back(inIons[ui]); -+ } -+ -+ -+ break; -+ } -+ default: -+ ASSERT(false); - } -- case REPLACE_MODE_UNION: -- { -- ASSERT(false); -- break; -- } -- default: -- ASSERT(false); - } - - //Only output ions if any were found -@@ -2779,6 +2844,8 @@ - newD->data.resize(d->data.size()); - if(stopMode == STOP_MODE_NEIGHBOUR) - { -+ unsigned int nProg=0; -+ - bool spin=false; - #pragma omp parallel for shared(spin) - for(size_t uj=0;ujdata.size();uj++) -@@ -2811,14 +2878,15 @@ - } - - res.clear(); -+ #pragma atomic -+ nProg++; - - //Update progress as needed - if(!curProg--) - { - #pragma omp critical - { -- n+=NUM_CALLBACK/(nnMax); -- progress.filterProgress= (unsigned int)(((float)n/(float)totalDataSize)*100.0f); -+ progress.filterProgress= (unsigned int)(((float)nProg/(float)totalDataSize)*100.0f); - if(*Filter::wantAbort) - spin=true; - curProg=NUM_CALLBACK/(nnMax); -@@ -3063,9 +3131,10 @@ - IonStreamData *newD = new IonStreamData; - newD->parent=this; - -- //Adjust this number to provide more update thanusual, because we -+ //Adjust this number to provide more update than usual, because we - //are not doing an o(1) task between updates; yes, it is a hack -- unsigned int curProg=NUM_CALLBACK/(10*nnMax); -+ const unsigned int PROG_PER_PASS=NUM_CALLBACK/(10*nnMax); -+ unsigned int curProg=PROG_PER_PASS; - newD->data.reserve(d->data.size()); - if(stopMode == STOP_MODE_NEIGHBOUR) - { -@@ -3113,11 +3182,11 @@ - { - #pragma omp critical - { -- n+=NUM_CALLBACK/(nnMax); -+ n+=PROG_PER_PASS; - progress.filterProgress= (unsigned int)(((float)n/(float)totalDataSize)*100.0f); - if(*Filter::wantAbort) - spin=true; -- curProg=NUM_CALLBACK/(nnMax); -+ curProg=PROG_PER_PASS; - } - } - } -@@ -3263,6 +3332,8 @@ - break; - } - } -+ progress.filterProgress=100; -+ - //If we have bad points, let the user know. - if(!badPts.empty()) - { -@@ -4230,11 +4301,8 @@ - } - - //distance between search pt and found pt -- float sqrDistance; -- sqrDistance = searchTree.getPtRef(ptIdx).sqrDist(pSource[ui].getPosRef()); -- -- if(sqrDistance > DISTANCE_EPSILON) -- ptsFound.insert(ptIdx); -+ -+ ptsFound.insert(ptIdx); - } - - -@@ -4244,8 +4312,14 @@ - //Count the number of numerator and denominator ions, using the masses we set aside earlier - for(set::iterator it=ptsFound.begin(); it!=ptsFound.end(); ++it) - { -+ -+ //check that the distance is non-zero, to force no self-matching -+ float sqrDistance; -+ sqrDistance = searchTree.getPtRef(*it).sqrDist(pSource[ui].getPosRef()); -+ if(sqrDistance < DISTANCE_EPSILON) -+ continue; -+ - float ionMass; -- //check that the distance is non-zero, to force no self-matching - ionMass = dataMasses[searchTree.getOrigIndex(*it)]; - - unsigned int ionID; -@@ -4326,9 +4400,11 @@ - bool nnHistogramTest(); - bool rdfPlotTest(); - bool axialDistTest(); --bool replaceTest(); -+bool replaceIntersectAndUnionTest(); - bool localConcTestRadius(); - bool localConcTestNN(); -+bool replaceSubtractTest(); -+bool replaceUnionTest(); - - bool SpatialAnalysisFilter::runUnitTests() - { -@@ -4343,8 +4419,15 @@ - - if(!axialDistTest()) - return false; -- if(!replaceTest()) -+ if(!replaceIntersectAndUnionTest()) - return false; -+ -+ if(!replaceSubtractTest()) -+ return false; -+ -+ if(!replaceUnionTest()) -+ return false; -+ - if(!localConcTestRadius()) - return false; - -@@ -4617,7 +4700,7 @@ - return true; - } - --bool replaceTest() -+bool replaceIntersectAndUnionTest() - { - std::string ionFile=createTmpFilename(NULL,".pos"); - -@@ -4637,6 +4720,157 @@ - //Create a spatial analysis filter - SpatialAnalysisFilter *f=new SpatialAnalysisFilter; - f->setCaching(false); -+ //Set it to do a union calculation -+ bool needUp; -+ string s; -+ s=TRANS(SPATIAL_ALGORITHMS[ALGORITHM_REPLACE]); -+ TEST(f->setProperty(KEY_ALGORITHM,s,needUp),"Set prop"); -+ TEST(f->setProperty(KEY_REPLACE_FILE,ionFile,needUp),"Set prop"); -+ s="1"; -+ TEST(f->setProperty(KEY_REPLACE_VALUE,s,needUp),"Set prop"); -+ -+ vector opVec; -+ opVec.push_back(REPLACE_MODE_INTERSECT); -+ opVec.push_back(REPLACE_MODE_UNION); -+ -+ ProgressData p; -+ vector streamIn,streamOut; -+ streamIn.push_back(d); -+ for(unsigned int opId=0;opIdsetProperty(KEY_REPLACE_ALGORITHM,s,needUp),"Set prop"); -+ -+ //Do the refresh -+ TEST(!f->refresh(streamIn,streamOut,p),"refresh OK"); -+ -+ TEST(streamOut.size() == 1,"stream count"); -+ TEST(streamOut[0]->getStreamType() == STREAM_TYPE_IONS,"stream type"); -+ TEST(streamOut[0]->getNumBasicObjects() == NIONS,"Number objects"); -+ -+ //we should have taken the mass-to-charge from the file -+ const IonStreamData *outIons = (const IonStreamData*)streamOut[0]; -+ for(unsigned int ui=0;uidata[ui].getMassToCharge() == 1); -+ } -+ delete streamOut[0]; -+ streamOut.clear(); -+ } -+ delete f; -+ delete d; -+ -+ wxRemoveFile(ionFile); -+ -+ -+ return true; -+} -+ -+bool replaceSubtractTest() -+{ -+ std::string ionFile=createTmpFilename(NULL,".pos"); -+ -+ vector ions; -+ const unsigned int NIONS=10; -+ const unsigned int DIFF_COUNT=5; -+ for(unsigned int ui=0;ui tmpI; -+ for(unsigned int ui=0;uidata.swap(ions); -+ -+ //Create a spatial analysis filter -+ SpatialAnalysisFilter *f=new SpatialAnalysisFilter; -+ f->setCaching(false); -+ -+ //Set it to do a subtraction calculation -+ bool needUp; -+ string s; -+ s=TRANS(SPATIAL_ALGORITHMS[ALGORITHM_REPLACE]); -+ TEST(f->setProperty(KEY_ALGORITHM,s,needUp),"Set prop"); -+ TEST(f->setProperty(KEY_REPLACE_FILE,ionFile,needUp),"Set prop"); -+ s=TRANS(REPLACE_ALGORITHMS[REPLACE_MODE_SUBTRACT]); -+ TEST(f->setProperty(KEY_REPLACE_ALGORITHM,s,needUp),"Set prop"); -+ -+ //Do the refresh -+ ProgressData p; -+ vector streamIn,streamOut; -+ streamIn.push_back(d); -+ TEST(!f->refresh(streamIn,streamOut,p),"refresh OK"); -+ delete f; -+ delete d; -+ streamIn.clear(); -+ -+ TEST(streamOut.size() == 1,"stream count"); -+ TEST(streamOut[0]->getStreamType() == STREAM_TYPE_IONS,"stream type"); -+ TEST(streamOut[0]->getNumBasicObjects() == DIFF_COUNT,"Number objects"); -+ -+ //we should have taken the mass-to-charge from the original data, -+ // not the file -+ const IonStreamData *outIons = (const IonStreamData*)streamOut[0]; -+ for(unsigned int ui=0;uigetNumBasicObjects(); ui++) -+ { -+ ASSERT(outIons->data[ui].getMassToCharge() == 1); -+ ASSERT(outIons->data[ui].getPos()[2] >= 0); -+ } -+ -+ wxRemoveFile(ionFile); -+ -+ delete streamOut[0]; -+ -+ return true; -+} -+ -+bool replaceUnionTest() -+{ -+ std::string ionFile=createTmpFilename(NULL,".pos"); -+ -+ //"B" dataset -+ vector ions; -+ ions.push_back(IonHit(Point3D(0,0,0),1)); -+ ions.push_back(IonHit(Point3D(1,0,1),1)); -+ ions.push_back(IonHit(Point3D(0,1,1),1)); -+ -+ IonHit::makePos(ions,ionFile.c_str()); -+ ions.clear(); -+ -+ //"A" dataset -+ ions.push_back(IonHit(Point3D(0,0,0),2)); -+ ions.push_back(IonHit(Point3D(1,0,-1),2)); -+ ions.push_back(IonHit(Point3D(0,1,-1),2)); -+ -+ -+ IonStreamData *d = new IonStreamData; -+ d->data.swap(ions); -+ -+ //Create a spatial analysis filter -+ SpatialAnalysisFilter *f=new SpatialAnalysisFilter; -+ f->setCaching(false); - - //Set it to do a union calculation - bool needUp; -@@ -4644,13 +4878,11 @@ - s=TRANS(SPATIAL_ALGORITHMS[ALGORITHM_REPLACE]); - TEST(f->setProperty(KEY_ALGORITHM,s,needUp),"Set prop"); - TEST(f->setProperty(KEY_REPLACE_FILE,ionFile,needUp),"Set prop"); -- s=TRANS(REPLACE_ALGORITHMS[REPLACE_MODE_INTERSECT]); -+ s=TRANS(REPLACE_ALGORITHMS[REPLACE_MODE_UNION]); - TEST(f->setProperty(KEY_REPLACE_ALGORITHM,s,needUp),"Set prop"); -- - s="1"; - TEST(f->setProperty(KEY_REPLACE_VALUE,s,needUp),"Set prop"); - -- - //Do the refresh - ProgressData p; - vector streamIn,streamOut; -@@ -4662,14 +4894,16 @@ - - TEST(streamOut.size() == 1,"stream count"); - TEST(streamOut[0]->getStreamType() == STREAM_TYPE_IONS,"stream type"); -- TEST(streamOut[0]->getNumBasicObjects() == NIONS,"Number objects"); -- -- //we should have taken the mass-to-charge from the file -+ TEST(streamOut[0]->getNumBasicObjects() == 5,"Number objects"); -+ -+ //There should be - const IonStreamData *outIons = (const IonStreamData*)streamOut[0]; -- for(unsigned int ui=0;uigetNumBasicObjects(); ui++) - { -- ASSERT(outIons->data[ui].getMassToCharge() == 1); -+ sumV+=outIons->data[ui].getMassToCharge(); - } -+ TEST( EQ_TOL(sumV,7.0f),"mass-to-charge check"); - - wxRemoveFile(ionFile); - -@@ -4678,7 +4912,6 @@ - return true; - } - -- - //--- Local concentration tests -- - const IonStreamData *createLCIonStream() - { -diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/spectrumPlot.cpp ---- src/backend/filters/spectrumPlot.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filters/spectrumPlot.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -517,6 +517,8 @@ - - getOut.push_back(d); - -+ progress.filterProgress=100; -+ - return 0; - } - -diff -r bcb9acfa66de -r effd078610a7 src/backend/filters/transform.cpp ---- src/backend/filters/transform.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/filters/transform.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -998,8 +998,10 @@ - break; - } - -+ } - } -- } -+ -+ progress.filterProgress=100; - } - else - { -@@ -1526,6 +1528,11 @@ - case KEY_CROP_MINIMUM: - { - ASSERT(scalarParams.size() ==2); -+ float tmp; -+ if(stream_cast(tmp,value) || tmp >=scalarParams[1]) -+ return false; -+ -+ - if(!applyPropertyNow(scalarParams[0],value,needUpdate)) - return false; - break; -@@ -1533,6 +1540,9 @@ - case KEY_CROP_MAXIMUM: - { - ASSERT(scalarParams.size() ==2); -+ float tmp; -+ if(stream_cast(tmp,value) || tmp <=scalarParams[0]) -+ return false; - if(!applyPropertyNow(scalarParams[1],value,needUpdate)) - return false; - break; -diff -r bcb9acfa66de -r effd078610a7 src/backend/plot.cpp ---- src/backend/plot.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/plot.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -29,7 +29,7 @@ - NTRANS("Moving avg.") - }; - --const char *plotTypeStrings[]= { -+const char *traceStyleStrings[]= { - NTRANS("Lines"), - NTRANS("Bars"), - NTRANS("Steps"), -@@ -119,15 +119,15 @@ - string plotString(unsigned int plotMode) - { - ASSERT(plotMode< PLOT_TYPE_ENUM_END); -- return TRANS(plotTypeStrings[plotMode]); -+ return TRANS(traceStyleStrings[plotMode]); - } - - unsigned int plotID(const std::string &plotString) - { -- COMPILE_ASSERT(THREEDEP_ARRAYSIZE(plotTypeStrings) == PLOT_TYPE_ENUM_END); -+ COMPILE_ASSERT(THREEDEP_ARRAYSIZE(traceStyleStrings) == PLOT_TYPE_ENUM_END); - for(unsigned int ui=0;uigetPlotMode(); -+} -+ - void PlotWrapper::getVisibleIDs(vector &visiblePlotIDs ) const - { - -@@ -791,7 +797,7 @@ - if(!plottingData[ui]->visible) - continue; - -- if(plottingData[ui]->getType()!= PLOT_MODE_1D) -+ if(plottingData[ui]->getMode()!= PLOT_MODE_1D) - continue; - - if(((Plot1D*)plottingData[ui])->wantLogPlot()) -@@ -809,7 +815,7 @@ - float minYVal=0.1; - for(size_t ui=0;uivisible || plottingData[ui]->getType() !=PLOT_MODE_1D) -+ if(!plottingData[ui]->visible || plottingData[ui]->getMode() !=PLOT_MODE_1D) - continue; - - float tmp ; -@@ -929,7 +935,7 @@ - Plot2DFunc *curPlot; - curPlot=(Plot2DFunc*)plottingData[ui]; - -- if(curPlot->getType() == PLOT_2D_DENS) -+ if(curPlot->getMode() == PLOT_2D_DENS) - { - wantColourbar=true; - } -@@ -1047,11 +1053,6 @@ - plottingData[plotIDHandler.getPos(plotId)]->regionGroup.getRegion(regionId,region); - } - --unsigned int PlotWrapper::plotType(unsigned int plotId) const --{ -- return plottingData[plotIDHandler.getPos(plotId)]->getPlotMode(); --} -- - - void PlotWrapper::moveRegion(unsigned int plotID, unsigned int regionId, bool regionSelfUpdate, - unsigned int movementType, float newX, float newY) const -@@ -1135,7 +1136,7 @@ - - void PlotBase::copyBase(PlotBase *target) const - { -- target->plotType=plotType; -+ target->traceStyle=traceStyle; - target->minX=minX; - target->maxX=maxX; - target->minY=minY; -@@ -1157,12 +1158,12 @@ - - unsigned int PlotBase::getType() const - { -- return plotType; -+ return traceStyle; - } - - unsigned int PlotBase::getMode() const - { -- switch(plotType) -+ switch(traceStyle) - { - case PLOT_LINE_LINES: - case PLOT_LINE_BARS: -@@ -1181,7 +1182,7 @@ - Plot1D::Plot1D() - { - //Set the default plot properties -- plotType=PLOT_LINE_LINES; -+ traceStyle=PLOT_LINE_LINES; - plotMode=PLOT_MODE_1D; - xLabel=""; - yLabel=""; -@@ -1489,7 +1490,7 @@ - - - //Plot the appropriate form -- switch(plotMode) -+ switch(traceStyle) - { - case PLOT_LINE_LINES: - //Unfortunately, when using line plots, mathgl moves the data points to the plot boundary, -@@ -1632,7 +1633,7 @@ - Plot2DFunc::Plot2DFunc() - { - plotMode = PLOT_MODE_2D; -- plotType=PLOT_2D_DENS; -+ traceStyle=PLOT_2D_DENS; - } - - void Plot2DFunc::setData(const Array2D &a, -@@ -1705,7 +1706,8 @@ - - Plot2DScatter::Plot2DScatter() - { -- plotType=PLOT_2D_SCATTER; -+ plotMode=PLOT_2D_SCATTER; -+ traceStyle=PLOT_LINE_POINTS; - scatterIntensityLog=false; - } - -diff -r bcb9acfa66de -r effd078610a7 src/backend/plot.h ---- src/backend/plot.h Tue May 31 13:04:58 2016 +1000 -+++ src/backend/plot.h Tue Jun 21 12:45:20 2016 +0100 -@@ -217,7 +217,7 @@ - class PlotBase - { - protected: -- //!Sub type of plot (eg lines, bars for 1D) -+ //!Type of plot - unsigned int plotMode; - //!xaxis label - std::string xLabel; -@@ -229,8 +229,9 @@ - //plot colour (for single coloured plots) - float r,g,b; - -- //The type of plot (ie what class is it?) -- unsigned int plotType; -+ //The sub-style of the plot trace (eg lines, points, bars, etc) -+ // FIXME: This is badly named, change to traceStyle, or dataStyle, or something -+ unsigned int traceStyle; - - void copyBase(PlotBase *target) const; - -@@ -297,8 +298,12 @@ - void setStrings(const std::string &x, - const std::string &y,const std::string &t); - -+ //Set the colour of the plot trace - void setColour(float rNew, float gNew, float bNew); - -+ //set the visual style for the trace (dots, lines, etc) -+ void setTraceStyle(unsigned int newStyle) { traceStyle=newStyle;} -+ - std::string getXLabel() const { return xLabel;} - std::string getTitle() const { return title;} - std::string getYLabel() const { return yLabel;} -@@ -309,6 +314,7 @@ - void setPlotMode(unsigned int newMode) { plotMode= newMode;} - - -+ //get the colour of the trace - void getColour(float &r, float &g, float &b) const ; - - #ifdef DEBUG -@@ -613,7 +619,7 @@ - - - //!obtain the type of a plot, given the plot's uniqueID -- unsigned int plotType(unsigned int plotId) const; -+ unsigned int getPlotMode(unsigned int plotId) const; - - //Retrieve the types of visible plots - unsigned int getVisibleMode() const; -diff -r bcb9acfa66de -r effd078610a7 src/backend/viscontrol.cpp ---- src/backend/viscontrol.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/backend/viscontrol.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -249,7 +249,7 @@ - plotData->yLabel,plotData->dataLabel); - - //set the appearance of the plot -- //plotNew->setTraceStyle(plotStyle); -+ plotNew->setTraceStyle(plotData->plotStyle); - plotNew->setColour(plotData->r,plotData->g,plotData->b); - - -@@ -275,7 +275,7 @@ - unsigned int plotID; - - PlotBase *plotNew; -- switch(plotData->plotType) -+ switch(plotData->plotStyle) - { - case PLOT_2D_DENS: - { -diff -r bcb9acfa66de -r effd078610a7 src/common/basics.cpp ---- src/common/basics.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/common/basics.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -1347,7 +1347,8 @@ - while(CFile.good() && !CFile.eof() && atHeader) - { - //Grab a line from the file -- CFile.getline(inBuffer,BUFFER_SIZE); -+ if(!CFile.getline(inBuffer,BUFFER_SIZE)) -+ break; - - if(!CFile.good()) - return ERR_FILE_FORMAT; -@@ -1457,10 +1458,8 @@ - - } - //Grab a line from the file -- CFile.getline(inBuffer,BUFFER_SIZE); -- -- if(!CFile.good() && !CFile.eof()) -- return ERR_FILE_FORMAT; -+ if(!CFile.getline(inBuffer,BUFFER_SIZE)) -+ break; - } - - return 0; -diff -r bcb9acfa66de -r effd078610a7 src/gui/mainFrame.cpp ---- src/gui/mainFrame.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/gui/mainFrame.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -1391,7 +1391,7 @@ - updateWxTreeCtrl(treeFilters); - - if(!noUpdate) -- return doSceneUpdate(true); -+ doSceneUpdate(true); - - return true; - } -@@ -3834,7 +3834,7 @@ - - } - --bool MainWindowFrame::doSceneUpdate(bool ensureVisible) -+void MainWindowFrame::doSceneUpdate(bool ensureVisible) - { - //Update scene - ASSERT(!currentlyUpdatingScene); -@@ -3864,6 +3864,11 @@ - ensureResultVisible=ensureVisible; - - ASSERT(!refreshControl); -+ -+ //Hack to prevent crash on double-refresh -+ if(refreshControl) -+ return; -+ - refreshControl = new RefreshController(visControl.state.treeState); - refreshThread=new RefreshThread(this,refreshControl); - progressTimer->Start(PROGRESS_TIMER_DELAY); -@@ -3871,7 +3876,8 @@ - refreshThread->Create(); - refreshThread->Run(); - -- return true; -+ cerr << "Updating scene complete"<< endl; -+ return; - } - - void MainWindowFrame::updateWxTreeCtrl( wxTreeCtrl *t, const Filter *f) -@@ -3971,6 +3977,11 @@ - ASSERT(!visControl.state.treeState.isRefreshing()); - progressTimer->Stop(); - -+ //Hack to prevent crash on re-entry during refresh. Should never trigger. -+ if(!refreshControl) -+ return; -+ -+ - vector > consoleMessages; - consoleMessages=refreshControl->getConsoleMessages(); - -diff -r bcb9acfa66de -r effd078610a7 src/gui/mainFrame.h ---- src/gui/mainFrame.h Tue May 31 13:04:58 2016 +1000 -+++ src/gui/mainFrame.h Tue Jun 21 12:45:20 2016 +0100 -@@ -124,7 +124,7 @@ - //!Update the progress information in the status bar - void updateProgressStatus(); - //!Perform an update to the 3D Scene. Returns false if refresh failed -- bool doSceneUpdate(bool ensureResultVisible=false); -+ void doSceneUpdate(bool ensureResultVisible=false); - - //!Complete the scene update. Returns false if failed - void finishSceneUpdate(unsigned int errCode); -diff -r bcb9acfa66de -r effd078610a7 src/gui/mathglPane.cpp ---- src/gui/mathglPane.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/gui/mathglPane.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -627,7 +627,7 @@ - thePlot->getRegion(plotId,regionId,r); - - //TODO: Implement a more generic region handler? -- ASSERT(thePlot->plotType(plotId) == PLOT_MODE_1D); -+ ASSERT(thePlot->getPlotMode(plotId) == PLOT_MODE_1D); - - float mglStartX,mglStartY; - toPlotCoords(draggingStart.x, draggingStart.y,mglStartX,mglStartY); -@@ -1471,7 +1471,7 @@ - return; - - -- ASSERT(thePlot->plotType(startMousePlot) == PLOT_MODE_1D); -+ ASSERT(thePlot->getPlotMode(startMousePlot) == PLOT_MODE_1D); - - //See where extending the region is allowed up to. - thePlot->findRegionLimit(startMousePlot,startMouseRegion, -@@ -1550,7 +1550,7 @@ - { - //This needs to be extended to support more - //plot types. -- ASSERT(thePlot->plotType(startMousePlot) == PLOT_MODE_1D); -+ ASSERT(thePlot->getPlotMode(startMousePlot) == PLOT_MODE_1D); - - //Draw "ghost" limits markers for move, - //these appear as moving vertical bars to outline -diff -r bcb9acfa66de -r effd078610a7 src/wx/wxcomponents.cpp ---- src/wx/wxcomponents.cpp Tue May 31 13:04:58 2016 +1000 -+++ src/wx/wxcomponents.cpp Tue Jun 21 12:45:20 2016 +0100 -@@ -188,14 +188,14 @@ - - void CopyGrid::saveData() - { -- wxFileDialog *wxF = new wxFileDialog(this,TRANS("Save Data..."), wxT(""), -+ wxFileDialog wxF(this,TRANS("Save Data..."), wxT(""), - wxT(""),TRANS("Text File (*.txt)|*.txt|All Files (*)|*"),wxFD_SAVE); - -- if( (wxF->ShowModal() == wxID_CANCEL)) -+ if( (wxF.ShowModal() == wxID_CANCEL)) - return; - - -- std::string dataFile = stlStr(wxF->GetPath()); -+ std::string dataFile = stlStr(wxF.GetPath()); - ofstream f(dataFile.c_str()); - - if(!f) From 177e44f7a55ca9e87959bbf6b40241ff2dc1114e Mon Sep 17 00:00:00 2001 From: D Haley Date: Mon, 13 Feb 2017 01:09:49 +0000 Subject: [PATCH 6/7] * Add sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 101ae2b..db1a723 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /3Depict-0.0.17.tar.gz /3Depict-0.0.18.tar.gz /3Depict-0.0.19.tar.gz +/3Depict-0.0.20.tar.gz diff --git a/sources b/sources index 768b71f..2039ffd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -09f6e960a3a2e7e2a217e64930a1a3d4 3Depict-0.0.19.tar.gz +SHA512 (3Depict-0.0.20.tar.gz) = e9a68e57c56a0fc9246a70b0bb031a40c54726ba38663fddc9f92995826bc17641fa6cb6872773de39b762e340f03f114a1509ed640bcfc06b266260f1e17654 From 055e56ddfe6d2274b189d65a882da41733cea527 Mon Sep 17 00:00:00 2001 From: D Haley Date: Mon, 13 Feb 2017 03:00:45 +0000 Subject: [PATCH 7/7] * Add fix for PPC64 build - disable tapsim build --- 3Depict-0.0.20-abort_tapsim_load.patch | 15 +++++++++++++++ 3Depict.spec | 4 ++++ 2 files changed, 19 insertions(+) create mode 100644 3Depict-0.0.20-abort_tapsim_load.patch diff --git a/3Depict-0.0.20-abort_tapsim_load.patch b/3Depict-0.0.20-abort_tapsim_load.patch new file mode 100644 index 0000000..973d96f --- /dev/null +++ b/3Depict-0.0.20-abort_tapsim_load.patch @@ -0,0 +1,15 @@ +diff -r eeac55f99398 src/backend/APT/APTFileIO.cpp +--- src/backend/APT/APTFileIO.cpp Mon Feb 13 02:29:47 2017 +0000 ++++ src/backend/APT/APTFileIO.cpp Mon Feb 13 02:34:25 2017 +0000 +@@ -1222,8 +1222,9 @@ + //Transfer position data + #ifdef __LITTLE_ENDIAN__ + h.setPos(Point3D((float*)(buffer))); +-#elif __BIG_ENDIAN__ +- static_assert(false); //TODO: IMPLEMENT ME ++#else ++ //FIXME: Implement me ++ return TAPSIM_ERR_FILE_FORMAT_FAIL; + #endif + //assign the ID as the mass to charge + h.setMassToCharge(*( (short*)(buffer+12) )); diff --git a/3Depict.spec b/3Depict.spec index 8f9c7cc..102296d 100644 --- a/3Depict.spec +++ b/3Depict.spec @@ -37,6 +37,9 @@ BuildRequires: qhull-devel Patch0: %{name}-%{version}-manual-pdf-loc.patch #Fedora specific font dir Patch1: %{name}-%{version}-font-path.patch +#Disable attempting to load tapsim files on non Little-endian +# arches. To be dealt with by upstream +Patch2: %{name}-%{version}-abort_tapsim_load.patch %description This software is designed to help users visualize and analyze 3D point clouds @@ -50,6 +53,7 @@ useful for general scalar valued point data purposes. %patch0 %patch1 +%patch2 %if 0%{?fedora} > 24 # Installation directory has changed