Skip to content
Snippets Groups Projects
Commit f8e0a912 authored by Jordi Inglada's avatar Jordi Inglada
Browse files

Developper guide

parent bc2307f5
No related branches found
No related tags found
No related merge requests found
#FIG 3.2
Landscape
Center
Metric
A4
100.00
Single
-2
1200 2
5 1 0 1 0 7 50 0 -1 0.000 0 0 0 0 2376.142 3919.443 2370 3797 2498 3906 2373 4042
6 900 3735 1980 4095
1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 1440 3915 540 180 1440 3915 1980 4095
4 1 0 50 0 0 12 0.0000 4 135 540 1423 3970 Reader\001
-6
6 2846 3688 3950 4150
1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 3398 3919 552 231 3398 3919 3950 4150
4 1 0 50 0 0 12 0.0000 4 135 720 3387 3890 Gaussian\001
4 1 0 50 0 0 12 0.0000 4 135 405 3404 4073 Filter\001
-6
1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2362 3909 50 50 2362 3909 2412 3909
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
1981 3913 2370 3909
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
2494 3913 2846 3917
4 0 0 50 0 0 12 0.0000 4 180 465 2194 3705 Image\001
4 1 0 50 0 0 8 0.0000 4 120 735 3421 4282 ProcessObject\001
4 1 0 50 0 0 8 0.0000 4 120 570 2407 4218 DataObject\001
4 1 0 50 0 0 8 0.0000 4 120 735 1434 4285 ProcessObject\001
#FIG 3.2
Landscape
Center
Metric
A4
100.00
Single
-2
1200 2
5 1 0 1 0 7 50 0 -1 0.000 0 0 0 0 2376.142 3919.443 2370 3797 2498 3906 2373 4042
5 1 0 1 0 7 50 0 -1 0.000 0 0 0 0 4295.142 3915.443 4289 3793 4417 3902 4292 4038
6 900 3735 1980 4095
1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 1440 3915 540 180 1440 3915 1980 4095
4 0 0 50 0 0 12 0.0000 4 135 540 1209 3974 Reader\001
-6
6 2846 3688 3950 4150
1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 3398 3919 552 231 3398 3919 3950 4150
4 1 0 50 0 0 12 0.0000 4 135 405 3419 4078 Filter\001
4 1 0 50 0 0 12 0.0000 4 135 720 3427 3897 Gaussian\001
-6
6 4619 3734 5723 4090
1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 5171 3912 552 178 5171 3912 5723 4090
4 1 0 50 0 0 12 0.0000 4 180 975 5188 3967 Thresholding\001
-6
1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2362 3909 50 50 2362 3909 2412 3909
1 3 0 1 0 0 50 0 20 0.000 1 0.0000 4300 3909 50 50 4300 3909 4350 3909
1 3 0 1 0 0 50 0 20 0.000 1 0.0000 5984 3900 50 50 5984 3900 6034 3900
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
1981 3913 2370 3909
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
2494 3913 2846 3917
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
3950 3913 4296 3913
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
4418 3908 4628 3912
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
5724 3904 5988 3904
2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2
5183 4089 5183 5911
2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2
3395 4144 3395 5863
2 1 2 1 0 7 50 0 -1 3.000 0 0 -1 0 0 2
1422 4096 1422 5781
2 1 0 1 0 7 50 0 -1 3.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
5183 4404 3402 4404
2 1 0 1 0 7 50 0 -1 3.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
3374 4698 1416 4698
2 1 0 1 0 7 50 0 -1 3.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
1431 5376 3389 5376
2 1 0 1 0 7 50 0 -1 3.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
3402 5602 5183 5602
4 0 0 50 0 0 12 0.0000 4 180 465 2194 3705 Image\001
4 0 0 50 0 0 12 0.0000 4 180 465 4114 3724 Image\001
4 0 0 50 0 0 12 0.0000 4 180 465 5786 3735 Image\001
4 0 0 50 0 0 12 0.0000 4 180 705 5272 4315 Update()\001
4 0 0 50 0 0 12 0.0000 4 180 1230 1491 5302 GenerateData()\001
4 0 0 50 0 0 12 0.0000 4 180 705 1483 4939 Update()\001
4 0 0 50 0 0 12 0.0000 4 180 1230 5245 5801 GenerateData()\001
4 0 0 50 0 0 12 0.0000 4 180 1230 3477 5548 GenerateData()\001
4 0 0 50 0 0 12 0.0000 4 180 705 3450 4630 Update()\001
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
6 975 1725 6600 2550
6 3075 1725 4500 2550
6 3825 1950 4425 2325
4 1 0 50 0 0 12 0.0000 0 135 135 4125 2325 Y\001
4 1 0 50 0 0 12 0.0000 0 180 465 4125 2100 Image\001
-6
6 3150 1950 3750 2325
4 1 0 50 0 0 12 0.0000 0 180 585 3450 2100 Casting\001
4 1 0 50 0 0 12 0.0000 0 135 405 3450 2325 Filter\001
-6
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
4500 2550 4500 1725 3075 1725 3075 2550 4500 2550
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
4425 2475 4425 1800 3825 1800 3825 2475 4425 2475
-6
6 5175 1725 6600 2550
6 5325 1950 5775 2325
4 1 0 50 0 0 12 0.0000 0 135 405 5550 2100 Filter\001
4 1 0 50 0 0 12 0.0000 0 135 120 5550 2325 B\001
-6
6 5925 1950 6525 2325
4 1 0 50 0 0 12 0.0000 0 180 465 6225 2100 Image\001
4 1 0 50 0 0 12 0.0000 0 135 120 6225 2325 Z\001
-6
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
6600 2550 6600 1725 5175 1725 5175 2550 6600 2550
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
6525 2475 6525 1800 5925 1800 5925 2475 6525 2475
-6
6 975 1725 2400 2550
6 1125 1950 1575 2325
4 1 0 50 0 0 12 0.0000 0 135 405 1350 2100 Filter\001
4 1 0 50 0 0 12 0.0000 0 135 135 1350 2325 A\001
-6
6 1725 1950 2325 2325
4 1 0 50 0 0 12 0.0000 0 180 465 2025 2100 Image\001
4 1 0 50 0 0 12 0.0000 0 135 135 2025 2325 X\001
-6
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
2325 2475 2325 1800 1725 1800 1725 2475 2325 2475
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
2400 2550 2400 1725 975 1725 975 2550 2400 2550
-6
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
2325 2175 3075 2175
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
4425 2175 5175 2175
-6
6 5175 3000 6600 3825
6 5325 3225 5775 3600
4 1 0 50 0 0 12 0.0000 0 135 405 5550 3375 Filter\001
4 1 0 50 0 0 12 0.0000 0 135 120 5550 3600 B\001
-6
6 5925 3225 6525 3600
4 1 0 50 0 0 12 0.0000 0 180 465 6225 3375 Image\001
4 1 0 50 0 0 12 0.0000 0 135 120 6225 3600 Z\001
-6
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
6600 3825 6600 3000 5175 3000 5175 3825 6600 3825
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
6525 3750 6525 3075 5925 3075 5925 3750 6525 3750
-6
6 975 3000 2400 3825
6 1125 3225 1575 3600
4 1 0 50 0 0 12 0.0000 0 135 405 1350 3375 Filter\001
4 1 0 50 0 0 12 0.0000 0 135 135 1350 3600 A\001
-6
6 1725 3225 2325 3600
4 1 0 50 0 0 12 0.0000 0 180 465 2025 3375 Image\001
4 1 0 50 0 0 12 0.0000 0 135 135 2025 3600 X\001
-6
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
2325 3750 2325 3075 1725 3075 1725 3750 2325 3750
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
2400 3825 2400 3000 975 3000 975 3825 2400 3825
-6
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
2325 3450 3965 3451
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
4342 3444 5175 3450
2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
4500 3825 4500 3000 3075 3000 3075 3825 4500 3825
2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 9
4350 3075 3225 3075 3225 3300 3975 3300 3972 3562 3233 3554
3225 3750 4350 3750 4350 3075
4 1 0 50 0 0 12 0.0000 0 180 615 3639 3232 Adaptor\001
4 1 0 50 0 0 12 0.0000 0 135 135 4164 3488 Y\001
\chapter{Image Adaptors}
\label{sec:ImageAdaptors}
\index{ImageAdaptors}
\begin{figure}
\center
\includegraphics[width=0.8\textwidth]{ImageAdaptorConcept.eps}
\itkcaption[ImageAdaptor concept]{ The difference between using a
CastImageFilter and an ImageAdaptor. ImageAdaptors
convert pixel values when they are accessed by iterators. Thus, they do not
produces an intermediate image. In the example
illustrated by this figure, the \emph{Image Y} is not created by the
ImageAdaptor; instead, the image is simulated on the fly each time an
iterator from the filter downstream attempts to access the image data.}
\label{fig:ImageAdaptorConcept}
\end{figure}
The purpose of an \emph{image adaptor} is to make one image appear
like another image, possibly of a different pixel type. A typical
example is to take an image of pixel type \code{unsigned char} and
present it as an image of pixel type \code{float}. The motivation for
using image adaptors in this case is to avoid the extra memory
resources required by using a casting filter. When we use the
\doxygen{CastImageFilter} for the conversion, the filter creates a
memory buffer large enough to store the \code{float} image. The
\code{float} image requires four times the memory of the
original image and contains no useful additional information. Image
adaptors, on the other hand, do not require the extra memory as
pixels are converted only when they are read using image iterators
(see Chapter~\ref{sec:ImageIteratorsChapter}).
Image adaptors are particularly useful when there is infrequent pixel access,
since the actual conversion occurs on the fly during the access operation. In
such cases the use of image adaptors may reduce overall computation time as
well as reduce memory usage. The use of image adaptors, however, can be
disadvantageous in some situations. For example, when the downstream filter
is executed multiple times, a CastImageFilter will cache its output after the
first execution and will not re-execute when the filter downstream is
updated. Conversely, an image adaptor will compute the cast every time.
Another application for image adaptors is to perform lightweight
pixel-wise operations replacing the need for a filter. In the toolkit,
adaptors are defined for many single valued and single parameter
functions such as trigonometric, exponential and logarithmic
functions. For example,
\begin{itemize}
\item \doxygen{ExpImageAdaptor}
\item \doxygen{SinImageAdaptor}
\item \doxygen{CosImageAdaptor}
\end{itemize}
The following examples illustrate common applications of image adaptors.
\section{Image Casting}
\label{sec:ImageAdaptorForBasicCasting}
\ifitkFullVersion
\input{ImageAdaptor1.tex}
\fi
\section{Adapting RGB Images}
\label{sec:ImageAdaptorForRGB}
\ifitkFullVersion
\input{ImageAdaptor2.tex}
\fi
\section{Adapting Vector Images}
\label{sec:ImageAdaptorForVectors}
\ifitkFullVersion
\input{ImageAdaptor3.tex}
\fi
\section{Adaptors for Simple Computation}
\label{sec:ImageAdaptorForSimpleComputation}
\ifitkFullVersion
\input{ImageAdaptor4.tex}
\fi
\section{Adaptors and Writers}
Image adaptors will not behave correctly when connected directly to a writer.
The reason is that writers tend to get direct access to the image buffer from
their input, since image adaptors do not have a real buffer their behavior in
this circumstances is incorrect. You should avoid instantiating the
\code{ImageFileWriter} or the \code{ImageSeriesWriter} over an image adaptor
type.
......@@ -6,7 +6,7 @@ Welcome to the \emph{ORFEO ToolBox (OTB) Software Guide}.
This document presents the essential concepts used in OTB. It will
guide you through the road of learning and using OTB. The Doxygen
documentation for the OTB application programming interface is
available on line.
available on line at \url{http://smsc.cnes.fr/PLEIADES/OTB/Doxygen/html}.
\section{Organization}
\label{sec:Organization}
......
......@@ -459,16 +459,16 @@ area, or \emph{extent}, of the iterator can be dereferenced.
%% \begin{figure}
%% \centering
%% \includegraphics[width=0.6\textwidth]{NeighborhoodIteratorFig1.eps}
%% \itkcaption[Neighborhood iterator]{Path of a $3x3$ neighborhood
%% iterator through a 2D image region. The extent of the neighborhood is
%% indicated by the hashing around the iterator position. Pixels that lie within
%% this extent are accessible through the iterator. An arrow denotes a single
%% iterator step, the result of one \code{++} operation.}
%% \protect\label{fig:NeighborhoodIteratorFig1}
%% \end{figure}
\begin{figure}
\centering
\includegraphics[width=0.6\textwidth]{NeighborhoodIteratorFig1.eps}
\itkcaption[Neighborhood iterator]{Path of a $3x3$ neighborhood
iterator through a 2D image region. The extent of the neighborhood is
indicated by the hashing around the iterator position. Pixels that lie within
this extent are accessible through the iterator. An arrow denotes a single
iterator step, the result of one \code{++} operation.}
\protect\label{fig:NeighborhoodIteratorFig1}
\end{figure}
\index{Neighborhood iterators!construction of}
\index{Neighborhood iterators!radius of}
......@@ -491,16 +491,16 @@ The radius of the neighborhood iterator is queried after construction
by calling the \code{GetRadius()} method. Some other methods provide
some useful information about the iterator and its underlying image.
%% \begin{figure}
%% \centering
%% \includegraphics[width=0.9\textwidth]{NeighborhoodIteratorFig2.eps}
%% \itkcaption[Some possible neighborhood iterator shapes]{Several possible 2D
%% neighborhood iterator shapes are shown along with their radii and sizes. A
%% neighborhood pixel can be dereferenced by its integer index (top) or its
%% offset from the center (bottom). The center pixel of each iterator is
%% shaded.}
%% \protect\label{fig:NeighborhoodIteratorFig2}
%% \end{figure}
\begin{figure}
\centering
\includegraphics[width=0.9\textwidth]{NeighborhoodIteratorFig2.eps}
\itkcaption[Some possible neighborhood iterator shapes]{Several possible 2D
neighborhood iterator shapes are shown along with their radii and sizes. A
neighborhood pixel can be dereferenced by its integer index (top) or its
offset from the center (bottom). The center pixel of each iterator is
shaded.}
\protect\label{fig:NeighborhoodIteratorFig2}
\end{figure}
\begin{itemize}
......
......@@ -84,7 +84,7 @@ colorlinks,linkcolor={blue},citecolor={blue},urlcolor={blue},
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{The ORFEO Tool Box Software Guide\\First edition\\Draft Version}
\title{The ORFEO Tool Box Software Guide\\ OTB-1.0}
\author{OTB Development Team}
......@@ -220,7 +220,18 @@ colorlinks,linkcolor={blue},citecolor={blue},urlcolor={blue},
%%%\part{Developper's guide}
%%%\input{Iterators.tex}
\ifitkFullVersion
\input{Iterators.tex}
\fi
\ifitkFullVersion
\input{ImageAdaptors.tex}
\fi
\ifitkFullVersion
\input{WriteAFilter.tex}
\fi
\backmatter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment