\section{CSED Class Reference}
\label{class_c_s_e_d}\index{CSED@{CSED}}
Ragnemalm's CSED distance transform algorithm.  


{\tt \#include $<$CSED.h$>$}

Inheritance diagram for CSED::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{class_c_s_e_d}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual bool {\bf get\-P} (const int x, const int y, int \&px, int \&py) const 
\end{CompactItemize}
\subsection*{Public Attributes}
\begin{CompactItemize}
\item 
{\bf \_\-\_\-pad0\_\-\_\-}: {\bf Distance\-Transform}({\bf x\-Size}\label{class_c_s_e_d_74a47a7eac047138ff811ede153943e6}

\item 
{\bf y\-Size}\label{class_c_s_e_d_7856ca4c107e88ecbccd9e0d1058ae8a}

\begin{CompactList}\small\item\em integer size (height) in pixels \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
P $\ast$ {\bf v}\label{class_c_s_e_d_9e3669d19b675bd57058fd4664205d2a}

\end{CompactItemize}
\subsection*{Private Member Functions}
\begin{CompactItemize}
\item 
void {\bf test} (const int px, const int py, const int ox, const int oy, vector$<$ P $\ast$ $>$ $\ast$list2, const int i)
\end{CompactItemize}
\subsection*{Static Private Member Functions}
\begin{CompactItemize}
\item 
static double {\bf D} (const int x, const int y)\label{class_c_s_e_d_6a0276e9c830d3a1e1cb7e192ecbd0e1}

\begin{CompactList}\small\item\em returns the length of a vector \item\end{CompactList}\item 
static double {\bf D} (P \&p)\label{class_c_s_e_d_57e5cf14e072f63352347f6d95fda901}

\begin{CompactList}\small\item\em returns the length of a vector \item\end{CompactList}\item 
static int {\bf sgn} (int i)\label{class_c_s_e_d_339796b17b4747f9a4fb2f2be1249877}

\begin{CompactList}\small\item\em return the sign of i \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Ragnemalm's CSED distance transform algorithm. 

As described in I. Ragnemalm, \char`\"{}Neighborhoods for distance transformations using ordered propagation,\char`\"{} CVGIP:IU 56(3):399-409, 1992.

To produce code for the original algorithm, define the symbol ORIGINAL in the CSED .h or .cpp file and recompile. In some cases this code exhibits errors (in the form of unassigned distance transform values for some points). To produce an improved version, do not define this symbol. 



\subsection{Member Function Documentation}
\index{CSED@{CSED}!getP@{getP}}
\index{getP@{getP}!CSED@{CSED}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool CSED::get\-P (const int {\em x}, const int {\em y}, int \& {\em px}, int \& {\em py}) const\hspace{0.3cm}{\tt  [virtual]}}\label{class_c_s_e_d_96812fce6c340f8e08e9326a44f8e067}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em x}]is the x location \item[{\em y}]is the y location \item[{\em px}]is the parent's x location to be returned \item[{\em py}]is the parent's y location to be returned \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the parent is know; otherwise false. \end{Desc}


Reimplemented from {\bf Distance\-Transform} {\rm (p.\,\pageref{class_distance_transform_96812fce6c340f8e08e9326a44f8e067})}.\index{CSED@{CSED}!test@{test}}
\index{test@{test}!CSED@{CSED}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CSED::test (const int {\em x}, const int {\em y}, const int {\em ox}, const int {\em oy}, vector$<$ P $\ast$ $>$ $\ast$ {\em list2}, const int {\em i})\hspace{0.3cm}{\tt  [private]}}\label{class_c_s_e_d_2b17d0b9dd57d6da7a013e490844723e}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em (x,y)}]is a pixel position, p \item[{\em (ox,oy)}]is the displacement from (x,y) to a neighbor, o \item[{\em list2}]is a list \item[{\em i}]is the subscript associated with (x,y) \small\begin{alltt}
  subroutine test ( o ):
      if D(v(p+o)) > D(v(p)+o)
          v(p+o) = v(p) + o
          p+o is put in list2  //in both
\end{alltt}\normalsize 
 \end{description}
\end{Desc}


The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
{\bf CSED.h}\item 
{\bf CSED.cpp}\end{CompactItemize}
