Commit 63b1250299e808457c3d9da76eb6862ab6c79336

Authored by Josh Klontz
1 parent 40483f50

formatting tweaks

Showing 1 changed file with 17 additions and 19 deletions
sdk/openbr_plugin.h
@@ -1004,13 +1004,15 @@ public: @@ -1004,13 +1004,15 @@ public:
1004 project(src,dst); 1004 project(src,dst);
1005 } 1005 }
1006 1006
1007 - // inplace project/update 1007 + /*!< \brief inplace projectUpdate. */
1008 void projectUpdate(Template &srcdst) 1008 void projectUpdate(Template &srcdst)
1009 { 1009 {
1010 Template dst; 1010 Template dst;
1011 projectUpdate(srcdst, dst); 1011 projectUpdate(srcdst, dst);
1012 srcdst = dst; 1012 srcdst = dst;
1013 } 1013 }
  1014 +
  1015 + /*!< \brief inplace projectUpdate. */
1014 void projectUpdate(TemplateList &srcdst) 1016 void projectUpdate(TemplateList &srcdst)
1015 { 1017 {
1016 TemplateList dst; 1018 TemplateList dst;
@@ -1018,12 +1020,15 @@ public: @@ -1018,12 +1020,15 @@ public:
1018 srcdst = dst; 1020 srcdst = dst;
1019 } 1021 }
1020 1022
1021 - // Time-varying transforms may move away from a single input->single output model, and only emit  
1022 - // templates under some conditions (e.g. a tracking thing may emit a template for each detected  
1023 - // unique object), in this case finalize indicates that no further calls to project will be made  
1024 - // and the transform can emit a final set if templates if it wants. Time-invariant transforms  
1025 - // don't have to do anything. 1023 + /*!
  1024 + * Time-varying transforms may move away from a single input->single output model, and only emit
  1025 + * templates under some conditions (e.g. a tracking thing may emit a template for each detected
  1026 + * unique object), in this case finalize indicates that no further calls to project will be made
  1027 + * and the transform can emit a final set if templates if it wants. Time-invariant transforms
  1028 + * don't have to do anything.
  1029 + */
1026 virtual void finalize(TemplateList & output) { output = TemplateList(); } 1030 virtual void finalize(TemplateList & output) { output = TemplateList(); }
  1031 +
1027 /*! 1032 /*!
1028 * \brief Does the transform require the non-const version of project? Can vary for aggregation type transforms 1033 * \brief Does the transform require the non-const version of project? Can vary for aggregation type transforms
1029 * (if their children are time varying, they are also time varying, otherwise probably not) 1034 * (if their children are time varying, they are also time varying, otherwise probably not)
@@ -1092,7 +1097,6 @@ inline QDataStream &amp;operator&gt;&gt;(QDataStream &amp;stream, Transform &amp;f) @@ -1092,7 +1097,6 @@ inline QDataStream &amp;operator&gt;&gt;(QDataStream &amp;stream, Transform &amp;f)
1092 return stream; 1097 return stream;
1093 } 1098 }
1094 1099
1095 -  
1096 /*! 1100 /*!
1097 * \brief A br::Transform for which the results of project may change due to prior calls to project 1101 * \brief A br::Transform for which the results of project may change due to prior calls to project
1098 */ 1102 */
@@ -1100,24 +1104,24 @@ class BR_EXPORT TimeVaryingTransform : public Transform @@ -1100,24 +1104,24 @@ class BR_EXPORT TimeVaryingTransform : public Transform
1100 { 1104 {
1101 Q_OBJECT 1105 Q_OBJECT
1102 1106
1103 - virtual bool timeVarying() const {return true;} 1107 + virtual bool timeVarying() const { return true; }
  1108 +
1104 virtual void project(const Template &src, Template &dst) const 1109 virtual void project(const Template &src, Template &dst) const
1105 { 1110 {
1106 qFatal("No const project defined for time-varying transform"); 1111 qFatal("No const project defined for time-varying transform");
1107 (void) dst; (void) src; 1112 (void) dst; (void) src;
1108 } 1113 }
  1114 +
1109 virtual void project(const TemplateList &src, TemplateList &dst) const 1115 virtual void project(const TemplateList &src, TemplateList &dst) const
1110 { 1116 {
1111 qFatal("No const project defined for time-varying transform"); 1117 qFatal("No const project defined for time-varying transform");
1112 (void) dst; (void) src; 1118 (void) dst; (void) src;
1113 } 1119 }
1114 1120
1115 -  
1116 protected: 1121 protected:
1117 TimeVaryingTransform(bool independent = true, bool trainable = true) : Transform(independent, trainable) {} 1122 TimeVaryingTransform(bool independent = true, bool trainable = true) : Transform(independent, trainable) {}
1118 }; 1123 };
1119 1124
1120 -  
1121 /*! 1125 /*!
1122 * \brief A br::Transform expecting multiple matrices per template. 1126 * \brief A br::Transform expecting multiple matrices per template.
1123 */ 1127 */
@@ -1135,6 +1139,7 @@ protected: @@ -1135,6 +1139,7 @@ protected:
1135 class BR_EXPORT CompositeTransform : public TimeVaryingTransform 1139 class BR_EXPORT CompositeTransform : public TimeVaryingTransform
1136 { 1140 {
1137 Q_OBJECT 1141 Q_OBJECT
  1142 +
1138 public: 1143 public:
1139 Q_PROPERTY(QList<br::Transform*> transforms READ get_transforms WRITE set_transforms RESET reset_transforms) 1144 Q_PROPERTY(QList<br::Transform*> transforms READ get_transforms WRITE set_transforms RESET reset_transforms)
1140 BR_PROPERTY(QList<br::Transform*>, transforms, QList<br::Transform*>()) 1145 BR_PROPERTY(QList<br::Transform*>, transforms, QList<br::Transform*>())
@@ -1151,17 +1156,12 @@ public: @@ -1151,17 +1156,12 @@ public:
1151 _project(src, dst); 1156 _project(src, dst);
1152 } 1157 }
1153 1158
1154 -  
1155 - bool timeVarying() const  
1156 - {  
1157 - return isTimeVarying;  
1158 - } 1159 + bool timeVarying() const { return isTimeVarying; }
1159 1160
1160 void init() 1161 void init()
1161 { 1162 {
1162 isTimeVarying = false; 1163 isTimeVarying = false;
1163 - foreach(const br::Transform * transform, transforms)  
1164 - { 1164 + foreach (const br::Transform *transform, transforms) {
1165 if (transform->timeVarying()) { 1165 if (transform->timeVarying()) {
1166 isTimeVarying = true; 1166 isTimeVarying = true;
1167 break; 1167 break;
@@ -1178,7 +1178,6 @@ protected: @@ -1178,7 +1178,6 @@ protected:
1178 CompositeTransform() : TimeVaryingTransform(false) {} 1178 CompositeTransform() : TimeVaryingTransform(false) {}
1179 }; 1179 };
1180 1180
1181 -  
1182 /*! 1181 /*!
1183 * \brief A br::Transform that does not require training data. 1182 * \brief A br::Transform that does not require training data.
1184 */ 1183 */
@@ -1196,7 +1195,6 @@ private: @@ -1196,7 +1195,6 @@ private:
1196 void load(QDataStream &stream) { (void) stream; } 1195 void load(QDataStream &stream) { (void) stream; }
1197 }; 1196 };
1198 1197
1199 -  
1200 /*! 1198 /*!
1201 * \brief A br::MetaTransform that does not require training data. 1199 * \brief A br::MetaTransform that does not require training data.
1202 */ 1200 */