• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Common/vtkArrayInterpolate.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkArrayInterpolate.h,v $
00005   
00006 -------------------------------------------------------------------------
00007   Copyright 2008 Sandia Corporation.
00008   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00009   the U.S. Government retains certain rights in this software.
00010 -------------------------------------------------------------------------
00011 
00012   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00013   All rights reserved.
00014   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00015 
00016      This software is distributed WITHOUT ANY WARRANTY; without even
00017      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00018      PURPOSE.  See the above copyright notice for more information.
00019 
00020 =========================================================================*/
00021 
00022 #ifndef __vtkArrayInterpolate_h
00023 #define __vtkArrayInterpolate_h
00024 
00025 #include "vtkTypedArray.h"
00026 
00027 class vtkArraySlice;
00028 class vtkArraySlices;
00029 class vtkArrayWeights;
00030 
00031 // .SECTION Thanks
00032 // Developed by Timothy M. Shead (tshead@sandia.gov) at Sandia National Laboratories.
00033 
00034 // Description:
00035 // Computes the weighted sum of a collection of slices from a source
00036 // array, and stores the results in a slice of a target array.  Note that
00037 // the number of source slices and weights must match, and the extents of
00038 // each source slice must match the extents of the target slice.
00039 //
00040 // Note: The implementation assumes that operator*(T, double) is defined,
00041 // and that there is an implicit conversion from its result back to T.
00042 // 
00043 // If you need to interpolate arrays of T other than double, you will
00044 // likely want to create your own specialization of this function.
00045 //
00046 // The implementation should produce correct results for dense and sparse
00047 // arrays, but may perform poorly on sparse.
00048 
00049 template<typename T>
00050 void vtkInterpolate(
00051   vtkTypedArray<T>* source_array,
00052   const vtkArraySlices& source_slices,
00053   const vtkArrayWeights& source_weights,
00054   const vtkArraySlice& target_slice,
00055   vtkTypedArray<T>* target_array);
00056 
00057 #include "vtkArrayInterpolate.txx"
00058 
00059 #endif
00060 

Generated by  doxygen 1.7.1