]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/include/vector.h
#3252 creaMaracasVisu Bug New Normal - manual paint filter fill bug setimages
[creaMaracasVisu.git] / lib / maracasVisuLib / include / vector.h
index edadd114f48639694a4ce6f973bdf117db5bcb64..f3a6ffb6bebf2a5b7b798e3f746cb1afa44a3ad5 100644 (file)
@@ -1,3 +1,28 @@
+/*# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and
+#  abiding by the rules of distribution of free software. You can  use,
+#  modify and/ or redistribute the software under the terms of the CeCILL-B
+#  license as circulated by CEA, CNRS and INRIA at the following URL
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability.
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
 ////////////////////////////////////////////////////////////////////////////////
 // vector.h
 // Creation : 24/02/2000
@@ -60,11 +85,11 @@ namespace gtm
         */
        //@{
        /// Default constructor.
-       TVector( uint N = 3, T data = ( T )0, int type = COL_VECTOR  );
+       TVector( uint32_t N = 3, T data = ( T )0, int type = COL_VECTOR  );
        /// Copy constructor.
        TVector( const TVector< T >& r );
        /// Use this to treat an ANSI array as a TVector.
-       TVector( T* block, uint N, bool copy = true, int type = COL_VECTOR );
+       TVector( T* block, uint32_t N, bool copy = true, int type = COL_VECTOR );
        //@}
 
        /// Destructor.
@@ -73,7 +98,7 @@ namespace gtm
        };
 
        /// Size change
-       void SetN( uint N );
+       void SetN( uint32_t N );
 
        /** Assignation operators.
         *
@@ -108,7 +133,7 @@ namespace gtm
        //@}
 
        /// Reference operator.
-       T& operator()( uint i ) {
+       T& operator()( uint32_t i ) {
            return( _vector[ i ] );
        };
        /// ANSI (C/C++ array) reference.
@@ -116,7 +141,7 @@ namespace gtm
            return( _vector );
        };
        /// Vector's cardinality.
-       uint GetN( ) {
+       uint32_t GetN( ) {
            return( _N );
        };
        /// Vector's type (ROW_VECTOR/COL_VECTOR).
@@ -197,7 +222,7 @@ namespace gtm
        /// Memory block.
        T* _vector;
        /// Cardinality.
-       uint _N;
+       uint32_t _N;
        /// Type (ROW_VECTOR/COL_VECTOR).
        int _type;
        /// Have I created _vector?
@@ -208,7 +233,7 @@ namespace gtm
 
 // -----------------------------------------------------------------------------
     template< class T >
-    TVector< T >::TVector( uint N, T data, int type )
+    TVector< T >::TVector( uint32_t N, T data, int type )
     {
        _N        = N;
        _type     = type;
@@ -231,7 +256,7 @@ namespace gtm
 
 // -----------------------------------------------------------------------------
     template< class T >
-    TVector< T >::TVector( T* block, uint N, bool copy, int type )
+    TVector< T >::TVector( T* block, uint32_t N, bool copy, int type )
     {
        _N        = N;
        _type     = type;
@@ -242,7 +267,7 @@ namespace gtm
 
 // -----------------------------------------------------------------------------
     template< class T >
-    void TVector< T >::SetN( uint N )
+    void TVector< T >::SetN( uint32_t N )
     {
        if( _myMemory ) VectorFreeMemory< T >( _vector );
        _N        = N;
@@ -269,7 +294,7 @@ namespace gtm
     template< class T >
     bool TVector< T >::operator==( const TVector< T >& r )
     {
-       uint i;
+       uint32_t i;
        bool ret;
 
        for(
@@ -285,7 +310,7 @@ namespace gtm
     template< class T >
     bool TVector< T >::operator!=( const TVector< T >& r )
     {
-       uint i;
+       uint32_t i;
        bool ret;
 
        for(
@@ -346,7 +371,7 @@ namespace gtm
     TVector< T > TVector< T >::operator-( )
     {
        TVector< T > ret( _N );
-       uint i;
+       uint32_t i;
   
        for( i = 0; i < _N; ret._vector[ i ] = ( T )0 - _vector[ i ], i++ );
        return( ret );