\hypertarget{group__gUtility}{
\subsection{General utility functions.}
\label{group__gUtility}\index{General utility functions.@{General utility functions.}}
}
\subsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structMT19937}{MT19937}
\begin{DoxyCompactList}\small\item\em Useful wrapper for \hyperlink{structMT19937}{MT19937} random number generator class. \end{DoxyCompactList}\item 
class \hyperlink{classKahan}{Kahan}
\begin{DoxyCompactList}\small\item\em Class implementing the \hyperlink{classKahan}{Kahan} summation algorithm to allow accurate summation of very large numbers of doubles. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef std::pair$<$ CVD::ImageRef, CVD::ImageRef $>$ \hyperlink{group__gUtility_ga4c9c078fe9f2a8a517df9262c8543b02}{BBox}
\end{DoxyCompactItemize}
\subsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
double \hyperlink{group__gUtility_ga8180400c575af0fd0a6338a75875bd22}{ln} (double x)
\item 
Vector \hyperlink{group__gUtility_ga7a95185ece267e7abac4894f9fde9a91}{spots\_\-to\_\-Vector} (const vector$<$ Vector$<$ 4 $>$ $>$ \&s)
\item 
vector$<$ Vector$<$ 4 $>$ $>$ \hyperlink{group__gUtility_gae1104eb1d7a9b68fa8a6251fb2343ce1}{spots\_\-to\_\-vector} (const Vector$<$$>$ \&s)
\item 
Image$<$ byte $>$ \hyperlink{group__gUtility_ga4325d10ac5bfef523a33f01bfb43eccd}{scale\_\-to\_\-bytes} (const Image$<$ float $>$ \&im, float lo, float hi)
\item 
Image$<$ byte $>$ \hyperlink{group__gUtility_gac421b269cf8aacaae9c988e717a849c5}{scale\_\-to\_\-bytes} (const Image$<$ float $>$ \&im)
\item 
Image$<$ float $>$ \hyperlink{group__gUtility_gaf5fcdabbc36798b463eb998cb5a8bc1f}{average\_\-image} (const vector$<$ Image$<$ float $>$ $>$ \&ims)
\item 
vector$<$ string $>$ \hyperlink{group__gUtility_gab51610948abb7da11353513eb87ba589}{split} (const string \&line)
\item 
{\footnotesize template$<$class C $>$ }\\string \hyperlink{group__gUtility_ga64e208db40f9638637ec4b2bcf72d958}{xtoa} (const C \&x)
\item 
{\footnotesize template$<$class C $>$ }\\C \hyperlink{group__gUtility_gae8fe496c6244cb68e78f862956360601}{atox} (const string \&s, const string \&msg)
\item 
set$<$ ImageRef $>$ \hyperlink{group__gUtility_gaf8193fed1ecae9b2873e2090c8531f4b}{dilate\_\-mask} (const vector$<$ ImageRef $>$ \&v, double r)
\item 
vector$<$ int $>$ \hyperlink{group__gUtility_ga2c9af6bc6b44cab6336954850fba52a7}{SampledMultispot::sequence} (int n)
\item 
double \hyperlink{group__gUtility_ga8f3cba07aa75b7320ae8bd6c0aeac498}{sign} (double x)
\item 
float \hyperlink{group__gUtility_gaae695f0b52ec15dcaaeb5e5e1bfb5f46}{sq} (float f)
\item 
const std::vector$<$ CVD::SubImage$<$ float $>$ $>$ \hyperlink{group__gUtility_ga644392716cfd26eeffed563f729ba17c}{sub\_\-images} (const std::vector$<$ CVD::Image$<$ float $>$ $>$ \&im, CVD::ImageRef pos, CVD::ImageRef size)
\item 
std::pair$<$ CVD::ImageRef, CVD::ImageRef $>$ \hyperlink{group__gUtility_ga995d7ced530caa661009e05d6650d2fc}{boundingbox} (const std::vector$<$ CVD::ImageRef $>$ \&all\_\-spots)
\item 
{\footnotesize template$<$class Stream $>$ }\\void \hyperlink{group__gUtility_ga7942f1dc429121e05acf8ea3a46a75c5}{open\_\-or\_\-die} (Stream \&save\_\-spots, const std::string \&save\_\-spots\_\-file)
\end{DoxyCompactItemize}


\subsubsection{Typedef Documentation}
\hypertarget{group__gUtility_ga4c9c078fe9f2a8a517df9262c8543b02}{
\index{General utility functions.@{General utility functions.}!BBox@{BBox}}
\index{BBox@{BBox}!General utility functions.@{General utility functions.}}
\paragraph[{BBox}]{\setlength{\rightskip}{0pt plus 5cm}typedef std::pair$<$CVD::ImageRef, CVD::ImageRef$>$ {\bf BBox}}}
\label{group__gUtility_ga4c9c078fe9f2a8a517df9262c8543b02}


Deffinition of a pixel aligned bounding box. 



Definition at line 68 of file utility.h.



\subsubsection{Function Documentation}
\hypertarget{group__gUtility_ga8180400c575af0fd0a6338a75875bd22}{
\index{General utility functions.@{General utility functions.}!ln@{ln}}
\index{ln@{ln}!General utility functions.@{General utility functions.}}
\paragraph[{ln}]{\setlength{\rightskip}{0pt plus 5cm}double ln (
\begin{DoxyParamCaption}
\item[{double}]{x}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group__gUtility_ga8180400c575af0fd0a6338a75875bd22}


Computes the natural logarithm, but returns -\/1e100 instead of inf for an input of 0. 

This prevents trapping of FPU exceptions. 
\begin{DoxyParams}{Parameters}
{\em x} & {\itshape x\/} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
ln {\itshape x\/} 
\end{DoxyReturn}


Definition at line 34 of file forward\_\-algorithm.h.



Referenced by backward\_\-sampling(), diff\_\-log\_\-log\_\-normal(), forward\_\-algorithm(), forward\_\-algorithm\_\-delta(), forward\_\-algorithm\_\-delta2(), forward\_\-algorithm\_\-hessian(), forward\_\-backward\_\-algorithm(), hess\_\-log\_\-log\_\-normal(), log\_\-log\_\-normal(), and FitSpots::try\_\-modifying\_\-model().


\begin{DoxyCode}
{
    if(x == 0)
        return -1e100;
    else
        return std::log(x);
}
\end{DoxyCode}
\hypertarget{group__gUtility_ga7a95185ece267e7abac4894f9fde9a91}{
\index{General utility functions.@{General utility functions.}!spots\_\-to\_\-Vector@{spots\_\-to\_\-Vector}}
\index{spots\_\-to\_\-Vector@{spots\_\-to\_\-Vector}!General utility functions.@{General utility functions.}}
\paragraph[{spots\_\-to\_\-Vector}]{\setlength{\rightskip}{0pt plus 5cm}Vector spots\_\-to\_\-Vector (
\begin{DoxyParamCaption}
\item[{const vector$<$ Vector$<$ 4 $>$ $>$ \&}]{s}
\end{DoxyParamCaption}
)}}
\label{group__gUtility_ga7a95185ece267e7abac4894f9fde9a91}


There are two sensible ways of storing the state vector of spot positions. 

This function converts between them. See also spots\_\-to\_\-vector. 
\begin{DoxyParams}{Parameters}
{\em s} & list of spots to convert \\
\hline
\end{DoxyParams}


Definition at line 118 of file multispot5.cc.



Referenced by FitSpots::optimize\_\-each\_\-spot\_\-in\_\-turn\_\-for\_\-several\_\-passes(), FitSpots::run(), and FitSpots::try\_\-modifying\_\-model().


\begin{DoxyCode}
{
    Vector<> r(s.size()*4);
    for(unsigned int i=0; i < s.size(); i++)
    {
        r[i*4+0] = s[i][0];
        r[i*4+1] = s[i][1];
        r[i*4+2] = s[i][2];
        r[i*4+3] = s[i][3];
    }
    return r;
}
\end{DoxyCode}
\hypertarget{group__gUtility_gae1104eb1d7a9b68fa8a6251fb2343ce1}{
\index{General utility functions.@{General utility functions.}!spots\_\-to\_\-vector@{spots\_\-to\_\-vector}}
\index{spots\_\-to\_\-vector@{spots\_\-to\_\-vector}!General utility functions.@{General utility functions.}}
\paragraph[{spots\_\-to\_\-vector}]{\setlength{\rightskip}{0pt plus 5cm}vector$<$Vector$<$4$>$ $>$ spots\_\-to\_\-vector (
\begin{DoxyParamCaption}
\item[{const Vector$<$$>$ \&}]{s}
\end{DoxyParamCaption}
)}}
\label{group__gUtility_gae1104eb1d7a9b68fa8a6251fb2343ce1}


There are two sensible ways of storing the state vector of spot positions. 

This function converts between them. See also spots\_\-to\_\-Vector. 
\begin{DoxyParams}{Parameters}
{\em s} & list of spots to convert \\
\hline
\end{DoxyParams}


Definition at line 135 of file multispot5.cc.



Referenced by NegativeFreeEnergy::compute\_\-with\_\-mask(), generate\_\-state\_\-parameters\_\-ye\_\-olde(), and NegativeFreeEnergy::operator()().


\begin{DoxyCode}
{
    vector<Vector<4> > r(s.size()/4);
    for(unsigned int i=0; i < r.size(); i++)
        r[i] = s.slice<Dynamic, 4>(i*4, 4);
    return r;
}
\end{DoxyCode}
\hypertarget{group__gUtility_ga4325d10ac5bfef523a33f01bfb43eccd}{
\index{General utility functions.@{General utility functions.}!scale\_\-to\_\-bytes@{scale\_\-to\_\-bytes}}
\index{scale\_\-to\_\-bytes@{scale\_\-to\_\-bytes}!General utility functions.@{General utility functions.}}
\paragraph[{scale\_\-to\_\-bytes}]{\setlength{\rightskip}{0pt plus 5cm}Image$<$byte$>$ scale\_\-to\_\-bytes (
\begin{DoxyParamCaption}
\item[{const Image$<$ float $>$ \&}]{im, }
\item[{float}]{lo, }
\item[{float}]{hi}
\end{DoxyParamCaption}
)}}
\label{group__gUtility_ga4325d10ac5bfef523a33f01bfb43eccd}


Normalize an image for display purposes. 



Definition at line 145 of file multispot5.cc.



Referenced by FitSpots::optimize\_\-each\_\-spot\_\-in\_\-turn\_\-for\_\-several\_\-passes(), and FitSpots::try\_\-modifying\_\-model().


\begin{DoxyCode}
{
        Image<byte> out(im.size());
        for(int r=0; r < out.size().y-0; r++)
                for(int c=0; c < out.size().x-0; c++)
                        out[r][c] = (int)floor((im[r][c]-lo)*255/(hi-lo));
        return out;
}
\end{DoxyCode}
\hypertarget{group__gUtility_gac421b269cf8aacaae9c988e717a849c5}{
\index{General utility functions.@{General utility functions.}!scale\_\-to\_\-bytes@{scale\_\-to\_\-bytes}}
\index{scale\_\-to\_\-bytes@{scale\_\-to\_\-bytes}!General utility functions.@{General utility functions.}}
\paragraph[{scale\_\-to\_\-bytes}]{\setlength{\rightskip}{0pt plus 5cm}Image$<$byte$>$ scale\_\-to\_\-bytes (
\begin{DoxyParamCaption}
\item[{const Image$<$ float $>$ \&}]{im}
\end{DoxyParamCaption}
)}}
\label{group__gUtility_gac421b269cf8aacaae9c988e717a849c5}


Normalize an image for display purposes. 



Definition at line 156 of file multispot5.cc.


\begin{DoxyCode}
{
        float lo = *min_element(im.begin(), im.end());
        float hi = *max_element(im.begin(), im.end());
        Image<byte> out(im.size());
        for(int r=0; r < out.size().y-0; r++)
                for(int c=0; c < out.size().x-0; c++)
                        out[r][c] = (int)floor((im[r][c]-lo)*255/(hi-lo));

        return out;
}
\end{DoxyCode}
\hypertarget{group__gUtility_gaf5fcdabbc36798b463eb998cb5a8bc1f}{
\index{General utility functions.@{General utility functions.}!average\_\-image@{average\_\-image}}
\index{average\_\-image@{average\_\-image}!General utility functions.@{General utility functions.}}
\paragraph[{average\_\-image}]{\setlength{\rightskip}{0pt plus 5cm}Image$<$float$>$ average\_\-image (
\begin{DoxyParamCaption}
\item[{const vector$<$ Image$<$ float $>$ $>$ \&}]{ims}
\end{DoxyParamCaption}
)}}
\label{group__gUtility_gaf5fcdabbc36798b463eb998cb5a8bc1f}


Average the input image stack for display purposes. 



Definition at line 170 of file multispot5.cc.



References assert\_\-same\_\-size().


\begin{DoxyCode}
{
    assert_same_size(ims);
    Image<float> r(ims[0].size(), 0);

    for(unsigned int i=0; i < ims.size(); i++)
        transform(r.begin(), r.end(), ims[i].begin(), r.begin(), plus<float>());

    transform(r.begin(), r.end(), r.begin(), bind2nd(multiplies<float>(), 1./ims.
      size()));
    return r;
}
\end{DoxyCode}
\hypertarget{group__gUtility_gab51610948abb7da11353513eb87ba589}{
\index{General utility functions.@{General utility functions.}!split@{split}}
\index{split@{split}!General utility functions.@{General utility functions.}}
\paragraph[{split}]{\setlength{\rightskip}{0pt plus 5cm}vector$<$string$>$ split (
\begin{DoxyParamCaption}
\item[{const string \&}]{line}
\end{DoxyParamCaption}
)}}
\label{group__gUtility_gab51610948abb7da11353513eb87ba589}


Tokenize a line. 



Definition at line 934 of file multispot5.cc.



Referenced by parse\_\-log\_\-file().


\begin{DoxyCode}
{
    vector<string> v;
    istringstream i(line);
    string s;

    while(!i.eof())
    {
        i >> s;
        if(i.fail())
            break;
        v.push_back(s);
    }
    return v;
}
\end{DoxyCode}
\hypertarget{group__gUtility_ga64e208db40f9638637ec4b2bcf72d958}{
\index{General utility functions.@{General utility functions.}!xtoa@{xtoa}}
\index{xtoa@{xtoa}!General utility functions.@{General utility functions.}}
\paragraph[{xtoa}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class C $>$ string xtoa (
\begin{DoxyParamCaption}
\item[{const C \&}]{x}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group__gUtility_ga64e208db40f9638637ec4b2bcf72d958}


Generic version of itoa. 

How many times has this been reimplemented?? 
\begin{DoxyParams}{Parameters}
{\em x} & Value to convert to string \\
\hline
\end{DoxyParams}


Definition at line 954 of file multispot5.cc.



Referenced by parse\_\-log\_\-file().


\begin{DoxyCode}
{
    ostringstream os;
    os << x;
    return os.str();
}
\end{DoxyCode}
\hypertarget{group__gUtility_gae8fe496c6244cb68e78f862956360601}{
\index{General utility functions.@{General utility functions.}!atox@{atox}}
\index{atox@{atox}!General utility functions.@{General utility functions.}}
\paragraph[{atox}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class C $>$ C atox (
\begin{DoxyParamCaption}
\item[{const string \&}]{s, }
\item[{const string \&}]{msg}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group__gUtility_gae8fe496c6244cb68e78f862956360601}


Inverse of \hyperlink{group__gUtility_ga64e208db40f9638637ec4b2bcf72d958}{xtoa()} How many times has this been reimplemented?? 


\begin{DoxyParams}{Parameters}
{\em s} & String to convert \\
\hline
{\em msg} & Mesage to print on error \\
\hline
\end{DoxyParams}


Definition at line 966 of file multispot5.cc.


\begin{DoxyCode}
{
    C c;
    istringstream i(s);
    i >> c;
    if(i.fail())
        throw LogFileParseError("Error parsing " + msg + ". Text is `" + s + "'."
      );
    return c;
}
\end{DoxyCode}
\hypertarget{group__gUtility_gaf8193fed1ecae9b2873e2090c8531f4b}{
\index{General utility functions.@{General utility functions.}!dilate\_\-mask@{dilate\_\-mask}}
\index{dilate\_\-mask@{dilate\_\-mask}!General utility functions.@{General utility functions.}}
\paragraph[{dilate\_\-mask}]{\setlength{\rightskip}{0pt plus 5cm}set$<$ImageRef$>$ dilate\_\-mask (
\begin{DoxyParamCaption}
\item[{const vector$<$ ImageRef $>$ \&}]{v, }
\item[{double}]{r}
\end{DoxyParamCaption}
)}}
\label{group__gUtility_gaf8193fed1ecae9b2873e2090c8531f4b}


Very simple and inefficient dilation function. 



Definition at line 1338 of file multispot5.cc.


\begin{DoxyCode}
{
    vector<ImageRef> m = getDisc(r);

    set<ImageRef> ret;

    for(unsigned int i=0; i < v.size(); i++)
        for(unsigned int j=0; j < m.size(); j++)
            ret.insert(v[i] + m[j]);

    return ret;
}
\end{DoxyCode}
\hypertarget{group__gUtility_ga2c9af6bc6b44cab6336954850fba52a7}{
\index{General utility functions.@{General utility functions.}!sequence@{sequence}}
\index{sequence@{sequence}!General utility functions.@{General utility functions.}}
\paragraph[{sequence}]{\setlength{\rightskip}{0pt plus 5cm}vector$<$int$>$ SampledMultispot::sequence (
\begin{DoxyParamCaption}
\item[{int}]{n}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group__gUtility_ga2c9af6bc6b44cab6336954850fba52a7}


Create a sequence of integers. 

These can be used as observations in an observation class by \hyperlink{group__gHMM_ga15931236a398994295355281ab9d3aad}{forward\_\-algorithm()} and etc. 
\begin{DoxyParams}{Parameters}
{\em n} & Length of sequence \\
\hline
\end{DoxyParams}


Definition at line 188 of file sampled\_\-multispot.h.



Referenced by FitSpots::optimize\_\-each\_\-spot\_\-in\_\-turn\_\-for\_\-several\_\-passes().


\begin{DoxyCode}
{
    vector<int> v;
    for(int i=0; i < n; i++)
        v.push_back(i);
    return v;
}
\end{DoxyCode}
\hypertarget{group__gUtility_ga8f3cba07aa75b7320ae8bd6c0aeac498}{
\index{General utility functions.@{General utility functions.}!sign@{sign}}
\index{sign@{sign}!General utility functions.@{General utility functions.}}
\paragraph[{sign}]{\setlength{\rightskip}{0pt plus 5cm}double sign (
\begin{DoxyParamCaption}
\item[{double}]{x}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group__gUtility_ga8f3cba07aa75b7320ae8bd6c0aeac498}


computes the sign of x 


\begin{DoxyParams}{Parameters}
{\em x} & {\itshape x\/} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
$ \begin{cases} 1 & x \ge 0\\ -1 & x < 0 \end{cases}$ 
\end{DoxyReturn}


Definition at line 38 of file utility.h.


\begin{DoxyCode}
{
    return x>=0?1:-1;
}
\end{DoxyCode}
\hypertarget{group__gUtility_gaae695f0b52ec15dcaaeb5e5e1bfb5f46}{
\index{General utility functions.@{General utility functions.}!sq@{sq}}
\index{sq@{sq}!General utility functions.@{General utility functions.}}
\paragraph[{sq}]{\setlength{\rightskip}{0pt plus 5cm}float sq (
\begin{DoxyParamCaption}
\item[{float}]{f}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{group__gUtility_gaae695f0b52ec15dcaaeb5e5e1bfb5f46}


The ubiquitous square function. 


\begin{DoxyParams}{Parameters}
{\em f} & Number to square \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
square of the number 
\end{DoxyReturn}


Definition at line 48 of file utility.h.



Referenced by auto\_\-fixed\_\-scaling(), NegativeFreeEnergy::compute\_\-with\_\-mask(), diff\_\-log\_\-log\_\-normal(), hess\_\-log\_\-log\_\-normal(), log\_\-log\_\-normal(), log\_\-normal\_\-std(), log\_\-probability\_\-spot(), log\_\-probability\_\-spot\_\-diff(), log\_\-probability\_\-spot\_\-hess(), NegativeFreeEnergy::operator()(), spot\_\-shape\_\-diff\_\-position(), spot\_\-shape\_\-hess\_\-position(), and NegativeFreeEnergy::variance\_\-from\_\-sample().


\begin{DoxyCode}
{ return f*f; }
\end{DoxyCode}
\hypertarget{group__gUtility_ga644392716cfd26eeffed563f729ba17c}{
\index{General utility functions.@{General utility functions.}!sub\_\-images@{sub\_\-images}}
\index{sub\_\-images@{sub\_\-images}!General utility functions.@{General utility functions.}}
\paragraph[{sub\_\-images}]{\setlength{\rightskip}{0pt plus 5cm}const std::vector$<$CVD::SubImage$<$float$>$ $>$ sub\_\-images (
\begin{DoxyParamCaption}
\item[{const std::vector$<$ CVD::Image$<$ float $>$ $>$ \&}]{im, }
\item[{CVD::ImageRef}]{pos, }
\item[{CVD::ImageRef}]{size}
\end{DoxyParamCaption}
)}}
\label{group__gUtility_ga644392716cfd26eeffed563f729ba17c}


Cut sub images out of every member of a vector of images. 


\begin{DoxyParams}{Parameters}
{\em im} & Images to be cut \\
\hline
{\em pos} & Top left corner \\
\hline
{\em size} & Size of the patch \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
subimages. 
\end{DoxyReturn}
\hypertarget{group__gUtility_ga995d7ced530caa661009e05d6650d2fc}{
\index{General utility functions.@{General utility functions.}!boundingbox@{boundingbox}}
\index{boundingbox@{boundingbox}!General utility functions.@{General utility functions.}}
\paragraph[{boundingbox}]{\setlength{\rightskip}{0pt plus 5cm}std::pair$<$CVD::ImageRef, CVD::ImageRef$>$ boundingbox (
\begin{DoxyParamCaption}
\item[{const std::vector$<$ CVD::ImageRef $>$ \&}]{all\_\-spots}
\end{DoxyParamCaption}
)}}
\label{group__gUtility_ga995d7ced530caa661009e05d6650d2fc}


Compute the bounding box of a set of points. 


\begin{DoxyParams}{Parameters}
{\em all\_\-spots} & List of points \\
\hline
\end{DoxyParams}


Referenced by FitSpots::optimize\_\-each\_\-spot\_\-in\_\-turn\_\-for\_\-several\_\-passes(), and FitSpots::try\_\-modifying\_\-model().

\hypertarget{group__gUtility_ga7942f1dc429121e05acf8ea3a46a75c5}{
\index{General utility functions.@{General utility functions.}!open\_\-or\_\-die@{open\_\-or\_\-die}}
\index{open\_\-or\_\-die@{open\_\-or\_\-die}!General utility functions.@{General utility functions.}}
\paragraph[{open\_\-or\_\-die}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Stream $>$ void open\_\-or\_\-die (
\begin{DoxyParamCaption}
\item[{Stream \&}]{save\_\-spots, }
\item[{const std::string \&}]{save\_\-spots\_\-file}
\end{DoxyParamCaption}
)}}
\label{group__gUtility_ga7942f1dc429121e05acf8ea3a46a75c5}

\begin{DoxyParams}{Parameters}
{\em save\_\-spots} & Stream \\
\hline
{\em save\_\-spots\_\-file} & File to open \\
\hline
\end{DoxyParams}


Definition at line 83 of file utility.h.



Referenced by mmain().


\begin{DoxyCode}
{
    using std::cerr;
    using std::endl;
    using std::strerror;
    using std::exit;
    save_spots.open(save_spots_file.c_str());
    int err = errno;

    if(!save_spots.good())
    {
        cerr << "***********************************************************\n";
        cerr << "ERROR: failed to open " << save_spots_file << ": " <<strerror(er
      r) << endl;
        cerr << "***********************************************************\n";
        exit(1);
    }
}
\end{DoxyCode}
