From 0ae5acdf140d2e0d21fee43d86685fe241e5fbed Mon Sep 17 00:00:00 2001 From: Kerautret <bertrand.kerautret@univ-lyon2.fr> Date: Wed, 26 Dec 2018 21:34:52 +0100 Subject: [PATCH] Demo: edit new format option DGtalToolsContrib --- .../IPOLdemo/Scripts/displaySegmentsInteract.sh | 2 +- Code/Seg/IPOLdemo/mainIPOL.cpp | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Code/Seg/IPOLdemo/Scripts/displaySegmentsInteract.sh b/Code/Seg/IPOLdemo/Scripts/displaySegmentsInteract.sh index 053686f..07ce1c0 100755 --- a/Code/Seg/IPOLdemo/Scripts/displaySegmentsInteract.sh +++ b/Code/Seg/IPOLdemo/Scripts/displaySegmentsInteract.sh @@ -11,7 +11,7 @@ OUT_FILE_BASENAME=$4 -displayLineSegments -i ${LINE_FILE} --customLineColor 50 50 250 --backgroundImage ${BG_IMAGE} -o ${OUT_FILE_BASENAME}.fig -s ${INPUT_LINESEED} --customLineColorSecSet 250 50 50 --customPointColor 50 250 50 --lineWidth 2 --lineWidthSecSet 2 --noDisplayEndPoints +displayLineSegments -i ${LINE_FILE} --customLineColor 50 50 250 --backgroundImage ${BG_IMAGE} -o ${OUT_FILE_BASENAME}.fig -s ${INPUT_LINESEED} --customLineColorSec 250 50 50 --customPointColor 50 250 50 --lineWidth 2 --lineWidthSec 2 --noDisplayEndPoints fig2dev -L eps ${OUT_FILE_BASENAME}.fig ${OUT_FILE_BASENAME}.eps convert -background \#FFFFFF -flatten ${OUT_FILE_BASENAME}.eps -geometry 512x ${OUT_FILE_BASENAME}.png diff --git a/Code/Seg/IPOLdemo/mainIPOL.cpp b/Code/Seg/IPOLdemo/mainIPOL.cpp index 6b3f10b..f6c6bb3 100755 --- a/Code/Seg/IPOLdemo/mainIPOL.cpp +++ b/Code/Seg/IPOLdemo/mainIPOL.cpp @@ -44,7 +44,8 @@ int main (int argc, char *argv[]) string output_filename = argv[2]; ofstream fout; fout.open (output_filename.c_str(), std::fstream::out); - + ofstream foutAllPts; + foutAllPts.open("segmentsPoints.dat",std::fstream::out) // Gradient map extraction (uses qt) QImage image; @@ -161,7 +162,7 @@ int main (int argc, char *argv[]) } - + // Display if (! bss.empty ()) { @@ -173,7 +174,14 @@ int main (int argc, char *argv[]) fout << points.front().x() << " " << points.front().y() << " " << points.back().x() << " " << points.back().y() << std::endl; - + + // Export pour l'affichage de tous les points d'un segments + for(auto p: points) + { + foutAllPts<< p.x() << " " << p.y() << " "; + } + foutAllPts<< std::endl; + // Affichage du DSS englobant // vector<Pt2i> bnd; // DigitalStraightSegment *dss = (*it)->getSegment (); -- GitLab