36 #ifndef __POINTMATCHER_INSPECTORS_H 37 #define __POINTMATCHER_INSPECTORS_H 64 return "Does nothing.";
68 NullInspector() : Inspector(
"NullInspector", ParametersDoc(), Parameters()) {}
76 return "Keep statistics on performance.";
81 {
"baseFileName",
"base file name for the statistics files (if empty, disabled)",
""},
82 {
"dumpPerfOnExit",
"dump performance statistics to stderr on exit",
"0"},
83 {
"dumpStats",
"dump the statistics on first and last step",
"0"}
103 virtual void dumpStats(std::ostream& stream);
111 virtual std::ostream* openStream(
const std::string& role) = 0;
112 virtual std::ostream* openStream(
const std::string& role,
const size_t iterationNumber) = 0;
113 virtual void closeStream(std::ostream* stream) = 0;
114 void dumpDataPoints(
const DataPoints&
data, std::ostream& stream);
115 void dumpMeshNodes(
const DataPoints& data, std::ostream& stream);
116 void dumpDataLinks(
const DataPoints&
ref,
const DataPoints&
reading,
const Matches&
matches,
const OutlierWeights& featureOutlierWeights, std::ostream& stream);
128 virtual void dumpDataPoints(
const DataPoints& cloud,
const std::string&
name);
129 virtual void dumpMeshNodes(
const DataPoints& cloud,
const std::string& name);
130 virtual void dumpIteration(
const size_t iterationNumber,
const TransformationParameters&
parameters,
const DataPoints& filteredReference,
const DataPoints& reading,
const Matches& matches,
const OutlierWeights& outlierWeights,
const TransformationCheckers& transformationCheckers);
131 virtual void finish(
const size_t iterationCount);
134 void buildGenericAttributeStream(std::ostream& stream,
const std::string& attribute,
const std::string& nameTag,
const DataPoints& cloud,
const int forcedDim);
136 void buildScalarStream(std::ostream& stream,
const std::string& name,
const DataPoints& ref,
const DataPoints& reading);
137 void buildScalarStream(std::ostream& stream,
const std::string& name,
const DataPoints& cloud);
139 void buildNormalStream(std::ostream& stream,
const std::string& name,
const DataPoints& ref,
const DataPoints& reading);
140 void buildNormalStream(std::ostream& stream,
const std::string& name,
const DataPoints& cloud);
142 void buildVectorStream(std::ostream& stream,
const std::string& name,
const DataPoints& ref,
const DataPoints& reading);
143 void buildVectorStream(std::ostream& stream,
const std::string& name,
const DataPoints& cloud);
145 void buildTensorStream(std::ostream& stream,
const std::string& name,
const DataPoints& ref,
const DataPoints& reading);
146 void buildTensorStream(std::ostream& stream,
const std::string& name,
const DataPoints& cloud);
148 void buildColorStream(std::ostream& stream,
const std::string& name,
const DataPoints& cloud);
150 void buildTimeStream(std::ostream& stream,
const std::string& name,
const DataPoints& cloud);
154 Matrix padWithZeros(
const Matrix m,
const int expectedRow,
const int expectedCols);
155 Matrix padWithOnes(
const Matrix m,
const int expectedRow,
const int expectedCols);
162 return "Dump the different steps into VTK files.";
167 {
"baseFileName",
"base file name for the VTK files ",
"point-matcher-output"},
168 {
"dumpPerfOnExit",
"dump performance statistics to stderr on exit",
"0"},
169 {
"dumpStats",
"dump the statistics on first and last step",
"0"},
170 {
"dumpIterationInfo",
"dump iteration info",
"0"},
171 {
"dumpDataLinks",
"dump data links at each iteration",
"0" },
172 {
"dumpReading",
"dump the reading cloud at each iteration",
"0"},
173 {
"dumpReference",
"dump the reference cloud at each iteration",
"0"},
174 {
"writeBinary",
"write binary VTK files",
"0"}
185 virtual std::ostream* openStream(
const std::string& role);
186 virtual std::ostream* openStream(
const std::string& role,
const size_t iterationCount);
187 virtual void closeStream(std::ostream* stream);
192 virtual void finish(
const size_t iterationCount);
196 #endif // __POINTMATCHER_INSPECTORS_H Matrix OutlierWeights
Weights of the associations between the points in Matches and the points in the reference.
virtual void dumpStatsHeader(std::ostream &stream)
Dump header for all statistics.
static const std::string description()
PointMatcherSupport::Parametrizable P
Parametrizable::Parameters Parameters
const bool bDumpReference
const bool bDumpDataLinks
PointMatcher< T >::DataPoints DataPoints
virtual void dumpStats(std::ostream &stream)
Dump all statistics in CSV format.
static const std::string description()
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dense matrix over ScalarType.
const bool bDumpReference
static const ParametersDoc availableParameters()
virtual void dumpIteration(const size_t iterationNumber, const TransformationParameters ¶meters, const DataPoints &filteredReference, const DataPoints &reading, const Matches &matches, const OutlierWeights &outlierWeights, const TransformationCheckers &transformationCheckers)
Dump the state of a given iteration.
Parametrizable::ParameterDoc ParameterDoc
const std::string baseFileName
std::map< std::string, Parameter > Parameters
Parameters stored as a map of string->string.
Parametrizable::ParametersDoc ParametersDoc
An inspector allows to log data at the different steps, for analysis.
PointMatcher< T >::Matrix Matrix
const bool bDumpDataLinks
PointMatcher< T >::TransformationCheckers TransformationCheckers
PointMatcher< T >::OutlierWeights OutlierWeights
Result of the data-association step (Matcher::findClosests), before outlier rejection.
Parameters parameters
parameters with their values encoded in string
virtual void init()
Start a new ICP operation or sequence.
The documentation of a parameter.
The superclass of classes that are constructed using generic parameters. This class provides the para...
std::vector< ParameterDoc > ParametersDoc
The documentation of all parameters.
PointMatcher< T >::Inspector Inspector
PointMatcher< T >::Matches Matches
const std::string className
name of the class
virtual void finish(const size_t iterationCount)
Tell the inspector the ICP operation is completed.
virtual void init()
Start a new ICP operation or sequence.
std::ostream * streamIter
virtual void addStat(const std::string &name, double data)
Add a value for statistics name, create it if new.
const bool bDumpIterationInfo
Matrix TransformationParameters
A matrix holding the parameters a transformation.
const bool bDumpIterationInfo
PointMatcherSupport::Parametrizable Parametrizable
PointMatcher< T >::TransformationParameters TransformationParameters