Downsample and crop hdf5 volumes and save as vti format

Download the example vistrail : bullet-viz.vt

Screenshot:

_images/module_netcdfreader.png

Purpose of Workflow

  1. This workflow read specified dataset/variable in a hdf5 file use the “vtkNetCDFReader” module. Use a python-source module, you can write some simpe code to print out detailed information and do some test.
  2. The ‘vtkImageShiftScale’ module to cast the scalar type( e.g. from double to float), scale and shift the data values ( important if you cast from float to byte).
  3. The ‘vtkImageResample’ module allows you to interpolate the data to different axis spacing/extent with cubic, linear, or nearest neighbor algorithm.
  4. The ‘vtkExtractVOI’ module also can do simple subsampling, and sub-volume selection.
  5. The ‘vtkStructurePointsWriter’ module writes the output variable into a vtk structured point data object (usually use the file extension .vtk). The other way is to use ‘vtkXMLImageDataWriter’ module to write to vtk image data format (.vti)
  6. To test the new dataset, the following workflow read the new vtk( or vti, depends on which module used to write the file) file, and visualize the dataset use pseudocolor and isosurface plots.

Important modules and port setup

  1. ‘vtkNetCDFReader’ module: filename, variable array status
  2. ‘vtkImageShiftScale’ module: output scalar type, shift, scale
  3. ‘vtkImageResample’ module: Interpolation mode, AxisMagnificationFactor
  4. ‘vtkExtractVOI’ module: sample rate, VOI
  5. ‘vtkStructuredPointsWriter’ module: filename, filetype, scalar name, write
  6. ‘vtkXMLImageDataWriter’ module: filename, filetype, write
  7. ‘vtkStruecturedPointsReader’ module: filename, scalar name