[Paraview] Question about programmable data source

David E DeMarle dave.demarle at kitware.com
Wed May 13 13:52:05 EDT 2015


You have to provide the whole extent in the request information pass.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Wed, May 13, 2015 at 1:19 PM, Wu, James <James.Wu at kla-tencor.com> wrote:

> I add a programmable data source using vtkImageData. The following is the
> script.
> There is nothing displayed after click "Apply". I am new user to paraview.
> Can any point me what's wrong with the script?
>
> Thanks,
> James
>
> dim = 10
> pdo = self.GetImageDataOutput()
> pdo.SetDimensions(dim, dim, dim)
> pdo.SetOrigin(0, 0, 0)
> pdo.SetSpacing(1, 1, 1)
> pdo.SetExtent(0, dim - 1, 0, dim - 1, 0, dim - 1)
> pdo.AllocateScalars(vtk.VTK_FLOAT, 1)
>
> for x in range(0, dim):
>     for y in range(0, dim):
>         for z in range(0, dim):
>             pdo.SetScalarComponentFromFloat(x, y, z, 0, 0.2)
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150513/d30de378/attachment.html>


More information about the ParaView mailing list