classutil_1_1Grid.tex 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. \hypertarget{classutil_1_1Grid}{}\section{util\+:\+:Grid Class Reference}
  2. \label{classutil_1_1Grid}\index{util\+::\+Grid@{util\+::\+Grid}}
  3. {\ttfamily \#include $<$Grid.\+h$>$}
  4. \subsection*{Public Member Functions}
  5. \begin{DoxyCompactItemize}
  6. \item
  7. \hyperlink{classutil_1_1Grid_a0b2bfd0044eb5633a3f1121e5e70709e}{Grid} (int width\+\_\+count, int height\+\_\+count, double width, double height)
  8. \item
  9. \hyperlink{classutil_1_1Grid_ad6457dda588e20ccd503e363e96dd57e}{Grid} (int width\+\_\+count, int height\+\_\+count, int depth\+\_\+count, double width, double height, double depth)
  10. \item
  11. void \hyperlink{classutil_1_1Grid_a0e93bd63922e7cbe405176a1ae21877e}{Set\+Value} (core\+::\+Object\+Data\+Ptr value, int x, int y, int z=0)
  12. \item
  13. void \hyperlink{classutil_1_1Grid_ad7dbf79146d9f5ae1662910b82fd25ea}{Set\+Value} (core\+::\+Object\+Data\+Ptr value, double x, double y, double z=0)
  14. \item
  15. core\+::\+Object\+Data\+Ptr \hyperlink{classutil_1_1Grid_a6658334ae9b505c56b75f6f15434832e}{Get\+Value} (int x, int y, int z=0) const
  16. \item
  17. core\+::\+Object\+Data\+Ptr \hyperlink{classutil_1_1Grid_a6cc6449dfe16dde11035fe2d16a321cd}{Get\+Value} (double x, double y, double z=0.\+0) const
  18. \item
  19. int \hyperlink{classutil_1_1Grid_a3f5cdd325b3e3eb30ca5d38bd31d005e}{Get\+Width\+Count} () const
  20. \item
  21. int \hyperlink{classutil_1_1Grid_a0c63eb86e4be8c63e996ff61c3ef8b7f}{Get\+Height\+Count} () const
  22. \item
  23. int \hyperlink{classutil_1_1Grid_a04f1c2fe745d469e49cf2523fe0f34fd}{Get\+Depth\+Count} () const
  24. \item
  25. double \hyperlink{classutil_1_1Grid_a8b4dc63bee5859cae315969e039b4cac}{Get\+Width} () const
  26. \item
  27. double \hyperlink{classutil_1_1Grid_a2d02a1eafe76faaa7e0f63ce406d782f}{Get\+Height} () const
  28. \item
  29. double \hyperlink{classutil_1_1Grid_afe6698a6766a43082ceea2d4bf27619e}{Get\+Depth} () const
  30. \item
  31. void \hyperlink{classutil_1_1Grid_a775e2a7574c81dd7acd1d185b2e72ed5}{Position\+To\+Index} (double x, double y, double z, int \&xi, int \&yi, int \&zi) const
  32. \item
  33. void \hyperlink{classutil_1_1Grid_a6597c4f785a764c0b291b8135863fe67}{Convolve2D} (int vicinity, double $\ast$mask, double multiplier)
  34. \item
  35. void \hyperlink{classutil_1_1Grid_ac161adb14df09651a6b33f855d887bfa}{Convolve3D} (int vicinity, double $\ast$mask, double multiplier)
  36. \end{DoxyCompactItemize}
  37. \subsection{Detailed Description}
  38. Class for storing values in a three dimensional grid. Can also be used for two dimensions but has a bit overhead.
  39. \subsection{Constructor \& Destructor Documentation}
  40. \index{util\+::\+Grid@{util\+::\+Grid}!Grid@{Grid}}
  41. \index{Grid@{Grid}!util\+::\+Grid@{util\+::\+Grid}}
  42. \subsubsection[{\texorpdfstring{Grid(int width\+\_\+count, int height\+\_\+count, double width, double height)}{Grid(int width\_count, int height\_count, double width, double height)}}]{\setlength{\rightskip}{0pt plus 5cm}util\+::\+Grid\+::\+Grid (
  43. \begin{DoxyParamCaption}
  44. \item[{int}]{width\+\_\+count, }
  45. \item[{int}]{height\+\_\+count, }
  46. \item[{double}]{width, }
  47. \item[{double}]{height}
  48. \end{DoxyParamCaption}
  49. )}\hypertarget{classutil_1_1Grid_a0b2bfd0044eb5633a3f1121e5e70709e}{}\label{classutil_1_1Grid_a0b2bfd0044eb5633a3f1121e5e70709e}
  50. Creates a new two dimensional grid.
  51. \begin{DoxyParams}{Parameters}
  52. {\em width\+\_\+count} & The number of elements on the x axis \\
  53. \hline
  54. {\em height\+\_\+count} & The number of elements on the y axis \\
  55. \hline
  56. {\em width} & The size of the whole grid on the x axis \\
  57. \hline
  58. {\em height} & The size of the whole grid on the y axis \\
  59. \hline
  60. \end{DoxyParams}
  61. \index{util\+::\+Grid@{util\+::\+Grid}!Grid@{Grid}}
  62. \index{Grid@{Grid}!util\+::\+Grid@{util\+::\+Grid}}
  63. \subsubsection[{\texorpdfstring{Grid(int width\+\_\+count, int height\+\_\+count, int depth\+\_\+count, double width, double height, double depth)}{Grid(int width\_count, int height\_count, int depth\_count, double width, double height, double depth)}}]{\setlength{\rightskip}{0pt plus 5cm}util\+::\+Grid\+::\+Grid (
  64. \begin{DoxyParamCaption}
  65. \item[{int}]{width\+\_\+count, }
  66. \item[{int}]{height\+\_\+count, }
  67. \item[{int}]{depth\+\_\+count, }
  68. \item[{double}]{width, }
  69. \item[{double}]{height, }
  70. \item[{double}]{depth}
  71. \end{DoxyParamCaption}
  72. )}\hypertarget{classutil_1_1Grid_ad6457dda588e20ccd503e363e96dd57e}{}\label{classutil_1_1Grid_ad6457dda588e20ccd503e363e96dd57e}
  73. Creates a new three dimensional grid.
  74. \begin{DoxyParams}{Parameters}
  75. {\em width\+\_\+count} & The number of elements on the x axis \\
  76. \hline
  77. {\em height\+\_\+count} & The number of elements on the y axis \\
  78. \hline
  79. {\em depth\+\_\+count} & The number of elements on the z axis \\
  80. \hline
  81. {\em width} & The size of the whole grid on the x axis \\
  82. \hline
  83. {\em height} & The size of the whole grid on the y axis \\
  84. \hline
  85. {\em depth} & The size of the whole grid on the z axis \\
  86. \hline
  87. \end{DoxyParams}
  88. \subsection{Member Function Documentation}
  89. \index{util\+::\+Grid@{util\+::\+Grid}!Convolve2D@{Convolve2D}}
  90. \index{Convolve2D@{Convolve2D}!util\+::\+Grid@{util\+::\+Grid}}
  91. \subsubsection[{\texorpdfstring{Convolve2\+D(int vicinity, double $\ast$mask, double multiplier)}{Convolve2D(int vicinity, double *mask, double multiplier)}}]{\setlength{\rightskip}{0pt plus 5cm}void util\+::\+Grid\+::\+Convolve2D (
  92. \begin{DoxyParamCaption}
  93. \item[{int}]{vicinity, }
  94. \item[{double $\ast$}]{mask, }
  95. \item[{double}]{multiplier}
  96. \end{DoxyParamCaption}
  97. )}\hypertarget{classutil_1_1Grid_a6597c4f785a764c0b291b8135863fe67}{}\label{classutil_1_1Grid_a6597c4f785a764c0b291b8135863fe67}
  98. Performs a 2D convolution.
  99. \begin{DoxyParams}{Parameters}
  100. {\em vicinity} & The size of the mask around the center (a 3x3 mask has a vicinity of 1) \\
  101. \hline
  102. {\em mask} & The mask/kernel to use for the convolution \\
  103. \hline
  104. {\em multiplier} & The value is multiplied with the result at the end of the convolution \\
  105. \hline
  106. \end{DoxyParams}
  107. \index{util\+::\+Grid@{util\+::\+Grid}!Convolve3D@{Convolve3D}}
  108. \index{Convolve3D@{Convolve3D}!util\+::\+Grid@{util\+::\+Grid}}
  109. \subsubsection[{\texorpdfstring{Convolve3\+D(int vicinity, double $\ast$mask, double multiplier)}{Convolve3D(int vicinity, double *mask, double multiplier)}}]{\setlength{\rightskip}{0pt plus 5cm}void util\+::\+Grid\+::\+Convolve3D (
  110. \begin{DoxyParamCaption}
  111. \item[{int}]{vicinity, }
  112. \item[{double $\ast$}]{mask, }
  113. \item[{double}]{multiplier}
  114. \end{DoxyParamCaption}
  115. )}\hypertarget{classutil_1_1Grid_ac161adb14df09651a6b33f855d887bfa}{}\label{classutil_1_1Grid_ac161adb14df09651a6b33f855d887bfa}
  116. Performs a 3D convolution.
  117. \begin{DoxyParams}{Parameters}
  118. {\em vicinity} & The size of the mask around the center (a 3x3 mask has a vicinity of 1) \\
  119. \hline
  120. {\em mask} & The mask/kernel to use for the convolution \\
  121. \hline
  122. {\em multiplier} & The value is multiplied with the result at the end of the convolution \\
  123. \hline
  124. \end{DoxyParams}
  125. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Depth@{Get\+Depth}}
  126. \index{Get\+Depth@{Get\+Depth}!util\+::\+Grid@{util\+::\+Grid}}
  127. \subsubsection[{\texorpdfstring{Get\+Depth() const}{GetDepth() const}}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+Grid\+::\+Get\+Depth (
  128. \begin{DoxyParamCaption}
  129. {}
  130. \end{DoxyParamCaption}
  131. ) const}\hypertarget{classutil_1_1Grid_afe6698a6766a43082ceea2d4bf27619e}{}\label{classutil_1_1Grid_afe6698a6766a43082ceea2d4bf27619e}
  132. Gets the size of the whole grid on the z axis. \begin{DoxyReturn}{Returns}
  133. the size of the whole grid on the z axis
  134. \end{DoxyReturn}
  135. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Depth\+Count@{Get\+Depth\+Count}}
  136. \index{Get\+Depth\+Count@{Get\+Depth\+Count}!util\+::\+Grid@{util\+::\+Grid}}
  137. \subsubsection[{\texorpdfstring{Get\+Depth\+Count() const}{GetDepthCount() const}}]{\setlength{\rightskip}{0pt plus 5cm}int util\+::\+Grid\+::\+Get\+Depth\+Count (
  138. \begin{DoxyParamCaption}
  139. {}
  140. \end{DoxyParamCaption}
  141. ) const}\hypertarget{classutil_1_1Grid_a04f1c2fe745d469e49cf2523fe0f34fd}{}\label{classutil_1_1Grid_a04f1c2fe745d469e49cf2523fe0f34fd}
  142. Gets the number of elements on the z axis. \begin{DoxyReturn}{Returns}
  143. The number of elements on the z axis
  144. \end{DoxyReturn}
  145. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Height@{Get\+Height}}
  146. \index{Get\+Height@{Get\+Height}!util\+::\+Grid@{util\+::\+Grid}}
  147. \subsubsection[{\texorpdfstring{Get\+Height() const}{GetHeight() const}}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+Grid\+::\+Get\+Height (
  148. \begin{DoxyParamCaption}
  149. {}
  150. \end{DoxyParamCaption}
  151. ) const}\hypertarget{classutil_1_1Grid_a2d02a1eafe76faaa7e0f63ce406d782f}{}\label{classutil_1_1Grid_a2d02a1eafe76faaa7e0f63ce406d782f}
  152. Gets the size of the whole grid on the y axis. \begin{DoxyReturn}{Returns}
  153. the size of the whole grid on the y axis
  154. \end{DoxyReturn}
  155. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Height\+Count@{Get\+Height\+Count}}
  156. \index{Get\+Height\+Count@{Get\+Height\+Count}!util\+::\+Grid@{util\+::\+Grid}}
  157. \subsubsection[{\texorpdfstring{Get\+Height\+Count() const}{GetHeightCount() const}}]{\setlength{\rightskip}{0pt plus 5cm}int util\+::\+Grid\+::\+Get\+Height\+Count (
  158. \begin{DoxyParamCaption}
  159. {}
  160. \end{DoxyParamCaption}
  161. ) const}\hypertarget{classutil_1_1Grid_a0c63eb86e4be8c63e996ff61c3ef8b7f}{}\label{classutil_1_1Grid_a0c63eb86e4be8c63e996ff61c3ef8b7f}
  162. Gets the number of elements on the y axis. \begin{DoxyReturn}{Returns}
  163. The number of elements on the y axis
  164. \end{DoxyReturn}
  165. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Value@{Get\+Value}}
  166. \index{Get\+Value@{Get\+Value}!util\+::\+Grid@{util\+::\+Grid}}
  167. \subsubsection[{\texorpdfstring{Get\+Value(int x, int y, int z=0) const}{GetValue(int x, int y, int z=0) const}}]{\setlength{\rightskip}{0pt plus 5cm}core\+::\+Object\+Data\+Ptr util\+::\+Grid\+::\+Get\+Value (
  168. \begin{DoxyParamCaption}
  169. \item[{int}]{x, }
  170. \item[{int}]{y, }
  171. \item[{int}]{z = {\ttfamily 0}}
  172. \end{DoxyParamCaption}
  173. ) const}\hypertarget{classutil_1_1Grid_a6658334ae9b505c56b75f6f15434832e}{}\label{classutil_1_1Grid_a6658334ae9b505c56b75f6f15434832e}
  174. Gets the value in the grid cell with the given index.
  175. \begin{DoxyParams}{Parameters}
  176. {\em x} & The x axis index \\
  177. \hline
  178. {\em y} & The y axis index \\
  179. \hline
  180. {\em z} & The z axis index \\
  181. \hline
  182. \end{DoxyParams}
  183. \begin{DoxyReturn}{Returns}
  184. The value in the grid cell
  185. \end{DoxyReturn}
  186. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Value@{Get\+Value}}
  187. \index{Get\+Value@{Get\+Value}!util\+::\+Grid@{util\+::\+Grid}}
  188. \subsubsection[{\texorpdfstring{Get\+Value(double x, double y, double z=0.\+0) const}{GetValue(double x, double y, double z=0.0) const}}]{\setlength{\rightskip}{0pt plus 5cm}core\+::\+Object\+Data\+Ptr util\+::\+Grid\+::\+Get\+Value (
  189. \begin{DoxyParamCaption}
  190. \item[{double}]{x, }
  191. \item[{double}]{y, }
  192. \item[{double}]{z = {\ttfamily 0.0}}
  193. \end{DoxyParamCaption}
  194. ) const}\hypertarget{classutil_1_1Grid_a6cc6449dfe16dde11035fe2d16a321cd}{}\label{classutil_1_1Grid_a6cc6449dfe16dde11035fe2d16a321cd}
  195. Gets the value in the grid cell at the given position.
  196. \begin{DoxyParams}{Parameters}
  197. {\em x} & The x axis value \\
  198. \hline
  199. {\em y} & The y axis value \\
  200. \hline
  201. {\em z} & The z axis value \\
  202. \hline
  203. \end{DoxyParams}
  204. \begin{DoxyReturn}{Returns}
  205. The value in the grid cell
  206. \end{DoxyReturn}
  207. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Width@{Get\+Width}}
  208. \index{Get\+Width@{Get\+Width}!util\+::\+Grid@{util\+::\+Grid}}
  209. \subsubsection[{\texorpdfstring{Get\+Width() const}{GetWidth() const}}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+Grid\+::\+Get\+Width (
  210. \begin{DoxyParamCaption}
  211. {}
  212. \end{DoxyParamCaption}
  213. ) const}\hypertarget{classutil_1_1Grid_a8b4dc63bee5859cae315969e039b4cac}{}\label{classutil_1_1Grid_a8b4dc63bee5859cae315969e039b4cac}
  214. Gets the size of the whole grid on the x axis. \begin{DoxyReturn}{Returns}
  215. the size of the whole grid on the x axis
  216. \end{DoxyReturn}
  217. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Width\+Count@{Get\+Width\+Count}}
  218. \index{Get\+Width\+Count@{Get\+Width\+Count}!util\+::\+Grid@{util\+::\+Grid}}
  219. \subsubsection[{\texorpdfstring{Get\+Width\+Count() const}{GetWidthCount() const}}]{\setlength{\rightskip}{0pt plus 5cm}int util\+::\+Grid\+::\+Get\+Width\+Count (
  220. \begin{DoxyParamCaption}
  221. {}
  222. \end{DoxyParamCaption}
  223. ) const}\hypertarget{classutil_1_1Grid_a3f5cdd325b3e3eb30ca5d38bd31d005e}{}\label{classutil_1_1Grid_a3f5cdd325b3e3eb30ca5d38bd31d005e}
  224. Gets the number of elements on the x axis. \begin{DoxyReturn}{Returns}
  225. The number of elements on the x axis
  226. \end{DoxyReturn}
  227. \index{util\+::\+Grid@{util\+::\+Grid}!Position\+To\+Index@{Position\+To\+Index}}
  228. \index{Position\+To\+Index@{Position\+To\+Index}!util\+::\+Grid@{util\+::\+Grid}}
  229. \subsubsection[{\texorpdfstring{Position\+To\+Index(double x, double y, double z, int \&xi, int \&yi, int \&zi) const}{PositionToIndex(double x, double y, double z, int \&xi, int \&yi, int \&zi) const}}]{\setlength{\rightskip}{0pt plus 5cm}void util\+::\+Grid\+::\+Position\+To\+Index (
  230. \begin{DoxyParamCaption}
  231. \item[{double}]{x, }
  232. \item[{double}]{y, }
  233. \item[{double}]{z, }
  234. \item[{int \&}]{xi, }
  235. \item[{int \&}]{yi, }
  236. \item[{int \&}]{zi}
  237. \end{DoxyParamCaption}
  238. ) const}\hypertarget{classutil_1_1Grid_a775e2a7574c81dd7acd1d185b2e72ed5}{}\label{classutil_1_1Grid_a775e2a7574c81dd7acd1d185b2e72ed5}
  239. Converts a 3D position to an 3D index.
  240. \begin{DoxyParams}{Parameters}
  241. {\em x} & The x axis value \\
  242. \hline
  243. {\em y} & The y axis value \\
  244. \hline
  245. {\em z} & The z axis value \\
  246. \hline
  247. {\em xi} & The x axis index \\
  248. \hline
  249. {\em yi} & The y axis index \\
  250. \hline
  251. {\em zi} & The z axis index \\
  252. \hline
  253. \end{DoxyParams}
  254. \index{util\+::\+Grid@{util\+::\+Grid}!Set\+Value@{Set\+Value}}
  255. \index{Set\+Value@{Set\+Value}!util\+::\+Grid@{util\+::\+Grid}}
  256. \subsubsection[{\texorpdfstring{Set\+Value(core\+::\+Object\+Data\+Ptr value, int x, int y, int z=0)}{SetValue(core::ObjectDataPtr value, int x, int y, int z=0)}}]{\setlength{\rightskip}{0pt plus 5cm}void util\+::\+Grid\+::\+Set\+Value (
  257. \begin{DoxyParamCaption}
  258. \item[{core\+::\+Object\+Data\+Ptr}]{value, }
  259. \item[{int}]{x, }
  260. \item[{int}]{y, }
  261. \item[{int}]{z = {\ttfamily 0}}
  262. \end{DoxyParamCaption}
  263. )}\hypertarget{classutil_1_1Grid_a0e93bd63922e7cbe405176a1ae21877e}{}\label{classutil_1_1Grid_a0e93bd63922e7cbe405176a1ae21877e}
  264. Sets a value in the grid cell with the given index.
  265. \begin{DoxyParams}{Parameters}
  266. {\em value} & The value to set \\
  267. \hline
  268. {\em x} & The x axis index \\
  269. \hline
  270. {\em y} & The y axis index \\
  271. \hline
  272. {\em z} & The z axis index \\
  273. \hline
  274. \end{DoxyParams}
  275. \index{util\+::\+Grid@{util\+::\+Grid}!Set\+Value@{Set\+Value}}
  276. \index{Set\+Value@{Set\+Value}!util\+::\+Grid@{util\+::\+Grid}}
  277. \subsubsection[{\texorpdfstring{Set\+Value(core\+::\+Object\+Data\+Ptr value, double x, double y, double z=0)}{SetValue(core::ObjectDataPtr value, double x, double y, double z=0)}}]{\setlength{\rightskip}{0pt plus 5cm}void util\+::\+Grid\+::\+Set\+Value (
  278. \begin{DoxyParamCaption}
  279. \item[{core\+::\+Object\+Data\+Ptr}]{value, }
  280. \item[{double}]{x, }
  281. \item[{double}]{y, }
  282. \item[{double}]{z = {\ttfamily 0}}
  283. \end{DoxyParamCaption}
  284. )}\hypertarget{classutil_1_1Grid_ad7dbf79146d9f5ae1662910b82fd25ea}{}\label{classutil_1_1Grid_ad7dbf79146d9f5ae1662910b82fd25ea}
  285. Sets a value in the grid cell at the given position.
  286. \begin{DoxyParams}{Parameters}
  287. {\em value} & The value to set \\
  288. \hline
  289. {\em x} & The x axis value \\
  290. \hline
  291. {\em y} & The y axis value \\
  292. \hline
  293. {\em z} & The z axis value \\
  294. \hline
  295. \end{DoxyParams}
  296. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  297. \item
  298. util/Grid.\+h\item
  299. util/Grid.\+cpp\end{DoxyCompactItemize}