Category: VTK

ZFP Added to VTK

Just trying to keep a log here.  I added the zfp .5 to VTK 7 to allow lossy compression to 3D datasets.  It works, but you do have to specify the extent of the data to the compressor separately.  I may be able to avoid this in the future, but this is what you get …

Continue reading


Last week I was asked to figure out how to embed 3D objects into PDF.  This seemed like it would be simple once I figured out which tools to use.  This is partially true, however Adobe decided to use U3D format for its internal 3D viewer, which seems less than universal in my opinion.  The …

Continue reading

Python and VTK to get Vorticity

After a few days of understanding the VTK pipeline, I’ve finally figured out how to generate a vorticity cube from velocity cutout from the JHU Turbuelence database.  So here is the code! h5file = h5py.File(“temp.h5”, ‘r’) vtkdata = numpy_support.numpy_to_vtk(h5file[“u00000”][:,:,:,:].ravel(), deep=True, array_type=vtk.VTK_FLOAT) vtkdata.SetNumberOfComponents(3) #We have an x,y,z vector so reform it accordingly vtkdata.SetName(“Velocity”) image = vtk.vtkImageData() …

Continue reading