[Paraview] Filtering Triangle Data based on single value of 2 component vector

Michael Jackson mike.jackson at bluequartz.net
Tue Mar 19 09:37:33 EDT 2013


Just to follow up I figured out how to do this with Xdmf:


    <Attribute Name="Label 0" AttributeType="Scalar" Center="Cell">
        <DataItem ItemType="HyperSlab" Dimensions="23403757 1" Type="HyperSlab" Name="Zero">
          <DataItem Dimensions="3 2" Format="XML"> 0 0 1 1 23403757 1 </DataItem>

          <DataItem Format="HDF" Dimensions="23403757 2" NumberType="Int" Precision="4" >
                test.dream3d:/SurfaceMeshDataContainer/FACE_DATA/SurfaceMeshTriangleLabels
          </DataItem>
        </DataItem>
    </Attribute>
    
    <Attribute Name="Label 1" AttributeType="Scalar" Center="Cell">
        <DataItem ItemType="HyperSlab" Dimensions="23403757 1" Type="HyperSlab" Name="One">
          <DataItem Dimensions="3 2" Format="XML"> 0 1 1 1 23403757 1 </DataItem>

          <DataItem Format="HDF" Dimensions="23403757 2" NumberType="Int" Precision="4" >
                test.dream3d:/SurfaceMeshDataContainer/FACE_DATA/SurfaceMeshTriangleLabels
          </DataItem>
        </DataItem>
    </Attribute>

The original array is a (23403757 x 2) (rows x cols) array. Using the above Hyperslab attributes I can get a pair of arrays. Then in ParaView I can run 2 "Threshold" filters on the value that I want and then Append the resulting data sets together. This gives the visualization that I am looking for.

Hope it helps someone. 
___________________________________________________________
Mike Jackson                    Principal Software Engineer
BlueQuartz Software                            Dayton, Ohio
mike.jackson at bluequartz.net              www.bluequartz.net

On Mar 16, 2013, at 4:31 PM, Michael Jackson wrote:

> We are generating a mesh where each Triangle has a pair of "Grain Id" values associated with it. We store the values as a 2 component vector (which Xdmf doesn't seem to like). The idea being that we want to be able to extract out all triangles where EITHER one of the 2 values match an input value.
> 
> Is something like this even possible with ParaView's built in filters? What happens if I write out a 3 component vector (a dummy value in the 3rd slot)? Does that make it possible?
> 
> What if I split up the 2 Component vector into a Pair of Arrays? I guess at that point I would just run the same threshold 2, once on each array then merge the results? 
> 
> Ideas or thoughts are much appreciated.
> 
> Thanks.
> ___________________________________________________________
> Mike Jackson                    Principal Software Engineer
> BlueQuartz Software                            Dayton, Ohio
> mike.jackson at bluequartz.net              www.bluequartz.net
> 



More information about the ParaView mailing list