[opengtl-commits] [698] specify pixel::setAlpha/alpha functions |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 698
Author: cyrille
Date: 2009-03-26 13:32:40 +0100 (Thu, 26 Mar 2009)
Log Message:
-----------
specify pixel::setAlpha/alpha functions
Modified Paths:
--------------
trunk/OpenGTL/OpenShiva/OpenShiva/Library.h
trunk/OpenGTL/OpenShiva/doc/specification/ShivaSpec.tex
Modified: trunk/OpenGTL/OpenShiva/OpenShiva/Library.h
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/Library.h 2009-03-26 12:27:32 UTC (rev 697)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/Library.h 2009-03-26 12:32:40 UTC (rev 698)
@@ -41,10 +41,10 @@
friend class Kernel;
friend class LibrariesManager;
Library( bool _isKernel, int _channelsNb );
- virtual ~Library();
+ virtual ~Library(); // TODO BIC remove the virtual
private:
- virtual void cleanup();
- virtual void postCompilation();
+ virtual void cleanup(); // TODO BIC move those function to LibraryCompilation
+ virtual void postCompilation(); // TODO BIC move those function to LibraryCompilation
public:
/**
* @return the name of the kernel
Modified: trunk/OpenGTL/OpenShiva/doc/specification/ShivaSpec.tex
===================================================================
--- trunk/OpenGTL/OpenShiva/doc/specification/ShivaSpec.tex 2009-03-26 12:27:32 UTC (rev 697)
+++ trunk/OpenGTL/OpenShiva/doc/specification/ShivaSpec.tex 2009-03-26 12:32:40 UTC (rev 698)
@@ -440,7 +440,7 @@
\verb|pixelN| can be cast to the corresponding vector of \verb|float|.
-\subsubsection{Fields}
+\subsubsection{Members}
\paragraph{data}
Give access to the vector containing the data.
@@ -448,6 +448,24 @@
Give access to the coordinates of the pixel, the type of this field is
\verb|float|.
+\paragraph{setAlpha}
+The \verb|setAlpha| function allows to set the current alpha channel of a
+pixel. It takes a \verb|float| as argument.
+
+When the image doesn't have an alpha channel, this function does nothing.
+
+\paragraph{alpha}
+The \verb|alpha| functions allows to get the value of the alpha channel of a
+pixel.
+
+For instance:
+\begin{lstlisting}
+pixel src, dst;
+dst.setAlpha( 0.5 * src.alpha() );
+\end{lstlisting}
+
+When the image doesn't have an alpha channel, this function return $ 1.0 $.
+
\subsection{Region types}
\begin{lstlisting}