[Paraview] Paraview Programmable Source 3D Text

Cory Quammen cory.quammen at kitware.com
Mon Jan 5 08:57:01 EST 2015


Hi Roman,

A representation plugin could probably do this. It would just need to
set its internal actor to an instance of vtkFollower and set the
camera from the view's renderer, which could be set by overriding the
AddToView(vtkView* view) method in your custom representation.

I hope that helps,
Cory

On Mon, Jan 5, 2015 at 8:24 AM, Dr. Roman Grothausmann
<grothausmann.roman at mh-hannover.de> wrote:
> Dear Utkarsh,
>
>
> Needing the same thing as Willi, I've created a paraview plugin written in
> C++ doing basically the same as Your script. Would it be possible to achieve
> something like vtkFollower does from within a c++ PV plugin such that the
> text always faces the camera? An other idea would be to use Python in the
> animation view to rotate the text as the camera orbits. This would be a
> workaround only for animations, which would suffice for me. Do You thing
> that should be possible if nothing else works?
>
> Many thanks for looking into this.
> Roman
>
> On 26/09/13 19:52, Utkarsh Ayachit wrote:
>>
>> Alas, that's not easy to do, if at all possible, with Python source.
>>
>>
>> On Thu, Sep 26, 2013 at 5:48 AM, Willi Karel <wk at ipf.tuwien.ac.at
>> <mailto:wk at ipf.tuwien.ac.at>> wrote:
>>
>>     Dear Utkarsh,
>>
>>     would it be possible to synchronize the transform of the rendered
>> texts
>>     to the transform of the camera, such that the planes in which the
>> texts
>>     lie stay normal to the viewing direction?
>>     I'm aware of vtkFollower, but I'm not sure if it is applicable / how
>> to
>>     make use of it in the context of ParaView / Programmable Source, as it
>>     derives from vtkActor.
>>
>>     Many thanks!
>>     Willi.
>>
>>     On 25.09.2013 22 <tel:25.09.2013%2022>:50, Willi Karel wrote:
>>      > Dear Utkarsh,
>>      > that works nice, thanks a lot!
>>      > Willi.
>>      >
>>      > On 25.09.2013 15 <tel:25.09.2013%2015>:25, Utkarsh Ayachit wrote:
>>      >> Willi,
>>      >>
>>      >> You can still use the programmable source for 3D text. With
>>      >> "vtkPolyData" as the chosen Output DataSet Type, you can use the
>>      >> attached script as the "Script".
>>      >>
>>      >>
>>      >>
>>      >>
>>      >>
>>      >>
>>      >>
>>      >>
>>      >>
>>      >> On Wed, Sep 25, 2013 at 6:11 AM, Willi Karel <wk at ipf.tuwien.ac.at
>>     <mailto:wk at ipf.tuwien.ac.at>
>>      >> <mailto:wk at ipf.tuwien.ac.at <mailto:wk at ipf.tuwien.ac.at>>> wrote:
>>      >>
>>      >>     I'd like to insert various text strings programmatically into
>> the scene
>>      >>     at various 3D locations in world coordinates. To me, (Python)
>>      >>     "Programmable Source" seems to be the appropriate tool for
>> that purpose
>>      >>     (which I successfully use to insert geometries into the
>> scene). Is that
>>      >>     possible using "Programmable Source"? Otherwise, is there any
>> other
>>      >>     method to do so?
>>      >>
>>      >>     I am aware of Sources -> 3D Text,
>>      >>     but that means a lot of manual, repetitive work.
>>      >>
>>      >>     Many thanks!
>>      >>     Willi.
>>      >>     --
>>      >>                             _____ _____ _____  Technische
>> Universität Wien
>>      >>        DI Wilfried Karel   /____// ___//    / Dept. of Geodesy &
>> Geoinform.
>>      >>       wilfried.karel@     // __ / /__ / // / Research Groups
>> Photogrammetry
>>      >> geo.tuwien.ac.at <http://geo.tuwien.ac.at>
>> <http://geo.tuwien.ac.at>
>>       //__/// /__ / // /
>>      >>     & Remote Sensing
>>      >> +43 1 58801 12244 <tel:%2B43%201%2058801%2012244>
>>     <tel:%2B43%201%2058801%2012244>
>>      >>      /____//____//____/ Gusshausstr. 27-29, A-1040 Wien
>>      >>     _______________________________________________
>>      >>     Powered by www.kitware.com <http://www.kitware.com>
>>     <http://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
>>      >>
>>      >>     Follow this link to subscribe/unsubscribe:
>>      >> http://www.paraview.org/mailman/listinfo/paraview
>>      >>
>>      >>
>>      >
>>
>>     --
>>                              _____ _____ _____  Technische Universität
>> Wien
>>         DI Wilfried Karel   /____// ___//    / Dept. of Geodesy &
>> Geoinform.
>>        wilfried.karel@     // __ / /__ / // / Research Groups
>> Photogrammetry
>>     geo.tuwien.ac.at <http://geo.tuwien.ac.at>    //__/// /__ / // /   &
>> Remote
>>     Sensing
>>     +43 1 58801 12244 <tel:%2B43%201%2058801%2012244>   /____//____//____/
>>     Gusshausstr. 27-29, A-1040 Wien
>>
>>
>>
>>
>> _______________________________________________
>> 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
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>
> --
> Dr. Roman Grothausmann
>
> Tomographie und Digitale Bildverarbeitung
> Tomography and Digital Image Analysis
>
> Institut für Funktionelle und Angewandte Anatomie, OE 4120
> Medizinische Hochschule Hannover
> Carl-Neuberg-Str. 1
> D-30625 Hannover
>
> Tel. +49 511 532-9574
> _______________________________________________
> 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



-- 
Cory Quammen
R&D Engineer
Kitware, Inc.


More information about the ParaView mailing list