[Paraview] custom xml for vtkContourFilter
Axel Steuwer
steuwer at ill . fr
Thu, 30 Oct 2003 12:46:58 +0100 (CET)
Hi,
in the same context, is there any way that the vtkProgrammableSource
of /Examples/Modelling/Python/reconstructSurface.py
can be wrapped/used in paraview? In particular,
the very handy snippet for reading xyz data.
# Read some points. Use a programmable filter to read them.
pointSource = vtk.vtkProgrammableSource()
def readPoints():
output = pointSource.GetPolyDataOutput()
points = vtk.vtkPoints()
output.SetPoints(points)
file = open(os.path.normpath(os.path.join(VTK_DATA_ROOT,
"Data/cactus.3337.pts")))
line = file.readline()
while line:
data = string.split(line)
if data and data[0] == 'p':
x, y, z = float(data[1]), float(data[2]), float(data[3])
points.InsertNextPoint(x, y, z)
line = file.readline()
pointSource.SetExecuteMethod(readPoints)
This would be a handy input filter for ascii data points?
Axel
> There is a special widget for setting contour values. It is
> called ContourEntry. Here is how it is used in the default
> contour module:
>
> <ContourEntry label="Contour Values" trace_name="Contour Values"
> help="List of current contour values. "/>
>
> (1.0.3 release, this changed slightly in the development version)
> The VectorEntry widget requires having a Set/Get pair and SetXXX
> has to to take only one argument.
>
> -Berk
>
> On Wed, 2003-10-29 at 09:07, Axel Steuwer wrote:
>> Hi,
>>
>> when writing the definition of a custom vtk filter in XML
>> for single int or float I use for example
>>
>> <VectorEntry variable="NeighborhoodSize"
>> trace_name="NeighborhoodSize"
>> type="float" help="NeighborhoodSize" default_value="10" data_range="0
>> 40.0"/>
>>
>> for the vtkSurfaceReconstructionFilter.
>>
>> However, if I want to follow this up with the vtkContourFilter as in
>> Examples/Modelling/Python/surfaceReconstruction.py to see
>> the surface using SetValue(0, 0.), what do I have to write in the XML
>> to set the values of "void SetValue (int i, float value)"
>> Is it a mix of types?
>>
>> Axel
>>
>>
>>
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview . org
>> http://www . paraview . org/mailman/listinfo/paraview
>
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview . org
> http://www . paraview . org/mailman/listinfo/paraview