Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

[diderot] Annotation of /branches/pure-cfg/doc/report/basis.tex
 [diderot] / branches / pure-cfg / doc / report / basis.tex

# Annotation of /branches/pure-cfg/doc/report/basis.tex

 1 : jhr 326 %!TEX root = report.tex 2 : % 3 : \chapter{The Diderot Basis Environment} 4 : \label{chap:basis} 5 : 6 : jhr 699 % polymorphic function 7 : jhr 329 \newcommand{\PFNSPEC}[4]{\item[\normalfont{$\mathtt{#1} : (#2) #3 \rightarrow #4$}]\mbox{}\\} 8 : \newcommand{\FNSPEC}[3]{\item[\normalfont{$\mathtt{#1} : #2 \rightarrow #3$}]\mbox{}\\} 9 : jhr 327 \newcommand{\imageTy}[2]{\mkw{image}(#1)[#2]} 10 : \newcommand{\kernelTy}[2]{\mkw{kernel\#}#2} 11 : \newcommand{\fieldTy}[3]{\mkw{field\#}#1(#2)[#3]} 12 : 13 : jhr 326 \section{Overloaded operators} 14 : 15 : \section{Other operators} 16 : 17 : \section{Functions} 18 : \begin{description} 19 : jhr 699 \FNSPEC{atan2}{(\mkw{real},\,\mkw{real})}{\mkw{real}} 20 : returns the principal value of the arc tangent of $\frac{y}{x}$, 21 : using the signs of both arguments to determine the quadrant of the return 22 : value. 23 : jhr 327 \FNSPEC{CL}{\mkw{tensor}[3,3]}{\mkw{real}} 24 : \PFNSPEC{convolve}{d,k,\sigma}{(\imageTy{d}{\sigma},\,\kernelTy{k})}{\fieldTy{k}{d}{\sigma}} 25 : \FNSPEC{cos}{\mkw{real}}{\mkw{real}} 26 : jhr 699 returns the cosine of its argument (measured in radians). 27 : jhr 327 \PFNSPEC{dot}{d}{(\mkw{tensor}[d],\,\mkw{tensor}[d])}{\mkw{real}} 28 : \PFNSPEC{inside}{k,d,\sigma}{(\fieldTy{k}{d}{\sigma},\,\mkw{tensor}[d])}{\mkw{bool}} 29 : \PFNSPEC{load}{d,\sigma}{\mkw{string}}{\imageTy{d}{\sigma}} 30 : jhr 329 loads the named image file, which should be a Nrrd file. 31 : Note that this function may only be used in the global initialization part of a Diderot 32 : program. 33 : jhr 327 \FNSPEC{max}{(\mkw{real},\,\mkw{real})}{\mkw{real}} 34 : jhr 326 returns the minimum of its two arguments. 35 : jhr 327 \FNSPEC{min}{(\mkw{real},\,\mkw{real})}{\mkw{real}} 36 : jhr 326 returns the maximum of its two arguments. 37 : jhr 327 \FNSPEC{modulate}{(\mkw{tensor}[d],\,\mkw{tensor}[d])}{\mkw{tensor}[d]} 38 : \FNSPEC{pow}{(\mkw{real},\,\mkw{real})}{\mkw{real}} 39 : jhr 326 returns the first argument raised to the power of the second argument. 40 : jhr 327 \PFNSPEC{principleEvec}{d}{\mkw{tensor}[d,d]}{\mkw{tensor}[d]} 41 : \FNSPEC{sin}{\mkw{real}}{\mkw{real}} 42 : jhr 699 returns the sine of its argument (measured in radians). 43 : \FNSPEC{sqrt}{\mkw{real}}{\mkw{real}} 44 : returns the square root of its argument. 45 : \FNSPEC{tan}{\mkw{real}}{\mkw{real}} 46 : returns the tangent of its argument (measured in radians). 47 : jhr 326 \end{description}% 48 : 49 : \section{Kernels} 50 : Diderot knows about a number of standard convolution kernels, which are described in the 51 : following table: 52 : \begin{center} 53 : \begin{tabular}{r@{ \texttt{:} }lp{3.5in}} 54 : \multicolumn{2}{c}{\textbf{Specification}} & \textbf{Description} \\ \hline 55 : \texttt{bspln3} & \kw{kernel\#}\texttt{2} & cubic bspline reconstruction (does not interpolate) \\ 56 : \texttt{bspln5} & \kw{kernel\#}\texttt{4} & quintic bspline reconstruction (does not interpolate) \\ 57 : jhr 356 \texttt{ctmr} & \kw{kernel\#}\texttt{1} & Catmull-Rom interpolation \\ 58 : jhr 326 \texttt{tent} & \kw{kernel\#}\texttt{0} & linear interpolation \\ \hline 59 : \end{tabular}% 60 : \end{center}%