[vtkusers] Multi-Input and Math on Data
Charl P. Botha
cpbotha at gmail.com
Thu Aug 26 18:02:51 EDT 2004
On Thu, 26 Aug 2004 17:38:17 -0400, Stewart Dickson <dicksonsp at ornl.gov> wrote:
> I wish to visualize a derived 480x480x480 scalar data field:
> entropy = pressure / density ^ 1.33333
>
> I have the vtkNetCDFHDFReader library which is distributed with ASPECT
> <http://www.aspect-sdm.org> Therefore, I can read the data files into Vtk.
>
> Is there a library in Vtk to allow one to do exponentiation and division
> on the output of two vtkNetCDFHDFReaders?
I'm assuming the vtkNetCDFHDFReaders output vtkImageData types. In
that case, you can use vtkImageMathematics[1] to perform the division,
but raising to a power is currently not directly supported (unless I'm
overlooking something). The right way would be be to adapt the
vtkImageMathematics class to support this - this would be
straight-forward modification. A kludge would be to decompose your
exponentiation into exp and log, both operations that are supported by
vtkImageMathematics.
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
More information about the vtkusers
mailing list