diff --git a/3Depict-0.0.10-fix-value-shuffle-abort.patch b/3Depict-0.0.10-fix-value-shuffle-abort.patch new file mode 100644 index 0000000..4c07b6e --- /dev/null +++ b/3Depict-0.0.10-fix-value-shuffle-abort.patch @@ -0,0 +1,127 @@ +diff -r c4664e47d2a1 src/APTClasses.h +diff -r c4664e47d2a1 src/filters/transform.cpp +--- src/filters/transform.cpp Wed Apr 04 12:29:05 2012 +1000 ++++ src/filters/transform.cpp Fri Apr 06 12:54:27 2012 +0100 +@@ -891,7 +891,7 @@ + progress.filterProgress=0; + progress.stepName=TRANS("Collate"); + progress.maxStep=3; +- if((*callback)(true)) ++ if(!(*callback)(true)) + return ERR_CALLBACK_FAIL; + //we have to cross the streams (I thought that was bad?) + // - Each dataset is no longer independant, and needs to +@@ -1644,17 +1644,30 @@ + bool rotateTest(); + bool translateTest(); + bool scaleTest(); ++bool shuffleTest(); ++ ++ ++class MassCompare ++{ ++ public: ++ inline bool operator()(const IonHit &h1,const IonHit &h2) const ++ {return h1.getMassToCharge() streamIn,streamOut; ++ IonStreamData *d; ++ ++ RandNumGen rng; ++ rng.initTimer(); ++ ++ const unsigned int NUM_PTS=1000; ++ ++ unsigned int span[]={ ++ 5, 7, 9 ++ }; ++ d=synthDataPoints(span,NUM_PTS); ++ streamIn.push_back(d); ++ ++ //Set up the filter itself ++ //--- ++ TransformFilter *f=new TransformFilter; ++ ++ bool needUp; ++ //Switch to shuffle mode ++ TEST(f->setProperty(0,KEY_MODE, ++ TRANS(TRANSFORM_MODE_STRING[MODE_VALUE_SHUFFLE]),needUp),"refresh error code"); ++ //--- ++ ++ ++ //OK, so now run the shuffle ++ //Do the refresh ++ ProgressData p; ++ TEST(!f->refresh(streamIn,streamOut,p,dummyCallback),"refresh error code"); ++ delete f; ++ ++ TEST(streamOut.size() == 1,"stream count"); ++ TEST(streamOut[0]->getStreamType() == STREAM_TYPE_IONS,"stream type"); ++ TEST(streamOut[0]->getNumBasicObjects() == d->data.size(),"Ion count invariance"); ++ ++ TEST(streamOut[0]->getNumBasicObjects() == d->data.size(),"Ion count invariance"); ++ ++ IonStreamData *outData=(IonStreamData*)streamOut[0]; ++ ++ //Check to see that the output masses each exist in the input, ++ //but are not in the same sequence ++ //--- ++ ++ ++ bool sequenceDifferent=false; ++ for(size_t ui=0;uidata.size();ui++) ++ { ++ if(d->data[ui].getMassToCharge() == outData->data[ui].getMassToCharge()) ++ { ++ sequenceDifferent=true; ++ break; ++ } ++ } ++ TEST(sequenceDifferent, ++ "Should be shuffled - Prob. of sequence being identical in both orig & shuffled cases is very low"); ++ //Sort masses ++ MassCompare cmp; ++ std::sort(outData->data.begin(),outData->data.end(),cmp); ++ std::sort(d->data.begin(),d->data.end(),cmp); ++ ++ ++ for(size_t ui=0;uidata.size();ui++) ++ { ++ TEST(d->data[ui].getMassToCharge() == outData->data[ui].getMassToCharge(),"Shuffle + Sort mass should be the same"); ++ ++ } ++ ++ ++ ++ delete streamOut[0]; ++ delete d; ++ return true; ++} ++ + #endif diff --git a/3Depict.spec b/3Depict.spec index 7ab11dc..e18b9fb 100644 --- a/3Depict.spec +++ b/3Depict.spec @@ -38,6 +38,8 @@ Patch0: %{name}-%{version}-manual-pdf-loc.patch Patch1: %{name}-%{version}-font-path.patch #libpng API change patch Patch2: %{name}-%{version}-png-gray.patch +#post-release patch to fix transform->value shuffle uncond. abort. +Patch3: %{name}-%{version}-fix-value-shuffle-abort.patch %description This software is designed to help users visualize and analyze 3D point clouds @@ -52,6 +54,7 @@ useful for general scalar valued point data purposes. %patch0 %patch1 %patch2 +%patch3 %build %configure --disable-debug-checks --enable-openmp-parallel @@ -119,6 +122,9 @@ rm -rf %{buildroot} %changelog +* Fri Apr 6 2012 D Haley - 0.0.10-2 +- Add post-release patch from upstream mercurial (http://threedepict.hg.sourceforge.net/hgweb/threedepict/threedepict/rev/4583c3a39b82) + * Sun Apr 1 2012 D Haley - 0.0.10-1 - Update to 0.0.10