%======================================================================%
% Filename: Article.tex
% Project: Insight Journal Article - ComposeRGBAImageFilter
% Author: Daniel Mueller: dan.muel [at] gmail.com
%----------------------------------------------------------------------%
% Description:
% This artcile presents the ComposeRGBAImageFilter.
%======================================================================%
\documentclass{InsightArticle}

\usepackage{amsfonts}					%Maths fonts
\usepackage{amssymb}					%Maths symbols
\usepackage{listing}					%Used for list of listings
\usepackage{listings}					%List program code source
\usepackage{subfigure}				  	%For subfigures
\usepackage{pstricks,pst-grad,multido} 	%For drawing barcharts
\usepackage[dvips]{graphicx}            %Graphics
\graphicspath{{images/}}                %List folders to figures here
\usepackage[dvips,						%Allow urls 
			bookmarks, 
			bookmarksopen,
			bookmarksnumbered, 
			backref,
			colorlinks,
			linkcolor={blue},
			citecolor={blue},
			urlcolor={blue}]{hyperref}

%======================================================================%
%                   F r o n t   M a t t e r                            % 
%======================================================================%
% The title should be descriptive enough for people to be able to find
% the relevant document. 
\title{ComposeRGBAImageFilter}

% Increment the release number whenever significant changes are made.
% The author and/or editor can define 'significant' however they like.
\release{1.0}

% Name and affiliation
\author{Dan Mueller$^{\scriptscriptstyle\textsf{1}}$}
\authoraddress{ $^{\textsf{1}}$Queensland University of Technology, Brisbane, Australia }

%	Set custom header style
\pagestyle{fancy}								
\fancyhead{} 			% clear all header fields
\fancyhead[L]{\textsf{ ComposeRGBAImageFilter }}
\fancyhead[R]{\textsf{\thepage}}
\fancyfoot{} 			% clear all footer fields

%Set default font
%\renewcommand{\familydefault}{\rmdefault}	%Roman
\renewcommand{\familydefault}{\sfdefault}	%Sans serif
%\renewcommand{\familydefault}{\ttdefault}	%Typewriter

% Document
\begin{document}

% Include defs and commands for listing source code
\include{listcode}

% Setup source code listings 
\lstset{frame = tb,
        framerule = 0.5pt,
        float,
        fontadjust,
        backgroundcolor={\color{listbackground}},
        basicstyle = {\ttfamily\footnotesize},
        keywordstyle = {\ttfamily\color{listkeyword}\textbf},
        identifierstyle = {\ttfamily},
        commentstyle = {\ttfamily\color{listcomment}\textit},
        stringstyle = {\ttfamily},
        showstringspaces = false,
        showtabs = false,
        numbers = left,
        %captionpos = b,
        tabsize = 2
}


%Code definitions
\def\code#1{\small\texttt{#1}}

% Show the title
\maketitle

% Make the title page header/footer empty
\thispagestyle{empty}

\ifhtml
\chapter*{Front Matter\label{front}}
\fi


%======================================================================%
%                       A b s t r a c t                                % 
%======================================================================%
\begin{abstract}
\noindent
This article presents the \code{itk::ComposeRGBAImageFilter}.
\\
\\
\keyword{ITK, Compose}

\end{abstract}

%======================================================================%
%                     M a i n   M a t t e r                            % 
%======================================================================%
%\tableofcontents

%----------------------------------------------------------------------%
% Section
%----------------------------------------------------------------------%
\section{Introduction}
The existing \code{itk::ComposeRGBImageFilter} allows users to compose
a multi-channel (RGB) image from three scalar inputs.
Currently its RGBA counterpart does not exist.
This article presents the \code{itk::ComposeRGBAImageFilter}.

%----------------------------------------------------------------------%
% Section
%----------------------------------------------------------------------%
\section{Implementation}
A number of additions to the ITK Common namespace must be made to
accommodate the proposed \code{itk::ComposeRGBAImageFilter}:
\begin{enumerate}
	\item Add an \code{\#include "itkNumericTraitsRGBAPixel.h"} to the bottom of \code{itkRGBAPixel.h}.
	\item Add \code{itkNumericTraitsRGBAPixel.h} and 
			  \code{itkNumericTraitsRGBAPixel.cxx} to the \code{Common} directory.
	\item Add \code{itkNumericTraitsRGBAPixel.cxx} to the list of sources files in
			  \code{Common/CMakeLists.txt}.
\end{enumerate}

\begin{figure}[!h]
\begin{center}
    %Images ------------------------------------------------------
    \subfigure[Input1]{\includegraphics[width=0.18\textwidth]{../Data/Test1.png}}
    \subfigure[Input2]{\includegraphics[width=0.18\textwidth]{../Data/Test2.png}}
    \subfigure[Input3]{\includegraphics[width=0.18\textwidth]{../Data/Test3.png}}
    \subfigure[Input4]{\includegraphics[width=0.18\textwidth]{../Data/Test4.png}}
    \subfigure[Output]{\includegraphics[width=0.18\textwidth]{output.png}}
    %Caption ------------------------------------------------------
    \caption{Results of the \code{ComposeRGBA} test.}
    \label{fig:Results}        
\end{center}
\end{figure}

%----------------------------------------------------------------------%
% Section
%----------------------------------------------------------------------%
\section{Code}
\begin{center}
	\listcode{language=[ISO]C++}
			 {floatplacement=!htb}
			 {caption=\code{itkComposeRGBAImageFilter.h}.}
			 {label=list:itkComposeRGBAImageFilter}
	\lstinputlisting{../Source/itkComposeRGBAImageFilter.h}
\end{center}

\end{document}