volume.cxx File Reference

#include <memory.h>
#include "volume.hxx"
#include <vtkCharArray.h>
#include <vtkDataArray.h>
#include <vtkDoubleArray.h>
#include <vtkFloatArray.h>
#include <vtkIntArray.h>
#include <vtkPointData.h>
#include <vtkShortArray.h>
#include <vtkUnsignedCharArray.h>
#include <vtkUnsignedIntArray.h>
#include <vtkUnsignedShortArray.h>
Include dependency graph for volume.cxx:

Go to the source code of this file.

Functions

template<class FROM , class TO >
static void convertCastT (FROM *src, TO *dest, ulong size)
template<class FROM , class TO >
static void convertScaleT (FROM *src, TO *dest, ulong size, double smin, double tmin, double slope)
template<class TYPE >
static void getMinMaxT (TYPE *src, ulong size, double &min, double &max)

Function Documentation

template<class FROM , class TO >
static void convertCastT ( FROM *  src,
TO *  dest,
ulong  size 
) [inline, static]

Definition at line 52 of file volume.cxx.

00053 {
00054     FROM* end = src + size;
00055     for( ; src < end; src++, dest++ ) *dest = ( TO )*src;
00056 }

template<class FROM , class TO >
static void convertScaleT ( FROM *  src,
TO *  dest,
ulong  size,
double  smin,
double  tmin,
double  slope 
) [inline, static]

Definition at line 61 of file volume.cxx.

00063 {
00064     FROM* end = src + size;
00065     for( ; src < end; src++, dest++ )
00066         *dest = ( TO )( ( double( *src ) - smin ) * slope + tmin );
00067 }

template<class TYPE >
static void getMinMaxT ( TYPE *  src,
ulong  size,
double &  min,
double &  max 
) [inline, static]

Definition at line 71 of file volume.cxx.

00073 {
00074     TYPE* end = src + size;
00075     TYPE m, M;
00076     bool st;
00077         
00078     m = ( TYPE )0;
00079     M = ( TYPE )0;
00080     for( st = true; src < end; src++, st = false ) {
00081                 
00082         if( *src < m || st ) m = *src;
00083         if( *src > M || st ) M = *src;
00084                 
00085     } // rof
00086         
00087     min = ( double )m;
00088     max = ( double )M;
00089 }


Generated on 20 Oct 2010 for creaMaracasVisu_lib by  doxygen 1.6.1