[Paraview] Manipulating points.

Andrew Maclean andrew.amaclean at gmail.com
Sat Nov 22 17:43:14 EST 2008


Hey it works! Your instructions are great.

I set up a sphere and followed your instructions. The programmable
filter I used is this:

#pdi = self.GetPolyDataInput()
pd = vtk.vtkPolyData()
pd =  self.GetPolyDataOutput()
coord = pd.GetPoint(0) # (0,0,0.5)
x, y, z = coord[:3]
x = 0
y = 0
z = 0.7
#print x, y, z
pd.GetPoints().SetPoint(0, x, y, z)


I rarely use python so I am not very good at it.

The question I have is that with this current setup the point is
modified in both windows. Is it possible to just modify the point in
the output window?

As you can see I don't fully understand the input/output process of
the ProgrammableFilter.

Thanks for any help.

I have attached the .pvsm file as a zipped file.


Regards
  Andrew

On Sat, Nov 22, 2008 at 1:47 AM, David E DeMarle
<dave.demarle at kitware.com> wrote:
> On Fri, Nov 21, 2008 at 5:20 AM, Andrew Maclean
> <andrew.amaclean at gmail.com> wrote:
>> Is it possible to select a single point, change its 3D coordinates and
>> re-render it?
>> We are building 3D maps by hand and sometimes the coordinates of
>> points go awry so we need to adjust them.
>>
>> What I am hoping to do is to convert our files to vtp files, feed them
>> into ParaView and then hand edit any points that are wrong. The point
>> here is that ParaView is really good at visualisation so any errors
>> are readily apparent.
>>
>> Thanks for any information,
>> Andrew
>> --
>> ___________________________________________
>> Andrew J. P. Maclean
>> Centre for Autonomous Systems
>> The Rose Street Building J04
>> The University of Sydney  2006  NSW
>> AUSTRALIA
>> Ph: +61 2 9351 3283
>> Fax: +61 2 9351 7474
>> URL: http://www.acfr.usyd.edu.au/
>> ___________________________________________
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>
> Not automatically. You could do it with a lot of effort via selection
> and the programmable filter and the spreadsheet view.
>
> The process would be:
>
> Split the view top to bottom and make a spreadsheet view. Show the
> data's selected point values in the spreadsheet view.
>
> Insert a programmable filter, make it shallow copy through the point
> and cell associated attribute data.
>
> Split the 3D view again, now right to left, and make the original data
> visible in one view and the filter's output in the other. Link the
> cameras.
>
> Select a vertex in the original. It's index and coordinates will be
> shown in the spreadsheet view.
>
> At a line to the end of the python filters program and change that
> particular point's coordinates in the output data.
>
> Repeat the last two steps, adding to the program each time.
>
> --
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 28 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-371-3971 x109
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>



-- 
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney  2006  NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.acfr.usyd.edu.au/
___________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HowTo.zip
Type: application/zip
Size: 8420 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20081123/288bbded/attachment.zip>


More information about the ParaView mailing list