Browse Source

doc update

Johannes Ruehle 12 years ago
parent
commit
9cc8976875
1 changed files with 47 additions and 0 deletions
  1. 47 0
      cbaselib/LabeledSetFactory.h

+ 47 - 0
cbaselib/LabeledSetFactory.h

@@ -23,6 +23,53 @@ namespace OBJREC
  * For example, using the document type "DaimlerStereoPedRecXml" from above, by calling ::addCreator() this string is mapped to the xml load LabeledSetCreatorDaimlerXml,
  * which exactly knows how to handle the internal xml structure and create a LabeledSet out of it.
  *
+ * <h2>Example configuration</h2>
+ * contents of main_prog.config:
+ *  \verbatim
+ ...
+ [train]
+ dataset = <path to train folder containing config for training (train.config)>
+ ...
+ \endverbatim
+ *
+ * contents of training folder:<br>
+ * \verbatim
+ train.config
+ train_files.xml
+ ...
+ \endverbatim
+ *
+ * contents of train.config:
+ * \verbatim
+[main]
+factoryxml = train_files.xml  -> specifying that the factory is used for loading a xml file containing further information
+ ...
+ \endverbatim
+ * contents of train_files.xml:
+ * \verbatim
+ < !DOCTYPE DaimlerStereoPedRecXml >   -> Doctype tells the factory which implementation of the LabeledSetCreatorInterface interface should be used for handling this particulary xml file
+ < itemlist >
+ < item filename="07m_04s_237599u.pgm" objectid="17028"/>
+ < item filename="15m_39s_595649u.pgm" objectid="39616"/>
+   ....
+ < / itemlist >
+ \endverbatim
+
+ * To handle this example train_files.xml, suppose a class LabeledSetCreatorDaimlerXml was implemented (implementing interface LabeledSetCreatorInterface) .
+ * You have to add this class to the factory in advance of using the factory:
+ * \code
+ * NICE::Config confSimple ( "main_prog.config" );
+ *
+ * LabeledSetCreatorDaimlerXml *daimlerXml = new LabeledSetCreatorDaimlerXml();
+ * LabeledSetFactory *factory = new LabeledSetFactory();
+ * factory->addCreator("DaimlerStereoPedRecXml", daimlerXml); //the daimlerXml tells the factory that it is associated with the doctype "DaimlerStereoPedRecXml"
+ *
+ * MultiDataset  md( &confSimple, factory);
+ *
+ * const LabeledSet *pTrainFiles = md["train"];
+ * ...
+ *  \endcode
+ *
  * \date 2012/05/18
  * \author Johannes Ruehle
  */