38 #include <boost/typeof/typeof.hpp> 
   39 #include <boost/lexical_cast.hpp> 
   40 #define BOOST_ASSIGN_MAX_PARAMS 6 
   50         bool contains(
const M& m, 
const typename M::key_type& k)
 
   52                 BOOST_AUTO(it,m.find(k));
 
   57         const typename M::mapped_type& 
get(
const M& m, 
const typename M::key_type& k)
 
   59                 BOOST_AUTO(it,m.find(k));
 
   63                         throw std::runtime_error(
"unknown key");
 
   69                         {
"Phillips2007VarTrimmed", {
 
   70                                 {
"type", 
"inproceedings"},
 
   71                                 {
"title", 
"Outlier robust ICP for minimizing fractional RMSD"},
 
   72                                 {
"author", 
"Phillips, J.M. and Liu, R. and Tomasi, C."},
 
   73                                 {
"booktitle", 
"3-D Digital Imaging and Modeling, 2007. 3DIM '07. Sixth International Conference on"},
 
   75                                 {
"pages", 
"427--434"},
 
   76                                 {
"publisher", 
"IEEE Press"},
 
   77                                 {
"doi", 
"10.1109/3DIM.2007.39"},
 
   78                                 {
"fulltext", 
"http://x86.cs.duke.edu/~tomasi/papers/phillips/phillips3DIM07.pdf"}
 
   80                         {
"Chetverikov2002Trimmed", {
 
   81                                 {
"type", 
"inproceedings"},
 
   82                                 {
"title", 
"The Trimmed Iterative Closest Point Algorithm"},
 
   83                                 {
"author", 
"Chetverikov, D. and Svirko, D. and Stepanov, D. and Krsek, P."},
 
   84                                 {
"booktitle", 
"Pattern Recognition, 2002. Proceedings. 16th International Conference on"},
 
   86                                 {
"pages", 
"545--548"},
 
   87                                 {
"publisher", 
"IEEE Press"},
 
   88                                 {
"doi", 
"10.1109/ICPR.2002.1047997 "},
 
   89                                 {
"fulltext", 
"http://hci.iwr.uni-heidelberg.de/publications/dip/2002/ICPR2002/DATA/10_1_03.PDF"}
 
   91                         {
"Besl1992Point2Point", {
 
   92                                 {
"type", 
"inproceedings"},
 
   93                                 {
"title", 
"A Method for Registration of 3-D Shapes"},
 
   94                                 {
"author", 
"Besl, P.J. and McKay, H.D."},
 
   95                                 {
"booktitle", 
"Pattern Analysis and Machine Intelligence, IEEE Transactions"},
 
   97                                 {
"pages", 
"239--256"},
 
   98                                 {
"publisher", 
"IEEE Press"},
 
   99                                 {
"doi", 
"10.1109/34.121791"},
 
  100                                 {
"fulltext", 
"http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=121791"}
 
  102                         {
"Censi2007ICPCovariance", {
 
  103                                 {
"type", 
"inproceedings" },
 
  104                                 {
"title", 
"An Accurate Closed-Form Estimate of {ICP}'s Covariance" },
 
  105                                 {
"author", 
"Censi, A." },
 
  106                                 {
"booktitle", 
"Proceedings of the {IEEE} International Conference on Robotics and Automation ({ICRA})" },
 
  108                                 {
"pages", 
"3167--3172" },
 
  109                                 {
"publisher", 
"IEEE Press" },
 
  110                                 {
"doi", 
"10.1109/ROBOT.2007.363961" },
 
  111                                 {
"fulltext", 
"http://purl.org/censi/research/2007-icra-icpcov.pdf"}
 
  113                         {
"Chen1991Point2Plane", {
 
  114                                 {
"type", 
"inproceedings"},
 
  115                                 {
"title", 
"Object modeling by registration of multiple range images"},
 
  116                                 {
"author", 
"Chen, Y. and Medioni, G."},
 
  117                                 {
"booktitle", 
"Robotics and Automation, 1991. Proceedings., 1991 IEEE International Conference on"},
 
  119                                 {
"pages", 
"2724--2729"},
 
  120                                 {
"publisher", 
"IEEE Press"},
 
  121                                 {
"doi", 
"10.1109/ROBOT.1991.132043"},
 
  122                                 {
"fulltext", 
"http://ieeexplore.ieee.org/search/srchabstract.jsp?tp=&arnumber=132043"}
 
  124                         {
"Masuda1996Random", {
 
  125                                 {
"type", 
"inproceedings"},
 
  126                                 {
"title", 
"Registration and integration of multiple range images for 3-D model construction"},
 
  127                                 {
"author", 
"Masuda, T. and Sakaue, K. and Yokoya, N."},
 
  128                                 {
"booktitle", 
"Pattern Recognition, 1996., Proceedings of the 13th International Conference on"},
 
  130                                 {
"pages", 
"879--883"},
 
  131                                 {
"publisher", 
"IEEE Press"},
 
  132                                 {
"doi", 
"10.1109/ICPR.1996.546150"},
 
  133                                 {
"fulltext", 
"http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=546150"}
 
  135                         {
"Diebel2004Median", {
 
  136                                 {
"type", 
"inproceedings"},
 
  137                                 {
"title", 
"Simultaneous Localization and Mapping with Active Stereo Vision"},
 
  138                                 {
"author", 
"Diebel, J. and Reutersward, K. and Thrun, S. and Davis, J. and Gupta, R."},
 
  139                                 {
"booktitle", 
"Intelligent Robots and Systems, 2004. (IROS 2004). Proceedings. 2004 IEEE/RSJ International Conference on"},
 
  141                                 {
"pages", 
"3436--3443"},
 
  142                                 {
"publisher", 
"IEEE Press"},
 
  143                                 {
"doi", 
"10.1109/IROS.2004.1389948"},
 
  144                                 {
"fulltext", 
"http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1389948"}
 
  146                         {
"Pomerleau2012Noise", {
 
  147                                 {
"type", 
"inproceedings"},
 
  148                                 {
"title", 
"Noise Characterization of Depth Sensors for Surface Inspections"},
 
  149                                 {
"author", 
"F. Pomerleau, A. Breitenmoser, M. Liu, F. Colas, R. Siegwart"},
 
  150                                 {
"booktitle", 
" International Conference on Applied Robotics for the Power Industry, 2012. (CARPI 2012). Proceedings of the IEEE"},
 
  153                                 {
"publisher", 
"IEEE Press"},
 
  157                         {
"RobustWeightFunctions", {
 
  159                                 {
"title", 
"Robust regression using iteratively reweighted least-squares"},
 
  160                                 {
"author", 
"Paul W Holland and Roy E Welsch"},
 
  161                                 {
"booktitle", 
"Communications in Statistics - Theory and Methods"},
 
  163                                 {
"pages", 
"813-827"},
 
  165                                 {
"doi", 
"10.1080/03610927708827533"},
 
  170                                 {
"author", 
"Umeyama, Shinji"},
 
  171                                 {
"title", 
"Least-Squares Estimation of Transformation Parameters Between Two Point Patterns"},
 
  172                                 {
"journal", 
"IEEE Trans. Pattern Anal. Mach. Intell."},
 
  173                                 {
"issue_date", 
"April 1991"},
 
  178                                 {
"issn", 
"0162-8828"},
 
  179                                 {
"pages", 
"376--380"},
 
  181                                 {
"url", 
"https://doi.org/10.1109/34.88573"},
 
  182                                 {
"doi", 
"10.1109/34.88573"},
 
  184                                 {
"publisher", 
"IEEE Computer Society"},
 
  185                                 {
"address", 
"Washington, DC, USA"}
 
  187                         {
"Rusinkiewicz2001", {
 
  188                                 {
"type", 
"inproceedings"},
 
  189                                 {
"author", 
"Rusinkiewicz, Szymon and Levoy, Marc"},
 
  190                                 {
"title", 
"Efficient Variants of the ICP Algorithm"},
 
  191                                 {
"journal", 
"Proceedings Third International Conference on 3-D Digital Imaging and Modeling"},
 
  193                                 {
"isbn", 
"0769509843"},
 
  194                                 {
"pages", 
"145--152"},
 
  195                                 {
"doi", 
"10.1109/IM.2001.924423"},
 
  196                                 {
"publisher", 
"IEEE Computer Society"},
 
  197                                 {
"address", 
"Quebec City, Quebec, Canada"}
 
  200                                 {
"type", 
"inproceedings"},
 
  201                                 {
"author", 
"Gelfand, N. and Ikemoto, L. and Rusinkiewicz, Szymon and Levoy, M."},
 
  202                                 {
"title", 
"Geometrically stable sampling for the ICP algorithm"},
 
  203                                 {
"journal", 
"Fourth International Conference on 3-D Digital Imaging and Modeling, 2003. 3DIM 2003. Proceedings."},
 
  205                                 {
"isbn", 
"0-7695-1991-1"},
 
  206                                 {
"pages", 
"260--267"},
 
  207                                 {
"doi", 
"10.1109/IM.2003.1240258"},
 
  208                                 {
"publisher", 
"IEEE Computer Society"}
 
  224                         default: assert(
false); 
break;
 
  231                 for (
size_t i = 0; i < 
entries.size(); ++i)
 
  233                         const string& entryName(
entries[i]);
 
  235                                 throw runtime_error(
string(
"Broken bibliography, missing entry " + entryName));
 
  238                         os << 
"[" << i+1 << 
"]";
 
  240                                 os << 
" " << 
get(entry, 
"title") << 
".";
 
  242                                 os << 
" " << 
get(entry, 
"author") << 
"";
 
  244                                 os << 
" In " << 
get(entry, 
"booktitle") << 
".";
 
  246                                 os << 
" " << 
get(entry, 
"journal") << 
".";
 
  248                                 os << 
" " << 
get(entry, 
"pages") << 
".";
 
  250                                 os << 
" " << 
get(entry, 
"year") << 
".";
 
  258                 for (
size_t i = 0; i < 
entries.size(); ++i)
 
  260                         const string& entryName(
entries[i]);
 
  262                                 throw runtime_error(
string(
"Broken bibliography, missing entry " + entryName));
 
  265                         os << 
" * " << 
"<<Anchor(" << entryName << 
")>>[" << i+1 << 
"] -";
 
  267                                 os << 
" '''" << 
get(entry, 
"title") << 
".'''";
 
  269                                 os << 
" " << 
get(entry, 
"author") << 
"";
 
  271                                 os << 
" ''In " << 
get(entry, 
"booktitle") << 
".''";
 
  273                                 os << 
" " << 
get(entry, 
"journal") << 
".";
 
  275                                 os << 
" " << 
get(entry, 
"pages") << 
".";
 
  277                                 os << 
" " << 
get(entry, 
"year") << 
".";
 
  279                                 os << 
" DOI: [[https://doi.org/" << 
get(entry, 
"doi") << 
"|" << 
get(entry, 
"doi") << 
"]].";
 
  281                                 os << 
" [[" << 
get(entry, 
"fulltext") << 
"|full text]].";
 
  289                 for (
size_t i = 0; i < 
entries.size(); ++i)
 
  291                         const string& entryName(
entries[i]);
 
  293                                 throw runtime_error(
string(
"Broken bibliography, missing entry " + entryName));
 
  296                         os << 
"@" << 
get(entry, 
"type") << 
"{" << entryName << endl;
 
  298                                 os << 
"\ttitle={" << 
get(entry, 
"title") << 
"}," << endl;
 
  300                                 os << 
"\tauthor={" << 
get(entry, 
"author") << 
"}," << endl;
 
  302                                 os << 
"\tbooktitle={" << 
get(entry, 
"booktitle") << 
"}," << endl;
 
  304                                 os << 
"\tjournal={" << 
get(entry, 
"journal") << 
"}," << endl;
 
  306                                 os << 
"\tpages={" << 
get(entry, 
"pages") << 
"}," << endl;
 
  308                                 os << 
"\tyear={" << 
get(entry, 
"year") << 
"}," << endl;
 
  309                         os << 
"}" << endl << endl;
 
  313         static StringVector splitString(
const string& text, 
char delim)
 
  319                         const size_t nextPos = text.find(delim, pos);
 
  320                         if (nextPos == text.npos)
 
  322                                 res.push_back(text.substr(pos));
 
  326                                 res.push_back(text.substr(pos, nextPos - pos));
 
  340                 for (
size_t i = 0; i < words.size(); ++i)
 
  342                         const string& word(words[i]);
 
  343                         const size_t l(word.length());
 
  344                         const size_t p(word.find(
'}'));
 
  345                         if ((l > 7) && (word.substr(0, 6) == 
"\\cite{") && (p != string::npos))
 
  351                                 const StringVector keys(splitString(word.substr(6, p-6), 
','));
 
  352                                 for (
size_t j = 0; j < keys.size(); ++j)
 
  354                                         const string key(keys[j]);
 
  356                                                 newText += 
"[[#" + key + 
"|";
 
  359                                                 newText += std::to_string(
get(indices, key)+1);
 
  363                                                 size_t index(entries.size());
 
  364                                                 entries.push_back(key);
 
  365                                                 indices[key] = index;
 
  366                                                 newText += std::to_string(index+1);
 
  370                                         if (j+1 != keys.size())
 
  377                                 newText += word.substr(p+1);
 
  381                         if (i+1 != words.size())