\section{Sadie\_\-Contrast.c File Reference}
\label{Sadie__Contrast_8c}\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
{\tt \#include $<$tcl.h$>$}\par
{\tt \#include $<$tk.h$>$}\par
{\tt \#include \char`\"{}sadie.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
int {\bf Sadie\_\-Contrast\_\-Norm\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Histeq\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Linear\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Log\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-PWLStretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Root\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Sqr\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Tbl\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Qnt\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Sat\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Thresh\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Adapt\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Ref\-Stretch\-Cmd} (Client\-Data client\_\-data, Tcl\_\-Interp $\ast$interp, int argc, char $\ast$argv[$\,$])
\item 
int {\bf Sadie\_\-Contrast\_\-Init} (Tcl\_\-Interp $\ast$interp)
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
short {\bf nlev}
\item 
short {\bf csize}
\item 
double {\bf weight}
\item 
double $\ast$ {\bf count}
\item 
{\bf PIXEL} {\bf gain}
\item 
{\bf PIXEL} {\bf bias}
\item 
{\bf PIXEL} {\bf gmin}
\item 
{\bf PIXEL} {\bf gmax}
\item 
{\bf PIXEL} {\bf thresh}
\item 
{\bf PIXEL} {\bf gbrk} [2][4]
\item 
{\bf PIXEL} $\ast$ {\bf table}
\end{CompactItemize}


\subsection{Function Documentation}
\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_AdaptStretchCmd@{Sadie\_\-Contrast\_\-AdaptStretchCmd}}
\index{Sadie_Contrast_AdaptStretchCmd@{Sadie\_\-Contrast\_\-AdaptStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Adapt\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a23}




Definition at line 1398 of file Sadie\_\-Contrast.c.

References CHECKIMG, SLEN, IMAGE::text, and VSTRETCH.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_HisteqStretchCmd@{Sadie\_\-Contrast\_\-HisteqStretchCmd}}
\index{Sadie_Contrast_HisteqStretchCmd@{Sadie\_\-Contrast\_\-HisteqStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Histeq\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a13}




Definition at line 190 of file Sadie\_\-Contrast.c.

References CHECKIMG, HISTEQ, SLEN, and IMAGE::text.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_Init@{Sadie\_\-Contrast\_\-Init}}
\index{Sadie_Contrast_Init@{Sadie\_\-Contrast\_\-Init}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Init (Tcl\_\-Interp $\ast$ {\em interp})}\label{Sadie__Contrast_8c_a25}




Definition at line 1631 of file Sadie\_\-Contrast.c.

References Sadie\_\-Contrast\_\-Adapt\-Stretch\-Cmd, Sadie\_\-Contrast\_\-Histeq\-Stretch\-Cmd, Sadie\_\-Contrast\_\-Linear\-Stretch\-Cmd, Sadie\_\-Contrast\_\-Log\-Stretch\-Cmd, Sadie\_\-Contrast\_\-Norm\-Stretch\-Cmd, Sadie\_\-Contrast\_\-PWLStretch\-Cmd, Sadie\_\-Contrast\_\-Qnt\-Stretch\-Cmd, Sadie\_\-Contrast\_\-Ref\-Stretch\-Cmd, Sadie\_\-Contrast\_\-Root\-Stretch\-Cmd, Sadie\_\-Contrast\_\-Sat\-Stretch\-Cmd, Sadie\_\-Contrast\_\-Sqr\-Stretch\-Cmd, Sadie\_\-Contrast\_\-Tbl\-Stretch\-Cmd, and Sadie\_\-Contrast\_\-Thresh\-Stretch\-Cmd.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_LinearStretchCmd@{Sadie\_\-Contrast\_\-LinearStretchCmd}}
\index{Sadie_Contrast_LinearStretchCmd@{Sadie\_\-Contrast\_\-LinearStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Linear\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a14}




Definition at line 308 of file Sadie\_\-Contrast.c.

References bias, CHECKIMG, gain, gmax, gmin, SLEN, STRETCH, IMAGE::text, and type.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_LogStretchCmd@{Sadie\_\-Contrast\_\-LogStretchCmd}}
\index{Sadie_Contrast_LogStretchCmd@{Sadie\_\-Contrast\_\-LogStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Log\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a15}




Definition at line 446 of file Sadie\_\-Contrast.c.

References CHECKIMG, SLEN, STRETCH, and IMAGE::text.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_NormStretchCmd@{Sadie\_\-Contrast\_\-NormStretchCmd}}
\index{Sadie_Contrast_NormStretchCmd@{Sadie\_\-Contrast\_\-NormStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Norm\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a12}




Definition at line 55 of file Sadie\_\-Contrast.c.

References CHECKIMG, CONTNORM, SLEN, and IMAGE::text.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_PWLStretchCmd@{Sadie\_\-Contrast\_\-PWLStretchCmd}}
\index{Sadie_Contrast_PWLStretchCmd@{Sadie\_\-Contrast\_\-PWLStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-PWLStretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a16}




Definition at line 540 of file Sadie\_\-Contrast.c.

References CHECKIMG, gbrk, SLEN, STRETCH, and IMAGE::text.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_QntStretchCmd@{Sadie\_\-Contrast\_\-QntStretchCmd}}
\index{Sadie_Contrast_QntStretchCmd@{Sadie\_\-Contrast\_\-QntStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Qnt\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a20}




Definition at line 1042 of file Sadie\_\-Contrast.c.

References CHECKIMG, gmax, gmin, nlev, SLEN, STRETCH, and IMAGE::text.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_RefStretchCmd@{Sadie\_\-Contrast\_\-RefStretchCmd}}
\index{Sadie_Contrast_RefStretchCmd@{Sadie\_\-Contrast\_\-RefStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Ref\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a24}




Definition at line 1502 of file Sadie\_\-Contrast.c.

References CHECKIMG, MATCH, SLEN, and IMAGE::text.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_RootStretchCmd@{Sadie\_\-Contrast\_\-RootStretchCmd}}
\index{Sadie_Contrast_RootStretchCmd@{Sadie\_\-Contrast\_\-RootStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Root\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a17}




Definition at line 749 of file Sadie\_\-Contrast.c.

References CHECKIMG, SLEN, STRETCH, and IMAGE::text.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_SatStretchCmd@{Sadie\_\-Contrast\_\-SatStretchCmd}}
\index{Sadie_Contrast_SatStretchCmd@{Sadie\_\-Contrast\_\-SatStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Sat\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a21}




Definition at line 1177 of file Sadie\_\-Contrast.c.

References CHECKIMG, gmax, gmin, SLEN, STRETCH, and IMAGE::text.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_SqrStretchCmd@{Sadie\_\-Contrast\_\-SqrStretchCmd}}
\index{Sadie_Contrast_SqrStretchCmd@{Sadie\_\-Contrast\_\-SqrStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Sqr\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a18}




Definition at line 835 of file Sadie\_\-Contrast.c.

References CHECKIMG, SLEN, STRETCH, and IMAGE::text.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_TblStretchCmd@{Sadie\_\-Contrast\_\-TblStretchCmd}}
\index{Sadie_Contrast_TblStretchCmd@{Sadie\_\-Contrast\_\-TblStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Tbl\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a19}




Definition at line 922 of file Sadie\_\-Contrast.c.

References CHECKIMG, IMAGE::gmax, IMAGE::gmin, malloc, nlev, SLEN, STRETCH, table, and IMAGE::text.

Referenced by Sadie\_\-Contrast\_\-Init.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!Sadie_Contrast_ThreshStretchCmd@{Sadie\_\-Contrast\_\-ThreshStretchCmd}}
\index{Sadie_Contrast_ThreshStretchCmd@{Sadie\_\-Contrast\_\-ThreshStretchCmd}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Sadie\_\-Contrast\_\-Thresh\-Stretch\-Cmd (Client\-Data {\em client\_\-data}, Tcl\_\-Interp $\ast$ {\em interp}, int {\em argc}, char $\ast$ {\em argv}[$\,$])}\label{Sadie__Contrast_8c_a22}




Definition at line 1295 of file Sadie\_\-Contrast.c.

References CHECKIMG, SLEN, STRETCH, IMAGE::text, and thresh.

Referenced by Sadie\_\-Contrast\_\-Init.

\subsection{Variable Documentation}
\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!bias@{bias}}
\index{bias@{bias}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf PIXEL} bias}\label{Sadie__Contrast_8c_a6}




Definition at line 30 of file Sadie\_\-Contrast.c.

Referenced by Sadie\_\-Contrast\_\-Linear\-Stretch\-Cmd.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!count@{count}}
\index{count@{count}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double$\ast$ count}\label{Sadie__Contrast_8c_a4}




Definition at line 28 of file Sadie\_\-Contrast.c.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!csize@{csize}}
\index{csize@{csize}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}short csize}\label{Sadie__Contrast_8c_a2}




Definition at line 26 of file Sadie\_\-Contrast.c.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!gain@{gain}}
\index{gain@{gain}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf PIXEL} gain}\label{Sadie__Contrast_8c_a5}




Definition at line 29 of file Sadie\_\-Contrast.c.

Referenced by Sadie\_\-Contrast\_\-Linear\-Stretch\-Cmd.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!gbrk@{gbrk}}
\index{gbrk@{gbrk}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf PIXEL} gbrk[2][4]}\label{Sadie__Contrast_8c_a10}




Definition at line 34 of file Sadie\_\-Contrast.c.

Referenced by Sadie\_\-Contrast\_\-PWLStretch\-Cmd.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!gmax@{gmax}}
\index{gmax@{gmax}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf PIXEL} gmax}\label{Sadie__Contrast_8c_a8}




Definition at line 32 of file Sadie\_\-Contrast.c.

Referenced by Sadie\_\-Contrast\_\-Linear\-Stretch\-Cmd, Sadie\_\-Contrast\_\-Qnt\-Stretch\-Cmd, and Sadie\_\-Contrast\_\-Sat\-Stretch\-Cmd.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!gmin@{gmin}}
\index{gmin@{gmin}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf PIXEL} gmin}\label{Sadie__Contrast_8c_a7}




Definition at line 31 of file Sadie\_\-Contrast.c.

Referenced by Sadie\_\-Contrast\_\-Linear\-Stretch\-Cmd, Sadie\_\-Contrast\_\-Qnt\-Stretch\-Cmd, and Sadie\_\-Contrast\_\-Sat\-Stretch\-Cmd.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!nlev@{nlev}}
\index{nlev@{nlev}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}short nlev}\label{Sadie__Contrast_8c_a1}




Definition at line 25 of file Sadie\_\-Contrast.c.

Referenced by Sadie\_\-Contrast\_\-Qnt\-Stretch\-Cmd, and Sadie\_\-Contrast\_\-Tbl\-Stretch\-Cmd.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!table@{table}}
\index{table@{table}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf PIXEL}$\ast$ table}\label{Sadie__Contrast_8c_a11}




Definition at line 35 of file Sadie\_\-Contrast.c.

Referenced by Sadie\_\-Contrast\_\-Tbl\-Stretch\-Cmd.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!thresh@{thresh}}
\index{thresh@{thresh}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf PIXEL} thresh}\label{Sadie__Contrast_8c_a9}




Definition at line 33 of file Sadie\_\-Contrast.c.

Referenced by Sadie\_\-Contrast\_\-Thresh\-Stretch\-Cmd.\index{Sadie_Contrast.c@{Sadie\_\-Contrast.c}!weight@{weight}}
\index{weight@{weight}!Sadie_Contrast.c@{Sadie\_\-Contrast.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double weight}\label{Sadie__Contrast_8c_a3}




Definition at line 27 of file Sadie\_\-Contrast.c.