\documentclass{article}
\usepackage{latexsym}
\usepackage{hyperref}
\usepackage{cite}
\usepackage{eso-pic,graphicx}

%% Header Logo
\newcommand{\mylogo}{\includegraphics[scale=0.2]{images/ritk.pdf}}
\usepackage{scrpage2}
\pagestyle{scrheadings}
\clearscrheadfoot
\chead{\headmark}
\cfoot[\pagemark]{\pagemark}
\ohead[\mylogo]{\mylogo}
\ihead[\today]{\today}

\begin{document}

\title{RITK Style Guide}
\author{Jakob Wasza, Sebastian Bauer, Sven Haase}
\date{October 2011}
\maketitle

\section{Purpose}
The following document is a description of the accepted coding style for the Range Imaging Toolkit (RITK). Developers who wish to contribute code to RITK should read and adhere to the standards described here.

\section{Document Overview}
This document is organized into the following sections
\begin{itemize}
	\item System Overview \& Philosophy - motivation for the guideline
	\item Copyright - copyright issues
	\item File Organization - guide to RITK directory structure
	\item Naming Convention - patterns used to name classes, variables and files
	\item Namespaces - the use of namespaces
\end{itemize}
This style guide is not a final ultimate version. Rather, you can send any suggestions to \href{mailto:ritk@i5.cs.fau.de}{ritk@i5.cs.fau.de} and we will revise the issue or add sections to this style guide. If you want to be sure to use the most recent style guide, go to \url{http://www5.cs.fau.de/ritk} and download the latest version there.

\section{Style Guidelines}
The following guidelines have been adopted by the RITK community. They will help to standardize the code written for RITK.  By developing source code with one single style we can include new enhancements from the community and evaluate bugfixes faster. All in all this provokes a faster evolution and improved quality of the RITK source code. Most of the guidelines are in the style of ITK \cite{ITK}. The ITK guide can be found in your ITK directory in \textit{Documentation/Style.pdf}.

\subsection{System Overview \& Philosophy}
The decisions of the following guidelines where established and evolved during the developing process of RITK. These decisions were mostly influenced by the goals RITK needs to fulfil, e.g. real-time processing, generic architecture and portability.

\subsubsection{Implementation Language}
The core implementation language is \verb!C++!. It was chosen as we decided to build a range image streaming application that is only useful if it can run in real-time and still can handle large amounts of data. RITK uses the full power of \verb!C++! including namespaces, function overloading, inheritance and templates.

\subsubsection{Portability}
RITK and its dependencies were developed with the intention to compile on different operating systems with different compilers. Nevertheless, only two configurations have been tested yet:
\begin{itemize}
	\item Windows 7 32bit, MSVC 2008
	\item Windows 7 64bit, MSVC 2008
	\item Windows 7 32bit, MSVC 2010
	\item Linux, GCC
\end{itemize}
If you can confirm any other combination of operating systems and compilers, please write us an email with additional information.

\subsubsection{CMake Build Environment}
The RITK build environment is CMake as it is in ITK. For further information go to \url{http://www.cmake.org}.

\subsubsection{Doxygen Documentation System}
The Doxygen open-source system is used to generate an on-line documentation. For further information go to \url{http://www.doxygen.org}.

\subsection{Copyright}
The license file is included in all downloads. We have not yet put up any copyright header that needs to be included in all files.

\subsection{File Organization}
Classes are created and organized into a single class per file set. A file set consists of .h header file, .cxx implementation file, and/or a .txx templated implementation file. The files should be placed in the correct directory. Please adapt the already existing system, where plugins are subdivided into open-source and closed-source and within those folders in source-, filter-, and application-plugins. If you modify RITK itself make sure to put your additional source codes in the correct module and keep the logical structure. File names within RITK always have to start with \textit{ritk} (e.g. \textit{ritkRImage.h}).

\subsection{Naming Convention}
The most important naming rule is to use meaningful names. In addition to that there are several rules to keep the appearance of the source code homogeneous.
\subsubsection{Classes}
If you create a plugin use the \textit{Plugin Creator}. It will organize and name the code files the right way. For naming additional classes please adapt the structure to the already implemented source files.
\subsubsection{Variables}
 To indicate separate words names are constructed by using case change. For member variables use the prefix \textit{m\_} (e.g. \textit{m\_MyMemberVariable}). Local variables should start with a capital letter.
\subsubsection{Functions}
Functions in RITK need to start with a capital letter. When referring to class methods in code, an explicit this$\rightarrow$ pointer should be used. This helps clarify exactly which method is being invoked.

\subsection{Namespaces}
All classes within RITK itself should be placed in the ritk:: namespace. The plugins do not have to use any namespace.
\subsection{Code Layout and Indentation}
There is only one important point. We DO use tabs in comparison to ITK. For all other layout guidelines please consult the ITK style guide (Chapter 3.7).

\bibliographystyle{alpha}

\bibliography{CodeStyle}

\end{document}