[Paraview] mapping scalars onto surface geometry

Moreland, Kenneth kmorel at sandia.gov
Mon Feb 8 17:41:20 EST 2016


Giles,

"Image Data" is simply what VTK calls a structured grid with axis aligned points with uniform spacing between them. It is a restrictive data format, but if your data fits then it is a compact representation because you don't have to explicitly specify cell connections or point locations. I've attached an excerpt from the ParaView Tutorial that lists the data types including both image data and unstructured grids.

Legacy VTK files (those with a .vtk extension) can represent either unstructured grid data or image data. I've also attached an example vtk file containing image data. Complete documentation of the vtk file format can be found in this document: http://www.vtk.org/VTK/img/file-formats.pdf.

-Ken

From: Richardson CFD <garcfd at gmail.com<mailto:garcfd at gmail.com>>
Date: Sunday, February 7, 2016 at 3:15 AM
To: Kenneth Moreland <kmorel at sandia.gov<mailto:kmorel at sandia.gov>>
Cc: "paraview at paraview.org<mailto:paraview at paraview.org>" <paraview at paraview.org<mailto:paraview at paraview.org>>
Subject: [EXTERNAL] Re: mapping scalars onto surface geometry

Kenneth, wonderful - that's done the trick (see attached).
A quick and simple solution!

Whats the difference between an image file (and the unstructured data file that I have created)?

Thanks very much, Giles.

On Sun, Feb 7, 2016 at 6:31 AM, Moreland, Kenneth <kmorel at sandia.gov<mailto:kmorel at sandia.gov>> wrote:
Giles,

I think I've figured out your problem. The scalars data you sent me is an unstructured grid with "voxel"-type cells. One of my least favorite features of VTK is that there is a distinction between a box in an unstructured grid (called a hexahedra) and a box in a data set with structured grid (called a voxel). These two cells are essentially the same shape, but the order of the points is different.

The reason why I dislike this feature is that it is technically allowable to put voxel cells in an unstructured grid. However, this fouls up lots of filters that don't check for this corner case. Apparently the probe filter, which is the underlying filter for resample with dataset, is one of the filters broken for voxels. (Unless there is something else about this dataset that I am missing.) I submitted a bug about this (http://www.paraview.org/Bug/view.php?id=15982).

The most expedient way around this problem is to run the tetrahedralize filter on the scalars. That will convert the voxels to tetrahedra correctly, and the probe filter has no problem on that data type. The interpolation will be slightly different but close. Overall a better solution is to save your data as image data rather than convert it to an unstructured grid. The file will be smaller and the interpolation should happen correctly.

-Ken

From: Richardson CFD <garcfd at gmail.com<mailto:garcfd at gmail.com>>
Date: Saturday, February 6, 2016 at 5:54 AM
To: "paraview at paraview.org<mailto:paraview at paraview.org>" <paraview at paraview.org<mailto:paraview at paraview.org>>, Kenneth Moreland <kmorel at sandia.gov<mailto:kmorel at sandia.gov>>
Subject: [EXTERNAL] mapping scalars onto surface geometry

Kenneth,

I have made two files here available for download (sphere.stl and scalars.vtk).

https://drive.google.com/file/d/0B4bNbYR3XwvQVlBZNlVBX0RXSkU/view?usp=sharing

https://drive.google.com/file/d/0B4bNbYR3XwvQTkJxRDhLb0MxZGc/view?usp=sharing

I hope you can give these a try using "Resample with Dataset" to see what the problem is.

Regards Giles.
[https://ipmcdn.avast.com/images/logo-avast-v1.png]<https://www.avast.com/sig-email>    This email has been sent from a virus-free computer protected by Avast.
www.avast.com<https://www.avast.com/sig-email>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160208/88bc128e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VTKGridTypes.pdf
Type: application/pdf
Size: 1467779 bytes
Desc: VTKGridTypes.pdf
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160208/88bc128e/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExampleImageData.vtk
Type: application/octet-stream
Size: 74255 bytes
Desc: ExampleImageData.vtk
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160208/88bc128e/attachment-0001.obj>


More information about the ParaView mailing list