[Paraview] Specifying a NULL scalar array in custom filter

John Biddiscombe biddisco at cscs.ch
Thu Nov 27 04:20:13 EST 2008


Utkarsh
> One way would be to write a domain which is a array list domain 
> subclass that provides the "array" NONE as an option.
Thanks. I subclassed vtkSMArrayListDomain and made 
vtkSMArrayListNoneDomain. I only needed to add one line to set the 
"None" String. However, I decided this was a waste of a class and didn't 
let me customize the string, so I wanted to try adding an atttribute to 
ArrayListDomain so we could just re-use the existing class with an extra 
tag.

I have added "none_string" as an attribute and it can be used like this

        <ArrayListDomain name="array_list"
                         attribute_type="Scalars"
                         none_string="No Total Pressure Array"
                         input_domain_name="tp_array">
          <RequiredProperties>
            <Property name="Input" function="Input"/>
          </RequiredProperties>
        </ArrayListDomain>

So now the array selection pops up and there is an additional entry 
which is "No Total Pressure Array" in this case. This string is passed 
to the filter, and since the array does not exist in the Point/Cell 
Field data, the filter ignores it.

Shall I commit this to CVS ?

JB



More information about the ParaView mailing list