\hypertarget{class_image_scrambler}{}\section{Image\+Scrambler Class Reference}
\label{class_image_scrambler}\index{Image\+Scrambler@{Image\+Scrambler}}
Inheritance diagram for Image\+Scrambler\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_image_scrambler}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_image_scrambler_add8fe476a0557f10a1fdae5b2b8e576a}{}\hyperlink{class_image_scrambler_add8fe476a0557f10a1fdae5b2b8e576a}{Image\+Scrambler} (Q\+Widget $\ast$parent=0)\label{class_image_scrambler_add8fe476a0557f10a1fdae5b2b8e576a}

\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
\hypertarget{class_image_scrambler_aa0ad5b405d49d1769d7e794f391f8657}{}\hyperlink{class_image_scrambler_aa0ad5b405d49d1769d7e794f391f8657}{$\sim$\+Image\+Scrambler} ()\label{class_image_scrambler_aa0ad5b405d49d1769d7e794f391f8657}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
void \hyperlink{class_image_scrambler_afe4e275f55ee362ea7ce13fcec6f0b26}{crop\+Swap} (Q\+Image \&, int, int, int, int, int, int)
\begin{DoxyCompactList}\small\item\em Funtion that crop two squares of equal size of an image or sub image and swaps them. The funtion receives two coords (x0, y0) and (x1, y1) and a width and a height. Then swaps pixel by pixel the square formed from the top left coordinate (x0, y0) to the bottom right coordinate (x0+width, y0+height) with the square formed from the top left coordinate (x1, y1) to the bottom right (x1+width, y1+height). \end{DoxyCompactList}\item 
Q\+Image \hyperlink{class_image_scrambler_a7eb90242d1779b98f48f9abe5ed7d698}{Scramble\+Filter} (Q\+Image image, int, int, int, int, int)
\begin{DoxyCompactList}\small\item\em Funtion that recursively scrambles an images by dividing the image in squares (sub images) and then swapping them. The first step the program does is divide the image in two or four squares and swap the squares, the resulting image is divided in four squares and then the same steps are applied recursively to each of the four squares. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Slots}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_image_scrambler_afa24bbf9d4f71fd0853478a66d74d5f4}{}void \hyperlink{class_image_scrambler_afa24bbf9d4f71fd0853478a66d74d5f4}{on\+\_\+btn\+Load\+New\+Image\+\_\+clicked} ()\label{class_image_scrambler_afa24bbf9d4f71fd0853478a66d74d5f4}

\begin{DoxyCompactList}\small\item\em Function display a file browsing window to load an image into the G\+U\+I. \end{DoxyCompactList}\item 
\hypertarget{class_image_scrambler_aba8b3a0f8d406c9e48e1d0e9e429a60e}{}void \hyperlink{class_image_scrambler_aba8b3a0f8d406c9e48e1d0e9e429a60e}{on\+\_\+btn\+Save\+\_\+clicked} ()\label{class_image_scrambler_aba8b3a0f8d406c9e48e1d0e9e429a60e}

\begin{DoxyCompactList}\small\item\em Function that saves the scrambled image in the computer. \end{DoxyCompactList}\item 
\hypertarget{class_image_scrambler_a2a548be139a62d30dea82e2797d51ec7}{}void \hyperlink{class_image_scrambler_a2a548be139a62d30dea82e2797d51ec7}{on\+\_\+btn\+Scramble\+Image\+\_\+clicked} ()\label{class_image_scrambler_a2a548be139a62d30dea82e2797d51ec7}

\begin{DoxyCompactList}\small\item\em Function invokes the Scramble\+Filter function to scramble the image and load it in the G\+U\+I. \end{DoxyCompactList}\item 
\hypertarget{class_image_scrambler_a7c3ef8d29bfc424d296e95c6acdb427e}{}void \hyperlink{class_image_scrambler_a7c3ef8d29bfc424d296e95c6acdb427e}{on\+\_\+btn\+Descramble\+Image\+\_\+clicked} ()\label{class_image_scrambler_a7c3ef8d29bfc424d296e95c6acdb427e}

\begin{DoxyCompactList}\small\item\em Function that restore the scrambled image to the original image. \end{DoxyCompactList}\item 
\hypertarget{class_image_scrambler_a7199f376e7dc4fc4b61145be2dcaaad3}{}void \hyperlink{class_image_scrambler_a7199f376e7dc4fc4b61145be2dcaaad3}{on\+\_\+action\+Load\+\_\+\+Image\+\_\+triggered} ()\label{class_image_scrambler_a7199f376e7dc4fc4b61145be2dcaaad3}

\begin{DoxyCompactList}\small\item\em Function that invokes the \hyperlink{class_image_scrambler_afa24bbf9d4f71fd0853478a66d74d5f4}{on\+\_\+btn\+Load\+New\+Image\+\_\+clicked()} function. \end{DoxyCompactList}\item 
\hypertarget{class_image_scrambler_aef30dcfeee03fa8aee60fd7ba89815b3}{}void \hyperlink{class_image_scrambler_aef30dcfeee03fa8aee60fd7ba89815b3}{on\+\_\+action\+Save\+\_\+\+Image\+\_\+triggered} ()\label{class_image_scrambler_aef30dcfeee03fa8aee60fd7ba89815b3}

\begin{DoxyCompactList}\small\item\em Function that invokes the \hyperlink{class_image_scrambler_aba8b3a0f8d406c9e48e1d0e9e429a60e}{on\+\_\+btn\+Save\+\_\+clicked()} function. \end{DoxyCompactList}\item 
\hypertarget{class_image_scrambler_ac7514d09c9ee2b021d803375eba95f74}{}void \hyperlink{class_image_scrambler_ac7514d09c9ee2b021d803375eba95f74}{on\+\_\+action\+Scramble\+\_\+\+Image\+\_\+triggered} ()\label{class_image_scrambler_ac7514d09c9ee2b021d803375eba95f74}

\begin{DoxyCompactList}\small\item\em Function that invokes the \hyperlink{class_image_scrambler_a2a548be139a62d30dea82e2797d51ec7}{on\+\_\+btn\+Scramble\+Image\+\_\+clicked()} function. \end{DoxyCompactList}\item 
\hypertarget{class_image_scrambler_a80b3b6e575f0b24290d71d202d910fed}{}void \hyperlink{class_image_scrambler_a80b3b6e575f0b24290d71d202d910fed}{on\+\_\+action\+Descramble\+\_\+\+Image\+\_\+triggered} ()\label{class_image_scrambler_a80b3b6e575f0b24290d71d202d910fed}

\begin{DoxyCompactList}\small\item\em Function that invokes the \hyperlink{class_image_scrambler_a7c3ef8d29bfc424d296e95c6acdb427e}{on\+\_\+btn\+Descramble\+Image\+\_\+clicked()} function. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_image_scrambler_a9bdaf498f7f4d2b6143aae8ff59ddff3}{}Ui\+::\+Image\+Scrambler $\ast$ {\bfseries ui}\label{class_image_scrambler_a9bdaf498f7f4d2b6143aae8ff59ddff3}

\item 
Q\+Image \hyperlink{class_image_scrambler_a90f0c2de88b3d790ab25460dc2222a60}{original\+Image}
\item 
Q\+Image \hyperlink{class_image_scrambler_a691bd6839008b2ec5dc3bc2933328cc2}{scrambled\+Image}
\item 
int \hyperlink{class_image_scrambler_a4d5951c83206c8cf7bad2c6a9f7387d8}{scramble\+Depth}
\end{DoxyCompactItemize}


\subsection{Member Function Documentation}
\hypertarget{class_image_scrambler_afe4e275f55ee362ea7ce13fcec6f0b26}{}\index{Image\+Scrambler@{Image\+Scrambler}!crop\+Swap@{crop\+Swap}}
\index{crop\+Swap@{crop\+Swap}!Image\+Scrambler@{Image\+Scrambler}}
\subsubsection[{crop\+Swap}]{\setlength{\rightskip}{0pt plus 5cm}void Image\+Scrambler\+::crop\+Swap (
\begin{DoxyParamCaption}
\item[{Q\+Image \&}]{img, }
\item[{int}]{x0, }
\item[{int}]{y0, }
\item[{int}]{x1, }
\item[{int}]{y1, }
\item[{int}]{width, }
\item[{int}]{height}
\end{DoxyParamCaption}
)}\label{class_image_scrambler_afe4e275f55ee362ea7ce13fcec6f0b26}


Funtion that crop two squares of equal size of an image or sub image and swaps them. The funtion receives two coords (x0, y0) and (x1, y1) and a width and a height. Then swaps pixel by pixel the square formed from the top left coordinate (x0, y0) to the bottom right coordinate (x0+width, y0+height) with the square formed from the top left coordinate (x1, y1) to the bottom right (x1+width, y1+height). 


\begin{DoxyParams}{Parameters}
{\em img} & Reference to the image to swap the squares. \\
\hline
{\em x0} & The top left x coordinate of the first square in the image. \\
\hline
{\em y0} & The top left y coordinate of the first square in the image. \\
\hline
{\em x1} & The top left x coordinate of the second square in the image. \\
\hline
{\em y1} & The top left y coordinate of the second square in the image. \\
\hline
{\em width} & Width of the squares \\
\hline
{\em height} & Height of the squares \\
\hline
\end{DoxyParams}
\hypertarget{class_image_scrambler_a7eb90242d1779b98f48f9abe5ed7d698}{}\index{Image\+Scrambler@{Image\+Scrambler}!Scramble\+Filter@{Scramble\+Filter}}
\index{Scramble\+Filter@{Scramble\+Filter}!Image\+Scrambler@{Image\+Scrambler}}
\subsubsection[{Scramble\+Filter}]{\setlength{\rightskip}{0pt plus 5cm}Q\+Image Image\+Scrambler\+::\+Scramble\+Filter (
\begin{DoxyParamCaption}
\item[{Q\+Image}]{image, }
\item[{int}]{N, }
\item[{int}]{sx, }
\item[{int}]{sy, }
\item[{int}]{width, }
\item[{int}]{height}
\end{DoxyParamCaption}
)}\label{class_image_scrambler_a7eb90242d1779b98f48f9abe5ed7d698}


Funtion that recursively scrambles an images by dividing the image in squares (sub images) and then swapping them. The first step the program does is divide the image in two or four squares and swap the squares, the resulting image is divided in four squares and then the same steps are applied recursively to each of the four squares. 


\begin{DoxyParams}{Parameters}
{\em image} & The image to scramble \\
\hline
{\em N} & The depth of the recursion. The image will be scrambled in 4$^\wedge$n squares. \\
\hline
{\em sx} & Starting left top x coordinate of the image or sub image to divide \\
\hline
{\em sy} & Starting left top y coodinate of the image or sub image to divide \\
\hline
{\em width} & Width of the received image \\
\hline
{\em height} & Height of the received image \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the scrambled image 
\end{DoxyReturn}


\subsection{Member Data Documentation}
\hypertarget{class_image_scrambler_a90f0c2de88b3d790ab25460dc2222a60}{}\index{Image\+Scrambler@{Image\+Scrambler}!original\+Image@{original\+Image}}
\index{original\+Image@{original\+Image}!Image\+Scrambler@{Image\+Scrambler}}
\subsubsection[{original\+Image}]{\setlength{\rightskip}{0pt plus 5cm}Q\+Image Image\+Scrambler\+::original\+Image\hspace{0.3cm}{\ttfamily [private]}}\label{class_image_scrambler_a90f0c2de88b3d790ab25460dc2222a60}
the original image (imagen original) \hypertarget{class_image_scrambler_a4d5951c83206c8cf7bad2c6a9f7387d8}{}\index{Image\+Scrambler@{Image\+Scrambler}!scramble\+Depth@{scramble\+Depth}}
\index{scramble\+Depth@{scramble\+Depth}!Image\+Scrambler@{Image\+Scrambler}}
\subsubsection[{scramble\+Depth}]{\setlength{\rightskip}{0pt plus 5cm}int Image\+Scrambler\+::scramble\+Depth\hspace{0.3cm}{\ttfamily [private]}}\label{class_image_scrambler_a4d5951c83206c8cf7bad2c6a9f7387d8}
recursive depth (profundidad de la recursion) \hypertarget{class_image_scrambler_a691bd6839008b2ec5dc3bc2933328cc2}{}\index{Image\+Scrambler@{Image\+Scrambler}!scrambled\+Image@{scrambled\+Image}}
\index{scrambled\+Image@{scrambled\+Image}!Image\+Scrambler@{Image\+Scrambler}}
\subsubsection[{scrambled\+Image}]{\setlength{\rightskip}{0pt plus 5cm}Q\+Image Image\+Scrambler\+::scrambled\+Image\hspace{0.3cm}{\ttfamily [private]}}\label{class_image_scrambler_a691bd6839008b2ec5dc3bc2933328cc2}
scrambled image (imagen revuelta) 

The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Image\+Scrambler.\+h\item 
Filter.\+cpp\item 
Image\+Scrambler.\+cpp\end{DoxyCompactItemize}
