[vtkusers] NetCDF

David Gobbi dgobbi at irus.rri.on.ca
Tue Jun 13 19:21:17 EDT 2000


Hi Arindam,

If you want to read the NetCDF data in as an image, then 
vtkImageImport is probably the best way to go.  

You first use the NetCDF library to read the data into a C array,
and then use vtkImageImport to feed the data into the VTK pipeline.
If the data contains something other than an image you can do
the same thing, but I'm not familiar with the methods.  Take a
look at vtk/imaging/examplesCxx/ImportExport.cxx

In our lab we use the NetCDF extension to python, read a NetCDF
variable into a Python array, and then pass the array to VTK
using vtkImageImport.  Something very similar can be done with
C++, I'm not sure about tcl.

If anyone has developed a proper vtkNetCDFImageReader for VTK,
I'd also love to hear about it.

 - David

On Tue, 13 Jun 2000, Arindam Bhattacharya wrote:

> Hello everybody,
>                   Is there any available code or sample model to read in
> NetCDF data  in vtk
> 
> regards
> Arindam





More information about the vtkusers mailing list