Home My Page Projects Code Snippets Project Openings diderot

# SCM Repository

[diderot] View of /trunk/doc/report/basis.tex
 [diderot] / trunk / doc / report / basis.tex

# View of /trunk/doc/report/basis.tex

Wed Aug 18 23:32:54 2010 UTC (9 years, 6 months ago) by jhr
File size: 2330 byte(s)
  Working on report

%!TEX root = report.tex
%
\chapter{The Diderot Basis Environment}
\label{chap:basis}

\newcommand{\PFNSPEC}[4]{\item[\normalfont{$\mathtt{#1} : (#2) #3 \rightarrow #4$}]\mbox{}\\}
\newcommand{\FNSPEC}[3]{\item[\normalfont{$\mathtt{#1} : #2 \rightarrow #3$}]\mbox{}\\}
\newcommand{\imageTy}[2]{\mkw{image}(#1)[#2]}
\newcommand{\kernelTy}[2]{\mkw{kernel\#}#2}
\newcommand{\fieldTy}[3]{\mkw{field\#}#1(#2)[#3]}

\section{Other operators}

\section{Functions}
\begin{description}
\FNSPEC{CL}{\mkw{tensor}[3,3]}{\mkw{real}}
\PFNSPEC{convolve}{d,k,\sigma}{(\imageTy{d}{\sigma},\,\kernelTy{k})}{\fieldTy{k}{d}{\sigma}}
\FNSPEC{cos}{\mkw{real}}{\mkw{real}}
returns the cosine of its argument.
\PFNSPEC{dot}{d}{(\mkw{tensor}[d],\,\mkw{tensor}[d])}{\mkw{real}}
\PFNSPEC{inside}{k,d,\sigma}{(\fieldTy{k}{d}{\sigma},\,\mkw{tensor}[d])}{\mkw{bool}}
loads the named image file, which should be a Nrrd file.
Note that this function may only be used in the global initialization part of a Diderot
program.
\FNSPEC{max}{(\mkw{real},\,\mkw{real})}{\mkw{real}}
returns the minimum of its two arguments.
\FNSPEC{min}{(\mkw{real},\,\mkw{real})}{\mkw{real}}
returns the maximum of its two arguments.
\FNSPEC{modulate}{(\mkw{tensor}[d],\,\mkw{tensor}[d])}{\mkw{tensor}[d]}
\FNSPEC{pow}{(\mkw{real},\,\mkw{real})}{\mkw{real}}
returns the first argument raised to the power of the second argument.
\PFNSPEC{principleEvec}{d}{\mkw{tensor}[d,d]}{\mkw{tensor}[d]}
\FNSPEC{sin}{\mkw{real}}{\mkw{real}}
returns the sine of its argument.
\end{description}%

\section{Kernels}
Diderot knows about a number of standard convolution kernels, which are described in the
following table:
\begin{center}
\begin{tabular}{r@{ \texttt{:} }lp{3.5in}}
\multicolumn{2}{c}{\textbf{Specification}} & \textbf{Description} \\ \hline
\texttt{bspln3} & \kw{kernel\#}\texttt{2} & cubic bspline reconstruction (does not interpolate) \\
\texttt{bspln5} & \kw{kernel\#}\texttt{4} & quintic bspline reconstruction (does not interpolate) \\
\texttt{ctmr} & \kw{kernel\#}\texttt{2} & Catmull-Rom interpolation \\
\texttt{tent} & \kw{kernel\#}\texttt{0} & linear interpolation \\ \hline
\end{tabular}%
\end{center}%