\hypertarget{a02619}{
\section{mln::io::pnm Namespace Reference}
\label{da/dfd/a02619}\index{mln::io::pnm@{mln::io::pnm}}
}


Namespace of pnm input/output handling.  


\subsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
namespace \hyperlink{a02620}{impl}


\begin{DoxyCompactList}\small\item\em Namespace of pnm's implementation details. \item\end{DoxyCompactList}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename V $>$ }\\\hyperlink{a00248}{image2d}$<$ V $>$ \hyperlink{a02619_ab38140184a2382cdfca5390be61f30c4}{load} (char type\_\-, const std::string \&filename)
\begin{DoxyCompactList}\small\item\em main function : load pnm format \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I $>$ }\\void \hyperlink{a02619_ace152cefb8612300ee0f9c04aac3122c}{load} (char type\_\-, \hyperlink{a00044}{Image}$<$ I $>$ \&ima\_\-, const std::string \&filename)
\begin{DoxyCompactList}\small\item\em An other way to load pnm files : the destination is an argument to check if the type match the file to load. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I $>$ }\\void \hyperlink{a02619_afbe3696ac4419d3176d81f15e147411f}{load\_\-ascii\_\-builtin} (std::ifstream \&file, I \&ima)
\begin{DoxyCompactList}\small\item\em load\_\-ascii for builtin value types. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I $>$ }\\void \hyperlink{a02619_aa22282ce667c156f53f9b177a0579726}{load\_\-ascii\_\-value} (std::ifstream \&file, I \&ima)
\begin{DoxyCompactList}\small\item\em load\_\-ascii for Milena value types. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I $>$ }\\void \hyperlink{a02619_a51515947a6474be7ce3678ffb9b02588}{load\_\-raw\_\-2d} (std::ifstream \&file, I \&ima)
\begin{DoxyCompactList}\small\item\em load\_\-raw\_\-2d. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename V $>$ }\\unsigned int \hyperlink{a02619_a43f6c8b10db994cbfafac6c5e5801343}{max\_\-component} (const V \&)
\begin{DoxyCompactList}\small\item\em Give the maximum value which can be stored as a component value type V. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$typename I $>$ }\\void \hyperlink{a02619_a245315c7314693e5033a956e1d9c1918}{save} (char type, const \hyperlink{a00044}{Image}$<$ I $>$ \&ima\_\-, const std::string \&filename)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Namespace of pnm input/output handling. 

\subsection{Function Documentation}
\hypertarget{a02619_ab38140184a2382cdfca5390be61f30c4}{
\index{mln::io::pnm@{mln::io::pnm}!load@{load}}
\index{load@{load}!mln::io::pnm@{mln::io::pnm}}
\subsubsection[{load}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename V $>$ {\bf image2d}$<$V$>$ mln::io::pnm::load (
\begin{DoxyParamCaption}
\item[{char}]{ type\_\-, }
\item[{const std::string \&}]{ filename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{da/dfd/a02619_ab38140184a2382cdfca5390be61f30c4}


main function : load pnm format 



Definition at line 210 of file pnm/load.hh.



References load\_\-raw\_\-2d(), and max\_\-component().

\hypertarget{a02619_ace152cefb8612300ee0f9c04aac3122c}{
\index{mln::io::pnm@{mln::io::pnm}!load@{load}}
\index{load@{load}!mln::io::pnm@{mln::io::pnm}}
\subsubsection[{load}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ void mln::io::pnm::load (
\begin{DoxyParamCaption}
\item[{char}]{ type\_\-, }
\item[{Image$<$ I $>$ \&}]{ ima\_\-, }
\item[{const std::string \&}]{ filename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{da/dfd/a02619_ace152cefb8612300ee0f9c04aac3122c}


An other way to load pnm files : the destination is an argument to check if the type match the file to load. 



Definition at line 257 of file pnm/load.hh.



References mln::make::box2d(), load\_\-raw\_\-2d(), and max\_\-component().

\hypertarget{a02619_afbe3696ac4419d3176d81f15e147411f}{
\index{mln::io::pnm@{mln::io::pnm}!load\_\-ascii\_\-builtin@{load\_\-ascii\_\-builtin}}
\index{load\_\-ascii\_\-builtin@{load\_\-ascii\_\-builtin}!mln::io::pnm@{mln::io::pnm}}
\subsubsection[{load\_\-ascii\_\-builtin}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ void mln::io::pnm::load\_\-ascii\_\-builtin (
\begin{DoxyParamCaption}
\item[{std::ifstream \&}]{ file, }
\item[{I \&}]{ ima}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{da/dfd/a02619_afbe3696ac4419d3176d81f15e147411f}


load\_\-ascii for builtin value types. 



Definition at line 178 of file pnm/load.hh.

\hypertarget{a02619_aa22282ce667c156f53f9b177a0579726}{
\index{mln::io::pnm@{mln::io::pnm}!load\_\-ascii\_\-value@{load\_\-ascii\_\-value}}
\index{load\_\-ascii\_\-value@{load\_\-ascii\_\-value}!mln::io::pnm@{mln::io::pnm}}
\subsubsection[{load\_\-ascii\_\-value}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ void mln::io::pnm::load\_\-ascii\_\-value (
\begin{DoxyParamCaption}
\item[{std::ifstream \&}]{ file, }
\item[{I \&}]{ ima}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{da/dfd/a02619_aa22282ce667c156f53f9b177a0579726}


load\_\-ascii for Milena value types. 



Definition at line 164 of file pnm/load.hh.

\hypertarget{a02619_a51515947a6474be7ce3678ffb9b02588}{
\index{mln::io::pnm@{mln::io::pnm}!load\_\-raw\_\-2d@{load\_\-raw\_\-2d}}
\index{load\_\-raw\_\-2d@{load\_\-raw\_\-2d}!mln::io::pnm@{mln::io::pnm}}
\subsubsection[{load\_\-raw\_\-2d}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ void mln::io::pnm::load\_\-raw\_\-2d (
\begin{DoxyParamCaption}
\item[{std::ifstream \&}]{ file, }
\item[{I \&}]{ ima}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{da/dfd/a02619_a51515947a6474be7ce3678ffb9b02588}


load\_\-raw\_\-2d. 

for all pnm 8/16 bits formats 

Definition at line 198 of file pnm/load.hh.



Referenced by load().

\hypertarget{a02619_a43f6c8b10db994cbfafac6c5e5801343}{
\index{mln::io::pnm@{mln::io::pnm}!max\_\-component@{max\_\-component}}
\index{max\_\-component@{max\_\-component}!mln::io::pnm@{mln::io::pnm}}
\subsubsection[{max\_\-component}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename V $>$ unsigned int mln::io::pnm::max\_\-component (
\begin{DoxyParamCaption}
\item[{const V \&}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{da/dfd/a02619_a43f6c8b10db994cbfafac6c5e5801343}


Give the maximum value which can be stored as a component value type V. 



Definition at line 56 of file max\_\-component.hh.



Referenced by load().

\hypertarget{a02619_a245315c7314693e5033a956e1d9c1918}{
\index{mln::io::pnm@{mln::io::pnm}!save@{save}}
\index{save@{save}!mln::io::pnm@{mln::io::pnm}}
\subsubsection[{save}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename I $>$ void mln::io::pnm::save (
\begin{DoxyParamCaption}
\item[{char}]{ type, }
\item[{const Image$<$ I $>$ \&}]{ ima\_\-, }
\item[{const std::string \&}]{ filename}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{da/dfd/a02619_a245315c7314693e5033a956e1d9c1918}
Save a Milena image as a pnm image.


\begin{DoxyParams}{Parameters}
\item[\mbox{\tt[in]} {\em type}]The type of the image to save (can be PPM, PGM, PBM). \item[\mbox{\tt[in]} {\em ima\_\-}]The image to save. \item[\mbox{\tt[in,out]} {\em filename}]the destination. \end{DoxyParams}


Definition at line 185 of file pnm/save.hh.

