[vtkusers] adding libs (was vtkStreamer and vtkFunctionSet)

Jesse Neri neri at hobbes.nrl.navy.mil
Tue Jul 9 14:45:05 EDT 2002


Sorry to pick up this thread so late.  I have built an HDF4 reader
for VTK 4.0, reading a very specific HDF file format.  We are using HDF4
to write out full data dumps from a fluid code. We dump coordinates for
both the cell-centered and vertex-centered spatial grids, and all the
fluid variables. The code is also multi block, so the VTK program
has controls to select which block(s) are processed.  The HDF data
is loaded up as vtkFieldData, so we can pick and choose which variables
are displayed, and mapped to the correct coordinates. VtkFieldData is just
right for processing this data out to vtkStructuredGrid format.

The actual HDF read is pretty simple. The hard part is knowing the
structure of data in the file, and getting the correct mapping of
coordinates and data out the other end, and getting the correct result.
HDF (4 or 5) just assures you that the binary file is readable across
multiple platforms (we write on SGI, read on SGI and Windows). The internal
structure of the file is up to the programmer.

Executables only require that the HDF libraries be available, much like
Tk/Tcl.
Its when you want to compile new classes that it gets more complicated.
The NCSA site has good downloads available for Unix and Windows platforms,
again much like Tk/Tcl. So, HDF or netCDF could be added as an optional part
of
VTK. However, I think it unlikely that any kind of universal vtkHDFReader
class
is practical, due to the unlimited complexity of the internal structures of
the
HDF files.

For example, some HDF datasets are the full set of coordinates and data, in
each
enumerated set.  We write 2 sets of x-y-z coordinates for a block on data,
then
n-sets of data, with enough information to decipher which coordinates go
with which
set of data. Then we repeat for each block of data. All of the indexing
information
is included in the HDF file, but I have to know in advance where to look,
and
how to use it. A universal reader as part of VTK does seem impractical.
However,
example code for several variants of HDF files could be assembled, and then
the most appropriate example chosen the develop a particular class.

--
Jess Neri   neri at hobbes.nrl.navy.mil   (202) 404-4365
Pulsed Power Physics Branch, Plasma Physics Division
Naval Research Laboratory, Washington DC   20375



> -----Original Message-----
> From: vtkusers-admin at public.kitware.com
> [mailto:vtkusers-admin at public.kitware.com]On Behalf Of Randy Heiland
> Sent: Friday, June 21, 2002 10:51 AM
> To: Andy Cedilnik; Berk Geveci
> Cc: Luca Antiga; vtkusers
> Subject: Re: [vtkusers] adding libs (was vtkStreamer and
> vtkFunctionSet)
>
>
> I don't exactly follow these arguments.  Specifically, I
> don't see the issue
> with providing a CMake boolean for using HDF.  Just as, when
> we build VTK w/
> parallel w/ MPI, the user is responsible for
> building/providing the MPI lib,
> why can't the same be true for HDF (or whatever)?
>
> Surely Kitware doesn't verify that all flavors of MPI work on
> all platforms.
>
> --Randy
>
>
> On Jun 21, 10:25am, Andy Cedilnik wrote:
> > Subject: Re: [vtkusers] vtkStreamer and vtkFunctionSet
> > Also libraries such as HDF5 are problematic for several reasons. An
> > example is the way they do memory management. Purify always detect
> > memory leaks even though they are not actual leaks. Another major
> > drawback of including HDF5 and NetCDF is that every time we include
> > another library in VTK, somebody has to port it to CMake,
> make it work
> > on all platforms, maintain the compatibility with new
> versions, etc. The
> > CMake 1.4 will solve the problem of linking libraries to
> your projects,
> > but the libraries will have to be present for all projects even for
> > those who do not use HDF5 and NetCDF.
> >
> > 			Andy
> >
> > On Fri, 2002-06-21 at 08:27, Berk Geveci wrote:
> > > Oh, did I not mention that we are working on a new (XML
> based) file
> > > format ? :-) This doesn't mean that VTK shouldn't support HDF and
> > > netCDF. I believe it should. We have experimented with both and
> > > have some readers for specific versions of both. The main
> problem is
> > > that they are very general and require additional
> information describing
> > > which arrays correspond to geometry, which to data etc.
> Also, netCDF and
> > > HDF readers would require additional libraries since we don't want
> > > to distribute the libaries with VTK.
> >
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/vtkusers
> >-- End of excerpt from Andy Cedilnik
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list