34 #ifndef AIMS_DATA_VOLUMEMANIP_H 
   35 #define AIMS_DATA_VOLUMEMANIP_H 
   42   template < 
typename T >
 
   51     for ( 
int y = 0; y < thing.
dimY(); y++ )
 
   52       for ( 
int x = 0; x < thing.
dimX(); x++ )
 
   53         m( y, x ) = thing( x, y );
 
   59   template < 
typename T >
 
   68     for ( j = 1; j < thing.
dimX(); j++ )
 
   72         while ( i >= 0L && thing( i ) > tmp )
 
   74             thing( i + 1 ) = thing( i );
 
   82   template < 
typename T >
 
   91     for ( j= 1 ; j < thing.
dimX(); j++ )
 
   95         while ( i >= 0L && thing( i ) < tmp )
 
   97             thing( i + 1 ) = thing( i );
 
  100         thing( i + 1 ) = tmp;
 
  105   template < 
typename T >
 
  116     for ( i = 0; i < order.
dimX(); i++ )
 
  119     for ( j = 1; j < temp.
dimX(); j++ )
 
  124         while( i >= 0L && temp( i ) > tmp1 )
 
  126             temp( i + 1 ) = temp( i );
 
  127             order( i + 1 ) = order( i );
 
  130         temp( i + 1 ) = tmp1;
 
  131         order( i + 1 ) = tmp2;
 
  138   template < 
typename T >
 
  149     for ( i = 0; i < order.
dimX(); i++ )
 
  152     for ( j = 1; j < temp.
dimX(); j++ )
 
  157         while( i >= 0L && temp( i ) < tmp1 )
 
  159             temp( i + 1 ) = temp( i );
 
  160             order( i + 1 ) = order( i );
 
  163         temp( i + 1 ) = tmp1;
 
  164         order( i + 1 ) = tmp2;
 
  190   template < 
typename T >
 
  200     for ( 
int y = 0; y < thing.
dimY(); y++ )
 
  201       for ( 
int x = 0; x < thing.
dimX(); x++ )
 
  203           m( x, y ) = thing( x, y );
 
  209   template < 
typename T >
 
  219     for ( 
int y = 0; y < thing.
dimY(); y++ )
 
  220       for ( 
int x = 0; x < thing.
dimX(); x++ )
 
  222           m( x, y ) = thing( x, y );
 
  230 template < 
typename T >
 
  234   int dimx = thing.
dimX();
 
  235   int dimy = thing.
dimY();
 
  236   int dimz = thing.
dimZ();
 
  237   int dimt = thing.
dimT();
 
  241   for ( 
int t = 0; t < dimt; t++ )
 
  244       for ( 
int z = 0; z < dimz; z++ )
 
  247           for ( 
int y = 0; y < dimy; y++ )
 
  250               for ( 
int x = 0; x < dimx; x++ )
 
  252                   os << thing( x, y, z, t );
 
  255                   if ( x == dimx - 1 && y != dimy - 1 )
 
  256                     os << 
"]," << std::endl << 
"   ";
 
  257                   if ( x == dimx - 1 && y == dimy - 1 && z != dimz - 1 )
 
  258                     os << 
"]]," << std::endl << 
"  ";
 
  259                   if ( x == dimx - 1 && y == dimy - 1 && z == dimz - 1 &&
 
  261                     os << 
"]]]," << std::endl << 
" ";
 
  262                   if ( x == dimx - 1 && y == dimy - 1 && z == dimz - 1 &&
 
  274 template < 
typename T >
 
  279   int dimx = thing.
dimX();
 
  280   int dimy = thing.
dimY();
 
  281   int dimz = thing.
dimZ();
 
  282   int dimt = thing.
dimT();
 
  285   for ( 
int t = 0; t < dimt; t++ )
 
  288       for ( 
int z = 0; z < dimz; z++ )
 
  291           for ( 
int y = 0; y < dimy; y++ )
 
  294               for ( 
int x = 0; x < dimx; x++ )
 
  296                   is >> thing( x, y, z, t );
 
  299                   if ( x == dimx - 1 && y != dimy - 1 )
 
  304                   if ( x == dimx - 1 && y == dimy - 1 && z != dimz - 1 )
 
  310                   if ( x == dimx - 1 && y == dimy - 1 && z == dimz - 1 &&
 
  318                   if ( x == dimx - 1 && y == dimy - 1 && z == dimz - 1 &&
 
int borderWidth() const
Size of the border.
carto::VolumeRef< T > & volume()
AimsData< T > clone() const
The class for EcatSino data write operation.
bool hasSameDim(const AimsData< T > &v1, const AimsData< T > &v2)
AimsData< T > transpose(const AimsData< T > &thing)
bool hasSameSize(const AimsData< T > &v1, const AimsData< T > &v2)
void incSorting(AimsData< T > &thing)
AimsData< int32_t > incOrder(const AimsData< T > &thing)
AimsData< T > triSup(const AimsData< T > &thing)
AimsData< T > triInf(const AimsData< T > &thing)
AimsData< int32_t > decOrder(const AimsData< T > &thing)
void decSorting(AimsData< T > &thing)
bool isSameVolumeSize(const Volume< T > &v1, const Volume< T > &v2)
std::istream & operator>>(std::istream &is, AimsData< T > &thing)
std::ostream & operator<<(std::ostream &os, const AimsData< T > &thing)