Commit 216ad474 authored by Kenneth Vanhoey's avatar Kenneth Vanhoey

correction : export frame dans exportPlyPTMgeneric

parent 7845e0e5
...@@ -259,7 +259,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typ ...@@ -259,7 +259,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typ
std::ofstream out(filename, std::ios::out) ; std::ofstream out(filename, std::ios::out) ;
if (!out.good()) if (!out.good())
{ {
CGoGNerr << "Unable to open file " << CGoGNendl ; CGoGNerr << "Unable to open file " << filename << CGoGNendl ;
return false ; return false ;
} }
...@@ -345,7 +345,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typ ...@@ -345,7 +345,7 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typ
TREAL errL2 = map.template getAttribute<REAL>(VERTEX,"errL2") ; TREAL errL2 = map.template getAttribute<REAL>(VERTEX,"errL2") ;
TREAL errLmax = map.template getAttribute<REAL>(VERTEX,"errLmax") ; TREAL errLmax = map.template getAttribute<REAL>(VERTEX,"errLmax") ;
TREAL stdDev = map.template getAttribute<REAL>(VERTEX,"StdDev") ; TREAL stdDev = map.template getAttribute<REAL>(VERTEX,"stdDev") ;
if (errL2.isValid()) if (errL2.isValid())
out << "property float errL2" << std::endl ; out << "property float errL2" << std::endl ;
if (errLmax.isValid()) if (errLmax.isValid())
...@@ -360,15 +360,19 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typ ...@@ -360,15 +360,19 @@ bool exportPlyPTMgeneric(typename PFP::MAP& map, const char* filename, const typ
for(unsigned int i = 0; i < vertices.size(); ++i) for(unsigned int i = 0; i < vertices.size(); ++i)
{ {
unsigned int vi = vertices[i]; unsigned int vi = vertices[i];
for(unsigned int coord = 0 ; coord < 3 ; ++coord) // position // position
for(unsigned int coord = 0 ; coord < 3 ; ++coord)
out << position[vi][coord] << " " ; out << position[vi][coord] << " " ;
for (unsigned int coord = 0 ; coord < 3 ; ++coord) // frame // frame
for(unsigned int axis = 0 ; axis < 3 ; ++axis) for(unsigned int axis = 0 ; axis < 3 ; ++axis)
for (unsigned int coord = 0 ; coord < 3 ; ++coord)
out << frame[axis][vi][coord] << " " ; out << frame[axis][vi][coord] << " " ;
for (unsigned int channel = 0 ; channel < 3 ; ++channel) // coefficients // coefficients
for (unsigned int channel = 0 ; channel < 3 ; ++channel)
for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI) for(unsigned int coefI = 0 ; coefI < nbCoefs ; ++coefI)
out << colorPTM[coefI][vi][channel] << " " ; out << colorPTM[coefI][vi][channel] << " " ;
if (errL2.isValid()) // fitting errors (if any) // fitting errors (if any)
if (errL2.isValid())
out << errL2[vi] << " " ; out << errL2[vi] << " " ;
if (errLmax.isValid()) if (errLmax.isValid())
out << errLmax[vi] << " " ; out << errLmax[vi] << " " ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment