classutil_1_1Grid.tex 16 KB

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