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 61 of file volume.cxx.

00062 {
00063     FROM* end = src + size;
00064     for( ; src < end; src++, dest++ ) *dest = ( TO )*src;
00065 }

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 70 of file volume.cxx.

00072 {
00073     FROM* end = src + size;
00074     for( ; src < end; src++, dest++ )
00075         *dest = ( TO )( ( double( *src ) - smin ) * slope + tmin );
00076 }

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

Definition at line 80 of file volume.cxx.

00082 {
00083     TYPE* end = src + size;
00084     TYPE m, M;
00085     bool st;
00086         
00087     m = ( TYPE )0;
00088     M = ( TYPE )0;
00089     for( st = true; src < end; src++, st = false ) {
00090                 
00091         if( *src < m || st ) m = *src;
00092         if( *src > M || st ) M = *src;
00093                 
00094     } // rof
00095         
00096     min = ( double )m;
00097     max = ( double )M;
00098 }


Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1