[Paraview] filled boxes / particles while doing a clip through the data
Scott, W Alan
wascott at sandia.gov
Mon Apr 26 15:14:37 EDT 2010
Karl,
I took a quick look, and tried to load your data (as listed below) as a .vtu file. I didn't load into paraview 3.6.2, and I noticed the following:
* You need a starting line that is as follows: <?xml version="1.0"?>
* You are creating lots of points, with data, but unstructured grids need some type of connectivity. Notice that I am using type 10, VTK_TETRA in the example below.
Here is a little test file that I have thrown together. Notice the <Cells> section.
<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
<UnstructuredGrid>
<Piece NumberOfPoints="10" NumberOfCells="8">
<CellData>
<DataArray type="Float32" Name="temperature" format="ascii">
1 3 5 7 9 1 2 1
</DataArray>
<DataArray type="Float32" Name="pressure" format="ascii">
2 4 6 8 10 12 14 16
</DataArray>
</CellData>
<Points>
<DataArray type="Float32" NumberOfComponents="3" format="ascii">
0 0 1 -1 -1 0
1 -1 0 1 1 0
-1 1 0 0 -1 0
1 0 0 0 1 0
-1 0 0 0 0 0
</DataArray>
</Points>
<Cells>
<DataArray type="Int32" Name="connectivity" format="ascii">
1 5 0 8
5 2 6 0
0 6 3 7
0 7 4 8
0 9 5 6
0 9 6 7
0 9 7 8
0 9 8 5
</DataArray>
<DataArray type="Int32" Name="offsets" format="ascii">
4 8 12 16 20 24 28 32
</DataArray>
<DataArray type="UInt8" Name="types" format="ascii">
10 10 10 10 10 10 10 10
</DataArray>
</Cells>
</Piece>
</UnstructuredGrid>
</VTKFile>
From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] On Behalf Of Karl Raiber
Sent: Monday, April 26, 2010 11:41 AM
To: paraview at paraview.org
Subject: [Paraview] filled boxes / particles while doing a clip through the data
Hi,
at the moment I'm doing my master thesis and I'm fighting with the following problem: I'd like to visualize a set of voxels (coordinates x,y,z and one material property of the voxel, which can be chosen, are given). In the following there's an small example of the data I'd like to import in PV:
x y z material
0 0 0 1
0 1 0 0
0 1 1 2
1 0 0 1
1 1 1 3
1 2 3 0
For the first try I chose an VTK unstructured grid file; it has been imported in PV as "VTK unstructured grid". In the following I created a glyph with boxes. That works fine, but afterwards I tried to do a clip and the major problem came up: within the clip the boxes are empty - only the walls of the boxes are displayed. It's mandatory that the boxes are filled.
I also tried another solution: import of the VTK-file as a VTK particle file, the glyph function works also fine and the clip function produces filled (I suppose so...hard to say) boxes, but the information / material property is lost. I appended the VTK-file at the end.
It will be perfect if someone might help me and knows a solution to get solid/filled boxes including the scalar material property. Is this an issue of the VTK-file? In case of - where's my mistake or what should I change? The export format of my data is quite flexible...
Thanks a lot in advance for hints, have a nice evening,
Karl
% ==================== EXAMPLE VTK-File =========================
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian">
<UnstructuredGrid>
<Piece NumberOfPoints="10" NumberOfCells="0">
<Points>
<DataArray name="Position" type="Float32" NumberOfComponents="3"
format="ascii">
0 0 0
1 1 1
0 0 1
1 0 1
0 1 1
0 0 1
1 1 2
1 2 1
1 2 2
2 2 2
</DataArray>
</Points>
<PointData Vectors="vector">
<DataArray type="Float32" Name="Structure" format="ascii">
0
1
2
3
1
2
2
3
0
0
</DataArray>
</PointData>
<Cells>
<DataArray type="UInt8" Name="types" format="ascii">
</DataArray>
</Cells>
</Piece>
</UnstructuredGrid>
</VTKFile>
%==============================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100426/dadbf493/attachment-0001.htm>
More information about the ParaView
mailing list